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
106 char portName[2*FW_OBJ_NAME_MAX_SIZE];
114 this->m_CmdDisp_InputPort[port].setObjName(portName);
121 port < static_cast<PlatformIntType>(this->getNum_compCmdReg_InputPorts());
124 this->m_compCmdReg_InputPort[port].init();
125 this->m_compCmdReg_InputPort[port].addCallComp(
129 this->m_compCmdReg_InputPort[port].setPortNum(port);
131#if FW_OBJECT_NAMES == 1
138 char portName[2*FW_OBJ_NAME_MAX_SIZE];
146 this->m_compCmdReg_InputPort[port].setObjName(portName);
153 port < static_cast<PlatformIntType>(this->getNum_compCmdStat_InputPorts());
156 this->m_compCmdStat_InputPort[port].init();
157 this->m_compCmdStat_InputPort[port].addCallComp(
161 this->m_compCmdStat_InputPort[port].setPortNum(port);
163#if FW_OBJECT_NAMES == 1
170 char portName[2*FW_OBJ_NAME_MAX_SIZE];
178 this->m_compCmdStat_InputPort[port].setObjName(portName);
185 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
188 this->m_pingIn_InputPort[port].init();
189 this->m_pingIn_InputPort[port].addCallComp(
193 this->m_pingIn_InputPort[port].setPortNum(port);
195#if FW_OBJECT_NAMES == 1
202 char portName[2*FW_OBJ_NAME_MAX_SIZE];
210 this->m_pingIn_InputPort[port].setObjName(portName);
217 port < static_cast<PlatformIntType>(this->getNum_seqCmdBuff_InputPorts());
220 this->m_seqCmdBuff_InputPort[port].init();
221 this->m_seqCmdBuff_InputPort[port].addCallComp(
225 this->m_seqCmdBuff_InputPort[port].setPortNum(port);
227#if FW_OBJECT_NAMES == 1
234 char portName[2*FW_OBJ_NAME_MAX_SIZE];
242 this->m_seqCmdBuff_InputPort[port].setObjName(portName);
249 port < static_cast<PlatformIntType>(this->getNum_CmdReg_OutputPorts());
252 this->m_CmdReg_OutputPort[port].init();
254#if FW_OBJECT_NAMES == 1
261 char portName[2*FW_OBJ_NAME_MAX_SIZE];
269 this->m_CmdReg_OutputPort[port].setObjName(portName);
276 port < static_cast<PlatformIntType>(this->getNum_CmdStatus_OutputPorts());
279 this->m_CmdStatus_OutputPort[port].init();
281#if FW_OBJECT_NAMES == 1
288 char portName[2*FW_OBJ_NAME_MAX_SIZE];
296 this->m_CmdStatus_OutputPort[port].setObjName(portName);
303 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
306 this->m_Log_OutputPort[port].init();
308#if FW_OBJECT_NAMES == 1
315 char portName[2*FW_OBJ_NAME_MAX_SIZE];
323 this->m_Log_OutputPort[port].setObjName(portName);
327#if FW_ENABLE_TEXT_LOGGING == 1
331 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
334 this->m_LogText_OutputPort[port].init();
336#if FW_OBJECT_NAMES == 1
343 char portName[2*FW_OBJ_NAME_MAX_SIZE];
351 this->m_LogText_OutputPort[port].setObjName(portName);
359 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
362 this->m_Time_OutputPort[port].init();
364#if FW_OBJECT_NAMES == 1
371 char portName[2*FW_OBJ_NAME_MAX_SIZE];
379 this->m_Time_OutputPort[port].setObjName(portName);
386 port < static_cast<PlatformIntType>(this->getNum_Tlm_OutputPorts());
389 this->m_Tlm_OutputPort[port].init();
391#if FW_OBJECT_NAMES == 1
398 char portName[2*FW_OBJ_NAME_MAX_SIZE];
406 this->m_Tlm_OutputPort[port].setObjName(portName);
413 port < static_cast<PlatformIntType>(this->getNum_compCmdSend_OutputPorts());
416 this->m_compCmdSend_OutputPort[port].init();
418#if FW_OBJECT_NAMES == 1
425 char portName[2*FW_OBJ_NAME_MAX_SIZE];
433 this->m_compCmdSend_OutputPort[port].setObjName(portName);
440 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
443 this->m_pingOut_OutputPort[port].init();
445#if FW_OBJECT_NAMES == 1
452 char portName[2*FW_OBJ_NAME_MAX_SIZE];
460 this->m_pingOut_OutputPort[port].setObjName(portName);
467 port < static_cast<PlatformIntType>(this->getNum_seqCmdStatus_OutputPorts());
470 this->m_seqCmdStatus_OutputPort[port].init();
472#if FW_OBJECT_NAMES == 1
479 char portName[2*FW_OBJ_NAME_MAX_SIZE];
487 this->m_seqCmdStatus_OutputPort[port].setObjName(portName);
493 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
77 void CommandDispatcherComponentBase :: {
…}
509 portNum < this->getNum_CmdDisp_InputPorts(),
513 return &this->m_CmdDisp_InputPort[portNum];
524 portNum < this->getNum_compCmdReg_InputPorts(),
528 return &this->m_compCmdReg_InputPort[portNum];
535 portNum < this->getNum_compCmdStat_InputPorts(),
539 return &this->m_compCmdStat_InputPort[portNum];
546 portNum < this->getNum_pingIn_InputPorts(),
550 return &this->m_pingIn_InputPort[portNum];
557 portNum < this->getNum_seqCmdBuff_InputPorts(),
561 return &this->m_seqCmdBuff_InputPort[portNum];
568 void CommandDispatcherComponentBase ::
569 set_CmdReg_OutputPort(
575 portNum < this->getNum_CmdReg_OutputPorts(),
579 this->m_CmdReg_OutputPort[portNum].addCallPort(port);
568 void CommandDispatcherComponentBase :: {
…}
582 void CommandDispatcherComponentBase ::
583 set_CmdStatus_OutputPort(
589 portNum < this->getNum_CmdStatus_OutputPorts(),
593 this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
582 void CommandDispatcherComponentBase :: {
…}
596 void CommandDispatcherComponentBase ::
603 portNum < this->getNum_Log_OutputPorts(),
607 this->m_Log_OutputPort[portNum].addCallPort(port);
596 void CommandDispatcherComponentBase :: {
…}
610#if FW_ENABLE_TEXT_LOGGING == 1
612 void CommandDispatcherComponentBase ::
613 set_LogText_OutputPort(
619 portNum < this->getNum_LogText_OutputPorts(),
623 this->m_LogText_OutputPort[portNum].addCallPort(port);
628 void CommandDispatcherComponentBase ::
635 portNum < this->getNum_Time_OutputPorts(),
639 this->m_Time_OutputPort[portNum].addCallPort(port);
628 void CommandDispatcherComponentBase :: {
…}
642 void CommandDispatcherComponentBase ::
649 portNum < this->getNum_Tlm_OutputPorts(),
653 this->m_Tlm_OutputPort[portNum].addCallPort(port);
642 void CommandDispatcherComponentBase :: {
…}
660 void CommandDispatcherComponentBase ::
661 set_compCmdSend_OutputPort(
667 portNum < this->getNum_compCmdSend_OutputPorts(),
671 this->m_compCmdSend_OutputPort[portNum].addCallPort(port);
660 void CommandDispatcherComponentBase :: {
…}
674 void CommandDispatcherComponentBase ::
675 set_pingOut_OutputPort(
681 portNum < this->getNum_pingOut_OutputPorts(),
685 this->m_pingOut_OutputPort[portNum].addCallPort(port);
674 void CommandDispatcherComponentBase :: {
…}
688 void CommandDispatcherComponentBase ::
689 set_seqCmdStatus_OutputPort(
695 portNum < this->getNum_seqCmdStatus_OutputPorts(),
699 this->m_seqCmdStatus_OutputPort[portNum].addCallPort(port);
688 void CommandDispatcherComponentBase :: {
…}
702#if FW_PORT_SERIALIZATION
708 void CommandDispatcherComponentBase ::
709 set_CmdReg_OutputPort(
711 Fw::InputSerializePort* port
715 portNum < this->getNum_CmdReg_OutputPorts(),
719 this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
722 void CommandDispatcherComponentBase ::
723 set_CmdStatus_OutputPort(
725 Fw::InputSerializePort* port
729 portNum < this->getNum_CmdStatus_OutputPorts(),
733 this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
736 void CommandDispatcherComponentBase ::
739 Fw::InputSerializePort* port
743 portNum < this->getNum_Log_OutputPorts(),
747 this->m_Log_OutputPort[portNum].registerSerialPort(port);
750#if FW_ENABLE_TEXT_LOGGING == 1
752 void CommandDispatcherComponentBase ::
753 set_LogText_OutputPort(
755 Fw::InputSerializePort* port
759 portNum < this->getNum_LogText_OutputPorts(),
763 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
768 void CommandDispatcherComponentBase ::
771 Fw::InputSerializePort* port
775 portNum < this->getNum_Time_OutputPorts(),
779 this->m_Time_OutputPort[portNum].registerSerialPort(port);
782 void CommandDispatcherComponentBase ::
785 Fw::InputSerializePort* port
789 portNum < this->getNum_Tlm_OutputPorts(),
793 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
798#if FW_PORT_SERIALIZATION
804 void CommandDispatcherComponentBase ::
805 set_compCmdSend_OutputPort(
807 Fw::InputSerializePort* port
811 portNum < this->getNum_compCmdSend_OutputPorts(),
815 this->m_compCmdSend_OutputPort[portNum].registerSerialPort(port);
818 void CommandDispatcherComponentBase ::
819 set_pingOut_OutputPort(
821 Fw::InputSerializePort* port
825 portNum < this->getNum_pingOut_OutputPorts(),
829 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
832 void CommandDispatcherComponentBase ::
833 set_seqCmdStatus_OutputPort(
835 Fw::InputSerializePort* port
839 portNum < this->getNum_seqCmdStatus_OutputPorts(),
843 this->m_seqCmdStatus_OutputPort[portNum].registerSerialPort(port);
852 void CommandDispatcherComponentBase ::
855 FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
857 this->m_CmdReg_OutputPort[0].invoke(
858 this->getIdBase() + OPCODE_CMD_NO_OP
861 this->m_CmdReg_OutputPort[0].invoke(
862 this->getIdBase() + OPCODE_CMD_NO_OP_STRING
865 this->m_CmdReg_OutputPort[0].invoke(
866 this->getIdBase() + OPCODE_CMD_TEST_CMD_1
869 this->m_CmdReg_OutputPort[0].invoke(
870 this->getIdBase() + OPCODE_CMD_CLEAR_TRACKING
852 void CommandDispatcherComponentBase :: {
…}
878 CommandDispatcherComponentBase ::
879 CommandDispatcherComponentBase(
const char* compName) :
880 Fw::ActiveComponentBase(compName)
883 this->m_first_update_CommandsDispatched =
true;
884 this->m_last_CommandsDispatched = 0;
887 this->m_first_update_CommandErrors =
true;
888 this->m_last_CommandErrors = 0;
878 CommandDispatcherComponentBase :: {
…}
891 CommandDispatcherComponentBase ::
892 ~CommandDispatcherComponentBase()
891 CommandDispatcherComponentBase :: {
…}
902 getNum_CmdDisp_InputPorts()
const
912 getNum_compCmdReg_InputPorts()
const
918 getNum_compCmdStat_InputPorts()
const
924 getNum_pingIn_InputPorts()
const
930 getNum_seqCmdBuff_InputPorts()
const
940 getNum_CmdReg_OutputPorts()
const
946 getNum_CmdStatus_OutputPorts()
const
952 getNum_Log_OutputPorts()
const
957#if FW_ENABLE_TEXT_LOGGING == 1
960 getNum_LogText_OutputPorts()
const
968 getNum_Time_OutputPorts()
const
974 getNum_Tlm_OutputPorts()
const
984 getNum_compCmdSend_OutputPorts()
const
990 getNum_pingOut_OutputPorts()
const
996 getNum_seqCmdStatus_OutputPorts()
const
1005 bool CommandDispatcherComponentBase ::
1009 portNum < this->getNum_CmdReg_OutputPorts(),
1013 return this->m_CmdReg_OutputPort[portNum].isConnected();
1005 bool CommandDispatcherComponentBase :: {
…}
1016 bool CommandDispatcherComponentBase ::
1020 portNum < this->getNum_CmdStatus_OutputPorts(),
1024 return this->m_CmdStatus_OutputPort[portNum].isConnected();
1016 bool CommandDispatcherComponentBase :: {
…}
1027 bool CommandDispatcherComponentBase ::
1031 portNum < this->getNum_Log_OutputPorts(),
1035 return this->m_Log_OutputPort[portNum].isConnected();
1027 bool CommandDispatcherComponentBase :: {
…}
1038#if FW_ENABLE_TEXT_LOGGING == 1
1040 bool CommandDispatcherComponentBase ::
1044 portNum < this->getNum_LogText_OutputPorts(),
1048 return this->m_LogText_OutputPort[portNum].isConnected();
1053 bool CommandDispatcherComponentBase ::
1057 portNum < this->getNum_Time_OutputPorts(),
1061 return this->m_Time_OutputPort[portNum].isConnected();
1053 bool CommandDispatcherComponentBase :: {
…}
1064 bool CommandDispatcherComponentBase ::
1068 portNum < this->getNum_Tlm_OutputPorts(),
1072 return this->m_Tlm_OutputPort[portNum].isConnected();
1064 bool CommandDispatcherComponentBase :: {
…}
1079 bool CommandDispatcherComponentBase ::
1083 portNum < this->getNum_compCmdSend_OutputPorts(),
1087 return this->m_compCmdSend_OutputPort[portNum].isConnected();
1079 bool CommandDispatcherComponentBase :: {
…}
1090 bool CommandDispatcherComponentBase ::
1094 portNum < this->getNum_pingOut_OutputPorts(),
1098 return this->m_pingOut_OutputPort[portNum].isConnected();
1090 bool CommandDispatcherComponentBase :: {
…}
1101 bool CommandDispatcherComponentBase ::
1105 portNum < this->getNum_seqCmdStatus_OutputPorts(),
1109 return this->m_seqCmdStatus_OutputPort[portNum].isConnected();
1101 bool CommandDispatcherComponentBase :: {
…}
1118 void CommandDispatcherComponentBase ::
1119 compCmdReg_handlerBase(
1126 portNum < this->getNum_compCmdReg_InputPorts(),
1134 this->compCmdReg_handler(
1118 void CommandDispatcherComponentBase :: {
…}
1143 void CommandDispatcherComponentBase ::
1144 compCmdStat_handlerBase(
1153 portNum < this->getNum_compCmdStat_InputPorts(),
1158 compCmdStat_preMsgHook(
1164 ComponentIpcSerializableBuffer msg;
1168 _status = msg.serialize(
1177 _status = msg.serialize(portNum);
1184 _status = msg.serialize(opCode);
1191 _status = msg.serialize(cmdSeq);
1198 _status = msg.serialize(response);
1143 void CommandDispatcherComponentBase :: {
…}
1214 void CommandDispatcherComponentBase ::
1222 portNum < this->getNum_pingIn_InputPorts(),
1231 ComponentIpcSerializableBuffer msg;
1235 _status = msg.serialize(
1244 _status = msg.serialize(portNum);
1251 _status = msg.serialize(key);
1214 void CommandDispatcherComponentBase :: {
…}
1267 void CommandDispatcherComponentBase ::
1268 seqCmdBuff_handlerBase(
1276 portNum < this->getNum_seqCmdBuff_InputPorts(),
1281 seqCmdBuff_preMsgHook(
1286 ComponentIpcSerializableBuffer msg;
1290 _status = msg.serialize(
1299 _status = msg.serialize(portNum);
1306 _status = msg.serialize(data);
1313 _status = msg.serialize(context);
1267 void CommandDispatcherComponentBase :: {
…}
1337 void CommandDispatcherComponentBase ::
1338 compCmdStat_preMsgHook(
1337 void CommandDispatcherComponentBase :: {
…}
1348 void CommandDispatcherComponentBase ::
1348 void CommandDispatcherComponentBase :: {
…}
1357 void CommandDispatcherComponentBase ::
1358 seqCmdBuff_preMsgHook(
1357 void CommandDispatcherComponentBase :: {
…}
1371 void CommandDispatcherComponentBase ::
1380 portNum < this->getNum_compCmdSend_OutputPorts(),
1383 this->m_compCmdSend_OutputPort[portNum].invoke(
1371 void CommandDispatcherComponentBase :: {
…}
1390 void CommandDispatcherComponentBase ::
1397 portNum < this->getNum_pingOut_OutputPorts(),
1400 this->m_pingOut_OutputPort[portNum].invoke(
1390 void CommandDispatcherComponentBase :: {
…}
1405 void CommandDispatcherComponentBase ::
1414 portNum < this->getNum_seqCmdStatus_OutputPorts(),
1417 this->m_seqCmdStatus_OutputPort[portNum].invoke(
1405 void CommandDispatcherComponentBase :: {
…}
1428 void CommandDispatcherComponentBase ::
1435 FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
1436 this->m_CmdStatus_OutputPort[0].invoke(opCode, cmdSeq, response);
1428 void CommandDispatcherComponentBase :: {
…}
1445 void CommandDispatcherComponentBase ::
1446 CMD_NO_OP_cmdHandlerBase(
1453 this->CMD_NO_OP_preMsgHook(opCode,cmdSeq);
1457 ComponentIpcSerializableBuffer msg;
1470 _status = msg.serialize(port);
1476 _status = msg.serialize(opCode);
1482 _status = msg.serialize(cmdSeq);
1488 _status = msg.serialize(args);
1445 void CommandDispatcherComponentBase :: {
…}
1504 void CommandDispatcherComponentBase ::
1505 CMD_NO_OP_STRING_cmdHandlerBase(
1512 this->CMD_NO_OP_STRING_preMsgHook(opCode,cmdSeq);
1516 ComponentIpcSerializableBuffer msg;
1520 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_CMD_NO_OP_STRING));
1529 _status = msg.serialize(port);
1535 _status = msg.serialize(opCode);
1541 _status = msg.serialize(cmdSeq);
1547 _status = msg.serialize(args);
1504 void CommandDispatcherComponentBase :: {
…}
1563 void CommandDispatcherComponentBase ::
1564 CMD_TEST_CMD_1_cmdHandlerBase(
1571 this->CMD_TEST_CMD_1_preMsgHook(opCode,cmdSeq);
1575 ComponentIpcSerializableBuffer msg;
1579 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_CMD_TEST_CMD_1));
1588 _status = msg.serialize(port);
1594 _status = msg.serialize(opCode);
1600 _status = msg.serialize(cmdSeq);
1606 _status = msg.serialize(args);
1563 void CommandDispatcherComponentBase :: {
…}
1622 void CommandDispatcherComponentBase ::
1623 CMD_CLEAR_TRACKING_cmdHandlerBase(
1630 this->CMD_CLEAR_TRACKING_preMsgHook(opCode,cmdSeq);
1634 ComponentIpcSerializableBuffer msg;
1638 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_CMD_CLEAR_TRACKING));
1647 _status = msg.serialize(port);
1653 _status = msg.serialize(opCode);
1659 _status = msg.serialize(cmdSeq);
1665 _status = msg.serialize(args);
1622 void CommandDispatcherComponentBase :: {
…}
1689 void CommandDispatcherComponentBase ::
1690 CMD_NO_OP_preMsgHook(
1689 void CommandDispatcherComponentBase :: {
…}
1700 void CommandDispatcherComponentBase ::
1701 CMD_NO_OP_STRING_preMsgHook(
1700 void CommandDispatcherComponentBase :: {
…}
1711 void CommandDispatcherComponentBase ::
1712 CMD_TEST_CMD_1_preMsgHook(
1711 void CommandDispatcherComponentBase :: {
…}
1722 void CommandDispatcherComponentBase ::
1723 CMD_CLEAR_TRACKING_preMsgHook(
1722 void CommandDispatcherComponentBase :: {
…}
1737 void CommandDispatcherComponentBase ::
1738 log_DIAGNOSTIC_OpCodeRegistered(
1746 if (this->m_Time_OutputPort[0].isConnected()) {
1747 this->m_Time_OutputPort[0].invoke(_logTime);
1752 _id = this->getIdBase() + EVENTID_OPCODEREGISTERED;
1755 if (this->m_Log_OutputPort[0].isConnected()) {
1759#if FW_AMPCS_COMPATIBLE
1768#if FW_AMPCS_COMPATIBLE
1771 static_cast<U8>(
sizeof(U32))
1784#if FW_AMPCS_COMPATIBLE
1787 static_cast<U8>(
sizeof(I32))
1800#if FW_AMPCS_COMPATIBLE
1803 static_cast<U8>(
sizeof(I32))
1816 this->m_Log_OutputPort[0].invoke(
1825#if FW_ENABLE_TEXT_LOGGING
1826 if (this->m_LogText_OutputPort[0].isConnected()) {
1827#if FW_OBJECT_NAMES == 1
1828 const char* _formatString =
1829 "(%s) %s: Opcode 0x%" PRIx32
" registered to port %" PRIi32
" slot %" PRIi32
"";
1831 const char* _formatString =
1832 "%s: Opcode 0x%" PRIx32
" registered to port %" PRIi32
" slot %" PRIi32
"";
1844 "OpCodeRegistered ",
1853 this->m_LogText_OutputPort[0].invoke(
1737 void CommandDispatcherComponentBase :: {
…}
1863 void CommandDispatcherComponentBase ::
1864 log_COMMAND_OpCodeDispatched(
1871 if (this->m_Time_OutputPort[0].isConnected()) {
1872 this->m_Time_OutputPort[0].invoke(_logTime);
1877 _id = this->getIdBase() + EVENTID_OPCODEDISPATCHED;
1880 if (this->m_Log_OutputPort[0].isConnected()) {
1884#if FW_AMPCS_COMPATIBLE
1893#if FW_AMPCS_COMPATIBLE
1896 static_cast<U8>(
sizeof(U32))
1909#if FW_AMPCS_COMPATIBLE
1912 static_cast<U8>(
sizeof(I32))
1925 this->m_Log_OutputPort[0].invoke(
1934#if FW_ENABLE_TEXT_LOGGING
1935 if (this->m_LogText_OutputPort[0].isConnected()) {
1936#if FW_OBJECT_NAMES == 1
1937 const char* _formatString =
1938 "(%s) %s: Opcode 0x%" PRIx32
" dispatched to port %" PRIi32
"";
1940 const char* _formatString =
1941 "%s: Opcode 0x%" PRIx32
" dispatched to port %" PRIi32
"";
1953 "OpCodeDispatched ",
1961 this->m_LogText_OutputPort[0].invoke(
1863 void CommandDispatcherComponentBase :: {
…}
1971 void CommandDispatcherComponentBase ::
1972 log_COMMAND_OpCodeCompleted(U32 Opcode)
1976 if (this->m_Time_OutputPort[0].isConnected()) {
1977 this->m_Time_OutputPort[0].invoke(_logTime);
1982 _id = this->getIdBase() + EVENTID_OPCODECOMPLETED;
1985 if (this->m_Log_OutputPort[0].isConnected()) {
1989#if FW_AMPCS_COMPATIBLE
1998#if FW_AMPCS_COMPATIBLE
2001 static_cast<U8>(
sizeof(U32))
2014 this->m_Log_OutputPort[0].invoke(
2023#if FW_ENABLE_TEXT_LOGGING
2024 if (this->m_LogText_OutputPort[0].isConnected()) {
2025#if FW_OBJECT_NAMES == 1
2026 const char* _formatString =
2027 "(%s) %s: Opcode 0x%" PRIx32
" completed";
2029 const char* _formatString =
2030 "%s: Opcode 0x%" PRIx32
" completed";
2049 this->m_LogText_OutputPort[0].invoke(
1971 void CommandDispatcherComponentBase :: {
…}
2059 void CommandDispatcherComponentBase ::
2060 log_COMMAND_OpCodeError(
2067 if (this->m_Time_OutputPort[0].isConnected()) {
2068 this->m_Time_OutputPort[0].invoke(_logTime);
2073 _id = this->getIdBase() + EVENTID_OPCODEERROR;
2076 if (this->m_Log_OutputPort[0].isConnected()) {
2080#if FW_AMPCS_COMPATIBLE
2089#if FW_AMPCS_COMPATIBLE
2092 static_cast<U8>(
sizeof(U32))
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: Opcode 0x%" PRIx32
" completed with error %s";
2136 const char* _formatString =
2137 "%s: Opcode 0x%" PRIx32
" completed with error %s";
2143 error.toString(errorStr);
2160 this->m_LogText_OutputPort[0].invoke(
2059 void CommandDispatcherComponentBase :: {
…}
2170 void CommandDispatcherComponentBase ::
2175 if (this->m_Time_OutputPort[0].isConnected()) {
2176 this->m_Time_OutputPort[0].invoke(_logTime);
2181 _id = this->getIdBase() + EVENTID_MALFORMEDCOMMAND;
2184 if (this->m_Log_OutputPort[0].isConnected()) {
2188#if FW_AMPCS_COMPATIBLE
2197#if FW_AMPCS_COMPATIBLE
2213 this->m_Log_OutputPort[0].invoke(
2222#if FW_ENABLE_TEXT_LOGGING
2223 if (this->m_LogText_OutputPort[0].isConnected()) {
2224#if FW_OBJECT_NAMES == 1
2225 const char* _formatString =
2226 "(%s) %s: Received malformed command packet. Status: %s";
2228 const char* _formatString =
2229 "%s: Received malformed command packet. Status: %s";
2235 Status.toString(StatusStr);
2244 "MalformedCommand ",
2251 this->m_LogText_OutputPort[0].invoke(
2170 void CommandDispatcherComponentBase :: {
…}
2261 void CommandDispatcherComponentBase ::
2262 log_WARNING_HI_InvalidCommand(U32 Opcode)
2266 if (this->m_Time_OutputPort[0].isConnected()) {
2267 this->m_Time_OutputPort[0].invoke(_logTime);
2272 _id = this->getIdBase() + EVENTID_INVALIDCOMMAND;
2275 if (this->m_Log_OutputPort[0].isConnected()) {
2279#if FW_AMPCS_COMPATIBLE
2288#if FW_AMPCS_COMPATIBLE
2291 static_cast<U8>(
sizeof(U32))
2304 this->m_Log_OutputPort[0].invoke(
2313#if FW_ENABLE_TEXT_LOGGING
2314 if (this->m_LogText_OutputPort[0].isConnected()) {
2315#if FW_OBJECT_NAMES == 1
2316 const char* _formatString =
2317 "(%s) %s: Invalid opcode 0x%" PRIx32
" received";
2319 const char* _formatString =
2320 "%s: Invalid opcode 0x%" PRIx32
" received";
2339 this->m_LogText_OutputPort[0].invoke(
2261 void CommandDispatcherComponentBase :: {
…}
2349 void CommandDispatcherComponentBase ::
2350 log_WARNING_HI_TooManyCommands(U32 Opcode)
2354 if (this->m_Time_OutputPort[0].isConnected()) {
2355 this->m_Time_OutputPort[0].invoke(_logTime);
2360 _id = this->getIdBase() + EVENTID_TOOMANYCOMMANDS;
2363 if (this->m_Log_OutputPort[0].isConnected()) {
2367#if FW_AMPCS_COMPATIBLE
2376#if FW_AMPCS_COMPATIBLE
2379 static_cast<U8>(
sizeof(U32))
2392 this->m_Log_OutputPort[0].invoke(
2401#if FW_ENABLE_TEXT_LOGGING
2402 if (this->m_LogText_OutputPort[0].isConnected()) {
2403#if FW_OBJECT_NAMES == 1
2404 const char* _formatString =
2405 "(%s) %s: Too many outstanding commands. opcode=0x%" PRIx32
"";
2407 const char* _formatString =
2408 "%s: Too many outstanding commands. opcode=0x%" PRIx32
"";
2427 this->m_LogText_OutputPort[0].invoke(
2349 void CommandDispatcherComponentBase :: {
…}
2437 void CommandDispatcherComponentBase ::
2438 log_ACTIVITY_HI_NoOpReceived()
2442 if (this->m_Time_OutputPort[0].isConnected()) {
2443 this->m_Time_OutputPort[0].invoke(_logTime);
2448 _id = this->getIdBase() + EVENTID_NOOPRECEIVED;
2451 if (this->m_Log_OutputPort[0].isConnected()) {
2454#if FW_AMPCS_COMPATIBLE
2464 this->m_Log_OutputPort[0].invoke(
2473#if FW_ENABLE_TEXT_LOGGING
2474 if (this->m_LogText_OutputPort[0].isConnected()) {
2475#if FW_OBJECT_NAMES == 1
2476 const char* _formatString =
2477 "(%s) %s: Received a NO-OP command";
2479 const char* _formatString =
2480 "%s: Received a NO-OP command";
2498 this->m_LogText_OutputPort[0].invoke(
2437 void CommandDispatcherComponentBase :: {
…}
2508 void CommandDispatcherComponentBase ::
2513 if (this->m_Time_OutputPort[0].isConnected()) {
2514 this->m_Time_OutputPort[0].invoke(_logTime);
2519 _id = this->getIdBase() + EVENTID_NOOPSTRINGRECEIVED;
2522 if (this->m_Log_OutputPort[0].isConnected()) {
2526#if FW_AMPCS_COMPATIBLE
2535 _status = message.
serialize(_logBuff, 40);
2541 this->m_Log_OutputPort[0].invoke(
2550#if FW_ENABLE_TEXT_LOGGING
2551 if (this->m_LogText_OutputPort[0].isConnected()) {
2552#if FW_OBJECT_NAMES == 1
2553 const char* _formatString =
2554 "(%s) %s: Received a NO-OP string=%s";
2556 const char* _formatString =
2557 "%s: Received a NO-OP string=%s";
2569 "NoOpStringReceived ",
2576 this->m_LogText_OutputPort[0].invoke(
2508 void CommandDispatcherComponentBase :: {
…}
2586 void CommandDispatcherComponentBase ::
2587 log_ACTIVITY_HI_TestCmd1Args(
2595 if (this->m_Time_OutputPort[0].isConnected()) {
2596 this->m_Time_OutputPort[0].invoke(_logTime);
2601 _id = this->getIdBase() + EVENTID_TESTCMD1ARGS;
2604 if (this->m_Log_OutputPort[0].isConnected()) {
2608#if FW_AMPCS_COMPATIBLE
2617#if FW_AMPCS_COMPATIBLE
2620 static_cast<U8>(
sizeof(I32))
2633#if FW_AMPCS_COMPATIBLE
2636 static_cast<U8>(
sizeof(
F32))
2649#if FW_AMPCS_COMPATIBLE
2652 static_cast<U8>(
sizeof(
U8))
2665 this->m_Log_OutputPort[0].invoke(
2674#if FW_ENABLE_TEXT_LOGGING
2675 if (this->m_LogText_OutputPort[0].isConnected()) {
2676#if FW_OBJECT_NAMES == 1
2677 const char* _formatString =
2678 "(%s) %s: TEST_CMD_1 args: I32: %" PRIi32
", F32: %f, U8: %" PRIu8
"";
2680 const char* _formatString =
2681 "%s: TEST_CMD_1 args: I32: %" PRIi32
", F32: %f, U8: %" PRIu8
"";
2702 this->m_LogText_OutputPort[0].invoke(
2586 void CommandDispatcherComponentBase :: {
…}
2712 void CommandDispatcherComponentBase ::
2713 log_DIAGNOSTIC_OpCodeReregistered(
2720 if (this->m_Time_OutputPort[0].isConnected()) {
2721 this->m_Time_OutputPort[0].invoke(_logTime);
2726 _id = this->getIdBase() + EVENTID_OPCODEREREGISTERED;
2729 if (this->m_Log_OutputPort[0].isConnected()) {
2733#if FW_AMPCS_COMPATIBLE
2742#if FW_AMPCS_COMPATIBLE
2745 static_cast<U8>(
sizeof(U32))
2758#if FW_AMPCS_COMPATIBLE
2761 static_cast<U8>(
sizeof(I32))
2774 this->m_Log_OutputPort[0].invoke(
2783#if FW_ENABLE_TEXT_LOGGING
2784 if (this->m_LogText_OutputPort[0].isConnected()) {
2785#if FW_OBJECT_NAMES == 1
2786 const char* _formatString =
2787 "(%s) %s: Opcode 0x%" PRIx32
" is already registered to port %" PRIi32
"";
2789 const char* _formatString =
2790 "%s: Opcode 0x%" PRIx32
" is already registered to port %" PRIi32
"";
2802 "OpCodeReregistered ",
2810 this->m_LogText_OutputPort[0].invoke(
2712 void CommandDispatcherComponentBase :: {
…}
2824 void CommandDispatcherComponentBase ::
2825 tlmWrite_CommandsDispatched(
2831 if (not this->m_first_update_CommandsDispatched) {
2833 if (arg == this->m_last_CommandsDispatched) {
2837 this->m_last_CommandsDispatched = arg;
2841 this->m_first_update_CommandsDispatched =
false;
2842 this->m_last_CommandsDispatched = arg;
2845 if (this->m_Tlm_OutputPort[0].isConnected()) {
2847 this->m_Time_OutputPort[0].isConnected() &&
2850 this->m_Time_OutputPort[0].invoke(_tlmTime);
2862 _id = this->getIdBase() + CHANNELID_COMMANDSDISPATCHED;
2864 this->m_Tlm_OutputPort[0].invoke(
2824 void CommandDispatcherComponentBase :: {
…}
2872 void CommandDispatcherComponentBase ::
2873 tlmWrite_CommandErrors(
2879 if (not this->m_first_update_CommandErrors) {
2881 if (arg == this->m_last_CommandErrors) {
2885 this->m_last_CommandErrors = arg;
2889 this->m_first_update_CommandErrors =
false;
2890 this->m_last_CommandErrors = arg;
2893 if (this->m_Tlm_OutputPort[0].isConnected()) {
2895 this->m_Time_OutputPort[0].isConnected() &&
2898 this->m_Time_OutputPort[0].invoke(_tlmTime);
2910 _id = this->getIdBase() + CHANNELID_COMMANDERRORS;
2912 this->m_Tlm_OutputPort[0].invoke(
2872 void CommandDispatcherComponentBase :: {
…}
2927 if (this->m_Time_OutputPort[0].isConnected()) {
2929 this->m_Time_OutputPort[0].invoke(_time);
2944 void CommandDispatcherComponentBase ::
2947 this->m_guardedPortMutex.lock();
2944 void CommandDispatcherComponentBase :: {
…}
2950 void CommandDispatcherComponentBase ::
2953 this->m_guardedPortMutex.unLock();
2950 void CommandDispatcherComponentBase :: {
…}
2963 ComponentIpcSerializableBuffer msg;
2986 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2988 if (msgType == COMMANDDISPATCHER_COMPONENT_EXIT) {
2989 return MSG_DISPATCH_EXIT;
2993 deserStatus = msg.deserialize(portNum);
3001 case COMPCMDSTAT_CMDRESPONSE: {
3004 deserStatus = msg.deserialize(opCode);
3012 deserStatus = msg.deserialize(cmdSeq);
3020 deserStatus = msg.deserialize(response);
3026 this->compCmdStat_handler(
3040 deserStatus = msg.deserialize(key);
3046 this->pingIn_handler(
3055 case SEQCMDBUFF_COM: {
3058 deserStatus = msg.deserialize(data);
3066 deserStatus = msg.deserialize(context);
3072 this->seqCmdBuff_handler(
3082 case CMD_CMD_NO_OP: {
3085 deserStatus = msg.deserialize(opCode);
3093 deserStatus = msg.deserialize(cmdSeq);
3101 deserStatus = msg.deserialize(args);
3112#if FW_CMD_CHECK_RESIDUAL
3114 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3123 this->CMD_NO_OP_cmdHandler(opCode, cmdSeq);
3129 case CMD_CMD_NO_OP_STRING: {
3132 deserStatus = msg.deserialize(opCode);
3140 deserStatus = msg.deserialize(cmdSeq);
3148 deserStatus = msg.deserialize(args);
3161 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3162 this->cmdResponse_out(
3174#if FW_CMD_CHECK_RESIDUAL
3176 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3185 this->CMD_NO_OP_STRING_cmdHandler(
3194 case CMD_CMD_TEST_CMD_1: {
3197 deserStatus = msg.deserialize(opCode);
3205 deserStatus = msg.deserialize(cmdSeq);
3213 deserStatus = msg.deserialize(args);
3226 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3227 this->cmdResponse_out(
3241 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3242 this->cmdResponse_out(
3256 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3257 this->cmdResponse_out(
3269#if FW_CMD_CHECK_RESIDUAL
3271 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3280 this->CMD_TEST_CMD_1_cmdHandler(
3291 case CMD_CMD_CLEAR_TRACKING: {
3294 deserStatus = msg.deserialize(opCode);
3302 deserStatus = msg.deserialize(cmdSeq);
3310 deserStatus = msg.deserialize(args);
3321#if FW_CMD_CHECK_RESIDUAL
3323 if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3332 this->CMD_CLEAR_TRACKING_cmdHandler(opCode, cmdSeq);
3338 return MSG_DISPATCH_ERROR;
3341 return MSG_DISPATCH_OK;
3348 void CommandDispatcherComponentBase ::
3358 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3360 const U32 idBase = callComp->
getIdBase();
3361 FW_ASSERT(opCode >= idBase, opCode, idBase);
3364 switch (opCode - idBase) {
3365 case OPCODE_CMD_NO_OP: {
3366 compPtr->CMD_NO_OP_cmdHandlerBase(
3374 case OPCODE_CMD_NO_OP_STRING: {
3375 compPtr->CMD_NO_OP_STRING_cmdHandlerBase(
3383 case OPCODE_CMD_TEST_CMD_1: {
3384 compPtr->CMD_TEST_CMD_1_cmdHandlerBase(
3392 case OPCODE_CMD_CLEAR_TRACKING: {
3393 compPtr->CMD_CLEAR_TRACKING_cmdHandlerBase(
3407 void CommandDispatcherComponentBase ::
3415 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3416 compPtr->compCmdReg_handlerBase(
3422 void CommandDispatcherComponentBase ::
3432 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3433 compPtr->compCmdStat_handlerBase(
3441 void CommandDispatcherComponentBase ::
3449 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3450 compPtr->pingIn_handlerBase(
3456 void CommandDispatcherComponentBase ::
3465 CommandDispatcherComponentBase* compPtr =
static_cast<CommandDispatcherComponentBase*
>(callComp);
3466 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.