9 #if FW_ENABLE_TEXT_LOGGING 28 #if !FW_DIRECT_PORT_CALLS 35 this->m_dataIn_InputPort[port].
init();
40 this->m_dataIn_InputPort[port].
setPortNum(port);
42 #if FW_OBJECT_NAMES == 1 46 this->m_objName.toChar(),
49 this->m_dataIn_InputPort[port].setObjName(portName.
toChar());
54 #if !FW_DIRECT_PORT_CALLS 61 this->m_dataReturnIn_InputPort[port].
init();
66 this->m_dataReturnIn_InputPort[port].
setPortNum(port);
68 #if FW_OBJECT_NAMES == 1 72 this->m_objName.toChar(),
75 this->m_dataReturnIn_InputPort[port].setObjName(portName.
toChar());
80 #if !FW_DIRECT_PORT_CALLS 87 this->m_logOut_OutputPort[port].
init();
89 #if FW_OBJECT_NAMES == 1 93 this->m_objName.toChar(),
96 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
101 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 105 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
108 this->m_logTextOut_OutputPort[port].
init();
110 #if FW_OBJECT_NAMES == 1 114 this->m_objName.toChar(),
117 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
122 #if !FW_DIRECT_PORT_CALLS 129 this->m_prmGetOut_OutputPort[port].
init();
131 #if FW_OBJECT_NAMES == 1 135 this->m_objName.toChar(),
138 this->m_prmGetOut_OutputPort[port].setObjName(portName.
toChar());
143 #if !FW_DIRECT_PORT_CALLS 150 this->m_prmSetOut_OutputPort[port].
init();
152 #if FW_OBJECT_NAMES == 1 156 this->m_objName.toChar(),
159 this->m_prmSetOut_OutputPort[port].setObjName(portName.
toChar());
164 #if !FW_DIRECT_PORT_CALLS 171 this->m_timeCaller_OutputPort[port].
init();
173 #if FW_OBJECT_NAMES == 1 177 this->m_objName.toChar(),
180 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
185 #if !FW_DIRECT_PORT_CALLS 192 this->m_tlmOut_OutputPort[port].
init();
194 #if FW_OBJECT_NAMES == 1 198 this->m_objName.toChar(),
201 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
206 #if !FW_DIRECT_PORT_CALLS 213 this->m_dataOut_OutputPort[port].
init();
215 #if FW_OBJECT_NAMES == 1 219 this->m_objName.toChar(),
222 this->m_dataOut_OutputPort[port].setObjName(portName.
toChar());
227 #if !FW_DIRECT_PORT_CALLS 234 this->m_dataReturnOut_OutputPort[port].
init();
236 #if FW_OBJECT_NAMES == 1 240 this->m_objName.toChar(),
243 this->m_dataReturnOut_OutputPort[port].setObjName(portName.
toChar());
248 #if !FW_DIRECT_PORT_CALLS 255 this->m_errorNotify_OutputPort[port].
init();
257 #if FW_OBJECT_NAMES == 1 261 this->m_objName.toChar(),
264 this->m_errorNotify_OutputPort[port].setObjName(portName.
toChar());
270 #if !FW_DIRECT_PORT_CALLS 281 static_cast<FwAssertArgType>(portNum)
284 return &this->m_dataIn_InputPort[portNum];
292 static_cast<FwAssertArgType>(portNum)
295 return &this->m_dataReturnIn_InputPort[portNum];
300 #if !FW_DIRECT_PORT_CALLS 314 static_cast<FwAssertArgType>(portNum)
317 this->m_logOut_OutputPort[portNum].
addCallPort(port);
320 #if FW_ENABLE_TEXT_LOGGING == 1 322 void TcDeframerComponentBase ::
323 set_logTextOut_OutputPort(
329 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
330 static_cast<FwAssertArgType>(portNum)
333 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
346 static_cast<FwAssertArgType>(portNum)
349 this->m_prmGetOut_OutputPort[portNum].
addCallPort(port);
360 static_cast<FwAssertArgType>(portNum)
363 this->m_prmSetOut_OutputPort[portNum].
addCallPort(port);
374 static_cast<FwAssertArgType>(portNum)
377 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
388 static_cast<FwAssertArgType>(portNum)
391 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
396 #if !FW_DIRECT_PORT_CALLS 410 static_cast<FwAssertArgType>(portNum)
413 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
424 static_cast<FwAssertArgType>(portNum)
427 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
438 static_cast<FwAssertArgType>(portNum)
441 this->m_errorNotify_OutputPort[portNum].
addCallPort(port);
446 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 455 Fw::InputSerializePort* port
460 static_cast<FwAssertArgType>(portNum)
463 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
466 #if FW_ENABLE_TEXT_LOGGING == 1 468 void TcDeframerComponentBase ::
469 set_logTextOut_OutputPort(
471 Fw::InputSerializePort* port
475 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
476 static_cast<FwAssertArgType>(portNum)
479 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
487 Fw::InputSerializePort* port
492 static_cast<FwAssertArgType>(portNum)
495 this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
501 Fw::InputSerializePort* port
506 static_cast<FwAssertArgType>(portNum)
509 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
515 Fw::InputSerializePort* port
520 static_cast<FwAssertArgType>(portNum)
523 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
528 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 537 Fw::InputSerializePort* port
542 static_cast<FwAssertArgType>(portNum)
545 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
551 Fw::InputSerializePort* port
556 static_cast<FwAssertArgType>(portNum)
559 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
565 Fw::InputSerializePort* port
570 static_cast<FwAssertArgType>(portNum)
573 this->m_errorNotify_OutputPort[portNum].registerSerialPort(port);
584 Fw::PassiveComponentBase(compName)
595 #if !FW_DIRECT_PORT_CALLS 606 static_cast<FwAssertArgType>(portNum)
609 return this->m_logOut_OutputPort[portNum].
isConnected();
612 #if FW_ENABLE_TEXT_LOGGING == 1 614 bool TcDeframerComponentBase ::
615 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
const 618 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
619 static_cast<FwAssertArgType>(portNum)
622 return this->m_logTextOut_OutputPort[portNum].isConnected();
632 static_cast<FwAssertArgType>(portNum)
635 return this->m_prmGetOut_OutputPort[portNum].
isConnected();
643 static_cast<FwAssertArgType>(portNum)
646 return this->m_prmSetOut_OutputPort[portNum].
isConnected();
654 static_cast<FwAssertArgType>(portNum)
657 return this->m_timeCaller_OutputPort[portNum].
isConnected();
665 static_cast<FwAssertArgType>(portNum)
668 return this->m_tlmOut_OutputPort[portNum].
isConnected();
673 #if !FW_DIRECT_PORT_CALLS 684 static_cast<FwAssertArgType>(portNum)
687 return this->m_dataOut_OutputPort[portNum].
isConnected();
695 static_cast<FwAssertArgType>(portNum)
698 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
706 static_cast<FwAssertArgType>(portNum)
709 return this->m_errorNotify_OutputPort[portNum].
isConnected();
730 static_cast<FwAssertArgType>(portNum)
757 static_cast<FwAssertArgType>(portNum)
768 #if !FW_DIRECT_PORT_CALLS 783 static_cast<FwAssertArgType>(portNum)
787 this->m_dataOut_OutputPort[portNum].isConnected(),
788 static_cast<FwAssertArgType>(portNum)
790 this->m_dataOut_OutputPort[portNum].
invoke(
805 static_cast<FwAssertArgType>(portNum)
809 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
810 static_cast<FwAssertArgType>(portNum)
812 this->m_dataReturnOut_OutputPort[portNum].
invoke(
826 static_cast<FwAssertArgType>(portNum)
830 this->m_errorNotify_OutputPort[portNum].isConnected(),
831 static_cast<FwAssertArgType>(portNum)
833 this->m_errorNotify_OutputPort[portNum].
invoke(
850 this->timeCaller_out(0, _logTime);
859 #if FW_AMPCS_COMPATIBLE 865 static_cast<FwAssertArgType>(_status)
879 #if FW_ENABLE_TEXT_LOGGING 880 if (this->isConnected_logTextOut_OutputPort(0)) {
881 #if FW_OBJECT_NAMES == 1 882 const char* _formatString =
883 "(%s) %s: Invalid packet received refusing to deframe";
885 const char* _formatString =
886 "%s: Invalid packet received refusing to deframe";
893 this->m_objName.toChar(),
898 this->logTextOut_out(
918 this->timeCaller_out(0, _logTime);
928 #if FW_AMPCS_COMPATIBLE 933 static_cast<FwAssertArgType>(_status)
937 #if FW_AMPCS_COMPATIBLE 940 static_cast<U8>(
sizeof(U16))
944 static_cast<FwAssertArgType>(_status)
950 static_cast<FwAssertArgType>(_status)
953 #if FW_AMPCS_COMPATIBLE 956 static_cast<U8>(
sizeof(U16))
960 static_cast<FwAssertArgType>(_status)
966 static_cast<FwAssertArgType>(_status)
979 #if FW_ENABLE_TEXT_LOGGING 980 if (this->isConnected_logTextOut_OutputPort(0)) {
981 #if FW_OBJECT_NAMES == 1 982 const char* _formatString =
983 "(%s) %s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
985 const char* _formatString =
986 "%s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
993 this->m_objName.toChar(),
995 "InvalidSpacecraftId ",
1000 this->logTextOut_out(
1020 this->timeCaller_out(0, _logTime);
1030 #if FW_AMPCS_COMPATIBLE 1035 static_cast<FwAssertArgType>(_status)
1039 #if FW_AMPCS_COMPATIBLE 1042 static_cast<U8>(
sizeof(U16))
1046 static_cast<FwAssertArgType>(_status)
1052 static_cast<FwAssertArgType>(_status)
1055 #if FW_AMPCS_COMPATIBLE 1062 static_cast<FwAssertArgType>(_status)
1068 static_cast<FwAssertArgType>(_status)
1081 #if FW_ENABLE_TEXT_LOGGING 1082 if (this->isConnected_logTextOut_OutputPort(0)) {
1083 #if FW_OBJECT_NAMES == 1 1084 const char* _formatString =
1085 "(%s) %s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
1087 const char* _formatString =
1088 "%s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
1095 this->m_objName.toChar(),
1097 "InvalidFrameLength ",
1102 this->logTextOut_out(
1122 this->timeCaller_out(0, _logTime);
1132 #if FW_AMPCS_COMPATIBLE 1137 static_cast<FwAssertArgType>(_status)
1141 #if FW_AMPCS_COMPATIBLE 1144 static_cast<U8>(
sizeof(U16))
1148 static_cast<FwAssertArgType>(_status)
1154 static_cast<FwAssertArgType>(_status)
1157 #if FW_AMPCS_COMPATIBLE 1160 static_cast<U8>(
sizeof(U16))
1164 static_cast<FwAssertArgType>(_status)
1170 static_cast<FwAssertArgType>(_status)
1183 #if FW_ENABLE_TEXT_LOGGING 1184 if (this->isConnected_logTextOut_OutputPort(0)) {
1185 #if FW_OBJECT_NAMES == 1 1186 const char* _formatString =
1187 "(%s) %s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1189 const char* _formatString =
1190 "%s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1197 this->m_objName.toChar(),
1204 this->logTextOut_out(
1224 this->timeCaller_out(0, _logTime);
1234 #if FW_AMPCS_COMPATIBLE 1239 static_cast<FwAssertArgType>(_status)
1243 #if FW_AMPCS_COMPATIBLE 1246 static_cast<U8>(
sizeof(U16))
1250 static_cast<FwAssertArgType>(_status)
1256 static_cast<FwAssertArgType>(_status)
1259 #if FW_AMPCS_COMPATIBLE 1262 static_cast<U8>(
sizeof(U16))
1266 static_cast<FwAssertArgType>(_status)
1272 static_cast<FwAssertArgType>(_status)
1285 #if FW_ENABLE_TEXT_LOGGING 1286 if (this->isConnected_logTextOut_OutputPort(0)) {
1287 #if FW_OBJECT_NAMES == 1 1288 const char* _formatString =
1289 "(%s) %s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1291 const char* _formatString =
1292 "%s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1299 this->m_objName.toChar(),
1306 this->logTextOut_out(
1326 this->timeCaller_out(0, _time);
1344 this->m_guardedPortMutex.
lock();
1350 this->m_guardedPortMutex.
unLock();
1357 void TcDeframerComponentBase ::
1374 void TcDeframerComponentBase ::
1375 m_p_dataReturnIn_in(
1384 compPtr->dataReturnIn_handlerBase(
1391 #if !FW_DIRECT_PORT_CALLS 1397 void TcDeframerComponentBase ::
1408 static_cast<FwAssertArgType>(portNum)
1412 this->m_logOut_OutputPort[portNum].isConnected(),
1413 static_cast<FwAssertArgType>(portNum)
1415 this->m_logOut_OutputPort[portNum].
invoke(
1423 #if FW_ENABLE_TEXT_LOGGING 1425 void TcDeframerComponentBase ::
1435 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1436 static_cast<FwAssertArgType>(portNum)
1440 this->m_logTextOut_OutputPort[portNum].isConnected(),
1441 static_cast<FwAssertArgType>(portNum)
1443 this->m_logTextOut_OutputPort[portNum].invoke(
1453 void TcDeframerComponentBase ::
1461 static_cast<FwAssertArgType>(portNum)
1465 this->m_timeCaller_OutputPort[portNum].isConnected(),
1466 static_cast<FwAssertArgType>(portNum)
1468 this->m_timeCaller_OutputPort[portNum].
invoke(
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
Enum representing an error during framing/deframing in the CCSDS protocols.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
void init()
Initialization function.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
void unLock()
unlock the mutex and assert success
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_logOut_OutputPorts()
static constexpr FwIndexType getNum_dataIn_InputPorts()
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
Invalid packet received that will be dropped.
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.
Deframing received an invalid SCID.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void addCallPort(InputTlmPort *callPort)
Register an input port.
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
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) ...
void init()
Initialization function.
void invoke(const Svc::Ccsds::FrameError &errorCode) const
Invoke a port connection.
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 connection.
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
Deframing received an invalid frame length.
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 connection.
A serious but recoverable event.
void init()
Initialization function.
Enum representing event severity.
bool isConnected_errorNotify_OutputPort(FwIndexType portNum) const
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 connection.
Deframing received an invalid checksum.
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
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.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Type used to pass context info between components during framing/deframing.
void errorNotify_out(FwIndexType portNum, const Svc::Ccsds::FrameError &errorCode) const
Invoke output port errorNotify.
RateGroupDivider component implementation.
static constexpr FwIndexType getNum_dataOut_OutputPorts()
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
Implementation of malloc based allocator.
Deframing received an invalid VCID.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
void init()
Initialization function.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
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].
void lock()
lock the mutex and assert success
void log_WARNING_HI_InvalidFrameLength(U16 transmitted, FwSizeType actual) const