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
103 char portName[2*FW_OBJ_NAME_MAX_SIZE];
111 this->m_buffQueueIn_InputPort[port].setObjName(portName);
118 port < static_cast<PlatformIntType>(this->getNum_comQueueIn_InputPorts());
121 this->m_comQueueIn_InputPort[port].init();
122 this->m_comQueueIn_InputPort[port].addCallComp(
126 this->m_comQueueIn_InputPort[port].setPortNum(port);
128#if FW_OBJECT_NAMES == 1
135 char portName[2*FW_OBJ_NAME_MAX_SIZE];
143 this->m_comQueueIn_InputPort[port].setObjName(portName);
150 port < static_cast<PlatformIntType>(this->getNum_comStatusIn_InputPorts());
153 this->m_comStatusIn_InputPort[port].init();
154 this->m_comStatusIn_InputPort[port].addCallComp(
158 this->m_comStatusIn_InputPort[port].setPortNum(port);
160#if FW_OBJECT_NAMES == 1
167 char portName[2*FW_OBJ_NAME_MAX_SIZE];
175 this->m_comStatusIn_InputPort[port].setObjName(portName);
182 port < static_cast<PlatformIntType>(this->getNum_run_InputPorts());
185 this->m_run_InputPort[port].init();
186 this->m_run_InputPort[port].addCallComp(
190 this->m_run_InputPort[port].setPortNum(port);
192#if FW_OBJECT_NAMES == 1
199 char portName[2*FW_OBJ_NAME_MAX_SIZE];
207 this->m_run_InputPort[port].setObjName(portName);
214 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
217 this->m_Log_OutputPort[port].init();
219#if FW_OBJECT_NAMES == 1
226 char portName[2*FW_OBJ_NAME_MAX_SIZE];
234 this->m_Log_OutputPort[port].setObjName(portName);
238#if FW_ENABLE_TEXT_LOGGING == 1
242 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
245 this->m_LogText_OutputPort[port].init();
247#if FW_OBJECT_NAMES == 1
254 char portName[2*FW_OBJ_NAME_MAX_SIZE];
262 this->m_LogText_OutputPort[port].setObjName(portName);
270 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
273 this->m_Time_OutputPort[port].init();
275#if FW_OBJECT_NAMES == 1
282 char portName[2*FW_OBJ_NAME_MAX_SIZE];
290 this->m_Time_OutputPort[port].setObjName(portName);
297 port < static_cast<PlatformIntType>(this->getNum_Tlm_OutputPorts());
300 this->m_Tlm_OutputPort[port].init();
302#if FW_OBJECT_NAMES == 1
309 char portName[2*FW_OBJ_NAME_MAX_SIZE];
317 this->m_Tlm_OutputPort[port].setObjName(portName);
324 port < static_cast<PlatformIntType>(this->getNum_buffQueueSend_OutputPorts());
327 this->m_buffQueueSend_OutputPort[port].init();
329#if FW_OBJECT_NAMES == 1
336 char portName[2*FW_OBJ_NAME_MAX_SIZE];
344 this->m_buffQueueSend_OutputPort[port].setObjName(portName);
351 port < static_cast<PlatformIntType>(this->getNum_comQueueSend_OutputPorts());
354 this->m_comQueueSend_OutputPort[port].init();
356#if FW_OBJECT_NAMES == 1
363 char portName[2*FW_OBJ_NAME_MAX_SIZE];
371 this->m_comQueueSend_OutputPort[port].setObjName(portName);
377 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
74 void ComQueueComponentBase :: {
…}
393 portNum < this->getNum_buffQueueIn_InputPorts(),
397 return &this->m_buffQueueIn_InputPort[portNum];
404 portNum < this->getNum_comQueueIn_InputPorts(),
408 return &this->m_comQueueIn_InputPort[portNum];
415 portNum < this->getNum_comStatusIn_InputPorts(),
419 return &this->m_comStatusIn_InputPort[portNum];
426 portNum < this->getNum_run_InputPorts(),
430 return &this->m_run_InputPort[portNum];
437 void ComQueueComponentBase ::
444 portNum < this->getNum_Log_OutputPorts(),
448 this->m_Log_OutputPort[portNum].addCallPort(port);
437 void ComQueueComponentBase :: {
…}
451#if FW_ENABLE_TEXT_LOGGING == 1
453 void ComQueueComponentBase ::
454 set_LogText_OutputPort(
460 portNum < this->getNum_LogText_OutputPorts(),
464 this->m_LogText_OutputPort[portNum].addCallPort(port);
469 void ComQueueComponentBase ::
476 portNum < this->getNum_Time_OutputPorts(),
480 this->m_Time_OutputPort[portNum].addCallPort(port);
469 void ComQueueComponentBase :: {
…}
483 void ComQueueComponentBase ::
490 portNum < this->getNum_Tlm_OutputPorts(),
494 this->m_Tlm_OutputPort[portNum].addCallPort(port);
483 void ComQueueComponentBase :: {
…}
501 void ComQueueComponentBase ::
502 set_buffQueueSend_OutputPort(
508 portNum < this->getNum_buffQueueSend_OutputPorts(),
512 this->m_buffQueueSend_OutputPort[portNum].addCallPort(port);
501 void ComQueueComponentBase :: {
…}
515 void ComQueueComponentBase ::
516 set_comQueueSend_OutputPort(
522 portNum < this->getNum_comQueueSend_OutputPorts(),
526 this->m_comQueueSend_OutputPort[portNum].addCallPort(port);
515 void ComQueueComponentBase :: {
…}
529#if FW_PORT_SERIALIZATION
535 void ComQueueComponentBase ::
538 Fw::InputSerializePort* port
542 portNum < this->getNum_Log_OutputPorts(),
546 this->m_Log_OutputPort[portNum].registerSerialPort(port);
549#if FW_ENABLE_TEXT_LOGGING == 1
551 void ComQueueComponentBase ::
552 set_LogText_OutputPort(
554 Fw::InputSerializePort* port
558 portNum < this->getNum_LogText_OutputPorts(),
562 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
567 void ComQueueComponentBase ::
570 Fw::InputSerializePort* port
574 portNum < this->getNum_Time_OutputPorts(),
578 this->m_Time_OutputPort[portNum].registerSerialPort(port);
581 void ComQueueComponentBase ::
584 Fw::InputSerializePort* port
588 portNum < this->getNum_Tlm_OutputPorts(),
592 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
597#if FW_PORT_SERIALIZATION
603 void ComQueueComponentBase ::
604 set_buffQueueSend_OutputPort(
606 Fw::InputSerializePort* port
610 portNum < this->getNum_buffQueueSend_OutputPorts(),
614 this->m_buffQueueSend_OutputPort[portNum].registerSerialPort(port);
617 void ComQueueComponentBase ::
618 set_comQueueSend_OutputPort(
620 Fw::InputSerializePort* port
624 portNum < this->getNum_comQueueSend_OutputPorts(),
628 this->m_comQueueSend_OutputPort[portNum].registerSerialPort(port);
637 ComQueueComponentBase ::
638 ComQueueComponentBase(
const char* compName) :
639 Fw::ActiveComponentBase(compName)
637 ComQueueComponentBase :: {
…}
644 ComQueueComponentBase ::
645 ~ComQueueComponentBase()
644 ComQueueComponentBase :: {
…}
655 getNum_buffQueueIn_InputPorts()
const
661 getNum_comQueueIn_InputPorts()
const
667 getNum_comStatusIn_InputPorts()
const
673 getNum_run_InputPorts()
const
683 getNum_Log_OutputPorts()
const
688#if FW_ENABLE_TEXT_LOGGING == 1
691 getNum_LogText_OutputPorts()
const
699 getNum_Time_OutputPorts()
const
705 getNum_Tlm_OutputPorts()
const
715 getNum_buffQueueSend_OutputPorts()
const
721 getNum_comQueueSend_OutputPorts()
const
730 bool ComQueueComponentBase ::
734 portNum < this->getNum_Log_OutputPorts(),
738 return this->m_Log_OutputPort[portNum].isConnected();
730 bool ComQueueComponentBase :: {
…}
741#if FW_ENABLE_TEXT_LOGGING == 1
743 bool ComQueueComponentBase ::
747 portNum < this->getNum_LogText_OutputPorts(),
751 return this->m_LogText_OutputPort[portNum].isConnected();
756 bool ComQueueComponentBase ::
760 portNum < this->getNum_Time_OutputPorts(),
764 return this->m_Time_OutputPort[portNum].isConnected();
756 bool ComQueueComponentBase :: {
…}
767 bool ComQueueComponentBase ::
771 portNum < this->getNum_Tlm_OutputPorts(),
775 return this->m_Tlm_OutputPort[portNum].isConnected();
767 bool ComQueueComponentBase :: {
…}
782 bool ComQueueComponentBase ::
786 portNum < this->getNum_buffQueueSend_OutputPorts(),
790 return this->m_buffQueueSend_OutputPort[portNum].isConnected();
782 bool ComQueueComponentBase :: {
…}
793 bool ComQueueComponentBase ::
797 portNum < this->getNum_comQueueSend_OutputPorts(),
801 return this->m_comQueueSend_OutputPort[portNum].isConnected();
793 bool ComQueueComponentBase :: {
…}
810 void ComQueueComponentBase ::
811 buffQueueIn_handlerBase(
818 portNum < this->getNum_buffQueueIn_InputPorts(),
823 buffQueueIn_preMsgHook(
827 ComponentIpcSerializableBuffer msg;
831 _status = msg.serialize(
840 _status = msg.serialize(portNum);
847 _status = msg.serialize(fwBuffer);
858 this->incNumMsgDropped();
810 void ComQueueComponentBase :: {
…}
868 void ComQueueComponentBase ::
869 comQueueIn_handlerBase(
877 portNum < this->getNum_comQueueIn_InputPorts(),
882 comQueueIn_preMsgHook(
887 ComponentIpcSerializableBuffer msg;
891 _status = msg.serialize(
900 _status = msg.serialize(portNum);
907 _status = msg.serialize(data);
914 _status = msg.serialize(context);
925 this->incNumMsgDropped();
868 void ComQueueComponentBase :: {
…}
935 void ComQueueComponentBase ::
936 comStatusIn_handlerBase(
943 portNum < this->getNum_comStatusIn_InputPorts(),
948 comStatusIn_preMsgHook(
952 ComponentIpcSerializableBuffer msg;
956 _status = msg.serialize(
965 _status = msg.serialize(portNum);
972 _status = msg.serialize(condition);
935 void ComQueueComponentBase :: {
…}
988 void ComQueueComponentBase ::
996 portNum < this->getNum_run_InputPorts(),
1005 ComponentIpcSerializableBuffer msg;
1009 _status = msg.serialize(
1018 _status = msg.serialize(portNum);
1025 _status = msg.serialize(context);
1036 this->incNumMsgDropped();
988 void ComQueueComponentBase :: {
…}
1054 void ComQueueComponentBase ::
1055 buffQueueIn_preMsgHook(
1054 void ComQueueComponentBase :: {
…}
1063 void ComQueueComponentBase ::
1064 comQueueIn_preMsgHook(
1063 void ComQueueComponentBase :: {
…}
1073 void ComQueueComponentBase ::
1074 comStatusIn_preMsgHook(
1073 void ComQueueComponentBase :: {
…}
1082 void ComQueueComponentBase ::
1082 void ComQueueComponentBase :: {
…}
1095 void ComQueueComponentBase ::
1102 portNum < this->getNum_buffQueueSend_OutputPorts(),
1105 this->m_buffQueueSend_OutputPort[portNum].invoke(
1095 void ComQueueComponentBase :: {
…}
1110 void ComQueueComponentBase ::
1118 portNum < this->getNum_comQueueSend_OutputPorts(),
1121 this->m_comQueueSend_OutputPort[portNum].invoke(
1110 void ComQueueComponentBase :: {
…}
1131 void ComQueueComponentBase ::
1132 log_WARNING_HI_QueueOverflow(
1139 if (this->m_Time_OutputPort[0].isConnected()) {
1140 this->m_Time_OutputPort[0].invoke(_logTime);
1145 _id = this->getIdBase() + EVENTID_QUEUEOVERFLOW;
1148 if (this->m_Log_OutputPort[0].isConnected()) {
1152#if FW_AMPCS_COMPATIBLE
1161#if FW_AMPCS_COMPATIBLE
1171 _status = _logBuff.
serialize(queueType);
1177#if FW_AMPCS_COMPATIBLE
1180 static_cast<U8>(
sizeof(U32))
1193 this->m_Log_OutputPort[0].invoke(
1202#if FW_ENABLE_TEXT_LOGGING
1203 if (this->m_LogText_OutputPort[0].isConnected()) {
1204#if FW_OBJECT_NAMES == 1
1205 const char* _formatString =
1206 "(%s) %s: The %s queue at index %" PRIu32
" overflowed";
1208 const char* _formatString =
1209 "%s: The %s queue at index %" PRIu32
" overflowed";
1215 queueType.toString(queueTypeStr);
1232 this->m_LogText_OutputPort[0].invoke(
1131 void ComQueueComponentBase :: {
…}
1246 void ComQueueComponentBase ::
1247 tlmWrite_comQueueDepth(
1252 if (this->m_Tlm_OutputPort[0].isConnected()) {
1254 this->m_Time_OutputPort[0].isConnected() &&
1257 this->m_Time_OutputPort[0].invoke(_tlmTime);
1269 _id = this->getIdBase() + CHANNELID_COMQUEUEDEPTH;
1271 this->m_Tlm_OutputPort[0].invoke(
1246 void ComQueueComponentBase :: {
…}
1279 void ComQueueComponentBase ::
1280 tlmWrite_buffQueueDepth(
1285 if (this->m_Tlm_OutputPort[0].isConnected()) {
1287 this->m_Time_OutputPort[0].isConnected() &&
1290 this->m_Time_OutputPort[0].invoke(_tlmTime);
1302 _id = this->getIdBase() + CHANNELID_BUFFQUEUEDEPTH;
1304 this->m_Tlm_OutputPort[0].invoke(
1279 void ComQueueComponentBase :: {
…}
1319 if (this->m_Time_OutputPort[0].isConnected()) {
1321 this->m_Time_OutputPort[0].invoke(_time);
1336 ComponentIpcSerializableBuffer msg;
1359 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
1361 if (msgType == COMQUEUE_COMPONENT_EXIT) {
1362 return MSG_DISPATCH_EXIT;
1366 deserStatus = msg.deserialize(portNum);
1374 case BUFFQUEUEIN_BUFFERSEND: {
1377 deserStatus = msg.deserialize(fwBuffer);
1383 this->buffQueueIn_handler(
1392 case COMQUEUEIN_COM: {
1395 deserStatus = msg.deserialize(data);
1403 deserStatus = msg.deserialize(context);
1409 this->comQueueIn_handler(
1419 case COMSTATUSIN_SUCCESSCONDITION: {
1422 deserStatus = msg.deserialize(condition);
1428 this->comStatusIn_handler(
1440 deserStatus = msg.deserialize(context);
1455 return MSG_DISPATCH_ERROR;
1458 return MSG_DISPATCH_OK;
1465 void ComQueueComponentBase ::
1473 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1474 compPtr->buffQueueIn_handlerBase(
1480 void ComQueueComponentBase ::
1489 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1490 compPtr->comQueueIn_handlerBase(
1497 void ComQueueComponentBase ::
1505 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1506 compPtr->comStatusIn_handlerBase(
1512 void ComQueueComponentBase ::
1520 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1521 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.