9 #if FW_ENABLE_TEXT_LOGGING 22 STARTRECORDINGIN_COMLOGGERSTART,
23 STOPRECORDINGIN_COMLOGGERSTOP,
42 class ComponentIpcSerializableBuffer :
52 MAX_DATA_SIZE =
sizeof(BuffUnion),
54 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
57 ComponentIpcSerializableBuffer() :
Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
63 U8 m_buff[SERIALIZATION_SIZE];
106 if ((this->m_dataBuffer.getSize() + sizeDelta) <= this->m_dataBuffer.getCapacity()) {
108 status = this->m_dataBuffer.serializeFrom(
id);
110 status = this->m_dataBuffer.serializeSize(size);
114 this->m_dataSize += sizeDelta;
135 #if !FW_DIRECT_PORT_CALLS 142 this->m_cmdIn_InputPort[port].
init();
147 this->m_cmdIn_InputPort[port].
setPortNum(port);
149 #if FW_OBJECT_NAMES == 1 153 this->m_objName.toChar(),
156 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
161 #if !FW_DIRECT_PORT_CALLS 168 this->m_comIn_InputPort[port].
init();
173 this->m_comIn_InputPort[port].
setPortNum(port);
175 #if FW_OBJECT_NAMES == 1 179 this->m_objName.toChar(),
182 this->m_comIn_InputPort[port].setObjName(portName.
toChar());
187 #if !FW_DIRECT_PORT_CALLS 194 this->m_pingIn_InputPort[port].
init();
199 this->m_pingIn_InputPort[port].
setPortNum(port);
201 #if FW_OBJECT_NAMES == 1 205 this->m_objName.toChar(),
208 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
213 #if !FW_DIRECT_PORT_CALLS 220 this->m_schedIn_InputPort[port].
init();
225 this->m_schedIn_InputPort[port].
setPortNum(port);
227 #if FW_OBJECT_NAMES == 1 231 this->m_objName.toChar(),
234 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
239 #if !FW_DIRECT_PORT_CALLS 246 this->m_startRecordingIn_InputPort[port].
init();
247 this->m_startRecordingIn_InputPort[port].
addCallComp(
249 m_p_startRecordingIn_in
251 this->m_startRecordingIn_InputPort[port].
setPortNum(port);
253 #if FW_OBJECT_NAMES == 1 257 this->m_objName.toChar(),
260 this->m_startRecordingIn_InputPort[port].setObjName(portName.
toChar());
265 #if !FW_DIRECT_PORT_CALLS 272 this->m_stopRecordingIn_InputPort[port].
init();
273 this->m_stopRecordingIn_InputPort[port].
addCallComp(
275 m_p_stopRecordingIn_in
277 this->m_stopRecordingIn_InputPort[port].
setPortNum(port);
279 #if FW_OBJECT_NAMES == 1 283 this->m_objName.toChar(),
286 this->m_stopRecordingIn_InputPort[port].setObjName(portName.
toChar());
291 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 295 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
298 this->m_LogText_OutputPort[port].
init();
300 #if FW_OBJECT_NAMES == 1 304 this->m_objName.toChar(),
307 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
312 #if !FW_DIRECT_PORT_CALLS 319 this->m_cmdRegOut_OutputPort[port].
init();
321 #if FW_OBJECT_NAMES == 1 325 this->m_objName.toChar(),
328 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
333 #if !FW_DIRECT_PORT_CALLS 340 this->m_cmdResponseOut_OutputPort[port].
init();
342 #if FW_OBJECT_NAMES == 1 346 this->m_objName.toChar(),
349 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
354 #if !FW_DIRECT_PORT_CALLS 361 this->m_logOut_OutputPort[port].
init();
363 #if FW_OBJECT_NAMES == 1 367 this->m_objName.toChar(),
370 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
375 #if !FW_DIRECT_PORT_CALLS 382 this->m_productGetOut_OutputPort[port].
init();
384 #if FW_OBJECT_NAMES == 1 388 this->m_objName.toChar(),
391 this->m_productGetOut_OutputPort[port].setObjName(portName.
toChar());
396 #if !FW_DIRECT_PORT_CALLS 403 this->m_productSendOut_OutputPort[port].
init();
405 #if FW_OBJECT_NAMES == 1 409 this->m_objName.toChar(),
412 this->m_productSendOut_OutputPort[port].setObjName(portName.
toChar());
417 #if !FW_DIRECT_PORT_CALLS 424 this->m_timeCaller_OutputPort[port].
init();
426 #if FW_OBJECT_NAMES == 1 430 this->m_objName.toChar(),
433 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
438 #if !FW_DIRECT_PORT_CALLS 445 this->m_tlmOut_OutputPort[port].
init();
447 #if FW_OBJECT_NAMES == 1 451 this->m_objName.toChar(),
454 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
459 #if !FW_DIRECT_PORT_CALLS 466 this->m_pingOut_OutputPort[port].
init();
468 #if FW_OBJECT_NAMES == 1 472 this->m_objName.toChar(),
475 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
483 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
487 static_cast<FwAssertArgType>(qStat)
491 #if !FW_DIRECT_PORT_CALLS 502 static_cast<FwAssertArgType>(portNum)
505 return &this->m_cmdIn_InputPort[portNum];
510 #if !FW_DIRECT_PORT_CALLS 521 static_cast<FwAssertArgType>(portNum)
524 return &this->m_comIn_InputPort[portNum];
532 static_cast<FwAssertArgType>(portNum)
535 return &this->m_pingIn_InputPort[portNum];
543 static_cast<FwAssertArgType>(portNum)
546 return &this->m_schedIn_InputPort[portNum];
554 static_cast<FwAssertArgType>(portNum)
557 return &this->m_startRecordingIn_InputPort[portNum];
565 static_cast<FwAssertArgType>(portNum)
568 return &this->m_stopRecordingIn_InputPort[portNum];
573 #if !FW_DIRECT_PORT_CALLS 579 #if FW_ENABLE_TEXT_LOGGING == 1 581 void ComLoggerDpComponentBase ::
582 set_LogText_OutputPort(
588 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
589 static_cast<FwAssertArgType>(portNum)
592 this->m_LogText_OutputPort[portNum].addCallPort(port);
605 static_cast<FwAssertArgType>(portNum)
608 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
619 static_cast<FwAssertArgType>(portNum)
622 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
633 static_cast<FwAssertArgType>(portNum)
636 this->m_logOut_OutputPort[portNum].
addCallPort(port);
647 static_cast<FwAssertArgType>(portNum)
650 this->m_productGetOut_OutputPort[portNum].
addCallPort(port);
661 static_cast<FwAssertArgType>(portNum)
664 this->m_productSendOut_OutputPort[portNum].
addCallPort(port);
675 static_cast<FwAssertArgType>(portNum)
678 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
689 static_cast<FwAssertArgType>(portNum)
692 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
697 #if !FW_DIRECT_PORT_CALLS 711 static_cast<FwAssertArgType>(portNum)
714 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
719 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 725 #if FW_ENABLE_TEXT_LOGGING == 1 727 void ComLoggerDpComponentBase ::
728 set_LogText_OutputPort(
730 Fw::InputSerializePort* port
734 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
735 static_cast<FwAssertArgType>(portNum)
738 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
746 Fw::InputSerializePort* port
751 static_cast<FwAssertArgType>(portNum)
754 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
760 Fw::InputSerializePort* port
765 static_cast<FwAssertArgType>(portNum)
768 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
774 Fw::InputSerializePort* port
779 static_cast<FwAssertArgType>(portNum)
782 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
788 Fw::InputSerializePort* port
793 static_cast<FwAssertArgType>(portNum)
796 this->m_productSendOut_OutputPort[portNum].registerSerialPort(port);
802 Fw::InputSerializePort* port
807 static_cast<FwAssertArgType>(portNum)
810 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
816 Fw::InputSerializePort* port
821 static_cast<FwAssertArgType>(portNum)
824 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
829 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 838 Fw::InputSerializePort* port
843 static_cast<FwAssertArgType>(portNum)
846 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
889 this->m_DpBufferErrorThrottle = 0;
898 #if !FW_DIRECT_PORT_CALLS 904 #if FW_ENABLE_TEXT_LOGGING == 1 906 bool ComLoggerDpComponentBase ::
907 isConnected_LogText_OutputPort(
FwIndexType portNum)
const 910 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
911 static_cast<FwAssertArgType>(portNum)
914 return this->m_LogText_OutputPort[portNum].isConnected();
924 static_cast<FwAssertArgType>(portNum)
927 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
935 static_cast<FwAssertArgType>(portNum)
938 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
946 static_cast<FwAssertArgType>(portNum)
949 return this->m_logOut_OutputPort[portNum].
isConnected();
957 static_cast<FwAssertArgType>(portNum)
960 return this->m_productGetOut_OutputPort[portNum].
isConnected();
968 static_cast<FwAssertArgType>(portNum)
971 return this->m_productSendOut_OutputPort[portNum].
isConnected();
979 static_cast<FwAssertArgType>(portNum)
982 return this->m_timeCaller_OutputPort[portNum].
isConnected();
990 static_cast<FwAssertArgType>(portNum)
993 return this->m_tlmOut_OutputPort[portNum].
isConnected();
998 #if !FW_DIRECT_PORT_CALLS 1009 static_cast<FwAssertArgType>(portNum)
1012 return this->m_pingOut_OutputPort[portNum].
isConnected();
1033 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
1036 switch (opCode - idBase) {
1094 static_cast<FwAssertArgType>(portNum)
1103 ComponentIpcSerializableBuffer msg;
1107 _status = msg.serializeFrom(
1108 static_cast<FwEnumStoreType>(COMIN_COM)
1112 static_cast<FwAssertArgType>(_status)
1116 _status = msg.serializeFrom(portNum);
1119 static_cast<FwAssertArgType>(_status)
1123 _status = msg.serializeFrom(data);
1126 static_cast<FwAssertArgType>(_status)
1130 _status = msg.serializeFrom(context);
1133 static_cast<FwAssertArgType>(_status)
1140 if (qStatus == Os::Queue::Status::FULL) {
1147 static_cast<FwAssertArgType>(qStatus)
1160 static_cast<FwAssertArgType>(portNum)
1168 ComponentIpcSerializableBuffer msg;
1172 _status = msg.serializeFrom(
1173 static_cast<FwEnumStoreType>(PINGIN_PING)
1177 static_cast<FwAssertArgType>(_status)
1181 _status = msg.serializeFrom(portNum);
1184 static_cast<FwAssertArgType>(_status)
1188 _status = msg.serializeFrom(key);
1191 static_cast<FwAssertArgType>(_status)
1200 static_cast<FwAssertArgType>(qStatus)
1213 static_cast<FwAssertArgType>(portNum)
1221 ComponentIpcSerializableBuffer msg;
1225 _status = msg.serializeFrom(
1226 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1230 static_cast<FwAssertArgType>(_status)
1234 _status = msg.serializeFrom(portNum);
1237 static_cast<FwAssertArgType>(_status)
1241 _status = msg.serializeFrom(context);
1244 static_cast<FwAssertArgType>(_status)
1253 static_cast<FwAssertArgType>(qStatus)
1267 static_cast<FwAssertArgType>(portNum)
1273 packetsPerContainer,
1276 ComponentIpcSerializableBuffer msg;
1280 _status = msg.serializeFrom(
1281 static_cast<FwEnumStoreType>(STARTRECORDINGIN_COMLOGGERSTART)
1285 static_cast<FwAssertArgType>(_status)
1289 _status = msg.serializeFrom(portNum);
1292 static_cast<FwAssertArgType>(_status)
1296 _status = msg.serializeFrom(packetsPerContainer);
1299 static_cast<FwAssertArgType>(_status)
1303 _status = msg.serializeFrom(priority);
1306 static_cast<FwAssertArgType>(_status)
1315 static_cast<FwAssertArgType>(qStatus)
1325 static_cast<FwAssertArgType>(portNum)
1330 ComponentIpcSerializableBuffer msg;
1334 _status = msg.serializeFrom(
1335 static_cast<FwEnumStoreType>(STOPRECORDINGIN_COMLOGGERSTOP)
1339 static_cast<FwAssertArgType>(_status)
1343 _status = msg.serializeFrom(portNum);
1346 static_cast<FwAssertArgType>(_status)
1355 static_cast<FwAssertArgType>(qStatus)
1411 #if !FW_DIRECT_PORT_CALLS 1425 static_cast<FwAssertArgType>(portNum)
1429 this->m_pingOut_OutputPort[portNum].isConnected(),
1430 static_cast<FwAssertArgType>(portNum)
1432 this->m_pingOut_OutputPort[portNum].
invoke(
1451 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1472 ComponentIpcSerializableBuffer msg;
1476 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_STARTCOMDP));
1479 static_cast<FwAssertArgType>(_status)
1485 _status = msg.serializeFrom(port);
1488 static_cast<FwAssertArgType>(_status)
1491 _status = msg.serializeFrom(opCode);
1494 static_cast<FwAssertArgType>(_status)
1497 _status = msg.serializeFrom(cmdSeq);
1500 static_cast<FwAssertArgType>(_status)
1503 _status = msg.serializeFrom(args);
1506 static_cast<FwAssertArgType>(_status)
1515 static_cast<FwAssertArgType>(qStatus)
1531 ComponentIpcSerializableBuffer msg;
1535 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_UPDATEPRIORITY));
1538 static_cast<FwAssertArgType>(_status)
1544 _status = msg.serializeFrom(port);
1547 static_cast<FwAssertArgType>(_status)
1550 _status = msg.serializeFrom(opCode);
1553 static_cast<FwAssertArgType>(_status)
1556 _status = msg.serializeFrom(cmdSeq);
1559 static_cast<FwAssertArgType>(_status)
1562 _status = msg.serializeFrom(args);
1565 static_cast<FwAssertArgType>(_status)
1574 static_cast<FwAssertArgType>(qStatus)
1590 ComponentIpcSerializableBuffer msg;
1594 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_STOPCOMDP));
1597 static_cast<FwAssertArgType>(_status)
1603 _status = msg.serializeFrom(port);
1606 static_cast<FwAssertArgType>(_status)
1609 _status = msg.serializeFrom(opCode);
1612 static_cast<FwAssertArgType>(_status)
1615 _status = msg.serializeFrom(cmdSeq);
1618 static_cast<FwAssertArgType>(_status)
1621 _status = msg.serializeFrom(args);
1624 static_cast<FwAssertArgType>(_status)
1633 static_cast<FwAssertArgType>(qStatus)
1649 ComponentIpcSerializableBuffer msg;
1653 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CLEAR_COUNTERS));
1656 static_cast<FwAssertArgType>(_status)
1662 _status = msg.serializeFrom(port);
1665 static_cast<FwAssertArgType>(_status)
1668 _status = msg.serializeFrom(opCode);
1671 static_cast<FwAssertArgType>(_status)
1674 _status = msg.serializeFrom(cmdSeq);
1677 static_cast<FwAssertArgType>(_status)
1680 _status = msg.serializeFrom(args);
1683 static_cast<FwAssertArgType>(_status)
1692 static_cast<FwAssertArgType>(qStatus)
1760 this->m_DpBufferErrorThrottle++;
1766 this->timeCaller_out(0, _logTime);
1776 #if FW_AMPCS_COMPATIBLE 1781 static_cast<FwAssertArgType>(_status)
1785 #if FW_AMPCS_COMPATIBLE 1788 static_cast<U8>(
sizeof(U32))
1792 static_cast<FwAssertArgType>(_status)
1798 static_cast<FwAssertArgType>(_status)
1811 #if FW_ENABLE_TEXT_LOGGING 1812 if (this->isConnected_LogText_OutputPort(0)) {
1813 #if FW_OBJECT_NAMES == 1 1814 const char* _formatString =
1815 "(%s) %s: Error getting ComDp buffer of size %" PRIu32
"";
1817 const char* _formatString =
1818 "%s: Error getting ComDp buffer of size %" PRIu32
"";
1822 (void) _logString.
format(
1825 this->m_objName.toChar(),
1848 this->timeCaller_out(0, _logTime);
1858 #if FW_AMPCS_COMPATIBLE 1863 static_cast<FwAssertArgType>(_status)
1867 #if FW_AMPCS_COMPATIBLE 1874 static_cast<FwAssertArgType>(_status)
1880 static_cast<FwAssertArgType>(_status)
1893 #if FW_ENABLE_TEXT_LOGGING 1894 if (this->isConnected_LogText_OutputPort(0)) {
1895 #if FW_OBJECT_NAMES == 1 1896 const char* _formatString =
1897 "(%s) %s: Started Com DP logging: %" PRIu64
" packets per container";
1899 const char* _formatString =
1900 "%s: Started Com DP logging: %" PRIu64
" packets per container";
1904 (void) _logString.
format(
1907 this->m_objName.toChar(),
1930 this->timeCaller_out(0, _logTime);
1940 #if FW_AMPCS_COMPATIBLE 1945 static_cast<FwAssertArgType>(_status)
1949 #if FW_AMPCS_COMPATIBLE 1956 static_cast<FwAssertArgType>(_status)
1962 static_cast<FwAssertArgType>(_status)
1975 #if FW_ENABLE_TEXT_LOGGING 1976 if (this->isConnected_LogText_OutputPort(0)) {
1977 #if FW_OBJECT_NAMES == 1 1978 const char* _formatString =
1979 "(%s) %s: Stopped Com DP logging: partial container %s";
1981 const char* _formatString =
1982 "%s: Stopped Com DP logging: partial container %s";
1986 partialContainer.toString(partialContainerStr);
1989 (void) _logString.
format(
1992 this->m_objName.toChar(),
1995 partialContainerStr.
toChar()
2015 this->timeCaller_out(0, _logTime);
2025 #if FW_AMPCS_COMPATIBLE 2030 static_cast<FwAssertArgType>(_status)
2034 #if FW_AMPCS_COMPATIBLE 2041 static_cast<FwAssertArgType>(_status)
2047 static_cast<FwAssertArgType>(_status)
2060 #if FW_ENABLE_TEXT_LOGGING 2061 if (this->isConnected_LogText_OutputPort(0)) {
2062 #if FW_OBJECT_NAMES == 1 2063 const char* _formatString =
2064 "(%s) %s: Updated Com DP priority to %" PRIu32
"";
2066 const char* _formatString =
2067 "%s: Updated Com DP priority to %" PRIu32
"";
2071 (void) _logString.
format(
2074 this->m_objName.toChar(),
2097 this->timeCaller_out(0, _logTime);
2106 #if FW_AMPCS_COMPATIBLE 2112 static_cast<FwAssertArgType>(_status)
2126 #if FW_ENABLE_TEXT_LOGGING 2127 if (this->isConnected_LogText_OutputPort(0)) {
2128 #if FW_OBJECT_NAMES == 1 2129 const char* _formatString =
2130 "(%s) %s: Cleared NumBuffersLogged counter and DpBufferError throttle";
2132 const char* _formatString =
2133 "%s: Cleared NumBuffersLogged counter and DpBufferError throttle";
2137 (void) _logString.
format(
2140 this->m_objName.toChar(),
2162 this->timeCaller_out(0, _logTime);
2172 #if FW_AMPCS_COMPATIBLE 2177 static_cast<FwAssertArgType>(_status)
2181 #if FW_AMPCS_COMPATIBLE 2188 static_cast<FwAssertArgType>(_status)
2194 static_cast<FwAssertArgType>(_status)
2207 #if FW_ENABLE_TEXT_LOGGING 2208 if (this->isConnected_LogText_OutputPort(0)) {
2209 #if FW_OBJECT_NAMES == 1 2210 const char* _formatString =
2211 "(%s) %s: Failed to start Com DP recording: packetsPerContainer %" PRIu64
" is invalid (must be > 0)";
2213 const char* _formatString =
2214 "%s: Failed to start Com DP recording: packetsPerContainer %" PRIu64
" is invalid (must be > 0)";
2218 (void) _logString.
format(
2221 this->m_objName.toChar(),
2223 "StartRecordingFailed ",
2246 this->m_DpBufferErrorThrottle = 0;
2265 this->timeCaller_out(0, _tlmTime);
2295 static_cast<FwAssertArgType>(_stat)
2317 static_cast<FwAssertArgType>(_stat)
2339 static_cast<FwAssertArgType>(_stat)
2361 static_cast<FwAssertArgType>(_stat)
2394 static_cast<FwAssertArgType>(buffer.
getSize()));
2395 buffer.
setSize(static_cast<U32>(packetSize));
2399 this->productSendOut_out(0, container.
getId(), buffer);
2411 this->timeCaller_out(0, _time);
2426 ComponentIpcSerializableBuffer _msg;
2436 static_cast<FwAssertArgType>(_msgStatus)
2446 static_cast<FwAssertArgType>(_deserStatus)
2449 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2451 if (_msgType == COMLOGGERDP_COMPONENT_EXIT) {
2456 _deserStatus = _msg.deserializeTo(portNum);
2459 static_cast<FwAssertArgType>(_deserStatus)
2467 _deserStatus = _msg.deserializeTo(data);
2470 static_cast<FwAssertArgType>(_deserStatus)
2475 _deserStatus = _msg.deserializeTo(context);
2478 static_cast<FwAssertArgType>(_deserStatus)
2494 _deserStatus = _msg.deserializeTo(key);
2497 static_cast<FwAssertArgType>(_deserStatus)
2509 case SCHEDIN_SCHED: {
2512 _deserStatus = _msg.deserializeTo(context);
2515 static_cast<FwAssertArgType>(_deserStatus)
2527 case STARTRECORDINGIN_COMLOGGERSTART: {
2530 _deserStatus = _msg.deserializeTo(packetsPerContainer);
2533 static_cast<FwAssertArgType>(_deserStatus)
2538 _deserStatus = _msg.deserializeTo(priority);
2541 static_cast<FwAssertArgType>(_deserStatus)
2546 packetsPerContainer,
2554 case STOPRECORDINGIN_COMLOGGERSTOP: {
2562 case CMD_STARTCOMDP: {
2565 _deserStatus = _msg.deserializeTo(_opCode);
2568 static_cast<FwAssertArgType>(_deserStatus)
2573 _deserStatus = _msg.deserializeTo(_cmdSeq);
2576 static_cast<FwAssertArgType>(_deserStatus)
2581 _deserStatus = _msg.deserializeTo(args);
2584 static_cast<FwAssertArgType>(_deserStatus)
2622 #if FW_CMD_CHECK_RESIDUAL 2635 packetsPerContainer,
2643 case CMD_UPDATEPRIORITY: {
2646 _deserStatus = _msg.deserializeTo(_opCode);
2649 static_cast<FwAssertArgType>(_deserStatus)
2654 _deserStatus = _msg.deserializeTo(_cmdSeq);
2657 static_cast<FwAssertArgType>(_deserStatus)
2662 _deserStatus = _msg.deserializeTo(args);
2665 static_cast<FwAssertArgType>(_deserStatus)
2688 #if FW_CMD_CHECK_RESIDUAL 2708 case CMD_STOPCOMDP: {
2711 _deserStatus = _msg.deserializeTo(_opCode);
2714 static_cast<FwAssertArgType>(_deserStatus)
2719 _deserStatus = _msg.deserializeTo(_cmdSeq);
2722 static_cast<FwAssertArgType>(_deserStatus)
2727 _deserStatus = _msg.deserializeTo(args);
2730 static_cast<FwAssertArgType>(_deserStatus)
2738 #if FW_CMD_CHECK_RESIDUAL 2755 case CMD_CLEAR_COUNTERS: {
2758 _deserStatus = _msg.deserializeTo(_opCode);
2761 static_cast<FwAssertArgType>(_deserStatus)
2766 _deserStatus = _msg.deserializeTo(_cmdSeq);
2769 static_cast<FwAssertArgType>(_deserStatus)
2774 _deserStatus = _msg.deserializeTo(args);
2777 static_cast<FwAssertArgType>(_deserStatus)
2785 #if FW_CMD_CHECK_RESIDUAL 2812 void ComLoggerDpComponentBase ::
2823 compPtr->cmdIn_handlerBase(
2835 void ComLoggerDpComponentBase ::
2845 compPtr->comIn_handlerBase(
2852 void ComLoggerDpComponentBase ::
2861 compPtr->pingIn_handlerBase(
2867 void ComLoggerDpComponentBase ::
2876 compPtr->schedIn_handlerBase(
2882 void ComLoggerDpComponentBase ::
2883 m_p_startRecordingIn_in(
2892 compPtr->startRecordingIn_handlerBase(
2894 packetsPerContainer,
2899 void ComLoggerDpComponentBase ::
2900 m_p_stopRecordingIn_in(
2907 compPtr->stopRecordingIn_handlerBase(portNum);
2910 #if !FW_DIRECT_PORT_CALLS 2916 #if FW_ENABLE_TEXT_LOGGING 2918 void ComLoggerDpComponentBase ::
2928 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
2929 static_cast<FwAssertArgType>(portNum)
2933 this->m_LogText_OutputPort[portNum].isConnected(),
2934 static_cast<FwAssertArgType>(portNum)
2936 this->m_LogText_OutputPort[portNum].invoke(
2946 void ComLoggerDpComponentBase ::
2954 static_cast<FwAssertArgType>(portNum)
2958 this->m_cmdRegOut_OutputPort[portNum].isConnected(),
2959 static_cast<FwAssertArgType>(portNum)
2961 this->m_cmdRegOut_OutputPort[portNum].
invoke(
2966 void ComLoggerDpComponentBase ::
2976 static_cast<FwAssertArgType>(portNum)
2980 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
2981 static_cast<FwAssertArgType>(portNum)
2983 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
2990 void ComLoggerDpComponentBase ::
3001 static_cast<FwAssertArgType>(portNum)
3005 this->m_logOut_OutputPort[portNum].isConnected(),
3006 static_cast<FwAssertArgType>(portNum)
3008 this->m_logOut_OutputPort[portNum].
invoke(
3026 static_cast<FwAssertArgType>(portNum)
3030 this->m_productGetOut_OutputPort[portNum].isConnected(),
3031 static_cast<FwAssertArgType>(portNum)
3033 return this->m_productGetOut_OutputPort[portNum].
invoke(
3040 void ComLoggerDpComponentBase ::
3049 static_cast<FwAssertArgType>(portNum)
3053 this->m_productSendOut_OutputPort[portNum].isConnected(),
3054 static_cast<FwAssertArgType>(portNum)
3056 this->m_productSendOut_OutputPort[portNum].
invoke(
3062 void ComLoggerDpComponentBase ::
3070 static_cast<FwAssertArgType>(portNum)
3074 this->m_timeCaller_OutputPort[portNum].isConnected(),
3075 static_cast<FwAssertArgType>(portNum)
3077 this->m_timeCaller_OutputPort[portNum].
invoke(
3082 void ComLoggerDpComponentBase ::
3092 static_cast<FwAssertArgType>(portNum)
3096 this->m_tlmOut_OutputPort[portNum].isConnected(),
3097 static_cast<FwAssertArgType>(portNum)
3099 this->m_tlmOut_OutputPort[portNum].
invoke(
3114 ContainerId::T containerId,
3117 DpContainer& container
3121 const FwDpIdType globalId = baseId + containerId;
3124 const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer);
3128 container = DpContainer(globalId, buffer, baseId);
3129 container.setPriority(priority);
Serialization/Deserialization operation was successful.
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
Started recording Com buffers.
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_logOut_OutputPorts()
Throttle reset count for DpBufferError.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
static constexpr FwSizeType CAPACITY
static constexpr FwIndexType getNum_productGetOut_OutputPorts()
void setTimeTag(Fw::Time timeTag)
Set the time tag.
FwIdType FwOpcodeType
The type of a command opcode.
virtual ~ComLoggerDpComponentBase()
Destroy ComLoggerDpComponentBase object.
void init()
Initialization function.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Svc::InputComLoggerStartPort * get_startRecordingIn_InputPort(FwIndexType portNum)
Failed to start recording due to invalid configuration.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
U32 FwDpPriorityType
The type of a data product priority.
void dpSend(DpContainer &container, Fw::Time timeTag=Fw::ZERO_TIME)
Send a data product.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void addCallPort(InputDpSendPort *callPort)
Register an input port.
void setSize(FwSizeType size)
void set_productSendOut_OutputPort(FwIndexType portNum, Fw::InputDpSendPort *port)
Connect port to productSendOut[portNum].
Status
status returned from the queue send function
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_schedIn_InputPorts()
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
void log_ACTIVITY_LO_CountersCleared() const
Starts recording ComBuffers at the specified priority.
virtual void StartComDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, FwSizeType packetsPerContainer, FwDpPriorityType priority)=0
No room left in the buffer to serialize data.
void StartComDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void invoke(U32 key) const
Invoke a port connection.
void tlmWrite_NumBuffersDropped(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void startRecordingIn_handlerBase(FwIndexType portNum, FwSizeType packetsPerContainer, FwDpPriorityType priority)
Handler base-class function for input port startRecordingIn.
Stopped recording Com buffers.
static constexpr FwIndexType getNum_productSendOut_OutputPorts()
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void init()
Initialization function.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
Enum representing a command response.
No time base has been established (Required)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void set_productGetOut_OutputPort(FwIndexType portNum, Fw::InputDpGetPort *port)
Connect port to productGetOut[portNum].
void StopComDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Updated data product priority.
static constexpr FwIndexType getNum_comIn_InputPorts()
Os::Queue m_queue
queue object for active component
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
void log_WARNING_HI_DpBufferError(U32 size)
Log event DpBufferError.
Message will block until space is available.
static constexpr FwSizeType CAPACITY
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
virtual void StopComDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command StopComDp.
FwIdType FwEventIdType
The type of an event identifier.
Svc::InputComLoggerStopPort * get_stopRecordingIn_InputPort(FwIndexType portNum)
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
A data product container.
static constexpr FwSizeType CAPACITY
Channel ID for NumBuffersLogged.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void UpdatePriority_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, FwDpPriorityType priority)=0
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
static constexpr FwSizeType CAPACITY
virtual void comIn_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port comIn.
A less serious but recoverable event.
static constexpr FwIndexType getNum_pingIn_InputPorts()
Omit length from serialization.
ActiveComponentBase(const char *name)
Constructor.
void init()
Initialization function.
void log_ACTIVITY_LO_PriorityUpdated(FwDpPriorityType priority) const
void invoke(Fw::Time &time) const
Invoke a port connection.
Channel ID for NumBuffersDropped.
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
void invalidateBuffer()
Invalidate the packet buffer.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void addCallPort(InputPingPort *callPort)
Register an input port.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
virtual void comIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
Fw::SerializeStatus serializeRecord_ComBufferRecord(const U8 *array, FwSizeType size)
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
A serious but recoverable event.
Channel ID for LoggingEnabled.
FwSizeType FwSizeStoreType
Errors dispatching messages.
static constexpr FwIndexType getNum_stopRecordingIn_InputPorts()
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
static constexpr FwSizeType getPacketSizeForDataSize(FwSizeType dataSize)
Get the packet size for a given data size.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
const char * toChar() const
Convert to a C-style char*.
Enum representing event severity.
FwSizeType getPacketSize() const
Get the packet size corresponding to the data size.
Fw::Buffer getBuffer() const
virtual void UpdatePriority_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command UpdatePriority.
virtual void StartComDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command StartComDp.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void stopRecordingIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port stopRecordingIn.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
uint8_t U8
8-bit unsigned integer
virtual void StopComDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
FwSizeType getSize() const
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
Important informational events.
FwIdType FwDpIdType
The type of a data product identifier.
void comIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Updates the priority of the active container (if any) and of all future containers.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
message to exit active component task
A message was sent requesting an exit of the loop.
void log_WARNING_LO_StartRecordingFailed(FwSizeType packetsPerContainer) const
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer) const
virtual void startRecordingIn_handler(FwIndexType portNum, FwSizeType packetsPerContainer, FwDpPriorityType priority)=0
Handler for input port startRecordingIn.
PlatformIndexType FwIndexType
virtual void CLEAR_COUNTERS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_COUNTERS.
void addCallPort(InputDpGetPort *callPort)
Register an input port.
void addCallPort(InputLogPort *callPort)
Register an input port.
virtual void stopRecordingIn_handler(FwIndexType portNum)=0
Handler for input port stopRecordingIn.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void init()
Initialization function.
void incNumMsgDropped()
increment the number of messages dropped
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
virtual void stopRecordingIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port stopRecordingIn.
The size of the serial representation.
RateGroupDivider component implementation.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
message sent/received okay
bool isConnected_productGetOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Whether a partial container was sent when recording stopped.
void tlmWrite_NumQueueDrops(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
Clears NumBuffersLogged and NumBuffersDropped counters and DpBufferError event throttle.
void UpdatePriority_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Message will return with status when space is unavailable.
void log_ACTIVITY_HI_ComDpStarted(FwSizeType packetsPerContainer) const
Channel ID for NumQueueDrops.
Implementation of malloc based allocator.
static constexpr FwIndexType getNum_startRecordingIn_InputPorts()
ComLoggerDpComponentBase(const char *compName="")
Construct ComLoggerDpComponentBase object.
void log_ACTIVITY_HI_ComDpStopped(const Svc::ComLoggerDp_PartialContainerStatus &partialContainer) const
void log_WARNING_HI_DpBufferError_ThrottleClear()
Reset throttle value for DpBufferError.
void init()
Initialization function.
void tlmWrite_NumBuffersLogged(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
DpContainer()
Constructor with default initialization.
void invoke(FwDpIdType id, const Fw::Buffer &buffer) const
Invoke a port connection.
virtual void CLEAR_COUNTERS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
bool isConnected_productSendOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
virtual void startRecordingIn_preMsgHook(FwIndexType portNum, FwSizeType packetsPerContainer, FwDpPriorityType priority)
Pre-message hook for async input port startRecordingIn.
void tlmWrite_LoggingEnabled(bool arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwSizeType CAPACITY
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void regCommands()
Register commands with the Command Dispatcher.
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
void CLEAR_COUNTERS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]
static constexpr FwIndexType getNum_timeCaller_OutputPorts()