11#if FW_ENABLE_TEXT_LOGGING
20 COMPCMDSTAT_CMDRESPONSE,
26 CMD_CMD_CLEAR_TRACKING,
40 class ComponentIpcSerializableBuffer :
55 return sizeof(m_buff);
62 const U8* getBuffAddr()
const {
68 U8 m_buff[SERIALIZATION_SIZE];
77 void CommandDispatcherComponentBase ::
89 port < static_cast<PlatformIntType>(this->getNum_CmdDisp_InputPorts());
92 this->m_CmdDisp_InputPort[port].init();
93 this->m_CmdDisp_InputPort[port].addCallComp(
97 this->m_CmdDisp_InputPort[port].setPortNum(port);
99#if FW_OBJECT_NAMES == 1
108 this->m_CmdDisp_InputPort[port].setObjName(portName);
115 port < static_cast<PlatformIntType>(this->getNum_compCmdReg_InputPorts());
118 this->m_compCmdReg_InputPort[port].init();
119 this->m_compCmdReg_InputPort[port].addCallComp(
123 this->m_compCmdReg_InputPort[port].setPortNum(port);
125#if FW_OBJECT_NAMES == 1
134 this->m_compCmdReg_InputPort[port].setObjName(portName);
141 port < static_cast<PlatformIntType>(this->getNum_compCmdStat_InputPorts());
144 this->m_compCmdStat_InputPort[port].init();
145 this->m_compCmdStat_InputPort[port].addCallComp(
149 this->m_compCmdStat_InputPort[port].setPortNum(port);
151#if FW_OBJECT_NAMES == 1
160 this->m_compCmdStat_InputPort[port].setObjName(portName);
167 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
170 this->m_pingIn_InputPort[port].init();
171 this->m_pingIn_InputPort[port].addCallComp(
175 this->m_pingIn_InputPort[port].setPortNum(port);
177#if FW_OBJECT_NAMES == 1
186 this->m_pingIn_InputPort[port].setObjName(portName);
193 port < static_cast<PlatformIntType>(this->getNum_seqCmdBuff_InputPorts());
196 this->m_seqCmdBuff_InputPort[port].init();
197 this->m_seqCmdBuff_InputPort[port].addCallComp(
201 this->m_seqCmdBuff_InputPort[port].setPortNum(port);
203#if FW_OBJECT_NAMES == 1
212 this->m_seqCmdBuff_InputPort[port].setObjName(portName);
219 port < static_cast<PlatformIntType>(this->getNum_CmdReg_OutputPorts());
222 this->m_CmdReg_OutputPort[port].init();
224#if FW_OBJECT_NAMES == 1
233 this->m_CmdReg_OutputPort[port].setObjName(portName);
240 port < static_cast<PlatformIntType>(this->getNum_CmdStatus_OutputPorts());
243 this->m_CmdStatus_OutputPort[port].init();
245#if FW_OBJECT_NAMES == 1
254 this->m_CmdStatus_OutputPort[port].setObjName(portName);
261 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
264 this->m_Log_OutputPort[port].init();
266#if FW_OBJECT_NAMES == 1
275 this->m_Log_OutputPort[port].setObjName(portName);
279#if FW_ENABLE_TEXT_LOGGING == 1
283 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
286 this->m_LogText_OutputPort[port].init();
288#if FW_OBJECT_NAMES == 1
297 this->m_LogText_OutputPort[port].setObjName(portName);
305 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
308 this->m_Time_OutputPort[port].init();
310#if FW_OBJECT_NAMES == 1
319 this->m_Time_OutputPort[port].setObjName(portName);
326 port < static_cast<PlatformIntType>(this->getNum_Tlm_OutputPorts());
329 this->m_Tlm_OutputPort[port].init();
331#if FW_OBJECT_NAMES == 1
340 this->m_Tlm_OutputPort[port].setObjName(portName);
347 port < static_cast<PlatformIntType>(this->getNum_compCmdSend_OutputPorts());
350 this->m_compCmdSend_OutputPort[port].init();
352#if FW_OBJECT_NAMES == 1
361 this->m_compCmdSend_OutputPort[port].setObjName(portName);
368 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
371 this->m_pingOut_OutputPort[port].init();
373#if FW_OBJECT_NAMES == 1
382 this->m_pingOut_OutputPort[port].setObjName(portName);
389 port < static_cast<PlatformIntType>(this->getNum_seqCmdStatus_OutputPorts());
392 this->m_seqCmdStatus_OutputPort[port].init();
394#if FW_OBJECT_NAMES == 1
403 this->m_seqCmdStatus_OutputPort[port].setObjName(portName);
409 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
77 void CommandDispatcherComponentBase :: {
…}
425 portNum < this->getNum_CmdDisp_InputPorts(),
429 return &this->m_CmdDisp_InputPort[portNum];
440 portNum < this->getNum_compCmdReg_InputPorts(),
444 return &this->m_compCmdReg_InputPort[portNum];
451 portNum < this->getNum_compCmdStat_InputPorts(),
455 return &this->m_compCmdStat_InputPort[portNum];
462 portNum < this->getNum_pingIn_InputPorts(),
466 return &this->m_pingIn_InputPort[portNum];
473 portNum < this->getNum_seqCmdBuff_InputPorts(),
477 return &this->m_seqCmdBuff_InputPort[portNum];
484 void CommandDispatcherComponentBase ::
485 set_CmdReg_OutputPort(
491 portNum < this->getNum_CmdReg_OutputPorts(),
495 this->m_CmdReg_OutputPort[portNum].addCallPort(port);
484 void CommandDispatcherComponentBase :: {
…}
498 void CommandDispatcherComponentBase ::
499 set_CmdStatus_OutputPort(
505 portNum < this->getNum_CmdStatus_OutputPorts(),
509 this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
498 void CommandDispatcherComponentBase :: {
…}
512 void CommandDispatcherComponentBase ::
519 portNum < this->getNum_Log_OutputPorts(),
523 this->m_Log_OutputPort[portNum].addCallPort(port);
512 void CommandDispatcherComponentBase :: {
…}
526#if FW_ENABLE_TEXT_LOGGING == 1
528 void CommandDispatcherComponentBase ::
529 set_LogText_OutputPort(
535 portNum < this->getNum_LogText_OutputPorts(),
539 this->m_LogText_OutputPort[portNum].addCallPort(port);
544 void CommandDispatcherComponentBase ::
551 portNum < this->getNum_Time_OutputPorts(),
555 this->m_Time_OutputPort[portNum].addCallPort(port);
544 void CommandDispatcherComponentBase :: {
…}
558 void CommandDispatcherComponentBase ::
565 portNum < this->getNum_Tlm_OutputPorts(),
569 this->m_Tlm_OutputPort[portNum].addCallPort(port);
558 void CommandDispatcherComponentBase :: {
…}
576 void CommandDispatcherComponentBase ::
577 set_compCmdSend_OutputPort(
583 portNum < this->getNum_compCmdSend_OutputPorts(),
587 this->m_compCmdSend_OutputPort[portNum].addCallPort(port);
576 void CommandDispatcherComponentBase :: {
…}
590 void CommandDispatcherComponentBase ::
591 set_pingOut_OutputPort(
597 portNum < this->getNum_pingOut_OutputPorts(),
601 this->m_pingOut_OutputPort[portNum].addCallPort(port);
590 void CommandDispatcherComponentBase :: {
…}
604 void CommandDispatcherComponentBase ::
605 set_seqCmdStatus_OutputPort(
611 portNum < this->getNum_seqCmdStatus_OutputPorts(),
615 this->m_seqCmdStatus_OutputPort[portNum].addCallPort(port);
604 void CommandDispatcherComponentBase :: {
…}
618#if FW_PORT_SERIALIZATION
624 void CommandDispatcherComponentBase ::
625 set_CmdReg_OutputPort(
627 Fw::InputSerializePort* port
631 portNum < this->getNum_CmdReg_OutputPorts(),
635 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
638 void CommandDispatcherComponentBase ::
639 set_CmdStatus_OutputPort(
641 Fw::InputSerializePort* port
645 portNum < this->getNum_CmdStatus_OutputPorts(),
649 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
652 void CommandDispatcherComponentBase ::
655 Fw::InputSerializePort* port
659 portNum < this->getNum_Log_OutputPorts(),
663 this->m_Log_OutputPort[portNum].registerSerialPort(port);
666#if FW_ENABLE_TEXT_LOGGING == 1
668 void CommandDispatcherComponentBase ::
669 set_LogText_OutputPort(
671 Fw::InputSerializePort* port
675 portNum < this->getNum_LogText_OutputPorts(),
679 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
684 void CommandDispatcherComponentBase ::
687 Fw::InputSerializePort* port
691 portNum < this->getNum_Time_OutputPorts(),
695 this->m_Time_OutputPort[portNum].registerSerialPort(port);
698 void CommandDispatcherComponentBase ::
701 Fw::InputSerializePort* port
705 portNum < this->getNum_Tlm_OutputPorts(),
709 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
714#if FW_PORT_SERIALIZATION
720 void CommandDispatcherComponentBase ::
721 set_compCmdSend_OutputPort(
723 Fw::InputSerializePort* port
727 portNum < this->getNum_compCmdSend_OutputPorts(),
731 this->m_compCmdSend_OutputPort[portNum].registerSerialPort(port);
734 void CommandDispatcherComponentBase ::
735 set_pingOut_OutputPort(
737 Fw::InputSerializePort* port
741 portNum < this->getNum_pingOut_OutputPorts(),
745 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
748 void CommandDispatcherComponentBase ::
749 set_seqCmdStatus_OutputPort(
751 Fw::InputSerializePort* port
755 portNum < this->getNum_seqCmdStatus_OutputPorts(),
759 this->m_seqCmdStatus_OutputPort[portNum].registerSerialPort(port);
768 void CommandDispatcherComponentBase ::
771 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
773 this->m_CmdReg_OutputPort[0].invoke(
774 this->getIdBase() + OPCODE_CMD_NO_OP
777 this->m_CmdReg_OutputPort[0].invoke(
778 this->getIdBase() + OPCODE_CMD_NO_OP_STRING
781 this->m_CmdReg_OutputPort[0].invoke(
782 this->getIdBase() + OPCODE_CMD_TEST_CMD_1
785 this->m_CmdReg_OutputPort[0].invoke(
786 this->getIdBase() + OPCODE_CMD_CLEAR_TRACKING
768 void CommandDispatcherComponentBase :: {
…}
794 CommandDispatcherComponentBase ::
795 CommandDispatcherComponentBase(
const char* compName) :
796 Fw::ActiveComponentBase(compName)
799 this->m_first_update_CommandsDispatched =
true;
800 this->m_last_CommandsDispatched = 0;
803 this->m_first_update_CommandErrors =
true;
804 this->m_last_CommandErrors = 0;
794 CommandDispatcherComponentBase :: {
…}
807 CommandDispatcherComponentBase ::
808 ~CommandDispatcherComponentBase()
807 CommandDispatcherComponentBase :: {
…}
818 getNum_CmdDisp_InputPorts()
828 getNum_compCmdReg_InputPorts()
834 getNum_compCmdStat_InputPorts()
840 getNum_pingIn_InputPorts()
846 getNum_seqCmdBuff_InputPorts()
856 getNum_CmdReg_OutputPorts()
862 getNum_CmdStatus_OutputPorts()
868 getNum_Log_OutputPorts()
873#if FW_ENABLE_TEXT_LOGGING == 1
876 getNum_LogText_OutputPorts()
884 getNum_Time_OutputPorts()
890 getNum_Tlm_OutputPorts()
900 getNum_compCmdSend_OutputPorts()
906 getNum_pingOut_OutputPorts()
912 getNum_seqCmdStatus_OutputPorts()
921 bool CommandDispatcherComponentBase ::
925 portNum < this->getNum_CmdReg_OutputPorts(),
929 return this->m_CmdReg_OutputPort[portNum].isConnected();
921 bool CommandDispatcherComponentBase :: {
…}
932 bool CommandDispatcherComponentBase ::
936 portNum < this->getNum_CmdStatus_OutputPorts(),
940 return this->m_CmdStatus_OutputPort[portNum].isConnected();
932 bool CommandDispatcherComponentBase :: {
…}
943 bool CommandDispatcherComponentBase ::
947 portNum < this->getNum_Log_OutputPorts(),
951 return this->m_Log_OutputPort[portNum].isConnected();
943 bool CommandDispatcherComponentBase :: {
…}
954#if FW_ENABLE_TEXT_LOGGING == 1
956 bool CommandDispatcherComponentBase ::
960 portNum < this->getNum_LogText_OutputPorts(),
964 return this->m_LogText_OutputPort[portNum].isConnected();
969 bool CommandDispatcherComponentBase ::
973 portNum < this->getNum_Time_OutputPorts(),
977 return this->m_Time_OutputPort[portNum].isConnected();
969 bool CommandDispatcherComponentBase :: {
…}
980 bool CommandDispatcherComponentBase ::
984 portNum < this->getNum_Tlm_OutputPorts(),
988 return this->m_Tlm_OutputPort[portNum].isConnected();
980 bool CommandDispatcherComponentBase :: {
…}
995 bool CommandDispatcherComponentBase ::
999 portNum < this->getNum_compCmdSend_OutputPorts(),
1003 return this->m_compCmdSend_OutputPort[portNum].isConnected();
995 bool CommandDispatcherComponentBase :: {
…}
1006 bool CommandDispatcherComponentBase ::
1010 portNum < this->getNum_pingOut_OutputPorts(),
1014 return this->m_pingOut_OutputPort[portNum].isConnected();
1006 bool CommandDispatcherComponentBase :: {
…}
1017 bool CommandDispatcherComponentBase ::
1021 portNum < this->getNum_seqCmdStatus_OutputPorts(),
1025 return this->m_seqCmdStatus_OutputPort[portNum].isConnected();
1017 bool CommandDispatcherComponentBase :: {
…}
1034 void CommandDispatcherComponentBase ::
1035 compCmdReg_handlerBase(
1042 portNum < this->getNum_compCmdReg_InputPorts(),
1050 this->compCmdReg_handler(
1034 void CommandDispatcherComponentBase :: {
…}
1059 void CommandDispatcherComponentBase ::
1060 compCmdStat_handlerBase(
1069 portNum < this->getNum_compCmdStat_InputPorts(),
1074 compCmdStat_preMsgHook(
1080 ComponentIpcSerializableBuffer msg;
1084 _status = msg.serialize(
1093 _status = msg.serialize(portNum);
1100 _status = msg.serialize(opCode);
1107 _status = msg.serialize(cmdSeq);
1114 _status = msg.serialize(response);
1059 void CommandDispatcherComponentBase :: {
…}
1130 void CommandDispatcherComponentBase ::
1138 portNum < this->getNum_pingIn_InputPorts(),
1147 ComponentIpcSerializableBuffer msg;
1151 _status = msg.serialize(
1160 _status = msg.serialize(portNum);
1167 _status = msg.serialize(key);
1130 void CommandDispatcherComponentBase :: {
…}
1183 void CommandDispatcherComponentBase ::
1184 seqCmdBuff_handlerBase(
1192 portNum < this->getNum_seqCmdBuff_InputPorts(),
1197 seqCmdBuff_preMsgHook(
1202 ComponentIpcSerializableBuffer msg;
1206 _status = msg.serialize(
1215 _status = msg.serialize(portNum);
1222 _status = msg.serialize(data);
1229 _status = msg.serialize(context);
1183 void CommandDispatcherComponentBase :: {
…}
1253 void CommandDispatcherComponentBase ::
1254 compCmdStat_preMsgHook(
1253 void CommandDispatcherComponentBase :: {
…}
1264 void CommandDispatcherComponentBase ::
1264 void CommandDispatcherComponentBase :: {
…}
1273 void CommandDispatcherComponentBase ::
1274 seqCmdBuff_preMsgHook(
1273 void CommandDispatcherComponentBase :: {
…}
1287 void CommandDispatcherComponentBase ::
1296 portNum < this->getNum_compCmdSend_OutputPorts(),
1299 this->m_compCmdSend_OutputPort[portNum].invoke(
1287 void CommandDispatcherComponentBase :: {
…}
1306 void CommandDispatcherComponentBase ::
1313 portNum < this->getNum_pingOut_OutputPorts(),
1316 this->m_pingOut_OutputPort[portNum].invoke(
1306 void CommandDispatcherComponentBase :: {
…}
1321 void CommandDispatcherComponentBase ::
1330 portNum < this->getNum_seqCmdStatus_OutputPorts(),
1333 this->m_seqCmdStatus_OutputPort[portNum].invoke(
1321 void CommandDispatcherComponentBase :: {
…}
1344 void CommandDispatcherComponentBase ::
1351 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
1352 this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
1344 void CommandDispatcherComponentBase :: {
…}
1361 void CommandDispatcherComponentBase ::
1362 CMD_NO_OP_cmdHandlerBase(
1369 this->CMD_NO_OP_preMsgHook(opCode,cmdSeq);
1373 ComponentIpcSerializableBuffer msg;
1386 _status = msg.serialize(port);
1392 _status = msg.serialize(opCode);
1398 _status = msg.serialize(cmdSeq);
1404 _status = msg.serialize(args);
1361 void CommandDispatcherComponentBase :: {
…}
1420 void CommandDispatcherComponentBase ::
1421 CMD_NO_OP_STRING_cmdHandlerBase(
1428 this->CMD_NO_OP_STRING_preMsgHook(opCode,cmdSeq);
1432 ComponentIpcSerializableBuffer msg;
1436 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_CMD_NO_OP_STRING));
1445 _status = msg.serialize(port);
1451 _status = msg.serialize(opCode);
1457 _status = msg.serialize(cmdSeq);
1463 _status = msg.serialize(args);
1420 void CommandDispatcherComponentBase :: {
…}
1479 void CommandDispatcherComponentBase ::
1480 CMD_TEST_CMD_1_cmdHandlerBase(
1487 this->CMD_TEST_CMD_1_preMsgHook(opCode,cmdSeq);
1491 ComponentIpcSerializableBuffer msg;
1495 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_CMD_TEST_CMD_1));
1504 _status = msg.serialize(port);
1510 _status = msg.serialize(opCode);
1516 _status = msg.serialize(cmdSeq);
1522 _status = msg.serialize(args);
1479 void CommandDispatcherComponentBase :: {
…}
1538 void CommandDispatcherComponentBase ::
1539 CMD_CLEAR_TRACKING_cmdHandlerBase(
1546 this->CMD_CLEAR_TRACKING_preMsgHook(opCode,cmdSeq);
1550 ComponentIpcSerializableBuffer msg;
1554 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_CMD_CLEAR_TRACKING));
1563 _status = msg.serialize(port);
1569 _status = msg.serialize(opCode);
1575 _status = msg.serialize(cmdSeq);
1581 _status = msg.serialize(args);
1538 void CommandDispatcherComponentBase :: {
…}
1605 void CommandDispatcherComponentBase ::
1606 CMD_NO_OP_preMsgHook(
1605 void CommandDispatcherComponentBase :: {
…}
1614 void CommandDispatcherComponentBase ::
1615 CMD_NO_OP_STRING_preMsgHook(
1614 void CommandDispatcherComponentBase :: {
…}
1623 void CommandDispatcherComponentBase ::
1624 CMD_TEST_CMD_1_preMsgHook(
1623 void CommandDispatcherComponentBase :: {
…}
1632 void CommandDispatcherComponentBase ::
1633 CMD_CLEAR_TRACKING_preMsgHook(
1632 void CommandDispatcherComponentBase :: {
…}
1645 void CommandDispatcherComponentBase ::
1646 log_DIAGNOSTIC_OpCodeRegistered(
1654 if (this->m_Time_OutputPort[0].isConnected()) {
1655 this->m_Time_OutputPort[0].invoke(_logTime);
1660 _id = this->getIdBase() + EVENTID_OPCODEREGISTERED;
1663 if (this->m_Log_OutputPort[0].isConnected()) {
1667#if FW_AMPCS_COMPATIBLE
1676#if FW_AMPCS_COMPATIBLE
1679 static_cast<U8>(
sizeof(U32))
1692#if FW_AMPCS_COMPATIBLE
1695 static_cast<U8>(
sizeof(I32))
1708#if FW_AMPCS_COMPATIBLE
1711 static_cast<U8>(
sizeof(I32))
1724 this->m_Log_OutputPort[0].invoke(
1733#if FW_ENABLE_TEXT_LOGGING
1734 if (this->m_LogText_OutputPort[0].isConnected()) {
1735#if FW_OBJECT_NAMES == 1
1736 const char* _formatString =
1737 "(%s) %s: Opcode 0x%" PRIx32
" registered to port %" PRIi32
" slot %" PRIi32
"";
1739 const char* _formatString =
1740 "%s: Opcode 0x%" PRIx32
" registered to port %" PRIi32
" slot %" PRIi32
"";
1752 "OpCodeRegistered ",
1761 this->m_LogText_OutputPort[0].invoke(
1645 void CommandDispatcherComponentBase :: {
…}
1771 void CommandDispatcherComponentBase ::
1772 log_COMMAND_OpCodeDispatched(
1779 if (this->m_Time_OutputPort[0].isConnected()) {
1780 this->m_Time_OutputPort[0].invoke(_logTime);
1785 _id = this->getIdBase() + EVENTID_OPCODEDISPATCHED;
1788 if (this->m_Log_OutputPort[0].isConnected()) {
1792#if FW_AMPCS_COMPATIBLE
1801#if FW_AMPCS_COMPATIBLE
1804 static_cast<U8>(
sizeof(U32))
1817#if FW_AMPCS_COMPATIBLE
1820 static_cast<U8>(
sizeof(I32))
1833 this->m_Log_OutputPort[0].invoke(
1842#if FW_ENABLE_TEXT_LOGGING
1843 if (this->m_LogText_OutputPort[0].isConnected()) {
1844#if FW_OBJECT_NAMES == 1
1845 const char* _formatString =
1846 "(%s) %s: Opcode 0x%" PRIx32
" dispatched to port %" PRIi32
"";
1848 const char* _formatString =
1849 "%s: Opcode 0x%" PRIx32
" dispatched to port %" PRIi32
"";
1861 "OpCodeDispatched ",
1869 this->m_LogText_OutputPort[0].invoke(
1771 void CommandDispatcherComponentBase :: {
…}
1879 void CommandDispatcherComponentBase ::
1880 log_COMMAND_OpCodeCompleted(U32 Opcode)
1884 if (this->m_Time_OutputPort[0].isConnected()) {
1885 this->m_Time_OutputPort[0].invoke(_logTime);
1890 _id = this->getIdBase() + EVENTID_OPCODECOMPLETED;
1893 if (this->m_Log_OutputPort[0].isConnected()) {
1897#if FW_AMPCS_COMPATIBLE
1906#if FW_AMPCS_COMPATIBLE
1909 static_cast<U8>(
sizeof(U32))
1922 this->m_Log_OutputPort[0].invoke(
1931#if FW_ENABLE_TEXT_LOGGING
1932 if (this->m_LogText_OutputPort[0].isConnected()) {
1933#if FW_OBJECT_NAMES == 1
1934 const char* _formatString =
1935 "(%s) %s: Opcode 0x%" PRIx32
" completed";
1937 const char* _formatString =
1938 "%s: Opcode 0x%" PRIx32
" completed";
1957 this->m_LogText_OutputPort[0].invoke(
1879 void CommandDispatcherComponentBase :: {
…}
1967 void CommandDispatcherComponentBase ::
1968 log_COMMAND_OpCodeError(
1975 if (this->m_Time_OutputPort[0].isConnected()) {
1976 this->m_Time_OutputPort[0].invoke(_logTime);
1981 _id = this->getIdBase() + EVENTID_OPCODEERROR;
1984 if (this->m_Log_OutputPort[0].isConnected()) {
1988#if FW_AMPCS_COMPATIBLE
1997#if FW_AMPCS_COMPATIBLE
2000 static_cast<U8>(
sizeof(U32))
2013#if FW_AMPCS_COMPATIBLE
2029 this->m_Log_OutputPort[0].invoke(
2038#if FW_ENABLE_TEXT_LOGGING
2039 if (this->m_LogText_OutputPort[0].isConnected()) {
2040#if FW_OBJECT_NAMES == 1
2041 const char* _formatString =
2042 "(%s) %s: Opcode 0x%" PRIx32
" completed with error %s";
2044 const char* _formatString =
2045 "%s: Opcode 0x%" PRIx32
" completed with error %s";
2051 error.toString(errorStr);
2068 this->m_LogText_OutputPort[0].invoke(
1967 void CommandDispatcherComponentBase :: {
…}
2078 void CommandDispatcherComponentBase ::
2083 if (this->m_Time_OutputPort[0].isConnected()) {
2084 this->m_Time_OutputPort[0].invoke(_logTime);
2089 _id = this->getIdBase() + EVENTID_MALFORMEDCOMMAND;
2092 if (this->m_Log_OutputPort[0].isConnected()) {
2096#if FW_AMPCS_COMPATIBLE
2105#if FW_AMPCS_COMPATIBLE
2121 this->m_Log_OutputPort[0].invoke(
2130#if FW_ENABLE_TEXT_LOGGING
2131 if (this->m_LogText_OutputPort[0].isConnected()) {
2132#if FW_OBJECT_NAMES == 1
2133 const char* _formatString =
2134 "(%s) %s: Received malformed command packet. Status: %s";
2136 const char* _formatString =
2137 "%s: Received malformed command packet. Status: %s";
2143 Status.toString(StatusStr);
2152 "MalformedCommand ",
2159 this->m_LogText_OutputPort[0].invoke(
2078 void CommandDispatcherComponentBase :: {
…}
2169 void CommandDispatcherComponentBase ::
2170 log_WARNING_HI_InvalidCommand(U32 Opcode)
2174 if (this->m_Time_OutputPort[0].isConnected()) {
2175 this->m_Time_OutputPort[0].invoke(_logTime);
2180 _id = this->getIdBase() + EVENTID_INVALIDCOMMAND;
2183 if (this->m_Log_OutputPort[0].isConnected()) {
2187#if FW_AMPCS_COMPATIBLE
2196#if FW_AMPCS_COMPATIBLE
2199 static_cast<U8>(
sizeof(U32))
2212 this->m_Log_OutputPort[0].invoke(
2221#if FW_ENABLE_TEXT_LOGGING
2222 if (this->m_LogText_OutputPort[0].isConnected()) {
2223#if FW_OBJECT_NAMES == 1
2224 const char* _formatString =
2225 "(%s) %s: Invalid opcode 0x%" PRIx32
" received";
2227 const char* _formatString =
2228 "%s: Invalid opcode 0x%" PRIx32
" received";
2247 this->m_LogText_OutputPort[0].invoke(
2169 void CommandDispatcherComponentBase :: {
…}
2257 void CommandDispatcherComponentBase ::
2258 log_WARNING_HI_TooManyCommands(U32 Opcode)
2262 if (this->m_Time_OutputPort[0].isConnected()) {
2263 this->m_Time_OutputPort[0].invoke(_logTime);
2268 _id = this->getIdBase() + EVENTID_TOOMANYCOMMANDS;
2271 if (this->m_Log_OutputPort[0].isConnected()) {
2275#if FW_AMPCS_COMPATIBLE
2284#if FW_AMPCS_COMPATIBLE
2287 static_cast<U8>(
sizeof(U32))
2300 this->m_Log_OutputPort[0].invoke(
2309#if FW_ENABLE_TEXT_LOGGING
2310 if (this->m_LogText_OutputPort[0].isConnected()) {
2311#if FW_OBJECT_NAMES == 1
2312 const char* _formatString =
2313 "(%s) %s: Too many outstanding commands. opcode=0x%" PRIx32
"";
2315 const char* _formatString =
2316 "%s: Too many outstanding commands. opcode=0x%" PRIx32
"";
2335 this->m_LogText_OutputPort[0].invoke(
2257 void CommandDispatcherComponentBase :: {
…}
2345 void CommandDispatcherComponentBase ::
2346 log_ACTIVITY_HI_NoOpReceived()
2350 if (this->m_Time_OutputPort[0].isConnected()) {
2351 this->m_Time_OutputPort[0].invoke(_logTime);
2356 _id = this->getIdBase() + EVENTID_NOOPRECEIVED;
2359 if (this->m_Log_OutputPort[0].isConnected()) {
2362#if FW_AMPCS_COMPATIBLE
2372 this->m_Log_OutputPort[0].invoke(
2381#if FW_ENABLE_TEXT_LOGGING
2382 if (this->m_LogText_OutputPort[0].isConnected()) {
2383#if FW_OBJECT_NAMES == 1
2384 const char* _formatString =
2385 "(%s) %s: Received a NO-OP command";
2387 const char* _formatString =
2388 "%s: Received a NO-OP command";
2406 this->m_LogText_OutputPort[0].invoke(
2345 void CommandDispatcherComponentBase :: {
…}
2416 void CommandDispatcherComponentBase ::
2421 if (this->m_Time_OutputPort[0].isConnected()) {
2422 this->m_Time_OutputPort[0].invoke(_logTime);
2427 _id = this->getIdBase() + EVENTID_NOOPSTRINGRECEIVED;
2430 if (this->m_Log_OutputPort[0].isConnected()) {
2434#if FW_AMPCS_COMPATIBLE
2443 _status = message.
serialize(_logBuff, 40);
2449 this->m_Log_OutputPort[0].invoke(
2458#if FW_ENABLE_TEXT_LOGGING
2459 if (this->m_LogText_OutputPort[0].isConnected()) {
2460#if FW_OBJECT_NAMES == 1
2461 const char* _formatString =
2462 "(%s) %s: Received a NO-OP string=%s";
2464 const char* _formatString =
2465 "%s: Received a NO-OP string=%s";
2477 "NoOpStringReceived ",
2484 this->m_LogText_OutputPort[0].invoke(
2416 void CommandDispatcherComponentBase :: {
…}
2494 void CommandDispatcherComponentBase ::
2495 log_ACTIVITY_HI_TestCmd1Args(
2503 if (this->m_Time_OutputPort[0].isConnected()) {
2504 this->m_Time_OutputPort[0].invoke(_logTime);
2509 _id = this->getIdBase() + EVENTID_TESTCMD1ARGS;
2512 if (this->m_Log_OutputPort[0].isConnected()) {
2516#if FW_AMPCS_COMPATIBLE
2525#if FW_AMPCS_COMPATIBLE
2528 static_cast<U8>(
sizeof(I32))
2541#if FW_AMPCS_COMPATIBLE
2544 static_cast<U8>(
sizeof(
F32))
2557#if FW_AMPCS_COMPATIBLE
2560 static_cast<U8>(
sizeof(
U8))
2573 this->m_Log_OutputPort[0].invoke(
2582#if FW_ENABLE_TEXT_LOGGING
2583 if (this->m_LogText_OutputPort[0].isConnected()) {
2584#if FW_OBJECT_NAMES == 1
2585 const char* _formatString =
2586 "(%s) %s: TEST_CMD_1 args: I32: %" PRIi32
", F32: %f, U8: %" PRIu8
"";
2588 const char* _formatString =
2589 "%s: TEST_CMD_1 args: I32: %" PRIi32
", F32: %f, U8: %" PRIu8
"";
2610 this->m_LogText_OutputPort[0].invoke(
2494 void CommandDispatcherComponentBase :: {
…}
2620 void CommandDispatcherComponentBase ::
2621 log_DIAGNOSTIC_OpCodeReregistered(
2628 if (this->m_Time_OutputPort[0].isConnected()) {
2629 this->m_Time_OutputPort[0].invoke(_logTime);
2634 _id = this->getIdBase() + EVENTID_OPCODEREREGISTERED;
2637 if (this->m_Log_OutputPort[0].isConnected()) {
2641#if FW_AMPCS_COMPATIBLE
2650#if FW_AMPCS_COMPATIBLE
2653 static_cast<U8>(
sizeof(U32))
2666#if FW_AMPCS_COMPATIBLE
2669 static_cast<U8>(
sizeof(I32))
2682 this->m_Log_OutputPort[0].invoke(
2691#if FW_ENABLE_TEXT_LOGGING
2692 if (this->m_LogText_OutputPort[0].isConnected()) {
2693#if FW_OBJECT_NAMES == 1
2694 const char* _formatString =
2695 "(%s) %s: Opcode 0x%" PRIx32
" is already registered to port %" PRIi32
"";
2697 const char* _formatString =
2698 "%s: Opcode 0x%" PRIx32
" is already registered to port %" PRIi32
"";
2710 "OpCodeReregistered ",
2718 this->m_LogText_OutputPort[0].invoke(
2620 void CommandDispatcherComponentBase :: {
…}
2732 void CommandDispatcherComponentBase ::
2733 tlmWrite_CommandsDispatched(
2739 if (not this->m_first_update_CommandsDispatched) {
2741 if (arg == this->m_last_CommandsDispatched) {
2745 this->m_last_CommandsDispatched = arg;
2749 this->m_first_update_CommandsDispatched =
false;
2750 this->m_last_CommandsDispatched = arg;
2753 if (this->m_Tlm_OutputPort[0].isConnected()) {
2755 this->m_Time_OutputPort[0].isConnected() &&
2758 this->m_Time_OutputPort[0].invoke(_tlmTime);
2770 _id = this->getIdBase() + CHANNELID_COMMANDSDISPATCHED;
2772 this->m_Tlm_OutputPort[0].invoke(
2732 void CommandDispatcherComponentBase :: {
…}
2780 void CommandDispatcherComponentBase ::
2781 tlmWrite_CommandErrors(
2787 if (not this->m_first_update_CommandErrors) {
2789 if (arg == this->m_last_CommandErrors) {
2793 this->m_last_CommandErrors = arg;
2797 this->m_first_update_CommandErrors =
false;
2798 this->m_last_CommandErrors = arg;
2801 if (this->m_Tlm_OutputPort[0].isConnected()) {
2803 this->m_Time_OutputPort[0].isConnected() &&
2806 this->m_Time_OutputPort[0].invoke(_tlmTime);
2818 _id = this->getIdBase() + CHANNELID_COMMANDERRORS;
2820 this->m_Tlm_OutputPort[0].invoke(
2780 void CommandDispatcherComponentBase :: {
…}
2835 if (this->m_Time_OutputPort[0].isConnected()) {
2837 this->m_Time_OutputPort[0].invoke(_time);
2852 void CommandDispatcherComponentBase ::
2855 this->m_guardedPortMutex.lock();
2852 void CommandDispatcherComponentBase :: {
…}
2858 void CommandDispatcherComponentBase ::
2861 this->m_guardedPortMutex.unLock();
2858 void CommandDispatcherComponentBase :: {
…}
2871 ComponentIpcSerializableBuffer msg;
2894 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2896 if (msgType == COMMANDDISPATCHER_COMPONENT_EXIT) {
2897 return MSG_DISPATCH_EXIT;
2901 deserStatus = msg.deserialize(portNum);
2909 case COMPCMDSTAT_CMDRESPONSE: {
2912 deserStatus = msg.deserialize(opCode);
2920 deserStatus = msg.deserialize(cmdSeq);
2928 deserStatus = msg.deserialize(response);
2934 this->compCmdStat_handler(
2948 deserStatus = msg.deserialize(key);
2954 this->pingIn_handler(
2963 case SEQCMDBUFF_COM: {
2966 deserStatus = msg.deserialize(data);
2974 deserStatus = msg.deserialize(context);
2980 this->seqCmdBuff_handler(
2990 case CMD_CMD_NO_OP: {
2993 deserStatus = msg.deserialize(opCode);
3001 deserStatus = msg.deserialize(cmdSeq);
3009 deserStatus = msg.deserialize(args);
3020#if FW_CMD_CHECK_RESIDUAL
3022 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3031 this->CMD_NO_OP_cmdHandler(opCode, cmdSeq);
3037 case CMD_CMD_NO_OP_STRING: {
3040 deserStatus = msg.deserialize(opCode);
3048 deserStatus = msg.deserialize(cmdSeq);
3056 deserStatus = msg.deserialize(args);
3069 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3070 this->cmdResponse_out(
3082#if FW_CMD_CHECK_RESIDUAL
3084 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3093 this->CMD_NO_OP_STRING_cmdHandler(
3102 case CMD_CMD_TEST_CMD_1: {
3105 deserStatus = msg.deserialize(opCode);
3113 deserStatus = msg.deserialize(cmdSeq);
3121 deserStatus = msg.deserialize(args);
3134 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3135 this->cmdResponse_out(
3149 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3150 this->cmdResponse_out(
3164 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3165 this->cmdResponse_out(
3177#if FW_CMD_CHECK_RESIDUAL
3179 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3188 this->CMD_TEST_CMD_1_cmdHandler(
3199 case CMD_CMD_CLEAR_TRACKING: {
3202 deserStatus = msg.deserialize(opCode);
3210 deserStatus = msg.deserialize(cmdSeq);
3218 deserStatus = msg.deserialize(args);
3229#if FW_CMD_CHECK_RESIDUAL
3231 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3240 this->CMD_CLEAR_TRACKING_cmdHandler(opCode, cmdSeq);
3246 return MSG_DISPATCH_ERROR;
3249 return MSG_DISPATCH_OK;
3256 void CommandDispatcherComponentBase ::
3266 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3268 const U32 idBase = callComp->
getIdBase();
3269 FW_ASSERT(opCode >= idBase, opCode, idBase);
3272 switch (opCode - idBase) {
3273 case OPCODE_CMD_NO_OP: {
3274 compPtr->CMD_NO_OP_cmdHandlerBase(
3282 case OPCODE_CMD_NO_OP_STRING: {
3283 compPtr->CMD_NO_OP_STRING_cmdHandlerBase(
3291 case OPCODE_CMD_TEST_CMD_1: {
3292 compPtr->CMD_TEST_CMD_1_cmdHandlerBase(
3300 case OPCODE_CMD_CLEAR_TRACKING: {
3301 compPtr->CMD_CLEAR_TRACKING_cmdHandlerBase(
3315 void CommandDispatcherComponentBase ::
3323 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3324 compPtr->compCmdReg_handlerBase(
3330 void CommandDispatcherComponentBase ::
3340 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3341 compPtr->compCmdStat_handlerBase(
3349 void CommandDispatcherComponentBase ::
3357 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3358 compPtr->pingIn_handlerBase(
3364 void CommandDispatcherComponentBase ::
3373 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3374 compPtr->seqCmdBuff_handlerBase(
PlatformIntType NATIVE_INT_TYPE
float F32
32-bit floating point
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
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ SERIALIZED_SIZE
The size of the serial representation.
@ SERIALIZED_SIZE
The size of the serial representation.
@ WARNING_HI
A serious but recoverable event.
@ ACTIVITY_HI
Important informational events.
@ DIAGNOSTIC
Software diagnostic events.
@ COMMAND
An activity related to commanding.
const char * toChar() const override
SerializeStatus serialize(SerializeBufferBase &buffer) const override
serialization function
void init()
Object initializer.
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
void resetDeser()
reset deserialization to beginning
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
const char * toChar() const
gets char buffer
@ QUEUE_OK
message sent/received okay
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.