9 #if FW_ENABLE_TEXT_LOGGING 32 this->m_dataIn_InputPort[port].
init();
37 this->m_dataIn_InputPort[port].
setPortNum(port);
39 #if FW_OBJECT_NAMES == 1 43 this->m_objName.toChar(),
46 this->m_dataIn_InputPort[port].setObjName(portName.
toChar());
56 this->m_dataReturnIn_InputPort[port].
init();
61 this->m_dataReturnIn_InputPort[port].
setPortNum(port);
63 #if FW_OBJECT_NAMES == 1 67 this->m_objName.toChar(),
70 this->m_dataReturnIn_InputPort[port].setObjName(portName.
toChar());
80 this->m_logOut_OutputPort[port].
init();
82 #if FW_OBJECT_NAMES == 1 86 this->m_objName.toChar(),
89 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
93 #if FW_ENABLE_TEXT_LOGGING == 1 97 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
100 this->m_logTextOut_OutputPort[port].
init();
102 #if FW_OBJECT_NAMES == 1 106 this->m_objName.toChar(),
109 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
120 this->m_timeCaller_OutputPort[port].
init();
122 #if FW_OBJECT_NAMES == 1 126 this->m_objName.toChar(),
129 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
139 this->m_dataOut_OutputPort[port].
init();
141 #if FW_OBJECT_NAMES == 1 145 this->m_objName.toChar(),
148 this->m_dataOut_OutputPort[port].setObjName(portName.
toChar());
158 this->m_dataReturnOut_OutputPort[port].
init();
160 #if FW_OBJECT_NAMES == 1 164 this->m_objName.toChar(),
167 this->m_dataReturnOut_OutputPort[port].setObjName(portName.
toChar());
181 static_cast<FwAssertArgType>(portNum)
184 return &this->m_dataIn_InputPort[portNum];
192 static_cast<FwAssertArgType>(portNum)
195 return &this->m_dataReturnIn_InputPort[portNum];
210 static_cast<FwAssertArgType>(portNum)
213 this->m_logOut_OutputPort[portNum].
addCallPort(port);
216 #if FW_ENABLE_TEXT_LOGGING == 1 218 void FprimeDeframerComponentBase ::
219 set_logTextOut_OutputPort(
225 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
226 static_cast<FwAssertArgType>(portNum)
229 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
242 static_cast<FwAssertArgType>(portNum)
245 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
260 static_cast<FwAssertArgType>(portNum)
263 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
274 static_cast<FwAssertArgType>(portNum)
277 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
280 #if FW_PORT_SERIALIZATION 289 Fw::InputSerializePort* port
294 static_cast<FwAssertArgType>(portNum)
297 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
300 #if FW_ENABLE_TEXT_LOGGING == 1 302 void FprimeDeframerComponentBase ::
303 set_logTextOut_OutputPort(
305 Fw::InputSerializePort* port
309 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
310 static_cast<FwAssertArgType>(portNum)
313 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
321 Fw::InputSerializePort* port
326 static_cast<FwAssertArgType>(portNum)
329 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
334 #if FW_PORT_SERIALIZATION 343 Fw::InputSerializePort* port
348 static_cast<FwAssertArgType>(portNum)
351 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
357 Fw::InputSerializePort* port
362 static_cast<FwAssertArgType>(portNum)
365 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
376 Fw::PassiveComponentBase(compName)
396 static_cast<FwAssertArgType>(portNum)
399 return this->m_logOut_OutputPort[portNum].
isConnected();
402 #if FW_ENABLE_TEXT_LOGGING == 1 404 bool FprimeDeframerComponentBase ::
405 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
408 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
409 static_cast<FwAssertArgType>(portNum)
412 return this->m_logTextOut_OutputPort[portNum].isConnected();
422 static_cast<FwAssertArgType>(portNum)
425 return this->m_timeCaller_OutputPort[portNum].
isConnected();
437 static_cast<FwAssertArgType>(portNum)
440 return this->m_dataOut_OutputPort[portNum].
isConnected();
448 static_cast<FwAssertArgType>(portNum)
451 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
470 static_cast<FwAssertArgType>(portNum)
497 static_cast<FwAssertArgType>(portNum)
521 static_cast<FwAssertArgType>(portNum)
525 this->m_dataOut_OutputPort[portNum].isConnected(),
526 static_cast<FwAssertArgType>(portNum)
528 this->m_dataOut_OutputPort[portNum].
invoke(
543 static_cast<FwAssertArgType>(portNum)
547 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
548 static_cast<FwAssertArgType>(portNum)
550 this->m_dataReturnOut_OutputPort[portNum].
invoke(
565 if (this->m_timeCaller_OutputPort[0].isConnected()) {
566 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
574 if (this->m_logOut_OutputPort[0].isConnected()) {
577 #if FW_AMPCS_COMPATIBLE 583 static_cast<FwAssertArgType>(_status)
587 this->m_logOut_OutputPort[0].
invoke(
596 #if FW_ENABLE_TEXT_LOGGING 597 if (this->m_logTextOut_OutputPort[0].isConnected()) {
598 #if FW_OBJECT_NAMES == 1 599 const char* _formatString =
600 "(%s) %s: Frame dropped: The received buffer is not long enough to contain a valid frame (header + trailer)";
602 const char* _formatString =
603 "%s: Frame dropped: The received buffer is not long enough to contain a valid frame (header + trailer)";
610 this->m_objName.toChar(),
612 "InvalidBufferReceived " 615 this->m_logTextOut_OutputPort[0].invoke(
630 if (this->m_timeCaller_OutputPort[0].isConnected()) {
631 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
639 if (this->m_logOut_OutputPort[0].isConnected()) {
642 #if FW_AMPCS_COMPATIBLE 648 static_cast<FwAssertArgType>(_status)
652 this->m_logOut_OutputPort[0].
invoke(
661 #if FW_ENABLE_TEXT_LOGGING 662 if (this->m_logTextOut_OutputPort[0].isConnected()) {
663 #if FW_OBJECT_NAMES == 1 664 const char* _formatString =
665 "(%s) %s: Frame dropped: The received buffer does not start with the F Prime start word";
667 const char* _formatString =
668 "%s: Frame dropped: The received buffer does not start with the F Prime start word";
675 this->m_objName.toChar(),
680 this->m_logTextOut_OutputPort[0].invoke(
695 if (this->m_timeCaller_OutputPort[0].isConnected()) {
696 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
704 if (this->m_logOut_OutputPort[0].isConnected()) {
707 #if FW_AMPCS_COMPATIBLE 713 static_cast<FwAssertArgType>(_status)
717 this->m_logOut_OutputPort[0].
invoke(
726 #if FW_ENABLE_TEXT_LOGGING 727 if (this->m_logTextOut_OutputPort[0].isConnected()) {
728 #if FW_OBJECT_NAMES == 1 729 const char* _formatString =
730 "(%s) %s: Frame dropped: The received buffer size cannot hold a frame of specified payload length";
732 const char* _formatString =
733 "%s: Frame dropped: The received buffer size cannot hold a frame of specified payload length";
740 this->m_objName.toChar(),
742 "InvalidLengthReceived " 745 this->m_logTextOut_OutputPort[0].invoke(
760 if (this->m_timeCaller_OutputPort[0].isConnected()) {
761 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
769 if (this->m_logOut_OutputPort[0].isConnected()) {
772 #if FW_AMPCS_COMPATIBLE 778 static_cast<FwAssertArgType>(_status)
782 this->m_logOut_OutputPort[0].
invoke(
791 #if FW_ENABLE_TEXT_LOGGING 792 if (this->m_logTextOut_OutputPort[0].isConnected()) {
793 #if FW_OBJECT_NAMES == 1 794 const char* _formatString =
795 "(%s) %s: Frame dropped: The transmitted frame checksum does not match that computed by the receiver";
797 const char* _formatString =
798 "%s: Frame dropped: The transmitted frame checksum does not match that computed by the receiver";
805 this->m_objName.toChar(),
810 this->m_logTextOut_OutputPort[0].invoke(
825 if (this->m_timeCaller_OutputPort[0].isConnected()) {
826 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
834 if (this->m_logOut_OutputPort[0].isConnected()) {
837 #if FW_AMPCS_COMPATIBLE 843 static_cast<FwAssertArgType>(_status)
847 this->m_logOut_OutputPort[0].
invoke(
856 #if FW_ENABLE_TEXT_LOGGING 857 if (this->m_logTextOut_OutputPort[0].isConnected()) {
858 #if FW_OBJECT_NAMES == 1 859 const char* _formatString =
860 "(%s) %s: The received buffer is too short to contain a valid FwPacketDescriptor";
862 const char* _formatString =
863 "%s: The received buffer is too short to contain a valid FwPacketDescriptor";
870 this->m_objName.toChar(),
875 this->m_logTextOut_OutputPort[0].invoke(
892 if (this->m_timeCaller_OutputPort[0].isConnected()) {
894 this->m_timeCaller_OutputPort[0].
invoke(_time);
912 this->m_guardedPortMutex.
lock();
918 this->m_guardedPortMutex.
unLock();
925 void FprimeDeframerComponentBase ::
942 void FprimeDeframerComponentBase ::
952 compPtr->dataReturnIn_handlerBase(
Serialization/Deserialization operation was successful.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
void log_WARNING_HI_InvalidBufferReceived() const
An invalid frame was received (length is wrong)
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_logOut_OutputPorts()
void unLock()
unlock the mutex and assert success
void log_WARNING_HI_InvalidLengthReceived() const
void log_WARNING_LO_PayloadTooShort() const
No time base has been established (Required)
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void init()
Object initializer.
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
FwIdType FwEventIdType
The type of an event identifier.
FprimeDeframerComponentBase(const char *compName="")
Construct FprimeDeframerComponentBase object.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
A less serious but recoverable event.
An invalid frame was received (too short to be a frame)
An invalid frame was received (not enough data to contain a valid FwPacketDescriptor type) ...
void invoke(Fw::Time &time) const
Invoke a port interface.
void log_WARNING_HI_InvalidStartWord() const
const char * toChar() const
Convert to a C-style char*.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port interface.
static constexpr FwIndexType getNum_dataIn_InputPorts()
Auto-generated base for FprimeDeframer component.
A serious but recoverable event.
void init()
Initialization function.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
virtual ~FprimeDeframerComponentBase()
Destroy FprimeDeframerComponentBase object.
virtual void lock()
Lock the guarded mutex.
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 invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
PlatformIndexType FwIndexType
void log_WARNING_HI_InvalidChecksum() const
void addCallPort(InputLogPort *callPort)
Register an input port.
Type used to pass context info between components during framing/deframing.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
RateGroupDivider component implementation.
An invalid frame was received (start word is wrong)
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
An invalid frame was received (checksum mismatch)
Implementation of malloc based allocator.
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
virtual void unLock()
Unlock the guarded mutex.
static constexpr FwIndexType getNum_dataOut_OutputPorts()
void lock()
lock the mutex and assert success