GCC Code Coverage Report


Directory: ./
File: Fw/Comp/PassiveComponentBase.cpp
Date: 2026-09-23 21:11:01
Exec Total Coverage
Lines: 11 25 44.0%
Functions: 6 9 66.7%
Branches: 0 5 0.0%

Line Branch Exec Source
1 #include <Fw/Comp/PassiveComponentBase.hpp>
2 #include <Fw/FPrimeBasicTypes.hpp>
3 #include <Fw/Types/Assert.hpp>
4
5 #include <Fw/Types/ExternalString.hpp>
6
7 namespace Fw {
8
9 3719 PassiveComponentBase::PassiveComponentBase(const char* name) : Fw::ObjBase(name), m_idBase(0), m_instance(0) {}
10
11 #if FW_OBJECT_TO_STRING == 1
12 ✗ const char* PassiveComponentBase::getToStringFormatString() {
13 ✗ return "Comp: %s";
14 }
15
16 ✗ void PassiveComponentBase::toString(char* buffer, FwSizeType size) {
17 ✗ FW_ASSERT(size > 0);
18 ✗ FW_ASSERT(buffer != nullptr);
19 ✗ Fw::FormatStatus status = Fw::ExternalString(buffer, static_cast<Fw::ExternalString::SizeType>(size))
20 ✗ .format(this->getToStringFormatString(),
21 #if FW_OBJECT_NAMES == 1
22 ✗ this->m_objName.toChar()
23 #else
24 "UNKNOWN"
25 #endif
26 );
27 ✗ if (status != Fw::FormatStatus::SUCCESS) {
28 ✗ buffer[0] = 0;
29 }
30 ✗ }
31 #endif
32
33 7438 PassiveComponentBase::~PassiveComponentBase() {}
34
35 28 void PassiveComponentBase::deinit() {}
36
37 3718 void PassiveComponentBase::init(FwEnumStoreType instance) {
38 3718 ObjBase::init();
39 3718 this->m_instance = instance;
40 3718 }
41
42 1698 FwEnumStoreType PassiveComponentBase::getInstance() const {
43 1698 return this->m_instance;
44 }
45
46 ✗ void PassiveComponentBase ::setIdBase(const FwIdType idBase) {
47 ✗ this->m_idBase = idBase;
48 ✗ }
49
50 1140906 FwIdType PassiveComponentBase ::getIdBase() const {
51 1140906 return this->m_idBase;
52 }
53
54 } // namespace Fw
55