GCC Code Coverage Report


Directory: lib/fprime-samd/fprime-samd/
File: Drv/SystemInfo/SystemInfo.cpp
Date: 2026-10-20 16:44:20
Exec Total Coverage
Lines: 10 10 100.0%
Functions: 3 3 100.0%
Branches: 10 20 50.0%

Line Branch Exec Source
1 // ======================================================================
2 // \title SystemInfo.cpp
3 // \author tumbar
4 // \brief cpp file for SystemInfo component implementation class
5 // ======================================================================
6
7 #include "fprime-samd/Drv/SystemInfo/SystemInfo.hpp"
8 #include "fprime-samd/Drv/SystemInfo/SystemInfoHardware.hpp"
9 #include "fprime-samd/Drv/SystemInfo/SystemInfoVersion.hpp"
10 #include "fprime-samd/Drv/Types/ResetReasonEnumAc.hpp"
11
12 namespace Samd21 {
13
14 // ----------------------------------------------------------------------
15 // Component construction and destruction
16 // ----------------------------------------------------------------------
17
18 4 SystemInfo::SystemInfo(const char* const compName) : SystemInfoComponentBase(compName) {}
19
20 8 SystemInfo::~SystemInfo() {}
21
22 // ----------------------------------------------------------------------
23 // Handler implementations for commands
24 // ----------------------------------------------------------------------
25
26 14 void SystemInfo::emit() {
27
1/2
✓ Branch 2 taken 14 times.
✗ Branch 3 not taken.
14 const ResetReason resetReason = SystemInfoHardware::SystemInfoHal::getResetReason();
28
29
1/2
✓ Branch 5 taken 14 times.
✗ Branch 6 not taken.
14 this->log_ACTIVITY_HI_SystemInfo(resetReason, SystemInfoVersion::PROJECT_COMMIT, SystemInfoVersion::FPRIME_COMMIT,
30 SystemInfoVersion::SAMD_COMMIT);
31
32
2/4
✓ Branch 6 taken 14 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 14 times.
✗ Branch 10 not taken.
14 this->tlmWrite_ResetCause(resetReason);
33
2/4
✓ Branch 6 taken 14 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 14 times.
✗ Branch 10 not taken.
14 this->tlmWrite_ProjectCommit(SystemInfoVersion::PROJECT_COMMIT);
34
2/4
✓ Branch 6 taken 14 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 14 times.
✗ Branch 10 not taken.
14 this->tlmWrite_FprimeCommit(SystemInfoVersion::FPRIME_COMMIT);
35
2/4
✓ Branch 6 taken 14 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 14 times.
✗ Branch 10 not taken.
14 this->tlmWrite_SamdCommit(SystemInfoVersion::SAMD_COMMIT);
36 28 }
37
38 } // namespace Samd21
39