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(
805 if (this->m_timeCaller_OutputPort[0].isConnected()) {
806 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
814 if (this->m_logOut_OutputPort[0].isConnected()) {
817 #if FW_AMPCS_COMPATIBLE 823 static_cast<FwAssertArgType>(_status)
827 this->m_logOut_OutputPort[0].
invoke(
836 #if FW_ENABLE_TEXT_LOGGING 837 if (this->m_logTextOut_OutputPort[0].isConnected()) {
838 #if FW_OBJECT_NAMES == 1 839 const char* _formatString =
840 "(%s) %s: Invalid packet received refusing to deframe";
842 const char* _formatString =
843 "%s: Invalid packet received refusing to deframe";
850 this->m_objName.toChar(),
855 this->m_logTextOut_OutputPort[0].invoke(
873 if (this->m_timeCaller_OutputPort[0].isConnected()) {
874 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
882 if (this->m_logOut_OutputPort[0].isConnected()) {
886 #if FW_AMPCS_COMPATIBLE 891 static_cast<FwAssertArgType>(_status)
895 #if FW_AMPCS_COMPATIBLE 898 static_cast<U8>(
sizeof(U16))
902 static_cast<FwAssertArgType>(_status)
908 static_cast<FwAssertArgType>(_status)
911 #if FW_AMPCS_COMPATIBLE 914 static_cast<U8>(
sizeof(U16))
918 static_cast<FwAssertArgType>(_status)
924 static_cast<FwAssertArgType>(_status)
927 this->m_logOut_OutputPort[0].
invoke(
936 #if FW_ENABLE_TEXT_LOGGING 937 if (this->m_logTextOut_OutputPort[0].isConnected()) {
938 #if FW_OBJECT_NAMES == 1 939 const char* _formatString =
940 "(%s) %s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
942 const char* _formatString =
943 "%s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
950 this->m_objName.toChar(),
952 "InvalidSpacecraftId ",
957 this->m_logTextOut_OutputPort[0].invoke(
975 if (this->m_timeCaller_OutputPort[0].isConnected()) {
976 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
984 if (this->m_logOut_OutputPort[0].isConnected()) {
988 #if FW_AMPCS_COMPATIBLE 993 static_cast<FwAssertArgType>(_status)
997 #if FW_AMPCS_COMPATIBLE 1000 static_cast<U8>(
sizeof(U16))
1004 static_cast<FwAssertArgType>(_status)
1010 static_cast<FwAssertArgType>(_status)
1013 #if FW_AMPCS_COMPATIBLE 1020 static_cast<FwAssertArgType>(_status)
1026 static_cast<FwAssertArgType>(_status)
1029 this->m_logOut_OutputPort[0].
invoke(
1038 #if FW_ENABLE_TEXT_LOGGING 1039 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1040 #if FW_OBJECT_NAMES == 1 1041 const char* _formatString =
1042 "(%s) %s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
1044 const char* _formatString =
1045 "%s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
1052 this->m_objName.toChar(),
1054 "InvalidFrameLength ",
1059 this->m_logTextOut_OutputPort[0].invoke(
1077 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1078 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1086 if (this->m_logOut_OutputPort[0].isConnected()) {
1090 #if FW_AMPCS_COMPATIBLE 1095 static_cast<FwAssertArgType>(_status)
1099 #if FW_AMPCS_COMPATIBLE 1102 static_cast<U8>(
sizeof(U16))
1106 static_cast<FwAssertArgType>(_status)
1112 static_cast<FwAssertArgType>(_status)
1115 #if FW_AMPCS_COMPATIBLE 1118 static_cast<U8>(
sizeof(U16))
1122 static_cast<FwAssertArgType>(_status)
1128 static_cast<FwAssertArgType>(_status)
1131 this->m_logOut_OutputPort[0].
invoke(
1140 #if FW_ENABLE_TEXT_LOGGING 1141 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1142 #if FW_OBJECT_NAMES == 1 1143 const char* _formatString =
1144 "(%s) %s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1146 const char* _formatString =
1147 "%s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1154 this->m_objName.toChar(),
1161 this->m_logTextOut_OutputPort[0].invoke(
1179 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1180 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1188 if (this->m_logOut_OutputPort[0].isConnected()) {
1192 #if FW_AMPCS_COMPATIBLE 1197 static_cast<FwAssertArgType>(_status)
1201 #if FW_AMPCS_COMPATIBLE 1204 static_cast<U8>(
sizeof(U16))
1208 static_cast<FwAssertArgType>(_status)
1214 static_cast<FwAssertArgType>(_status)
1217 #if FW_AMPCS_COMPATIBLE 1220 static_cast<U8>(
sizeof(U16))
1224 static_cast<FwAssertArgType>(_status)
1230 static_cast<FwAssertArgType>(_status)
1233 this->m_logOut_OutputPort[0].
invoke(
1242 #if FW_ENABLE_TEXT_LOGGING 1243 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1244 #if FW_OBJECT_NAMES == 1 1245 const char* _formatString =
1246 "(%s) %s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1248 const char* _formatString =
1249 "%s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1256 this->m_objName.toChar(),
1263 this->m_logTextOut_OutputPort[0].invoke(
1280 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1282 this->m_timeCaller_OutputPort[0].
invoke(_time);
1300 this->m_guardedPortMutex.
lock();
1306 this->m_guardedPortMutex.
unLock();
1313 void TcDeframerComponentBase ::
1330 void TcDeframerComponentBase ::
1331 m_p_dataReturnIn_in(
1340 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()
void log_WARNING_LO_InvalidPacket() const
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
Deframing received an invalid frame length.
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.
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()
Invalid packet received that will be dropped.
Deframing received an invalid checksum.
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.
Deframing received an invalid VCID.
Deframing received an invalid SCID.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
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