9 #if FW_ENABLE_TEXT_LOGGING 34 this->m_dataIn_InputPort[port].
init();
39 this->m_dataIn_InputPort[port].
setPortNum(port);
41 #if FW_OBJECT_NAMES == 1 45 this->m_objName.toChar(),
48 this->m_dataIn_InputPort[port].setObjName(portName.
toChar());
58 this->m_dataReturnIn_InputPort[port].
init();
63 this->m_dataReturnIn_InputPort[port].
setPortNum(port);
65 #if FW_OBJECT_NAMES == 1 69 this->m_objName.toChar(),
72 this->m_dataReturnIn_InputPort[port].setObjName(portName.
toChar());
82 this->m_logOut_OutputPort[port].
init();
84 #if FW_OBJECT_NAMES == 1 88 this->m_objName.toChar(),
91 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
95 #if FW_ENABLE_TEXT_LOGGING == 1 99 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
102 this->m_logTextOut_OutputPort[port].
init();
104 #if FW_OBJECT_NAMES == 1 108 this->m_objName.toChar(),
111 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
122 this->m_prmGetOut_OutputPort[port].
init();
124 #if FW_OBJECT_NAMES == 1 128 this->m_objName.toChar(),
131 this->m_prmGetOut_OutputPort[port].setObjName(portName.
toChar());
141 this->m_prmSetOut_OutputPort[port].
init();
143 #if FW_OBJECT_NAMES == 1 147 this->m_objName.toChar(),
150 this->m_prmSetOut_OutputPort[port].setObjName(portName.
toChar());
160 this->m_timeCaller_OutputPort[port].
init();
162 #if FW_OBJECT_NAMES == 1 166 this->m_objName.toChar(),
169 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
179 this->m_tlmOut_OutputPort[port].
init();
181 #if FW_OBJECT_NAMES == 1 185 this->m_objName.toChar(),
188 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
198 this->m_dataOut_OutputPort[port].
init();
200 #if FW_OBJECT_NAMES == 1 204 this->m_objName.toChar(),
207 this->m_dataOut_OutputPort[port].setObjName(portName.
toChar());
217 this->m_dataReturnOut_OutputPort[port].
init();
219 #if FW_OBJECT_NAMES == 1 223 this->m_objName.toChar(),
226 this->m_dataReturnOut_OutputPort[port].setObjName(portName.
toChar());
236 this->m_errorNotify_OutputPort[port].
init();
238 #if FW_OBJECT_NAMES == 1 242 this->m_objName.toChar(),
245 this->m_errorNotify_OutputPort[port].setObjName(portName.
toChar());
259 static_cast<FwAssertArgType>(portNum)
262 return &this->m_dataIn_InputPort[portNum];
270 static_cast<FwAssertArgType>(portNum)
273 return &this->m_dataReturnIn_InputPort[portNum];
288 static_cast<FwAssertArgType>(portNum)
291 this->m_logOut_OutputPort[portNum].
addCallPort(port);
294 #if FW_ENABLE_TEXT_LOGGING == 1 296 void TcDeframerComponentBase ::
297 set_logTextOut_OutputPort(
303 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
304 static_cast<FwAssertArgType>(portNum)
307 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
320 static_cast<FwAssertArgType>(portNum)
323 this->m_prmGetOut_OutputPort[portNum].
addCallPort(port);
334 static_cast<FwAssertArgType>(portNum)
337 this->m_prmSetOut_OutputPort[portNum].
addCallPort(port);
348 static_cast<FwAssertArgType>(portNum)
351 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
362 static_cast<FwAssertArgType>(portNum)
365 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
380 static_cast<FwAssertArgType>(portNum)
383 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
394 static_cast<FwAssertArgType>(portNum)
397 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
408 static_cast<FwAssertArgType>(portNum)
411 this->m_errorNotify_OutputPort[portNum].
addCallPort(port);
414 #if FW_PORT_SERIALIZATION 423 Fw::InputSerializePort* port
428 static_cast<FwAssertArgType>(portNum)
431 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
434 #if FW_ENABLE_TEXT_LOGGING == 1 436 void TcDeframerComponentBase ::
437 set_logTextOut_OutputPort(
439 Fw::InputSerializePort* port
443 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
444 static_cast<FwAssertArgType>(portNum)
447 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
455 Fw::InputSerializePort* port
460 static_cast<FwAssertArgType>(portNum)
463 this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
469 Fw::InputSerializePort* port
474 static_cast<FwAssertArgType>(portNum)
477 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
483 Fw::InputSerializePort* port
488 static_cast<FwAssertArgType>(portNum)
491 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
496 #if FW_PORT_SERIALIZATION 505 Fw::InputSerializePort* port
510 static_cast<FwAssertArgType>(portNum)
513 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
519 Fw::InputSerializePort* port
524 static_cast<FwAssertArgType>(portNum)
527 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
533 Fw::InputSerializePort* port
538 static_cast<FwAssertArgType>(portNum)
541 this->m_errorNotify_OutputPort[portNum].registerSerialPort(port);
552 Fw::PassiveComponentBase(compName)
572 static_cast<FwAssertArgType>(portNum)
575 return this->m_logOut_OutputPort[portNum].
isConnected();
578 #if FW_ENABLE_TEXT_LOGGING == 1 580 bool TcDeframerComponentBase ::
581 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
584 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
585 static_cast<FwAssertArgType>(portNum)
588 return this->m_logTextOut_OutputPort[portNum].isConnected();
598 static_cast<FwAssertArgType>(portNum)
601 return this->m_prmGetOut_OutputPort[portNum].
isConnected();
609 static_cast<FwAssertArgType>(portNum)
612 return this->m_prmSetOut_OutputPort[portNum].
isConnected();
620 static_cast<FwAssertArgType>(portNum)
623 return this->m_timeCaller_OutputPort[portNum].
isConnected();
631 static_cast<FwAssertArgType>(portNum)
634 return this->m_tlmOut_OutputPort[portNum].
isConnected();
646 static_cast<FwAssertArgType>(portNum)
649 return this->m_dataOut_OutputPort[portNum].
isConnected();
657 static_cast<FwAssertArgType>(portNum)
660 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
668 static_cast<FwAssertArgType>(portNum)
671 return this->m_errorNotify_OutputPort[portNum].
isConnected();
690 static_cast<FwAssertArgType>(portNum)
717 static_cast<FwAssertArgType>(portNum)
741 static_cast<FwAssertArgType>(portNum)
745 this->m_dataOut_OutputPort[portNum].isConnected(),
746 static_cast<FwAssertArgType>(portNum)
748 this->m_dataOut_OutputPort[portNum].
invoke(
763 static_cast<FwAssertArgType>(portNum)
767 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
768 static_cast<FwAssertArgType>(portNum)
770 this->m_dataReturnOut_OutputPort[portNum].
invoke(
784 static_cast<FwAssertArgType>(portNum)
788 this->m_errorNotify_OutputPort[portNum].isConnected(),
789 static_cast<FwAssertArgType>(portNum)
791 this->m_errorNotify_OutputPort[portNum].
invoke(
808 if (this->m_timeCaller_OutputPort[0].isConnected()) {
809 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
817 if (this->m_logOut_OutputPort[0].isConnected()) {
821 #if FW_AMPCS_COMPATIBLE 826 static_cast<FwAssertArgType>(_status)
830 #if FW_AMPCS_COMPATIBLE 833 static_cast<U8>(
sizeof(U16))
837 static_cast<FwAssertArgType>(_status)
843 static_cast<FwAssertArgType>(_status)
846 #if FW_AMPCS_COMPATIBLE 849 static_cast<U8>(
sizeof(U16))
853 static_cast<FwAssertArgType>(_status)
859 static_cast<FwAssertArgType>(_status)
862 this->m_logOut_OutputPort[0].
invoke(
871 #if FW_ENABLE_TEXT_LOGGING 872 if (this->m_logTextOut_OutputPort[0].isConnected()) {
873 #if FW_OBJECT_NAMES == 1 874 const char* _formatString =
875 "(%s) %s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
877 const char* _formatString =
878 "%s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
885 this->m_objName.toChar(),
887 "InvalidSpacecraftId ",
892 this->m_logTextOut_OutputPort[0].invoke(
910 if (this->m_timeCaller_OutputPort[0].isConnected()) {
911 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
919 if (this->m_logOut_OutputPort[0].isConnected()) {
923 #if FW_AMPCS_COMPATIBLE 928 static_cast<FwAssertArgType>(_status)
932 #if FW_AMPCS_COMPATIBLE 935 static_cast<U8>(
sizeof(U16))
939 static_cast<FwAssertArgType>(_status)
945 static_cast<FwAssertArgType>(_status)
948 #if FW_AMPCS_COMPATIBLE 955 static_cast<FwAssertArgType>(_status)
961 static_cast<FwAssertArgType>(_status)
964 this->m_logOut_OutputPort[0].
invoke(
973 #if FW_ENABLE_TEXT_LOGGING 974 if (this->m_logTextOut_OutputPort[0].isConnected()) {
975 #if FW_OBJECT_NAMES == 1 976 const char* _formatString =
977 "(%s) %s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
979 const char* _formatString =
980 "%s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
987 this->m_objName.toChar(),
989 "InvalidFrameLength ",
994 this->m_logTextOut_OutputPort[0].invoke(
1012 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1013 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1021 if (this->m_logOut_OutputPort[0].isConnected()) {
1025 #if FW_AMPCS_COMPATIBLE 1030 static_cast<FwAssertArgType>(_status)
1034 #if FW_AMPCS_COMPATIBLE 1037 static_cast<U8>(
sizeof(U16))
1041 static_cast<FwAssertArgType>(_status)
1047 static_cast<FwAssertArgType>(_status)
1050 #if FW_AMPCS_COMPATIBLE 1053 static_cast<U8>(
sizeof(U16))
1057 static_cast<FwAssertArgType>(_status)
1063 static_cast<FwAssertArgType>(_status)
1066 this->m_logOut_OutputPort[0].
invoke(
1075 #if FW_ENABLE_TEXT_LOGGING 1076 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1077 #if FW_OBJECT_NAMES == 1 1078 const char* _formatString =
1079 "(%s) %s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1081 const char* _formatString =
1082 "%s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1089 this->m_objName.toChar(),
1096 this->m_logTextOut_OutputPort[0].invoke(
1114 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1115 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1123 if (this->m_logOut_OutputPort[0].isConnected()) {
1127 #if FW_AMPCS_COMPATIBLE 1132 static_cast<FwAssertArgType>(_status)
1136 #if FW_AMPCS_COMPATIBLE 1139 static_cast<U8>(
sizeof(U16))
1143 static_cast<FwAssertArgType>(_status)
1149 static_cast<FwAssertArgType>(_status)
1152 #if FW_AMPCS_COMPATIBLE 1155 static_cast<U8>(
sizeof(U16))
1159 static_cast<FwAssertArgType>(_status)
1165 static_cast<FwAssertArgType>(_status)
1168 this->m_logOut_OutputPort[0].
invoke(
1177 #if FW_ENABLE_TEXT_LOGGING 1178 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1179 #if FW_OBJECT_NAMES == 1 1180 const char* _formatString =
1181 "(%s) %s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1183 const char* _formatString =
1184 "%s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1191 this->m_objName.toChar(),
1198 this->m_logTextOut_OutputPort[0].invoke(
1215 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1217 this->m_timeCaller_OutputPort[0].
invoke(_time);
1235 this->m_guardedPortMutex.
lock();
1241 this->m_guardedPortMutex.
unLock();
1248 void TcDeframerComponentBase ::
1265 void TcDeframerComponentBase ::
1266 m_p_dataReturnIn_in(
1275 compPtr->dataReturnIn_handlerBase(
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
Serialization/Deserialization operation was successful.
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum)
void addCallPort(InputTimePort *callPort)
Register an input port.
bool isConnected_errorNotify_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
Enum representing an error during framing/deframing in the CCSDS protocols.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
void init()
Initialization function.
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum)
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
void unLock()
unlock the mutex and assert success
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_logOut_OutputPorts()
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_dataIn_InputPorts()
bool isConnected_logOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_errorNotify_OutputPorts()
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
void init()
Initialization function.
No time base has been established (Required)
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
virtual void lock()
Lock the guarded mutex.
void init()
Initialization function.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void init()
Object initializer.
SerializeStatus
forward declaration for string
void log_ACTIVITY_LO_InvalidVcId(U16 transmitted, U16 configured) const
void addCallPort(InputErrorNotifyPort *callPort)
Register an input port.
void log_WARNING_HI_InvalidCrc(U16 transmitted, U16 computed) const
FwIdType FwEventIdType
The type of an event identifier.
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
void invoke(const Svc::Ccsds::FrameError &errorCode) const
Invoke a port interface.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Less important informational events.
virtual ~TcDeframerComponentBase()
Destroy TcDeframerComponentBase object.
A less serious but recoverable event.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
TcDeframerComponentBase(const char *compName="")
Construct TcDeframerComponentBase object.
void invoke(Fw::Time &time) const
Invoke a port interface.
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
Deframing received an invalid SCID.
const char * toChar() const
Convert to a C-style char*.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port interface.
A serious but recoverable event.
void init()
Initialization function.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void set_errorNotify_OutputPort(FwIndexType portNum, Svc::Ccsds::InputErrorNotifyPort *port)
Connect port to errorNotify[portNum].
void log_WARNING_LO_InvalidSpacecraftId(U16 transmitted, U16 configured) const
void init()
Initialization function.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Deframing received an invalid checksum.
void errorNotify_out(FwIndexType portNum, const Svc::Ccsds::FrameError &errorCode)
Invoke output port errorNotify.
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
PlatformIndexType FwIndexType
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
void addCallPort(InputLogPort *callPort)
Register an input port.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
static constexpr FwIndexType getNum_dataOut_OutputPorts()
Implementation of malloc based allocator.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
void init()
Initialization function.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
Deframing received an invalid VCID.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
virtual void unLock()
Unlock the guarded mutex.
Auto-generated base for TcDeframer component.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void lock()
lock the mutex and assert success
void log_WARNING_HI_InvalidFrameLength(U16 transmitted, FwSizeType actual) const
Deframing received an invalid frame length.