GCC Code Coverage Report


Directory: ./
File: InputSerializePort.cpp
Date: 2026-09-03 22:13:03
Exec Total Coverage
Lines: 0 18 0.0%
Functions: 0 6 0.0%
Branches: 0 0 -%

Line Branch Exec Source
1 #include <Fw/Port/InputSerializePort.hpp>
2 #include <Fw/Types/Assert.hpp>
3 #include <cstdio>
4
5 #if FW_PORT_SERIALIZATION == 1
6
7 namespace Fw {
8
9 // SerializePort has no call interface. It is to pass through serialized data
10 InputSerializePort::InputSerializePort() : InputPortBase(), m_func(nullptr) {}
11 InputSerializePort::~InputSerializePort() {}
12
13 void InputSerializePort::init() {
14 InputPortBase::init();
15 }
16
17 SerializeStatus InputSerializePort::invokeSerial(LinearBufferBase& buffer) {
18 FW_ASSERT(this->m_comp != nullptr);
19 FW_ASSERT(this->m_func != nullptr);
20
21 this->m_func(this->m_comp, this->m_portNum, buffer);
22
23 // The normal input ports perform deserialize() on the passed buffer,
24 // which is what this status is based on. This is not the case for the
25 // InputSerializePort, so just return an okay status
26 return FW_SERIALIZE_OK;
27 }
28
29 void InputSerializePort::addCallComp(Fw::PassiveComponentBase* callComp, CompFuncPtr funcPtr) {
30 FW_ASSERT(callComp != nullptr);
31 FW_ASSERT(funcPtr != nullptr);
32 this->m_comp = callComp;
33 this->m_func = funcPtr;
34 }
35
36 #if FW_OBJECT_TO_STRING == 1
37 const char* InputSerializePort::getToStringFormatString() {
38 return "Input Serial Port: %s %s->(%s)";
39 }
40 #endif
41
42 } // namespace Fw
43 #endif
44