11#if FW_ENABLE_TEXT_LOGGING
20 BUFFQUEUEIN_BUFFERSEND,
22 COMSTATUSIN_SUCCESSCONDITION,
36 class ComponentIpcSerializableBuffer :
51 return sizeof(m_buff);
58 const U8* getBuffAddr()
const {
64 U8 m_buff[SERIALIZATION_SIZE];
73 void ComQueueComponentBase ::
85 port < static_cast<PlatformIntType>(this->getNum_buffQueueIn_InputPorts());
88 this->m_buffQueueIn_InputPort[port].init();
89 this->m_buffQueueIn_InputPort[port].addCallComp(
93 this->m_buffQueueIn_InputPort[port].setPortNum(port);
95#if FW_OBJECT_NAMES == 1
104 this->m_buffQueueIn_InputPort[port].setObjName(portName);
111 port < static_cast<PlatformIntType>(this->getNum_comQueueIn_InputPorts());
114 this->m_comQueueIn_InputPort[port].init();
115 this->m_comQueueIn_InputPort[port].addCallComp(
119 this->m_comQueueIn_InputPort[port].setPortNum(port);
121#if FW_OBJECT_NAMES == 1
130 this->m_comQueueIn_InputPort[port].setObjName(portName);
137 port < static_cast<PlatformIntType>(this->getNum_comStatusIn_InputPorts());
140 this->m_comStatusIn_InputPort[port].init();
141 this->m_comStatusIn_InputPort[port].addCallComp(
145 this->m_comStatusIn_InputPort[port].setPortNum(port);
147#if FW_OBJECT_NAMES == 1
156 this->m_comStatusIn_InputPort[port].setObjName(portName);
163 port < static_cast<PlatformIntType>(this->getNum_run_InputPorts());
166 this->m_run_InputPort[port].init();
167 this->m_run_InputPort[port].addCallComp(
171 this->m_run_InputPort[port].setPortNum(port);
173#if FW_OBJECT_NAMES == 1
182 this->m_run_InputPort[port].setObjName(portName);
189 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
192 this->m_Log_OutputPort[port].init();
194#if FW_OBJECT_NAMES == 1
203 this->m_Log_OutputPort[port].setObjName(portName);
207#if FW_ENABLE_TEXT_LOGGING == 1
211 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
214 this->m_LogText_OutputPort[port].init();
216#if FW_OBJECT_NAMES == 1
225 this->m_LogText_OutputPort[port].setObjName(portName);
233 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
236 this->m_Time_OutputPort[port].init();
238#if FW_OBJECT_NAMES == 1
247 this->m_Time_OutputPort[port].setObjName(portName);
254 port < static_cast<PlatformIntType>(this->getNum_Tlm_OutputPorts());
257 this->m_Tlm_OutputPort[port].init();
259#if FW_OBJECT_NAMES == 1
268 this->m_Tlm_OutputPort[port].setObjName(portName);
275 port < static_cast<PlatformIntType>(this->getNum_buffQueueSend_OutputPorts());
278 this->m_buffQueueSend_OutputPort[port].init();
280#if FW_OBJECT_NAMES == 1
289 this->m_buffQueueSend_OutputPort[port].setObjName(portName);
296 port < static_cast<PlatformIntType>(this->getNum_comQueueSend_OutputPorts());
299 this->m_comQueueSend_OutputPort[port].init();
301#if FW_OBJECT_NAMES == 1
310 this->m_comQueueSend_OutputPort[port].setObjName(portName);
316 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
73 void ComQueueComponentBase :: {
…}
332 portNum < this->getNum_buffQueueIn_InputPorts(),
336 return &this->m_buffQueueIn_InputPort[portNum];
343 portNum < this->getNum_comQueueIn_InputPorts(),
347 return &this->m_comQueueIn_InputPort[portNum];
354 portNum < this->getNum_comStatusIn_InputPorts(),
358 return &this->m_comStatusIn_InputPort[portNum];
365 portNum < this->getNum_run_InputPorts(),
369 return &this->m_run_InputPort[portNum];
376 void ComQueueComponentBase ::
383 portNum < this->getNum_Log_OutputPorts(),
387 this->m_Log_OutputPort[portNum].addCallPort(port);
376 void ComQueueComponentBase :: {
…}
390#if FW_ENABLE_TEXT_LOGGING == 1
392 void ComQueueComponentBase ::
393 set_LogText_OutputPort(
399 portNum < this->getNum_LogText_OutputPorts(),
403 this->m_LogText_OutputPort[portNum].addCallPort(port);
408 void ComQueueComponentBase ::
415 portNum < this->getNum_Time_OutputPorts(),
419 this->m_Time_OutputPort[portNum].addCallPort(port);
408 void ComQueueComponentBase :: {
…}
422 void ComQueueComponentBase ::
429 portNum < this->getNum_Tlm_OutputPorts(),
433 this->m_Tlm_OutputPort[portNum].addCallPort(port);
422 void ComQueueComponentBase :: {
…}
440 void ComQueueComponentBase ::
441 set_buffQueueSend_OutputPort(
447 portNum < this->getNum_buffQueueSend_OutputPorts(),
451 this->m_buffQueueSend_OutputPort[portNum].addCallPort(port);
440 void ComQueueComponentBase :: {
…}
454 void ComQueueComponentBase ::
455 set_comQueueSend_OutputPort(
461 portNum < this->getNum_comQueueSend_OutputPorts(),
465 this->m_comQueueSend_OutputPort[portNum].addCallPort(port);
454 void ComQueueComponentBase :: {
…}
468#if FW_PORT_SERIALIZATION
474 void ComQueueComponentBase ::
477 Fw::InputSerializePort* port
481 portNum < this->getNum_Log_OutputPorts(),
485 this->m_Log_OutputPort[portNum].registerSerialPort(port);
488#if FW_ENABLE_TEXT_LOGGING == 1
490 void ComQueueComponentBase ::
491 set_LogText_OutputPort(
493 Fw::InputSerializePort* port
497 portNum < this->getNum_LogText_OutputPorts(),
501 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
506 void ComQueueComponentBase ::
509 Fw::InputSerializePort* port
513 portNum < this->getNum_Time_OutputPorts(),
517 this->m_Time_OutputPort[portNum].registerSerialPort(port);
520 void ComQueueComponentBase ::
523 Fw::InputSerializePort* port
527 portNum < this->getNum_Tlm_OutputPorts(),
531 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
536#if FW_PORT_SERIALIZATION
542 void ComQueueComponentBase ::
543 set_buffQueueSend_OutputPort(
545 Fw::InputSerializePort* port
549 portNum < this->getNum_buffQueueSend_OutputPorts(),
553 this->m_buffQueueSend_OutputPort[portNum].registerSerialPort(port);
556 void ComQueueComponentBase ::
557 set_comQueueSend_OutputPort(
559 Fw::InputSerializePort* port
563 portNum < this->getNum_comQueueSend_OutputPorts(),
567 this->m_comQueueSend_OutputPort[portNum].registerSerialPort(port);
576 ComQueueComponentBase ::
577 ComQueueComponentBase(
const char* compName) :
578 Fw::ActiveComponentBase(compName)
576 ComQueueComponentBase :: {
…}
583 ComQueueComponentBase ::
584 ~ComQueueComponentBase()
583 ComQueueComponentBase :: {
…}
594 getNum_buffQueueIn_InputPorts()
600 getNum_comQueueIn_InputPorts()
606 getNum_comStatusIn_InputPorts()
612 getNum_run_InputPorts()
622 getNum_Log_OutputPorts()
627#if FW_ENABLE_TEXT_LOGGING == 1
630 getNum_LogText_OutputPorts()
638 getNum_Time_OutputPorts()
644 getNum_Tlm_OutputPorts()
654 getNum_buffQueueSend_OutputPorts()
660 getNum_comQueueSend_OutputPorts()
669 bool ComQueueComponentBase ::
673 portNum < this->getNum_Log_OutputPorts(),
677 return this->m_Log_OutputPort[portNum].isConnected();
669 bool ComQueueComponentBase :: {
…}
680#if FW_ENABLE_TEXT_LOGGING == 1
682 bool ComQueueComponentBase ::
686 portNum < this->getNum_LogText_OutputPorts(),
690 return this->m_LogText_OutputPort[portNum].isConnected();
695 bool ComQueueComponentBase ::
699 portNum < this->getNum_Time_OutputPorts(),
703 return this->m_Time_OutputPort[portNum].isConnected();
695 bool ComQueueComponentBase :: {
…}
706 bool ComQueueComponentBase ::
710 portNum < this->getNum_Tlm_OutputPorts(),
714 return this->m_Tlm_OutputPort[portNum].isConnected();
706 bool ComQueueComponentBase :: {
…}
721 bool ComQueueComponentBase ::
725 portNum < this->getNum_buffQueueSend_OutputPorts(),
729 return this->m_buffQueueSend_OutputPort[portNum].isConnected();
721 bool ComQueueComponentBase :: {
…}
732 bool ComQueueComponentBase ::
736 portNum < this->getNum_comQueueSend_OutputPorts(),
740 return this->m_comQueueSend_OutputPort[portNum].isConnected();
732 bool ComQueueComponentBase :: {
…}
749 void ComQueueComponentBase ::
750 buffQueueIn_handlerBase(
757 portNum < this->getNum_buffQueueIn_InputPorts(),
762 buffQueueIn_preMsgHook(
766 ComponentIpcSerializableBuffer msg;
770 _status = msg.serialize(
779 _status = msg.serialize(portNum);
786 _status = msg.serialize(fwBuffer);
797 this->incNumMsgDropped();
749 void ComQueueComponentBase :: {
…}
807 void ComQueueComponentBase ::
808 comQueueIn_handlerBase(
816 portNum < this->getNum_comQueueIn_InputPorts(),
821 comQueueIn_preMsgHook(
826 ComponentIpcSerializableBuffer msg;
830 _status = msg.serialize(
839 _status = msg.serialize(portNum);
846 _status = msg.serialize(data);
853 _status = msg.serialize(context);
864 this->incNumMsgDropped();
807 void ComQueueComponentBase :: {
…}
874 void ComQueueComponentBase ::
875 comStatusIn_handlerBase(
882 portNum < this->getNum_comStatusIn_InputPorts(),
887 comStatusIn_preMsgHook(
891 ComponentIpcSerializableBuffer msg;
895 _status = msg.serialize(
904 _status = msg.serialize(portNum);
911 _status = msg.serialize(condition);
874 void ComQueueComponentBase :: {
…}
927 void ComQueueComponentBase ::
935 portNum < this->getNum_run_InputPorts(),
944 ComponentIpcSerializableBuffer msg;
948 _status = msg.serialize(
957 _status = msg.serialize(portNum);
964 _status = msg.serialize(context);
975 this->incNumMsgDropped();
927 void ComQueueComponentBase :: {
…}
993 void ComQueueComponentBase ::
994 buffQueueIn_preMsgHook(
993 void ComQueueComponentBase :: {
…}
1002 void ComQueueComponentBase ::
1003 comQueueIn_preMsgHook(
1002 void ComQueueComponentBase :: {
…}
1012 void ComQueueComponentBase ::
1013 comStatusIn_preMsgHook(
1012 void ComQueueComponentBase :: {
…}
1021 void ComQueueComponentBase ::
1021 void ComQueueComponentBase :: {
…}
1034 void ComQueueComponentBase ::
1041 portNum < this->getNum_buffQueueSend_OutputPorts(),
1044 this->m_buffQueueSend_OutputPort[portNum].invoke(
1034 void ComQueueComponentBase :: {
…}
1049 void ComQueueComponentBase ::
1057 portNum < this->getNum_comQueueSend_OutputPorts(),
1060 this->m_comQueueSend_OutputPort[portNum].invoke(
1049 void ComQueueComponentBase :: {
…}
1070 void ComQueueComponentBase ::
1071 log_WARNING_HI_QueueOverflow(
1078 if (this->m_Time_OutputPort[0].isConnected()) {
1079 this->m_Time_OutputPort[0].invoke(_logTime);
1084 _id = this->getIdBase() + EVENTID_QUEUEOVERFLOW;
1087 if (this->m_Log_OutputPort[0].isConnected()) {
1091#if FW_AMPCS_COMPATIBLE
1100#if FW_AMPCS_COMPATIBLE
1110 _status = _logBuff.
serialize(queueType);
1116#if FW_AMPCS_COMPATIBLE
1119 static_cast<U8>(
sizeof(U32))
1132 this->m_Log_OutputPort[0].invoke(
1141#if FW_ENABLE_TEXT_LOGGING
1142 if (this->m_LogText_OutputPort[0].isConnected()) {
1143#if FW_OBJECT_NAMES == 1
1144 const char* _formatString =
1145 "(%s) %s: The %s queue at index %" PRIu32
" overflowed";
1147 const char* _formatString =
1148 "%s: The %s queue at index %" PRIu32
" overflowed";
1154 queueType.toString(queueTypeStr);
1171 this->m_LogText_OutputPort[0].invoke(
1070 void ComQueueComponentBase :: {
…}
1185 void ComQueueComponentBase ::
1186 tlmWrite_comQueueDepth(
1191 if (this->m_Tlm_OutputPort[0].isConnected()) {
1193 this->m_Time_OutputPort[0].isConnected() &&
1196 this->m_Time_OutputPort[0].invoke(_tlmTime);
1208 _id = this->getIdBase() + CHANNELID_COMQUEUEDEPTH;
1210 this->m_Tlm_OutputPort[0].invoke(
1185 void ComQueueComponentBase :: {
…}
1218 void ComQueueComponentBase ::
1219 tlmWrite_buffQueueDepth(
1224 if (this->m_Tlm_OutputPort[0].isConnected()) {
1226 this->m_Time_OutputPort[0].isConnected() &&
1229 this->m_Time_OutputPort[0].invoke(_tlmTime);
1241 _id = this->getIdBase() + CHANNELID_BUFFQUEUEDEPTH;
1243 this->m_Tlm_OutputPort[0].invoke(
1218 void ComQueueComponentBase :: {
…}
1258 if (this->m_Time_OutputPort[0].isConnected()) {
1260 this->m_Time_OutputPort[0].invoke(_time);
1275 ComponentIpcSerializableBuffer msg;
1298 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
1300 if (msgType == COMQUEUE_COMPONENT_EXIT) {
1301 return MSG_DISPATCH_EXIT;
1305 deserStatus = msg.deserialize(portNum);
1313 case BUFFQUEUEIN_BUFFERSEND: {
1316 deserStatus = msg.deserialize(fwBuffer);
1322 this->buffQueueIn_handler(
1331 case COMQUEUEIN_COM: {
1334 deserStatus = msg.deserialize(data);
1342 deserStatus = msg.deserialize(context);
1348 this->comQueueIn_handler(
1358 case COMSTATUSIN_SUCCESSCONDITION: {
1361 deserStatus = msg.deserialize(condition);
1367 this->comStatusIn_handler(
1379 deserStatus = msg.deserialize(context);
1394 return MSG_DISPATCH_ERROR;
1397 return MSG_DISPATCH_OK;
1404 void ComQueueComponentBase ::
1412 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1413 compPtr->buffQueueIn_handlerBase(
1419 void ComQueueComponentBase ::
1428 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1429 compPtr->comQueueIn_handlerBase(
1436 void ComQueueComponentBase ::
1444 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1445 compPtr->comStatusIn_handlerBase(
1451 void ComQueueComponentBase ::
1459 ComQueueComponentBase* compPtr =
static_cast<ComQueueComponentBase*
>(callComp);
1460 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.