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)
413 #if FW_ENABLE_TEXT_LOGGING == 1 416 getNum_logTextOut_OutputPorts()
const 454 static_cast<FwAssertArgType>(portNum)
457 return this->m_logOut_OutputPort[portNum].
isConnected();
460 #if FW_ENABLE_TEXT_LOGGING == 1 462 bool FprimeDeframerComponentBase ::
463 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
466 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
467 static_cast<FwAssertArgType>(portNum)
470 return this->m_logTextOut_OutputPort[portNum].isConnected();
480 static_cast<FwAssertArgType>(portNum)
483 return this->m_timeCaller_OutputPort[portNum].
isConnected();
495 static_cast<FwAssertArgType>(portNum)
498 return this->m_dataOut_OutputPort[portNum].
isConnected();
506 static_cast<FwAssertArgType>(portNum)
509 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
528 static_cast<FwAssertArgType>(portNum)
555 static_cast<FwAssertArgType>(portNum)
579 static_cast<FwAssertArgType>(portNum)
583 this->m_dataOut_OutputPort[portNum].isConnected(),
584 static_cast<FwAssertArgType>(portNum)
586 this->m_dataOut_OutputPort[portNum].
invoke(
601 static_cast<FwAssertArgType>(portNum)
605 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
606 static_cast<FwAssertArgType>(portNum)
608 this->m_dataReturnOut_OutputPort[portNum].
invoke(
623 if (this->m_timeCaller_OutputPort[0].isConnected()) {
624 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
632 if (this->m_logOut_OutputPort[0].isConnected()) {
635 #if FW_AMPCS_COMPATIBLE 638 _status = _logBuff.
serialize(static_cast<U8>(0));
641 static_cast<FwAssertArgType>(_status)
645 this->m_logOut_OutputPort[0].
invoke(
654 #if FW_ENABLE_TEXT_LOGGING 655 if (this->m_logTextOut_OutputPort[0].isConnected()) {
656 #if FW_OBJECT_NAMES == 1 657 const char* _formatString =
658 "(%s) %s: Frame dropped: The received buffer is not long enough to contain a valid frame (header + trailer)";
660 const char* _formatString =
661 "%s: Frame dropped: The received buffer is not long enough to contain a valid frame (header + trailer)";
668 this->m_objName.toChar(),
670 "InvalidBufferReceived " 673 this->m_logTextOut_OutputPort[0].invoke(
688 if (this->m_timeCaller_OutputPort[0].isConnected()) {
689 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
697 if (this->m_logOut_OutputPort[0].isConnected()) {
700 #if FW_AMPCS_COMPATIBLE 703 _status = _logBuff.
serialize(static_cast<U8>(0));
706 static_cast<FwAssertArgType>(_status)
710 this->m_logOut_OutputPort[0].
invoke(
719 #if FW_ENABLE_TEXT_LOGGING 720 if (this->m_logTextOut_OutputPort[0].isConnected()) {
721 #if FW_OBJECT_NAMES == 1 722 const char* _formatString =
723 "(%s) %s: Frame dropped: The received buffer does not start with the F Prime start word";
725 const char* _formatString =
726 "%s: Frame dropped: The received buffer does not start with the F Prime start word";
733 this->m_objName.toChar(),
738 this->m_logTextOut_OutputPort[0].invoke(
753 if (this->m_timeCaller_OutputPort[0].isConnected()) {
754 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
762 if (this->m_logOut_OutputPort[0].isConnected()) {
765 #if FW_AMPCS_COMPATIBLE 768 _status = _logBuff.
serialize(static_cast<U8>(0));
771 static_cast<FwAssertArgType>(_status)
775 this->m_logOut_OutputPort[0].
invoke(
784 #if FW_ENABLE_TEXT_LOGGING 785 if (this->m_logTextOut_OutputPort[0].isConnected()) {
786 #if FW_OBJECT_NAMES == 1 787 const char* _formatString =
788 "(%s) %s: Frame dropped: The received buffer size cannot hold a frame of specified payload length";
790 const char* _formatString =
791 "%s: Frame dropped: The received buffer size cannot hold a frame of specified payload length";
798 this->m_objName.toChar(),
800 "InvalidLengthReceived " 803 this->m_logTextOut_OutputPort[0].invoke(
818 if (this->m_timeCaller_OutputPort[0].isConnected()) {
819 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
827 if (this->m_logOut_OutputPort[0].isConnected()) {
830 #if FW_AMPCS_COMPATIBLE 833 _status = _logBuff.
serialize(static_cast<U8>(0));
836 static_cast<FwAssertArgType>(_status)
840 this->m_logOut_OutputPort[0].
invoke(
849 #if FW_ENABLE_TEXT_LOGGING 850 if (this->m_logTextOut_OutputPort[0].isConnected()) {
851 #if FW_OBJECT_NAMES == 1 852 const char* _formatString =
853 "(%s) %s: Frame dropped: The transmitted frame checksum does not match that computed by the receiver";
855 const char* _formatString =
856 "%s: Frame dropped: The transmitted frame checksum does not match that computed by the receiver";
863 this->m_objName.toChar(),
868 this->m_logTextOut_OutputPort[0].invoke(
885 if (this->m_timeCaller_OutputPort[0].isConnected()) {
887 this->m_timeCaller_OutputPort[0].
invoke(_time);
905 this->m_guardedPortMutex.
lock();
911 this->m_guardedPortMutex.
unLock();
918 void FprimeDeframerComponentBase ::
935 void FprimeDeframerComponentBase ::
945 compPtr->dataReturnIn_handlerBase(
Serialization/Deserialization operation was successful.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void addCallPort(InputTimePort *callPort)
Register an input port.
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
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
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
FwIndexType getNum_timeCaller_OutputPorts() const
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_dataIn_InputPorts() const
void unLock()
unlock the mutex and assert success
An invalid frame was received (checksum mismatch)
void log_WARNING_HI_InvalidLengthReceived() const
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void init()
Object initializer.
An invalid frame was received (start word is wrong)
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
FwIndexType getNum_dataReturnIn_InputPorts() const
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) ...
An invalid frame was received (length is wrong)
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.
void invoke(Fw::Time &time) const
Invoke a port interface.
void log_WARNING_HI_InvalidStartWord() const
An invalid frame was received (too short to be a frame)
const char * toChar() const
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.
FwIndexType getNum_dataReturnOut_OutputPorts() const
Auto-generated base for FprimeDeframer component.
FwIndexType getNum_logOut_OutputPorts() const
A serious but recoverable event.
void init()
Initialization function.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
FwIndexType getNum_dataOut_OutputPorts() const
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
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.
No time base has been established.
PlatformIndexType FwIndexType
void log_WARNING_HI_InvalidChecksum() const
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
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.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
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.
void lock()
lock the mutex and assert success