9 #if FW_ENABLE_TEXT_LOGGING 26 #if !FW_DIRECT_PORT_CALLS 33 this->m_dataIn_InputPort[port].
init();
38 this->m_dataIn_InputPort[port].
setPortNum(port);
40 #if FW_OBJECT_NAMES == 1 44 this->m_objName.toChar(),
47 this->m_dataIn_InputPort[port].setObjName(portName.
toChar());
52 #if !FW_DIRECT_PORT_CALLS 59 this->m_dataReturnIn_InputPort[port].
init();
64 this->m_dataReturnIn_InputPort[port].
setPortNum(port);
66 #if FW_OBJECT_NAMES == 1 70 this->m_objName.toChar(),
73 this->m_dataReturnIn_InputPort[port].setObjName(portName.
toChar());
78 #if !FW_DIRECT_PORT_CALLS 85 this->m_logOut_OutputPort[port].
init();
87 #if FW_OBJECT_NAMES == 1 91 this->m_objName.toChar(),
94 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
99 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 103 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
106 this->m_logTextOut_OutputPort[port].
init();
108 #if FW_OBJECT_NAMES == 1 112 this->m_objName.toChar(),
115 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
120 #if !FW_DIRECT_PORT_CALLS 127 this->m_timeCaller_OutputPort[port].
init();
129 #if FW_OBJECT_NAMES == 1 133 this->m_objName.toChar(),
136 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
141 #if !FW_DIRECT_PORT_CALLS 148 this->m_dataOut_OutputPort[port].
init();
150 #if FW_OBJECT_NAMES == 1 154 this->m_objName.toChar(),
157 this->m_dataOut_OutputPort[port].setObjName(portName.
toChar());
162 #if !FW_DIRECT_PORT_CALLS 169 this->m_dataReturnOut_OutputPort[port].
init();
171 #if FW_OBJECT_NAMES == 1 175 this->m_objName.toChar(),
178 this->m_dataReturnOut_OutputPort[port].setObjName(portName.
toChar());
184 #if !FW_DIRECT_PORT_CALLS 195 static_cast<FwAssertArgType>(portNum)
198 return &this->m_dataIn_InputPort[portNum];
206 static_cast<FwAssertArgType>(portNum)
209 return &this->m_dataReturnIn_InputPort[portNum];
214 #if !FW_DIRECT_PORT_CALLS 228 static_cast<FwAssertArgType>(portNum)
231 this->m_logOut_OutputPort[portNum].
addCallPort(port);
234 #if FW_ENABLE_TEXT_LOGGING == 1 236 void FprimeDeframerComponentBase ::
237 set_logTextOut_OutputPort(
243 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
244 static_cast<FwAssertArgType>(portNum)
247 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
260 static_cast<FwAssertArgType>(portNum)
263 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
268 #if !FW_DIRECT_PORT_CALLS 282 static_cast<FwAssertArgType>(portNum)
285 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
296 static_cast<FwAssertArgType>(portNum)
299 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
304 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 313 Fw::InputSerializePort* port
318 static_cast<FwAssertArgType>(portNum)
321 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
324 #if FW_ENABLE_TEXT_LOGGING == 1 326 void FprimeDeframerComponentBase ::
327 set_logTextOut_OutputPort(
329 Fw::InputSerializePort* port
333 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
334 static_cast<FwAssertArgType>(portNum)
337 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
345 Fw::InputSerializePort* port
350 static_cast<FwAssertArgType>(portNum)
353 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
358 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 367 Fw::InputSerializePort* port
372 static_cast<FwAssertArgType>(portNum)
375 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
381 Fw::InputSerializePort* port
386 static_cast<FwAssertArgType>(portNum)
389 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
400 Fw::PassiveComponentBase(compName)
411 #if !FW_DIRECT_PORT_CALLS 422 static_cast<FwAssertArgType>(portNum)
425 return this->m_logOut_OutputPort[portNum].
isConnected();
428 #if FW_ENABLE_TEXT_LOGGING == 1 430 bool FprimeDeframerComponentBase ::
431 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
const 434 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
435 static_cast<FwAssertArgType>(portNum)
438 return this->m_logTextOut_OutputPort[portNum].isConnected();
448 static_cast<FwAssertArgType>(portNum)
451 return this->m_timeCaller_OutputPort[portNum].
isConnected();
456 #if !FW_DIRECT_PORT_CALLS 467 static_cast<FwAssertArgType>(portNum)
470 return this->m_dataOut_OutputPort[portNum].
isConnected();
478 static_cast<FwAssertArgType>(portNum)
481 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
502 static_cast<FwAssertArgType>(portNum)
529 static_cast<FwAssertArgType>(portNum)
540 #if !FW_DIRECT_PORT_CALLS 555 static_cast<FwAssertArgType>(portNum)
559 this->m_dataOut_OutputPort[portNum].isConnected(),
560 static_cast<FwAssertArgType>(portNum)
562 this->m_dataOut_OutputPort[portNum].
invoke(
577 static_cast<FwAssertArgType>(portNum)
581 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
582 static_cast<FwAssertArgType>(portNum)
584 this->m_dataReturnOut_OutputPort[portNum].
invoke(
602 this->timeCaller_out(0, _logTime);
611 #if FW_AMPCS_COMPATIBLE 617 static_cast<FwAssertArgType>(_status)
631 #if FW_ENABLE_TEXT_LOGGING 632 if (this->isConnected_logTextOut_OutputPort(0)) {
633 #if FW_OBJECT_NAMES == 1 634 const char* _formatString =
635 "(%s) %s: Frame dropped: The received buffer is not long enough to contain a valid frame (header + trailer)";
637 const char* _formatString =
638 "%s: Frame dropped: The received buffer is not long enough to contain a valid frame (header + trailer)";
645 this->m_objName.toChar(),
647 "InvalidBufferReceived " 650 this->logTextOut_out(
667 this->timeCaller_out(0, _logTime);
676 #if FW_AMPCS_COMPATIBLE 682 static_cast<FwAssertArgType>(_status)
696 #if FW_ENABLE_TEXT_LOGGING 697 if (this->isConnected_logTextOut_OutputPort(0)) {
698 #if FW_OBJECT_NAMES == 1 699 const char* _formatString =
700 "(%s) %s: Frame dropped: The received buffer does not start with the F Prime start word";
702 const char* _formatString =
703 "%s: Frame dropped: The received buffer does not start with the F Prime start word";
710 this->m_objName.toChar(),
715 this->logTextOut_out(
732 this->timeCaller_out(0, _logTime);
741 #if FW_AMPCS_COMPATIBLE 747 static_cast<FwAssertArgType>(_status)
761 #if FW_ENABLE_TEXT_LOGGING 762 if (this->isConnected_logTextOut_OutputPort(0)) {
763 #if FW_OBJECT_NAMES == 1 764 const char* _formatString =
765 "(%s) %s: Frame dropped: The received buffer size cannot hold a frame of specified payload length";
767 const char* _formatString =
768 "%s: Frame dropped: The received buffer size cannot hold a frame of specified payload length";
775 this->m_objName.toChar(),
777 "InvalidLengthReceived " 780 this->logTextOut_out(
797 this->timeCaller_out(0, _logTime);
806 #if FW_AMPCS_COMPATIBLE 812 static_cast<FwAssertArgType>(_status)
826 #if FW_ENABLE_TEXT_LOGGING 827 if (this->isConnected_logTextOut_OutputPort(0)) {
828 #if FW_OBJECT_NAMES == 1 829 const char* _formatString =
830 "(%s) %s: Frame dropped: The transmitted frame checksum does not match that computed by the receiver";
832 const char* _formatString =
833 "%s: Frame dropped: The transmitted frame checksum does not match that computed by the receiver";
840 this->m_objName.toChar(),
845 this->logTextOut_out(
862 this->timeCaller_out(0, _logTime);
871 #if FW_AMPCS_COMPATIBLE 877 static_cast<FwAssertArgType>(_status)
891 #if FW_ENABLE_TEXT_LOGGING 892 if (this->isConnected_logTextOut_OutputPort(0)) {
893 #if FW_OBJECT_NAMES == 1 894 const char* _formatString =
895 "(%s) %s: The received buffer is too short to contain a valid FwPacketDescriptor";
897 const char* _formatString =
898 "%s: The received buffer is too short to contain a valid FwPacketDescriptor";
905 this->m_objName.toChar(),
910 this->logTextOut_out(
930 this->timeCaller_out(0, _time);
948 this->m_guardedPortMutex.
lock();
954 this->m_guardedPortMutex.
unLock();
961 void FprimeDeframerComponentBase ::
978 void FprimeDeframerComponentBase ::
988 compPtr->dataReturnIn_handlerBase(
995 #if !FW_DIRECT_PORT_CALLS 1001 void FprimeDeframerComponentBase ::
1012 static_cast<FwAssertArgType>(portNum)
1016 this->m_logOut_OutputPort[portNum].isConnected(),
1017 static_cast<FwAssertArgType>(portNum)
1019 this->m_logOut_OutputPort[portNum].
invoke(
1027 #if FW_ENABLE_TEXT_LOGGING 1029 void FprimeDeframerComponentBase ::
1039 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1040 static_cast<FwAssertArgType>(portNum)
1044 this->m_logTextOut_OutputPort[portNum].isConnected(),
1045 static_cast<FwAssertArgType>(portNum)
1047 this->m_logTextOut_OutputPort[portNum].invoke(
1057 void FprimeDeframerComponentBase ::
1065 static_cast<FwAssertArgType>(portNum)
1069 this->m_timeCaller_OutputPort[portNum].isConnected(),
1070 static_cast<FwAssertArgType>(portNum)
1072 this->m_timeCaller_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputTimePort *callPort)
Register an input port.
An invalid frame was received (start word is wrong)
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 log_WARNING_HI_InvalidBufferReceived() const
An invalid frame was received (too short to be a frame)
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.
SerializeStatus
forward declaration for string
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) 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) ...
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.
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
void invoke(Fw::Time &time) const
Invoke a port connection.
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 connection.
static constexpr FwIndexType getNum_dataIn_InputPorts()
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
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].
Enum representing event severity.
An invalid frame was received (checksum mismatch)
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 connection.
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
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.
RateGroupDivider component implementation.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
An invalid frame was received (not enough data to contain a valid FwPacketDescriptor type) ...
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
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].
An invalid frame was received (length is wrong)
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