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());
269 #if !FW_DIRECT_PORT_CALLS 276 this->m_validateApidSeqCount_OutputPort[port].
init();
278 #if FW_OBJECT_NAMES == 1 282 this->m_objName.toChar(),
285 this->m_validateApidSeqCount_OutputPort[port].setObjName(portName.
toChar());
291 #if !FW_DIRECT_PORT_CALLS 302 static_cast<FwAssertArgType>(portNum)
305 return &this->m_dataIn_InputPort[portNum];
313 static_cast<FwAssertArgType>(portNum)
316 return &this->m_dataReturnIn_InputPort[portNum];
321 #if !FW_DIRECT_PORT_CALLS 335 static_cast<FwAssertArgType>(portNum)
338 this->m_logOut_OutputPort[portNum].
addCallPort(port);
341 #if FW_ENABLE_TEXT_LOGGING == 1 343 void SpacePacketDeframerComponentBase ::
344 set_logTextOut_OutputPort(
350 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
351 static_cast<FwAssertArgType>(portNum)
354 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
367 static_cast<FwAssertArgType>(portNum)
370 this->m_prmGetOut_OutputPort[portNum].
addCallPort(port);
381 static_cast<FwAssertArgType>(portNum)
384 this->m_prmSetOut_OutputPort[portNum].
addCallPort(port);
395 static_cast<FwAssertArgType>(portNum)
398 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
409 static_cast<FwAssertArgType>(portNum)
412 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
417 #if !FW_DIRECT_PORT_CALLS 431 static_cast<FwAssertArgType>(portNum)
434 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
445 static_cast<FwAssertArgType>(portNum)
448 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
459 static_cast<FwAssertArgType>(portNum)
462 this->m_errorNotify_OutputPort[portNum].
addCallPort(port);
473 static_cast<FwAssertArgType>(portNum)
476 this->m_validateApidSeqCount_OutputPort[portNum].
addCallPort(port);
481 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 490 Fw::InputSerializePort* port
495 static_cast<FwAssertArgType>(portNum)
498 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
501 #if FW_ENABLE_TEXT_LOGGING == 1 503 void SpacePacketDeframerComponentBase ::
504 set_logTextOut_OutputPort(
506 Fw::InputSerializePort* port
510 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
511 static_cast<FwAssertArgType>(portNum)
514 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
522 Fw::InputSerializePort* port
527 static_cast<FwAssertArgType>(portNum)
530 this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
536 Fw::InputSerializePort* port
541 static_cast<FwAssertArgType>(portNum)
544 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
550 Fw::InputSerializePort* port
555 static_cast<FwAssertArgType>(portNum)
558 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
563 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 572 Fw::InputSerializePort* port
577 static_cast<FwAssertArgType>(portNum)
580 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
586 Fw::InputSerializePort* port
591 static_cast<FwAssertArgType>(portNum)
594 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
600 Fw::InputSerializePort* port
605 static_cast<FwAssertArgType>(portNum)
608 this->m_errorNotify_OutputPort[portNum].registerSerialPort(port);
619 Fw::PassiveComponentBase(compName)
630 #if !FW_DIRECT_PORT_CALLS 641 static_cast<FwAssertArgType>(portNum)
644 return this->m_logOut_OutputPort[portNum].
isConnected();
647 #if FW_ENABLE_TEXT_LOGGING == 1 649 bool SpacePacketDeframerComponentBase ::
650 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
const 653 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
654 static_cast<FwAssertArgType>(portNum)
657 return this->m_logTextOut_OutputPort[portNum].isConnected();
667 static_cast<FwAssertArgType>(portNum)
670 return this->m_prmGetOut_OutputPort[portNum].
isConnected();
678 static_cast<FwAssertArgType>(portNum)
681 return this->m_prmSetOut_OutputPort[portNum].
isConnected();
689 static_cast<FwAssertArgType>(portNum)
692 return this->m_timeCaller_OutputPort[portNum].
isConnected();
700 static_cast<FwAssertArgType>(portNum)
703 return this->m_tlmOut_OutputPort[portNum].
isConnected();
708 #if !FW_DIRECT_PORT_CALLS 719 static_cast<FwAssertArgType>(portNum)
722 return this->m_dataOut_OutputPort[portNum].
isConnected();
730 static_cast<FwAssertArgType>(portNum)
733 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
741 static_cast<FwAssertArgType>(portNum)
744 return this->m_errorNotify_OutputPort[portNum].
isConnected();
752 static_cast<FwAssertArgType>(portNum)
755 return this->m_validateApidSeqCount_OutputPort[portNum].
isConnected();
776 static_cast<FwAssertArgType>(portNum)
803 static_cast<FwAssertArgType>(portNum)
814 #if !FW_DIRECT_PORT_CALLS 829 static_cast<FwAssertArgType>(portNum)
833 this->m_dataOut_OutputPort[portNum].isConnected(),
834 static_cast<FwAssertArgType>(portNum)
836 this->m_dataOut_OutputPort[portNum].
invoke(
851 static_cast<FwAssertArgType>(portNum)
855 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
856 static_cast<FwAssertArgType>(portNum)
858 this->m_dataReturnOut_OutputPort[portNum].
invoke(
872 static_cast<FwAssertArgType>(portNum)
876 this->m_errorNotify_OutputPort[portNum].isConnected(),
877 static_cast<FwAssertArgType>(portNum)
879 this->m_errorNotify_OutputPort[portNum].
invoke(
893 static_cast<FwAssertArgType>(portNum)
897 this->m_validateApidSeqCount_OutputPort[portNum].isConnected(),
898 static_cast<FwAssertArgType>(portNum)
900 return this->m_validateApidSeqCount_OutputPort[portNum].
invoke(
918 this->timeCaller_out(0, _logTime);
927 #if FW_AMPCS_COMPATIBLE 933 static_cast<FwAssertArgType>(_status)
947 #if FW_ENABLE_TEXT_LOGGING 948 if (this->isConnected_logTextOut_OutputPort(0)) {
949 #if FW_OBJECT_NAMES == 1 950 const char* _formatString =
951 "(%s) %s: Malformed packet received refusing to deframe";
953 const char* _formatString =
954 "%s: Malformed packet received refusing to deframe";
961 this->m_objName.toChar(),
966 this->logTextOut_out(
986 this->timeCaller_out(0, _logTime);
996 #if FW_AMPCS_COMPATIBLE 1001 static_cast<FwAssertArgType>(_status)
1005 #if FW_AMPCS_COMPATIBLE 1012 static_cast<FwAssertArgType>(_status)
1018 static_cast<FwAssertArgType>(_status)
1021 #if FW_AMPCS_COMPATIBLE 1028 static_cast<FwAssertArgType>(_status)
1034 static_cast<FwAssertArgType>(_status)
1047 #if FW_ENABLE_TEXT_LOGGING 1048 if (this->isConnected_logTextOut_OutputPort(0)) {
1049 #if FW_OBJECT_NAMES == 1 1050 const char* _formatString =
1051 "(%s) %s: Invalid length received. Header specified packet byte size of %" PRIu64
" | Actual received data length: %" PRIu64
"";
1053 const char* _formatString =
1054 "%s: Invalid length received. Header specified packet byte size of %" PRIu64
" | Actual received data length: %" PRIu64
"";
1061 this->m_objName.toChar(),
1068 this->logTextOut_out(
1088 this->timeCaller_out(0, _time);
1106 this->m_guardedPortMutex.
lock();
1112 this->m_guardedPortMutex.
unLock();
1119 void SpacePacketDeframerComponentBase ::
1136 void SpacePacketDeframerComponentBase ::
1137 m_p_dataReturnIn_in(
1146 compPtr->dataReturnIn_handlerBase(
1153 #if !FW_DIRECT_PORT_CALLS 1159 void SpacePacketDeframerComponentBase ::
1170 static_cast<FwAssertArgType>(portNum)
1174 this->m_logOut_OutputPort[portNum].isConnected(),
1175 static_cast<FwAssertArgType>(portNum)
1177 this->m_logOut_OutputPort[portNum].
invoke(
1185 #if FW_ENABLE_TEXT_LOGGING 1187 void SpacePacketDeframerComponentBase ::
1197 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1198 static_cast<FwAssertArgType>(portNum)
1202 this->m_logTextOut_OutputPort[portNum].isConnected(),
1203 static_cast<FwAssertArgType>(portNum)
1205 this->m_logTextOut_OutputPort[portNum].invoke(
1215 void SpacePacketDeframerComponentBase ::
1223 static_cast<FwAssertArgType>(portNum)
1227 this->m_timeCaller_OutputPort[portNum].isConnected(),
1228 static_cast<FwAssertArgType>(portNum)
1230 this->m_timeCaller_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
void errorNotify_out(FwIndexType portNum, const Svc::Ccsds::FrameError &errorCode) const
Invoke output port errorNotify.
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_validateApidSeqCount_OutputPorts()
Deframing received an invalid frame length.
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
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 set_errorNotify_OutputPort(FwIndexType portNum, Svc::Ccsds::InputErrorNotifyPort *port)
Connect port to errorNotify[portNum].
void init()
Initialization function.
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
void unLock()
unlock the mutex and assert success
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
U16 validateApidSeqCount_out(FwIndexType portNum, const ComCfg::Apid &apid, U16 sequenceCount) const
Invoke output port validateApidSeqCount.
void init()
Initialization function.
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
void init()
Initialization function.
No time base has been established (Required)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
virtual void lock()
Lock the guarded mutex.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void init()
Object initializer.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
void addCallPort(InputErrorNotifyPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
FwIdType FwEventIdType
The type of an event identifier.
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
void invoke(const Svc::Ccsds::FrameError &errorCode) const
Invoke a port connection.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
void invoke(Fw::Time &time) const
Invoke a port connection.
void log_WARNING_HI_InvalidPacket() const
const char * toChar() const
Convert to a C-style char*.
SpacePacketDeframerComponentBase(const char *compName="")
Construct SpacePacketDeframerComponentBase object.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port connection.
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
A serious but recoverable event.
void init()
Initialization function.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
virtual void unLock()
Unlock the guarded mutex.
Enum representing event severity.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
static constexpr FwIndexType getNum_dataIn_InputPorts()
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
static constexpr FwIndexType getNum_errorNotify_OutputPorts()
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
bool isConnected_errorNotify_OutputPort(FwIndexType portNum) const
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
Deframing received a malformed packet.
PlatformIndexType FwIndexType
U16 invoke(const ComCfg::Apid &apid, U16 sequenceCount) const
void addCallPort(InputLogPort *callPort)
Register an input port.
Type used to pass context info between components during framing/deframing.
void set_validateApidSeqCount_OutputPort(FwIndexType portNum, Svc::Ccsds::InputApidSequenceCountPort *port)
Connect port to validateApidSeqCount[portNum].
RateGroupDivider component implementation.
Auto-generated base for SpacePacketDeframer component.
bool isConnected_validateApidSeqCount_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_dataOut_OutputPorts()
static constexpr FwIndexType getNum_logOut_OutputPorts()
Implementation of malloc based allocator.
void init()
Initialization function.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF.
void log_WARNING_HI_InvalidLength(FwSizeType transmitted, FwSizeType actual) const
void lock()
lock the mutex and assert success
void addCallPort(InputApidSequenceCountPort *callPort)
Register an input port.
virtual ~SpacePacketDeframerComponentBase()
Destroy SpacePacketDeframerComponentBase object.