F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
OutputPortBase.cpp
Go to the documentation of this file.
3 #include <Fw/Types/Assert.hpp>
4 #include <Os/Console.hpp>
5 #include <cstdio>
6 
7 namespace Fw {
8 
10  : PortBase()
11 #if FW_PORT_SERIALIZATION == 1
12  ,
13  m_serPort(nullptr)
14 #endif
15 {
16 }
17 
19 
22 }
23 #if FW_PORT_SERIALIZATION == 1
24 void OutputPortBase::registerSerialPort(InputPortBase* port) {
25  FW_ASSERT(port);
26  this->m_connObj = port;
27  this->m_serPort = port;
28 }
29 
30 SerializeStatus OutputPortBase::invokeSerial(SerializeBufferBase& buffer) {
31  FW_ASSERT(this->m_serPort);
32  return this->m_serPort->invokeSerial(buffer);
33 }
34 #endif
35 
36 #if FW_OBJECT_TO_STRING == 1
37 const char* OutputPortBase::getToStringFormatString() {
38  return "Output Port: %s %s->(%s)";
39 }
40 #endif
41 
42 } // namespace Fw
virtual void init()
Definition: PortBase.cpp:34
SerializeStatus
forward declaration for string
void init() override
Fw::ObjBase * m_connObj
Definition: PortBase.hpp:34
#define FW_ASSERT(...)
Definition: Assert.hpp:14
#define FW_PORT_SERIALIZATION
for multi-note systems)
Definition: FpConfig.h:92