11#if FW_ENABLE_TEXT_LOGGING
20 BUFFQUEUEIN_BUFFERSEND,
22 COMSTATUSIN_SUCCESSCONDITION,
37 class ComponentIpcSerializableBuffer :
52 return sizeof(m_buff);
59 const U8* getBuffAddr()
const {
65 U8 m_buff[SERIALIZATION_SIZE];
74 void ComQueueComponentBase ::
86 port < static_cast<PlatformIntType>(this->getNum_buffQueueIn_InputPorts());
89 this->m_buffQueueIn_InputPort[port].init();
90 this->m_buffQueueIn_InputPort[port].addCallComp(
94 this->m_buffQueueIn_InputPort[port].setPortNum(port);
96#if FW_OBJECT_NAMES == 1
105 this->m_buffQueueIn_InputPort[port].setObjName(portName);
112 port < static_cast<PlatformIntType>(this->getNum_comQueueIn_InputPorts());
115 this->m_comQueueIn_InputPort[port].init();
116 this->m_comQueueIn_InputPort[port].addCallComp(
120 this->m_comQueueIn_InputPort[port].setPortNum(port);
122#if FW_OBJECT_NAMES == 1
131 this->m_comQueueIn_InputPort[port].setObjName(portName);
138 port < static_cast<PlatformIntType>(this->getNum_comStatusIn_InputPorts());
141 this->m_comStatusIn_InputPort[port].init();
142 this->m_comStatusIn_InputPort[port].addCallComp(
146 this->m_comStatusIn_InputPort[port].setPortNum(port);
148#if FW_OBJECT_NAMES == 1
157 this->m_comStatusIn_InputPort[port].setObjName(portName);
164 port < static_cast<PlatformIntType>(this->getNum_run_InputPorts());
167 this->m_run_InputPort[port].init();
168 this->m_run_InputPort[port].addCallComp(
172 this->m_run_InputPort[port].setPortNum(port);
174#if FW_OBJECT_NAMES == 1
183 this->m_run_InputPort[port].setObjName(portName);
190 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
193 this->m_Log_OutputPort[port].init();
195#if FW_OBJECT_NAMES == 1
204 this->m_Log_OutputPort[port].setObjName(portName);
208#if FW_ENABLE_TEXT_LOGGING == 1
212 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
215 this->m_LogText_OutputPort[port].init();
217#if FW_OBJECT_NAMES == 1
226 this->m_LogText_OutputPort[port].setObjName(portName);
234 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
237 this->m_Time_OutputPort[port].init();
239#if FW_OBJECT_NAMES == 1
248 this->m_Time_OutputPort[port].setObjName(portName);
255 port < static_cast<PlatformIntType>(this->getNum_Tlm_OutputPorts());
258 this->m_Tlm_OutputPort[port].init();
260#if FW_OBJECT_NAMES == 1
269 this->m_Tlm_OutputPort[port].setObjName(portName);
276 port < static_cast<PlatformIntType>(this->getNum_buffQueueSend_OutputPorts());
279 this->m_buffQueueSend_OutputPort[port].init();
281#if FW_OBJECT_NAMES == 1
290 this->m_buffQueueSend_OutputPort[port].setObjName(portName);
297 port < static_cast<PlatformIntType>(this->getNum_comQueueSend_OutputPorts());
300 this->m_comQueueSend_OutputPort[port].init();
302#if FW_OBJECT_NAMES == 1
311 this->m_comQueueSend_OutputPort[port].setObjName(portName);
317 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
74 void ComQueueComponentBase :: {
…}
333 portNum < this->getNum_buffQueueIn_InputPorts(),
337 return &this->m_buffQueueIn_InputPort[portNum];
344 portNum < this->getNum_comQueueIn_InputPorts(),
348 return &this->m_comQueueIn_InputPort[portNum];
355 portNum < this->getNum_comStatusIn_InputPorts(),
359 return &this->m_comStatusIn_InputPort[portNum];
366 portNum < this->getNum_run_InputPorts(),
370 return &this->m_run_InputPort[portNum];
377 void ComQueueComponentBase ::
384 portNum < this->getNum_Log_OutputPorts(),
388 this->m_Log_OutputPort[portNum].addCallPort(port);
377 void ComQueueComponentBase :: {
…}
391#if FW_ENABLE_TEXT_LOGGING == 1
393 void ComQueueComponentBase ::
394 set_LogText_OutputPort(
400 portNum < this->getNum_LogText_OutputPorts(),
404 this->m_LogText_OutputPort[portNum].addCallPort(port);
409 void ComQueueComponentBase ::
416 portNum < this->getNum_Time_OutputPorts(),
420 this->m_Time_OutputPort[portNum].addCallPort(port);
409 void ComQueueComponentBase :: {
…}
423 void ComQueueComponentBase ::
430 portNum < this->getNum_Tlm_OutputPorts(),
434 this->m_Tlm_OutputPort[portNum].addCallPort(port);
423 void ComQueueComponentBase :: {
…}
441 void ComQueueComponentBase ::
442 set_buffQueueSend_OutputPort(
448 portNum < this->getNum_buffQueueSend_OutputPorts(),
452 this->m_buffQueueSend_OutputPort[portNum].addCallPort(port);
441 void ComQueueComponentBase :: {
…}
455 void ComQueueComponentBase ::
456 set_comQueueSend_OutputPort(
462 portNum < this->getNum_comQueueSend_OutputPorts(),
466 this->m_comQueueSend_OutputPort[portNum].addCallPort(port);
455 void ComQueueComponentBase :: {
…}
469#if FW_PORT_SERIALIZATION
475 void ComQueueComponentBase ::
478 Fw::InputSerializePort* port
482 portNum < this->getNum_Log_OutputPorts(),
486 this->m_Log_OutputPort[portNum].registerSerialPort(port);
489#if FW_ENABLE_TEXT_LOGGING == 1
491 void ComQueueComponentBase ::
492 set_LogText_OutputPort(
494 Fw::InputSerializePort* port
498 portNum < this->getNum_LogText_OutputPorts(),
502 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
507 void ComQueueComponentBase ::
510 Fw::InputSerializePort* port
514 portNum < this->getNum_Time_OutputPorts(),
518 this->m_Time_OutputPort[portNum].registerSerialPort(port);
521 void ComQueueComponentBase ::
524 Fw::InputSerializePort* port
528 portNum < this->getNum_Tlm_OutputPorts(),
532 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
537#if FW_PORT_SERIALIZATION
543 void ComQueueComponentBase ::
544 set_buffQueueSend_OutputPort(
546 Fw::InputSerializePort* port
550 portNum < this->getNum_buffQueueSend_OutputPorts(),
554 this->m_buffQueueSend_OutputPort[portNum].registerSerialPort(port);
557 void ComQueueComponentBase ::
558 set_comQueueSend_OutputPort(
560 Fw::InputSerializePort* port
564 portNum < this->getNum_comQueueSend_OutputPorts(),
568 this->m_comQueueSend_OutputPort[portNum].registerSerialPort(port);
577 ComQueueComponentBase ::
578 ComQueueComponentBase(
const char* compName) :
579 Fw::ActiveComponentBase(compName)
577 ComQueueComponentBase :: {
…}
584 ComQueueComponentBase ::
585 ~ComQueueComponentBase()
584 ComQueueComponentBase :: {
…}
595 getNum_buffQueueIn_InputPorts()
const
601 getNum_comQueueIn_InputPorts()
const
607 getNum_comStatusIn_InputPorts()
const
613 getNum_run_InputPorts()
const
623 getNum_Log_OutputPorts()
const
628#if FW_ENABLE_TEXT_LOGGING == 1
631 getNum_LogText_OutputPorts()
const
639 getNum_Time_OutputPorts()
const
645 getNum_Tlm_OutputPorts()
const
655 getNum_buffQueueSend_OutputPorts()
const
661 getNum_comQueueSend_OutputPorts()
const
670 bool ComQueueComponentBase ::
674 portNum < this->getNum_Log_OutputPorts(),
678 return this->m_Log_OutputPort[portNum].isConnected();
670 bool ComQueueComponentBase :: {
…}
681#if FW_ENABLE_TEXT_LOGGING == 1
683 bool ComQueueComponentBase ::
687 portNum < this->getNum_LogText_OutputPorts(),
691 return this->m_LogText_OutputPort[portNum].isConnected();
696 bool ComQueueComponentBase ::
700 portNum < this->getNum_Time_OutputPorts(),
704 return this->m_Time_OutputPort[portNum].isConnected();
696 bool ComQueueComponentBase :: {
…}
707 bool ComQueueComponentBase ::
711 portNum < this->getNum_Tlm_OutputPorts(),
715 return this->m_Tlm_OutputPort[portNum].isConnected();
707 bool ComQueueComponentBase :: {
…}
722 bool ComQueueComponentBase ::
726 portNum < this->getNum_buffQueueSend_OutputPorts(),
730 return this->m_buffQueueSend_OutputPort[portNum].isConnected();
722 bool ComQueueComponentBase :: {
…}
733 bool ComQueueComponentBase ::
737 portNum < this->getNum_comQueueSend_OutputPorts(),
741 return this->m_comQueueSend_OutputPort[portNum].isConnected();
733 bool ComQueueComponentBase :: {
…}
750 void ComQueueComponentBase ::
751 buffQueueIn_handlerBase(
758 portNum < this->getNum_buffQueueIn_InputPorts(),
763 buffQueueIn_preMsgHook(
767 ComponentIpcSerializableBuffer msg;
771 _status = msg.serialize(
780 _status = msg.serialize(portNum);
787 _status = msg.serialize(fwBuffer);
798 this->incNumMsgDropped();
750 void ComQueueComponentBase :: {
…}
808 void ComQueueComponentBase ::
809 comQueueIn_handlerBase(
817 portNum < this->getNum_comQueueIn_InputPorts(),
822 comQueueIn_preMsgHook(
827 ComponentIpcSerializableBuffer msg;
831 _status = msg.serialize(
840 _status = msg.serialize(portNum);
847 _status = msg.serialize(data);
854 _status = msg.serialize(context);
865 this->incNumMsgDropped();
808 void ComQueueComponentBase :: {
…}
875 void ComQueueComponentBase ::
876 comStatusIn_handlerBase(
883 portNum < this->getNum_comStatusIn_InputPorts(),
888 comStatusIn_preMsgHook(
892 ComponentIpcSerializableBuffer msg;
896 _status = msg.serialize(
905 _status = msg.serialize(portNum);
912 _status = msg.serialize(condition);
875 void ComQueueComponentBase :: {
…}
928 void ComQueueComponentBase ::
936 portNum < this->getNum_run_InputPorts(),
945 ComponentIpcSerializableBuffer msg;
949 _status = msg.serialize(
958 _status = msg.serialize(portNum);
965 _status = msg.serialize(context);
976 this->incNumMsgDropped();
928 void ComQueueComponentBase :: {
…}
994 void ComQueueComponentBase ::
995 buffQueueIn_preMsgHook(
994 void ComQueueComponentBase :: {
…}
1003 void ComQueueComponentBase ::
1004 comQueueIn_preMsgHook(
1003 void ComQueueComponentBase :: {
…}
1013 void ComQueueComponentBase ::
1014 comStatusIn_preMsgHook(
1013 void ComQueueComponentBase :: {
…}
1022 void ComQueueComponentBase ::
1022 void ComQueueComponentBase :: {
…}
1035 void ComQueueComponentBase ::
1042 portNum < this->getNum_buffQueueSend_OutputPorts(),
1045 this->m_buffQueueSend_OutputPort[portNum].invoke(
1035 void ComQueueComponentBase :: {
…}
1050 void ComQueueComponentBase ::
1058 portNum < this->getNum_comQueueSend_OutputPorts(),
1061 this->m_comQueueSend_OutputPort[portNum].invoke(
1050 void ComQueueComponentBase :: {
…}
1071 void ComQueueComponentBase ::
1072 log_WARNING_HI_QueueOverflow(
1079 if (this->m_Time_OutputPort[0].isConnected()) {
1080 this->m_Time_OutputPort[0].invoke(_logTime);
1085 _id = this->getIdBase() + EVENTID_QUEUEOVERFLOW;
1088 if (this->m_Log_OutputPort[0].isConnected()) {
1092#if FW_AMPCS_COMPATIBLE
1101#if FW_AMPCS_COMPATIBLE
1111 _status = _logBuff.
serialize(queueType);
1117#if FW_AMPCS_COMPATIBLE
1120 static_cast<U8>(
sizeof(U32))
1133 this->m_Log_OutputPort[0].invoke(
1142#if FW_ENABLE_TEXT_LOGGING
1143 if (this->m_LogText_OutputPort[0].isConnected()) {
1144#if FW_OBJECT_NAMES == 1
1145 const char* _formatString =
1146 "(%s) %s: The %s queue at index %" PRIu32
" overflowed";
1148 const char* _formatString =
1149 "%s: The %s queue at index %" PRIu32
" overflowed";
1155 queueType.toString(queueTypeStr);
1172 this->m_LogText_OutputPort[0].invoke(
1071 void ComQueueComponentBase :: {
…}
1186 void ComQueueComponentBase ::
1187 tlmWrite_comQueueDepth(
1192 if (this->m_Tlm_OutputPort[0].isConnected()) {
1194 this->m_Time_OutputPort[0].isConnected() &&
1197 this->m_Time_OutputPort[0].invoke(_tlmTime);
1209 _id = this->getIdBase() + CHANNELID_COMQUEUEDEPTH;
1211 this->m_Tlm_OutputPort[0].invoke(
1186 void ComQueueComponentBase :: {
…}
1219 void ComQueueComponentBase ::
1220 tlmWrite_buffQueueDepth(
1225 if (this->m_Tlm_OutputPort[0].isConnected()) {
1227 this->m_Time_OutputPort[0].isConnected() &&
1230 this->m_Time_OutputPort[0].invoke(_tlmTime);
1242 _id = this->getIdBase() + CHANNELID_BUFFQUEUEDEPTH;
1244 this->m_Tlm_OutputPort[0].invoke(
1219 void ComQueueComponentBase :: {
…}
1259 if (this->m_Time_OutputPort[0].isConnected()) {
1261 this->m_Time_OutputPort[0].invoke(_time);
1276 ComponentIpcSerializableBuffer msg;
1299 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
1301 if (msgType == COMQUEUE_COMPONENT_EXIT) {
1302 return MSG_DISPATCH_EXIT;
1306 deserStatus = msg.deserialize(portNum);
1314 case BUFFQUEUEIN_BUFFERSEND: {
1317 deserStatus = msg.deserialize(fwBuffer);
1323 this->buffQueueIn_handler(
1332 case COMQUEUEIN_COM: {
1335 deserStatus = msg.deserialize(data);
1343 deserStatus = msg.deserialize(context);
1349 this->comQueueIn_handler(
1359 case COMSTATUSIN_SUCCESSCONDITION: {
1362 deserStatus = msg.deserialize(condition);
1368 this->comStatusIn_handler(
1380 deserStatus = msg.deserialize(context);
1395 return MSG_DISPATCH_ERROR;
1398 return MSG_DISPATCH_OK;
1405 void ComQueueComponentBase ::
1413 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1414 compPtr->buffQueueIn_handlerBase(
1420 void ComQueueComponentBase ::
1429 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1430 compPtr->comQueueIn_handlerBase(
1437 void ComQueueComponentBase ::
1445 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1446 compPtr->comStatusIn_handlerBase(
1452 void ComQueueComponentBase ::
1460 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1461 compPtr->run_handlerBase(
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
PlatformUIntType NATIVE_UINT_TYPE
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
@ WARNING_HI
A serious but recoverable event.
void init()
Object initializer.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
const char * toChar() const
gets char buffer
@ QUEUE_OK
message sent/received okay
@ QUEUE_FULL
queue was full when attempting to send a message
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Array of queue depths for Fw::Buffer types.
Array of queue depths for Fw::Com types.
An enumeration of queue data types.
@ SERIALIZED_SIZE
The size of the serial representation.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.