| 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/1✓ Branch 2 taken 14 times.
|
14 | const ResetReason resetReason = SystemInfoHardware::SystemInfoHal::getResetReason(); |
| 28 | |||
| 29 |
1/1✓ Branch 5 taken 14 times.
|
14 | this->log_ACTIVITY_HI_SystemInfo(resetReason, SystemInfoVersion::PROJECT_COMMIT, SystemInfoVersion::FPRIME_COMMIT, |
| 30 | SystemInfoVersion::SAMD_COMMIT); | ||
| 31 | |||
| 32 |
2/2✓ Branch 6 taken 14 times.
✓ Branch 9 taken 14 times.
|
14 | this->tlmWrite_ResetCause(resetReason); |
| 33 |
2/2✓ Branch 6 taken 14 times.
✓ Branch 9 taken 14 times.
|
14 | this->tlmWrite_ProjectCommit(SystemInfoVersion::PROJECT_COMMIT); |
| 34 |
2/2✓ Branch 6 taken 14 times.
✓ Branch 9 taken 14 times.
|
14 | this->tlmWrite_FprimeCommit(SystemInfoVersion::FPRIME_COMMIT); |
| 35 |
2/2✓ Branch 6 taken 14 times.
✓ Branch 9 taken 14 times.
|
14 | this->tlmWrite_SamdCommit(SystemInfoVersion::SAMD_COMMIT); |
| 36 | 28 | } | |
| 37 | |||
| 38 | } // namespace Samd21 | ||
| 39 |