9 #if FW_ENABLE_TEXT_LOGGING 34 this->m_dataIn_InputPort[port].
init();
39 this->m_dataIn_InputPort[port].
setPortNum(port);
41 #if FW_OBJECT_NAMES == 1 45 this->m_objName.toChar(),
48 this->m_dataIn_InputPort[port].setObjName(portName.
toChar());
58 this->m_dataReturnIn_InputPort[port].
init();
63 this->m_dataReturnIn_InputPort[port].
setPortNum(port);
65 #if FW_OBJECT_NAMES == 1 69 this->m_objName.toChar(),
72 this->m_dataReturnIn_InputPort[port].setObjName(portName.
toChar());
82 this->m_logOut_OutputPort[port].
init();
84 #if FW_OBJECT_NAMES == 1 88 this->m_objName.toChar(),
91 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
95 #if FW_ENABLE_TEXT_LOGGING == 1 99 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
102 this->m_logTextOut_OutputPort[port].
init();
104 #if FW_OBJECT_NAMES == 1 108 this->m_objName.toChar(),
111 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
122 this->m_prmGetOut_OutputPort[port].
init();
124 #if FW_OBJECT_NAMES == 1 128 this->m_objName.toChar(),
131 this->m_prmGetOut_OutputPort[port].setObjName(portName.
toChar());
141 this->m_prmSetOut_OutputPort[port].
init();
143 #if FW_OBJECT_NAMES == 1 147 this->m_objName.toChar(),
150 this->m_prmSetOut_OutputPort[port].setObjName(portName.
toChar());
160 this->m_timeCaller_OutputPort[port].
init();
162 #if FW_OBJECT_NAMES == 1 166 this->m_objName.toChar(),
169 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
179 this->m_tlmOut_OutputPort[port].
init();
181 #if FW_OBJECT_NAMES == 1 185 this->m_objName.toChar(),
188 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
198 this->m_dataOut_OutputPort[port].
init();
200 #if FW_OBJECT_NAMES == 1 204 this->m_objName.toChar(),
207 this->m_dataOut_OutputPort[port].setObjName(portName.
toChar());
217 this->m_dataReturnOut_OutputPort[port].
init();
219 #if FW_OBJECT_NAMES == 1 223 this->m_objName.toChar(),
226 this->m_dataReturnOut_OutputPort[port].setObjName(portName.
toChar());
240 static_cast<FwAssertArgType>(portNum)
243 return &this->m_dataIn_InputPort[portNum];
251 static_cast<FwAssertArgType>(portNum)
254 return &this->m_dataReturnIn_InputPort[portNum];
269 static_cast<FwAssertArgType>(portNum)
272 this->m_logOut_OutputPort[portNum].
addCallPort(port);
275 #if FW_ENABLE_TEXT_LOGGING == 1 277 void TcDeframerComponentBase ::
278 set_logTextOut_OutputPort(
284 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
285 static_cast<FwAssertArgType>(portNum)
288 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
301 static_cast<FwAssertArgType>(portNum)
304 this->m_prmGetOut_OutputPort[portNum].
addCallPort(port);
315 static_cast<FwAssertArgType>(portNum)
318 this->m_prmSetOut_OutputPort[portNum].
addCallPort(port);
329 static_cast<FwAssertArgType>(portNum)
332 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
343 static_cast<FwAssertArgType>(portNum)
346 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
361 static_cast<FwAssertArgType>(portNum)
364 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
375 static_cast<FwAssertArgType>(portNum)
378 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
381 #if FW_PORT_SERIALIZATION 390 Fw::InputSerializePort* port
395 static_cast<FwAssertArgType>(portNum)
398 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
401 #if FW_ENABLE_TEXT_LOGGING == 1 403 void TcDeframerComponentBase ::
404 set_logTextOut_OutputPort(
406 Fw::InputSerializePort* port
410 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
411 static_cast<FwAssertArgType>(portNum)
414 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
422 Fw::InputSerializePort* port
427 static_cast<FwAssertArgType>(portNum)
430 this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
436 Fw::InputSerializePort* port
441 static_cast<FwAssertArgType>(portNum)
444 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
450 Fw::InputSerializePort* port
455 static_cast<FwAssertArgType>(portNum)
458 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
463 #if FW_PORT_SERIALIZATION 472 Fw::InputSerializePort* port
477 static_cast<FwAssertArgType>(portNum)
480 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
486 Fw::InputSerializePort* port
491 static_cast<FwAssertArgType>(portNum)
494 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
505 Fw::PassiveComponentBase(compName)
542 #if FW_ENABLE_TEXT_LOGGING == 1 545 getNum_logTextOut_OutputPorts()
const 601 static_cast<FwAssertArgType>(portNum)
604 return this->m_logOut_OutputPort[portNum].
isConnected();
607 #if FW_ENABLE_TEXT_LOGGING == 1 609 bool TcDeframerComponentBase ::
610 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
613 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
614 static_cast<FwAssertArgType>(portNum)
617 return this->m_logTextOut_OutputPort[portNum].isConnected();
627 static_cast<FwAssertArgType>(portNum)
630 return this->m_prmGetOut_OutputPort[portNum].
isConnected();
638 static_cast<FwAssertArgType>(portNum)
641 return this->m_prmSetOut_OutputPort[portNum].
isConnected();
649 static_cast<FwAssertArgType>(portNum)
652 return this->m_timeCaller_OutputPort[portNum].
isConnected();
660 static_cast<FwAssertArgType>(portNum)
663 return this->m_tlmOut_OutputPort[portNum].
isConnected();
675 static_cast<FwAssertArgType>(portNum)
678 return this->m_dataOut_OutputPort[portNum].
isConnected();
686 static_cast<FwAssertArgType>(portNum)
689 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
708 static_cast<FwAssertArgType>(portNum)
735 static_cast<FwAssertArgType>(portNum)
759 static_cast<FwAssertArgType>(portNum)
763 this->m_dataOut_OutputPort[portNum].isConnected(),
764 static_cast<FwAssertArgType>(portNum)
766 this->m_dataOut_OutputPort[portNum].
invoke(
781 static_cast<FwAssertArgType>(portNum)
785 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
786 static_cast<FwAssertArgType>(portNum)
788 this->m_dataReturnOut_OutputPort[portNum].
invoke(
806 if (this->m_timeCaller_OutputPort[0].isConnected()) {
807 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
815 if (this->m_logOut_OutputPort[0].isConnected()) {
819 #if FW_AMPCS_COMPATIBLE 821 _status = _logBuff.
serialize(static_cast<U8>(2));
824 static_cast<FwAssertArgType>(_status)
828 #if FW_AMPCS_COMPATIBLE 831 static_cast<U8>(
sizeof(U16))
835 static_cast<FwAssertArgType>(_status)
838 _status = _logBuff.
serialize(transmitted);
841 static_cast<FwAssertArgType>(_status)
844 #if FW_AMPCS_COMPATIBLE 847 static_cast<U8>(
sizeof(U16))
851 static_cast<FwAssertArgType>(_status)
854 _status = _logBuff.
serialize(configured);
857 static_cast<FwAssertArgType>(_status)
860 this->m_logOut_OutputPort[0].
invoke(
869 #if FW_ENABLE_TEXT_LOGGING 870 if (this->m_logTextOut_OutputPort[0].isConnected()) {
871 #if FW_OBJECT_NAMES == 1 872 const char* _formatString =
873 "(%s) %s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
875 const char* _formatString =
876 "%s: Invalid Spacecraft ID Received. Received: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
883 this->m_objName.toChar(),
885 "InvalidSpacecraftId ",
890 this->m_logTextOut_OutputPort[0].invoke(
908 if (this->m_timeCaller_OutputPort[0].isConnected()) {
909 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
917 if (this->m_logOut_OutputPort[0].isConnected()) {
921 #if FW_AMPCS_COMPATIBLE 923 _status = _logBuff.
serialize(static_cast<U8>(2));
926 static_cast<FwAssertArgType>(_status)
930 #if FW_AMPCS_COMPATIBLE 933 static_cast<U8>(
sizeof(U16))
937 static_cast<FwAssertArgType>(_status)
940 _status = _logBuff.
serialize(transmitted);
943 static_cast<FwAssertArgType>(_status)
946 #if FW_AMPCS_COMPATIBLE 953 static_cast<FwAssertArgType>(_status)
959 static_cast<FwAssertArgType>(_status)
962 this->m_logOut_OutputPort[0].
invoke(
971 #if FW_ENABLE_TEXT_LOGGING 972 if (this->m_logTextOut_OutputPort[0].isConnected()) {
973 #if FW_OBJECT_NAMES == 1 974 const char* _formatString =
975 "(%s) %s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
977 const char* _formatString =
978 "%s: Not enough data received. Header length specified: %" PRIu16
" | Received data length: %" PRIu64
"";
985 this->m_objName.toChar(),
987 "InvalidFrameLength ",
992 this->m_logTextOut_OutputPort[0].invoke(
1010 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1011 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1019 if (this->m_logOut_OutputPort[0].isConnected()) {
1023 #if FW_AMPCS_COMPATIBLE 1025 _status = _logBuff.
serialize(static_cast<U8>(2));
1028 static_cast<FwAssertArgType>(_status)
1032 #if FW_AMPCS_COMPATIBLE 1035 static_cast<U8>(
sizeof(U16))
1039 static_cast<FwAssertArgType>(_status)
1042 _status = _logBuff.
serialize(transmitted);
1045 static_cast<FwAssertArgType>(_status)
1048 #if FW_AMPCS_COMPATIBLE 1051 static_cast<U8>(
sizeof(U16))
1055 static_cast<FwAssertArgType>(_status)
1058 _status = _logBuff.
serialize(configured);
1061 static_cast<FwAssertArgType>(_status)
1064 this->m_logOut_OutputPort[0].
invoke(
1073 #if FW_ENABLE_TEXT_LOGGING 1074 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1075 #if FW_OBJECT_NAMES == 1 1076 const char* _formatString =
1077 "(%s) %s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1079 const char* _formatString =
1080 "%s: Invalid Virtual Channel ID Received. Header token specified: %" PRIu16
" | Deframer configured with: %" PRIu16
"";
1087 this->m_objName.toChar(),
1094 this->m_logTextOut_OutputPort[0].invoke(
1112 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1113 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1121 if (this->m_logOut_OutputPort[0].isConnected()) {
1125 #if FW_AMPCS_COMPATIBLE 1127 _status = _logBuff.
serialize(static_cast<U8>(2));
1130 static_cast<FwAssertArgType>(_status)
1134 #if FW_AMPCS_COMPATIBLE 1137 static_cast<U8>(
sizeof(U16))
1141 static_cast<FwAssertArgType>(_status)
1144 _status = _logBuff.
serialize(transmitted);
1147 static_cast<FwAssertArgType>(_status)
1150 #if FW_AMPCS_COMPATIBLE 1153 static_cast<U8>(
sizeof(U16))
1157 static_cast<FwAssertArgType>(_status)
1163 static_cast<FwAssertArgType>(_status)
1166 this->m_logOut_OutputPort[0].
invoke(
1175 #if FW_ENABLE_TEXT_LOGGING 1176 if (this->m_logTextOut_OutputPort[0].isConnected()) {
1177 #if FW_OBJECT_NAMES == 1 1178 const char* _formatString =
1179 "(%s) %s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1181 const char* _formatString =
1182 "%s: Invalid checksum received. Trailer specified: %" PRIu16
" | Computed on board: %" PRIu16
"";
1189 this->m_objName.toChar(),
1196 this->m_logTextOut_OutputPort[0].invoke(
1213 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1215 this->m_timeCaller_OutputPort[0].
invoke(_time);
1233 this->m_guardedPortMutex.
lock();
1239 this->m_guardedPortMutex.
unLock();
1246 void TcDeframerComponentBase ::
1263 void TcDeframerComponentBase ::
1264 m_p_dataReturnIn_in(
1273 compPtr->dataReturnIn_handlerBase(
Deframing received an invalid frame length.
Serialization/Deserialization operation was successful.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
FwIndexType getNum_dataOut_OutputPorts() const
void addCallPort(InputTimePort *callPort)
Register an input port.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum)
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Deframing received an invalid VCID.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void unLock()
unlock the mutex and assert success
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
Deframing received an invalid checksum.
Auto-generated base for TcDeframer component.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void init()
Initialization function.
FwIndexType getNum_prmGetOut_OutputPorts() const
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum)
void log_WARNING_LO_InvalidSpacecraftId(U16 transmitted, U16 configured) const
void init()
Initialization function.
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void init()
Object initializer.
SerializeStatus
forward declaration for string
FwIndexType getNum_dataIn_InputPorts() const
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
void log_WARNING_HI_InvalidCrc(U16 transmitted, U16 computed) const
FwIdType FwEventIdType
The type of an event identifier.
void log_WARNING_HI_InvalidFrameLength(U16 transmitted, FwSizeType actual) const
virtual void lock()
Lock the guarded mutex.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
FwIndexType getNum_dataReturnOut_OutputPorts() const
void init()
Initialization function.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Less important informational events.
A less serious but recoverable event.
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
void invoke(Fw::Time &time) const
Invoke a port interface.
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
const char * toChar() const
virtual ~TcDeframerComponentBase()
Destroy TcDeframerComponentBase object.
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port interface.
A serious but recoverable event.
void init()
Initialization function.
FwIndexType getNum_timeCaller_OutputPorts() const
Deframing received an invalid SCID.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
FwIndexType getNum_dataReturnIn_InputPorts() const
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
No time base has been established.
PlatformIndexType FwIndexType
virtual void unLock()
Unlock the guarded mutex.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
FwIndexType getNum_prmSetOut_OutputPorts() const
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
TcDeframerComponentBase(const char *compName="")
Construct TcDeframerComponentBase object.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
FwIndexType getNum_logOut_OutputPorts() const
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
void log_ACTIVITY_LO_InvalidVcId(U16 transmitted, U16 configured) const
FwIndexType getNum_tlmOut_OutputPorts() const
void lock()
lock the mutex and assert success