9 #if FW_ENABLE_TEXT_LOGGING 19 BUFFERSENDIN_BUFFERSEND,
21 CMD_CLEAR_EVENT_THROTTLE,
34 class ComponentIpcSerializableBuffer :
44 MAX_DATA_SIZE =
sizeof(BuffUnion),
46 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
50 return sizeof(m_buff);
57 const U8* getBuffAddr()
const {
63 U8 m_buff[SERIALIZATION_SIZE];
81 #if !FW_DIRECT_PORT_CALLS 88 this->m_cmdIn_InputPort[port].
init();
93 this->m_cmdIn_InputPort[port].
setPortNum(port);
95 #if FW_OBJECT_NAMES == 1 99 this->m_objName.toChar(),
102 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
107 #if !FW_DIRECT_PORT_CALLS 114 this->m_bufferSendIn_InputPort[port].
init();
119 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
121 #if FW_OBJECT_NAMES == 1 125 this->m_objName.toChar(),
128 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
133 #if !FW_DIRECT_PORT_CALLS 140 this->m_schedIn_InputPort[port].
init();
145 this->m_schedIn_InputPort[port].
setPortNum(port);
147 #if FW_OBJECT_NAMES == 1 151 this->m_objName.toChar(),
154 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
159 #if !FW_DIRECT_PORT_CALLS 166 this->m_cmdRegIn_OutputPort[port].
init();
168 #if FW_OBJECT_NAMES == 1 172 this->m_objName.toChar(),
175 this->m_cmdRegIn_OutputPort[port].setObjName(portName.
toChar());
180 #if !FW_DIRECT_PORT_CALLS 187 this->m_cmdResponseOut_OutputPort[port].
init();
189 #if FW_OBJECT_NAMES == 1 193 this->m_objName.toChar(),
196 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
201 #if !FW_DIRECT_PORT_CALLS 208 this->m_eventOut_OutputPort[port].
init();
210 #if FW_OBJECT_NAMES == 1 214 this->m_objName.toChar(),
217 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
222 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 226 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
229 this->m_textEventOut_OutputPort[port].
init();
231 #if FW_OBJECT_NAMES == 1 235 this->m_objName.toChar(),
238 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
243 #if !FW_DIRECT_PORT_CALLS 250 this->m_timeGetOut_OutputPort[port].
init();
252 #if FW_OBJECT_NAMES == 1 256 this->m_objName.toChar(),
259 this->m_timeGetOut_OutputPort[port].setObjName(portName.
toChar());
264 #if !FW_DIRECT_PORT_CALLS 271 this->m_tlmOut_OutputPort[port].
init();
273 #if FW_OBJECT_NAMES == 1 277 this->m_objName.toChar(),
280 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
285 #if !FW_DIRECT_PORT_CALLS 292 this->m_deallocBufferSendOut_OutputPort[port].
init();
294 #if FW_OBJECT_NAMES == 1 298 this->m_objName.toChar(),
301 this->m_deallocBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
306 #if !FW_DIRECT_PORT_CALLS 313 this->m_dpWrittenOut_OutputPort[port].
init();
315 #if FW_OBJECT_NAMES == 1 319 this->m_objName.toChar(),
322 this->m_dpWrittenOut_OutputPort[port].setObjName(portName.
toChar());
327 #if !FW_DIRECT_PORT_CALLS 334 this->m_procBufferSendOut_OutputPort[port].
init();
336 #if FW_OBJECT_NAMES == 1 340 this->m_objName.toChar(),
343 this->m_procBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
351 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
355 static_cast<FwAssertArgType>(qStat)
359 #if !FW_DIRECT_PORT_CALLS 370 static_cast<FwAssertArgType>(portNum)
373 return &this->m_cmdIn_InputPort[portNum];
378 #if !FW_DIRECT_PORT_CALLS 389 static_cast<FwAssertArgType>(portNum)
392 return &this->m_bufferSendIn_InputPort[portNum];
400 static_cast<FwAssertArgType>(portNum)
403 return &this->m_schedIn_InputPort[portNum];
408 #if !FW_DIRECT_PORT_CALLS 422 static_cast<FwAssertArgType>(portNum)
425 this->m_cmdRegIn_OutputPort[portNum].
addCallPort(port);
436 static_cast<FwAssertArgType>(portNum)
439 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
450 static_cast<FwAssertArgType>(portNum)
453 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
456 #if FW_ENABLE_TEXT_LOGGING == 1 458 void DpWriterComponentBase ::
459 set_textEventOut_OutputPort(
465 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
466 static_cast<FwAssertArgType>(portNum)
469 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
482 static_cast<FwAssertArgType>(portNum)
485 this->m_timeGetOut_OutputPort[portNum].
addCallPort(port);
496 static_cast<FwAssertArgType>(portNum)
499 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
504 #if !FW_DIRECT_PORT_CALLS 518 static_cast<FwAssertArgType>(portNum)
521 this->m_deallocBufferSendOut_OutputPort[portNum].
addCallPort(port);
532 static_cast<FwAssertArgType>(portNum)
535 this->m_dpWrittenOut_OutputPort[portNum].
addCallPort(port);
546 static_cast<FwAssertArgType>(portNum)
549 this->m_procBufferSendOut_OutputPort[portNum].
addCallPort(port);
554 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 563 Fw::InputSerializePort* port
568 static_cast<FwAssertArgType>(portNum)
571 this->m_cmdRegIn_OutputPort[portNum].registerSerialPort(port);
577 Fw::InputSerializePort* port
582 static_cast<FwAssertArgType>(portNum)
585 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
591 Fw::InputSerializePort* port
596 static_cast<FwAssertArgType>(portNum)
599 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
602 #if FW_ENABLE_TEXT_LOGGING == 1 604 void DpWriterComponentBase ::
605 set_textEventOut_OutputPort(
607 Fw::InputSerializePort* port
611 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
612 static_cast<FwAssertArgType>(portNum)
615 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
623 Fw::InputSerializePort* port
628 static_cast<FwAssertArgType>(portNum)
631 this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
637 Fw::InputSerializePort* port
642 static_cast<FwAssertArgType>(portNum)
645 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
650 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 659 Fw::InputSerializePort* port
664 static_cast<FwAssertArgType>(portNum)
667 this->m_deallocBufferSendOut_OutputPort[portNum].registerSerialPort(port);
673 Fw::InputSerializePort* port
678 static_cast<FwAssertArgType>(portNum)
681 this->m_dpWrittenOut_OutputPort[portNum].registerSerialPort(port);
687 Fw::InputSerializePort* port
692 static_cast<FwAssertArgType>(portNum)
695 this->m_procBufferSendOut_OutputPort[portNum].registerSerialPort(port);
721 Fw::ActiveComponentBase(compName)
723 this->m_InvalidBufferThrottle = 0;
724 this->m_BufferTooSmallForPacketThrottle = 0;
725 this->m_InvalidHeaderHashThrottle = 0;
726 this->m_InvalidHeaderThrottle = 0;
727 this->m_BufferTooSmallForDataThrottle = 0;
728 this->m_FileOpenErrorThrottle = 0;
729 this->m_FileWriteErrorThrottle = 0;
738 #if !FW_DIRECT_PORT_CALLS 749 static_cast<FwAssertArgType>(portNum)
752 return this->m_cmdRegIn_OutputPort[portNum].
isConnected();
760 static_cast<FwAssertArgType>(portNum)
763 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
771 static_cast<FwAssertArgType>(portNum)
774 return this->m_eventOut_OutputPort[portNum].
isConnected();
777 #if FW_ENABLE_TEXT_LOGGING == 1 779 bool DpWriterComponentBase ::
780 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
const 783 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
784 static_cast<FwAssertArgType>(portNum)
787 return this->m_textEventOut_OutputPort[portNum].isConnected();
797 static_cast<FwAssertArgType>(portNum)
800 return this->m_timeGetOut_OutputPort[portNum].
isConnected();
808 static_cast<FwAssertArgType>(portNum)
811 return this->m_tlmOut_OutputPort[portNum].
isConnected();
816 #if !FW_DIRECT_PORT_CALLS 827 static_cast<FwAssertArgType>(portNum)
830 return this->m_deallocBufferSendOut_OutputPort[portNum].
isConnected();
838 static_cast<FwAssertArgType>(portNum)
841 return this->m_dpWrittenOut_OutputPort[portNum].
isConnected();
849 static_cast<FwAssertArgType>(portNum)
852 return this->m_procBufferSendOut_OutputPort[portNum].
isConnected();
873 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
876 switch (opCode - idBase) {
906 static_cast<FwAssertArgType>(portNum)
914 ComponentIpcSerializableBuffer msg;
918 _status = msg.serializeFrom(
919 static_cast<FwEnumStoreType>(BUFFERSENDIN_BUFFERSEND)
923 static_cast<FwAssertArgType>(_status)
927 _status = msg.serializeFrom(portNum);
930 static_cast<FwAssertArgType>(_status)
934 _status = msg.serializeFrom(fwBuffer);
937 static_cast<FwAssertArgType>(_status)
946 static_cast<FwAssertArgType>(qStatus)
959 static_cast<FwAssertArgType>(portNum)
967 ComponentIpcSerializableBuffer msg;
971 _status = msg.serializeFrom(
972 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
976 static_cast<FwAssertArgType>(_status)
980 _status = msg.serializeFrom(portNum);
983 static_cast<FwAssertArgType>(_status)
987 _status = msg.serializeFrom(context);
990 static_cast<FwAssertArgType>(_status)
999 static_cast<FwAssertArgType>(qStatus)
1029 #if !FW_DIRECT_PORT_CALLS 1043 static_cast<FwAssertArgType>(portNum)
1047 this->m_deallocBufferSendOut_OutputPort[portNum].isConnected(),
1048 static_cast<FwAssertArgType>(portNum)
1050 this->m_deallocBufferSendOut_OutputPort[portNum].
invoke(
1065 static_cast<FwAssertArgType>(portNum)
1069 this->m_dpWrittenOut_OutputPort[portNum].isConnected(),
1070 static_cast<FwAssertArgType>(portNum)
1072 this->m_dpWrittenOut_OutputPort[portNum].
invoke(
1087 static_cast<FwAssertArgType>(portNum)
1091 this->m_procBufferSendOut_OutputPort[portNum].isConnected(),
1092 static_cast<FwAssertArgType>(portNum)
1094 this->m_procBufferSendOut_OutputPort[portNum].
invoke(
1113 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1134 ComponentIpcSerializableBuffer msg;
1138 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1141 static_cast<FwAssertArgType>(_status)
1147 _status = msg.serializeFrom(port);
1150 static_cast<FwAssertArgType>(_status)
1153 _status = msg.serializeFrom(opCode);
1156 static_cast<FwAssertArgType>(_status)
1159 _status = msg.serializeFrom(cmdSeq);
1162 static_cast<FwAssertArgType>(_status)
1165 _status = msg.serializeFrom(args);
1168 static_cast<FwAssertArgType>(_status)
1177 static_cast<FwAssertArgType>(qStatus)
1212 this->m_InvalidBufferThrottle++;
1218 this->timeGetOut_out(0, _logTime);
1227 #if FW_AMPCS_COMPATIBLE 1233 static_cast<FwAssertArgType>(_status)
1247 #if FW_ENABLE_TEXT_LOGGING 1248 if (this->isConnected_textEventOut_OutputPort(0)) {
1249 #if FW_OBJECT_NAMES == 1 1250 const char* _formatString =
1251 "(%s) %s: Received buffer is invalid";
1253 const char* _formatString =
1254 "%s: Received buffer is invalid";
1261 this->m_objName.toChar(),
1266 this->textEventOut_out(
1288 this->m_BufferTooSmallForPacketThrottle++;
1294 this->timeGetOut_out(0, _logTime);
1304 #if FW_AMPCS_COMPATIBLE 1309 static_cast<FwAssertArgType>(_status)
1313 #if FW_AMPCS_COMPATIBLE 1320 static_cast<FwAssertArgType>(_status)
1326 static_cast<FwAssertArgType>(_status)
1329 #if FW_AMPCS_COMPATIBLE 1332 static_cast<U8>(
sizeof(U32))
1336 static_cast<FwAssertArgType>(_status)
1342 static_cast<FwAssertArgType>(_status)
1355 #if FW_ENABLE_TEXT_LOGGING 1356 if (this->isConnected_textEventOut_OutputPort(0)) {
1357 #if FW_OBJECT_NAMES == 1 1358 const char* _formatString =
1359 "(%s) %s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1361 const char* _formatString =
1362 "%s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1369 this->m_objName.toChar(),
1371 "BufferTooSmallForPacket ",
1376 this->textEventOut_out(
1399 this->m_InvalidHeaderHashThrottle++;
1405 this->timeGetOut_out(0, _logTime);
1415 #if FW_AMPCS_COMPATIBLE 1420 static_cast<FwAssertArgType>(_status)
1424 #if FW_AMPCS_COMPATIBLE 1431 static_cast<FwAssertArgType>(_status)
1437 static_cast<FwAssertArgType>(_status)
1440 #if FW_AMPCS_COMPATIBLE 1443 static_cast<U8>(
sizeof(U32))
1447 static_cast<FwAssertArgType>(_status)
1453 static_cast<FwAssertArgType>(_status)
1456 #if FW_AMPCS_COMPATIBLE 1459 static_cast<U8>(
sizeof(U32))
1463 static_cast<FwAssertArgType>(_status)
1469 static_cast<FwAssertArgType>(_status)
1482 #if FW_ENABLE_TEXT_LOGGING 1483 if (this->isConnected_textEventOut_OutputPort(0)) {
1484 #if FW_OBJECT_NAMES == 1 1485 const char* _formatString =
1486 "(%s) %s: Received a buffer of size %" PRIu64
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1488 const char* _formatString =
1489 "%s: Received a buffer of size %" PRIu64
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1496 this->m_objName.toChar(),
1498 "InvalidHeaderHash ",
1504 this->textEventOut_out(
1526 this->m_InvalidHeaderThrottle++;
1532 this->timeGetOut_out(0, _logTime);
1542 #if FW_AMPCS_COMPATIBLE 1547 static_cast<FwAssertArgType>(_status)
1551 #if FW_AMPCS_COMPATIBLE 1558 static_cast<FwAssertArgType>(_status)
1564 static_cast<FwAssertArgType>(_status)
1567 #if FW_AMPCS_COMPATIBLE 1570 static_cast<U8>(
sizeof(U32))
1574 static_cast<FwAssertArgType>(_status)
1580 static_cast<FwAssertArgType>(_status)
1593 #if FW_ENABLE_TEXT_LOGGING 1594 if (this->isConnected_textEventOut_OutputPort(0)) {
1595 #if FW_OBJECT_NAMES == 1 1596 const char* _formatString =
1597 "(%s) %s: Received buffer of size %" PRIu64
"; deserialization of packet header failed with error code %" PRIu32
"";
1599 const char* _formatString =
1600 "%s: Received buffer of size %" PRIu64
"; deserialization of packet header failed with error code %" PRIu32
"";
1607 this->m_objName.toChar(),
1614 this->textEventOut_out(
1636 this->m_BufferTooSmallForDataThrottle++;
1642 this->timeGetOut_out(0, _logTime);
1652 #if FW_AMPCS_COMPATIBLE 1657 static_cast<FwAssertArgType>(_status)
1661 #if FW_AMPCS_COMPATIBLE 1668 static_cast<FwAssertArgType>(_status)
1674 static_cast<FwAssertArgType>(_status)
1677 #if FW_AMPCS_COMPATIBLE 1680 static_cast<U8>(
sizeof(U32))
1684 static_cast<FwAssertArgType>(_status)
1690 static_cast<FwAssertArgType>(_status)
1703 #if FW_ENABLE_TEXT_LOGGING 1704 if (this->isConnected_textEventOut_OutputPort(0)) {
1705 #if FW_OBJECT_NAMES == 1 1706 const char* _formatString =
1707 "(%s) %s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1709 const char* _formatString =
1710 "%s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1717 this->m_objName.toChar(),
1719 "BufferTooSmallForData ",
1724 this->textEventOut_out(
1746 this->m_FileOpenErrorThrottle++;
1752 this->timeGetOut_out(0, _logTime);
1762 #if FW_AMPCS_COMPATIBLE 1767 static_cast<FwAssertArgType>(_status)
1771 #if FW_AMPCS_COMPATIBLE 1774 static_cast<U8>(
sizeof(U32))
1778 static_cast<FwAssertArgType>(_status)
1784 static_cast<FwAssertArgType>(_status)
1793 static_cast<FwAssertArgType>(_status)
1806 #if FW_ENABLE_TEXT_LOGGING 1807 if (this->isConnected_textEventOut_OutputPort(0)) {
1808 #if FW_OBJECT_NAMES == 1 1809 const char* _formatString =
1810 "(%s) %s: Error %" PRIu32
" opening file %s";
1812 const char* _formatString =
1813 "%s: Error %" PRIu32
" opening file %s";
1820 this->m_objName.toChar(),
1827 this->textEventOut_out(
1851 this->m_FileWriteErrorThrottle++;
1857 this->timeGetOut_out(0, _logTime);
1867 #if FW_AMPCS_COMPATIBLE 1872 static_cast<FwAssertArgType>(_status)
1876 #if FW_AMPCS_COMPATIBLE 1879 static_cast<U8>(
sizeof(U32))
1883 static_cast<FwAssertArgType>(_status)
1889 static_cast<FwAssertArgType>(_status)
1892 #if FW_AMPCS_COMPATIBLE 1895 static_cast<U8>(
sizeof(U32))
1899 static_cast<FwAssertArgType>(_status)
1905 static_cast<FwAssertArgType>(_status)
1908 #if FW_AMPCS_COMPATIBLE 1911 static_cast<U8>(
sizeof(U32))
1915 static_cast<FwAssertArgType>(_status)
1921 static_cast<FwAssertArgType>(_status)
1930 static_cast<FwAssertArgType>(_status)
1943 #if FW_ENABLE_TEXT_LOGGING 1944 if (this->isConnected_textEventOut_OutputPort(0)) {
1945 #if FW_OBJECT_NAMES == 1 1946 const char* _formatString =
1947 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1949 const char* _formatString =
1950 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1957 this->m_objName.toChar(),
1966 this->textEventOut_out(
1986 this->timeGetOut_out(0, _logTime);
1996 #if FW_AMPCS_COMPATIBLE 2001 static_cast<FwAssertArgType>(_status)
2005 #if FW_AMPCS_COMPATIBLE 2008 static_cast<U8>(
sizeof(U32))
2012 static_cast<FwAssertArgType>(_status)
2018 static_cast<FwAssertArgType>(_status)
2027 static_cast<FwAssertArgType>(_status)
2040 #if FW_ENABLE_TEXT_LOGGING 2041 if (this->isConnected_textEventOut_OutputPort(0)) {
2042 #if FW_OBJECT_NAMES == 1 2043 const char* _formatString =
2044 "(%s) %s: Wrote %" PRIu32
" bytes to file %s";
2046 const char* _formatString =
2047 "%s: Wrote %" PRIu32
" bytes to file %s";
2054 this->m_objName.toChar(),
2061 this->textEventOut_out(
2080 this->m_InvalidBufferThrottle = 0;
2087 this->m_BufferTooSmallForPacketThrottle = 0;
2094 this->m_InvalidHeaderHashThrottle = 0;
2101 this->m_InvalidHeaderThrottle = 0;
2108 this->m_BufferTooSmallForDataThrottle = 0;
2115 this->m_FileOpenErrorThrottle = 0;
2122 this->m_FileWriteErrorThrottle = 0;
2141 this->timeGetOut_out(0, _tlmTime);
2167 if (not this->m_first_update_NumBuffersReceived) {
2169 if (arg == this->m_last_NumBuffersReceived) {
2173 this->m_last_NumBuffersReceived = arg;
2177 this->m_first_update_NumBuffersReceived =
false;
2178 this->m_last_NumBuffersReceived = arg;
2186 static_cast<FwAssertArgType>(_stat)
2204 if (not this->m_first_update_NumBytesWritten) {
2206 if (arg == this->m_last_NumBytesWritten) {
2210 this->m_last_NumBytesWritten = arg;
2214 this->m_first_update_NumBytesWritten =
false;
2215 this->m_last_NumBytesWritten = arg;
2223 static_cast<FwAssertArgType>(_stat)
2241 if (not this->m_first_update_NumSuccessfulWrites) {
2243 if (arg == this->m_last_NumSuccessfulWrites) {
2247 this->m_last_NumSuccessfulWrites = arg;
2251 this->m_first_update_NumSuccessfulWrites =
false;
2252 this->m_last_NumSuccessfulWrites = arg;
2260 static_cast<FwAssertArgType>(_stat)
2278 if (not this->m_first_update_NumFailedWrites) {
2280 if (arg == this->m_last_NumFailedWrites) {
2284 this->m_last_NumFailedWrites = arg;
2288 this->m_first_update_NumFailedWrites =
false;
2289 this->m_last_NumFailedWrites = arg;
2297 static_cast<FwAssertArgType>(_stat)
2315 if (not this->m_first_update_NumErrors) {
2317 if (arg == this->m_last_NumErrors) {
2321 this->m_last_NumErrors = arg;
2325 this->m_first_update_NumErrors =
false;
2326 this->m_last_NumErrors = arg;
2334 static_cast<FwAssertArgType>(_stat)
2354 this->timeGetOut_out(0, _time);
2369 ComponentIpcSerializableBuffer _msg;
2379 static_cast<FwAssertArgType>(_msgStatus)
2389 static_cast<FwAssertArgType>(_deserStatus)
2392 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2394 if (_msgType == DPWRITER_COMPONENT_EXIT) {
2399 _deserStatus = _msg.deserializeTo(portNum);
2402 static_cast<FwAssertArgType>(_deserStatus)
2407 case BUFFERSENDIN_BUFFERSEND: {
2410 _deserStatus = _msg.deserializeTo(fwBuffer);
2413 static_cast<FwAssertArgType>(_deserStatus)
2425 case SCHEDIN_SCHED: {
2428 _deserStatus = _msg.deserializeTo(context);
2431 static_cast<FwAssertArgType>(_deserStatus)
2443 case CMD_CLEAR_EVENT_THROTTLE: {
2446 _deserStatus = _msg.deserializeTo(_opCode);
2449 static_cast<FwAssertArgType>(_deserStatus)
2454 _deserStatus = _msg.deserializeTo(_cmdSeq);
2457 static_cast<FwAssertArgType>(_deserStatus)
2462 _deserStatus = _msg.deserializeTo(args);
2465 static_cast<FwAssertArgType>(_deserStatus)
2473 #if FW_CMD_CHECK_RESIDUAL 2500 void DpWriterComponentBase ::
2511 compPtr->cmdIn_handlerBase(
2523 void DpWriterComponentBase ::
2524 m_p_bufferSendIn_in(
2532 compPtr->bufferSendIn_handlerBase(
2538 void DpWriterComponentBase ::
2547 compPtr->schedIn_handlerBase(
2553 #if !FW_DIRECT_PORT_CALLS 2559 void DpWriterComponentBase ::
2567 static_cast<FwAssertArgType>(portNum)
2571 this->m_cmdRegIn_OutputPort[portNum].isConnected(),
2572 static_cast<FwAssertArgType>(portNum)
2574 this->m_cmdRegIn_OutputPort[portNum].
invoke(
2579 void DpWriterComponentBase ::
2589 static_cast<FwAssertArgType>(portNum)
2593 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
2594 static_cast<FwAssertArgType>(portNum)
2596 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
2603 void DpWriterComponentBase ::
2614 static_cast<FwAssertArgType>(portNum)
2618 this->m_eventOut_OutputPort[portNum].isConnected(),
2619 static_cast<FwAssertArgType>(portNum)
2621 this->m_eventOut_OutputPort[portNum].
invoke(
2629 #if FW_ENABLE_TEXT_LOGGING 2631 void DpWriterComponentBase ::
2641 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
2642 static_cast<FwAssertArgType>(portNum)
2646 this->m_textEventOut_OutputPort[portNum].isConnected(),
2647 static_cast<FwAssertArgType>(portNum)
2649 this->m_textEventOut_OutputPort[portNum].invoke(
2659 void DpWriterComponentBase ::
2667 static_cast<FwAssertArgType>(portNum)
2671 this->m_timeGetOut_OutputPort[portNum].isConnected(),
2672 static_cast<FwAssertArgType>(portNum)
2674 this->m_timeGetOut_OutputPort[portNum].
invoke(
2679 void DpWriterComponentBase ::
2689 static_cast<FwAssertArgType>(portNum)
2693 this->m_tlmOut_OutputPort[portNum].isConnected(),
2694 static_cast<FwAssertArgType>(portNum)
2696 this->m_tlmOut_OutputPort[portNum].
invoke(
Received buffer is too small to hold a data product packet.
Serialization/Deserialization operation was successful.
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
Throttle reset count for BufferTooSmallForData.
void addCallPort(InputTimePort *callPort)
Register an input port.
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
static constexpr FwSizeType CAPACITY
Throttle reset count for InvalidBuffer.
FwIdType FwOpcodeType
The type of a command opcode.
void log_WARNING_HI_BufferTooSmallForData(FwSizeType bufferSize, U32 minSize)
void invoke(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke a port connection.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
An error occurred when opening a file.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
Channel ID for NumFailedWrites.
Throttle reset count for BufferTooSmallForPacket.
FwIdType getIdBase() const
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
PlatformSizeType FwSizeType
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
Error occurred when deserializing the packet header.
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum) const
U32 FwDpPriorityType
The type of a data product priority.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void addCallPort(InputDpWrittenPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Status
status returned from the queue send function
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
static constexpr FwSizeType CAPACITY
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
Channel ID for NumErrors.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
Enum representing a command response.
virtual void bufferSendIn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendIn.
static constexpr FwIndexType getNum_schedIn_InputPorts()
No time base has been established (Required)
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_timeGetOut_OutputPorts()
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
static constexpr FwIndexType getNum_deallocBufferSendOut_OutputPorts()
Os::Queue m_queue
queue object for active component
void addCallPort(InputTlmPort *callPort)
Register an input port.
void tlmWrite_NumErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum) const
SerializeStatus
forward declaration for string
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
Message will block until space is available.
Throttle reset count for FileOpenError.
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum) const
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocBufferSendOut.
void log_WARNING_HI_InvalidBuffer_ThrottleClear()
Reset throttle value for InvalidBuffer.
FwIdType FwEventIdType
The type of an event identifier.
void tlmWrite_NumFailedWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileWriteError_ThrottleClear()
Reset throttle value for FileWriteError.
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
The received buffer has an invalid header hash.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void dpWrittenOut_out(FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke output port dpWrittenOut.
void invoke(Fw::Time &time) const
Invoke a port connection.
message to exit active component task
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidHeaderHash(FwSizeType bufferSize, U32 storedHash, U32 computedHash)
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void set_deallocBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocBufferSendOut[portNum].
const char * toChar() const
Convert to a C-style char*.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void tlmWrite_NumBuffersReceived(U32 arg, Fw::Time _tlmTime=Fw::Time())
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
static constexpr FwIndexType getNum_procBufferSendOut_OutputPorts()
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port procBufferSendOut.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
void log_WARNING_HI_BufferTooSmallForData_ThrottleClear()
Reset throttle value for BufferTooSmallForData.
void log_WARNING_HI_FileOpenError_ThrottleClear()
Reset throttle value for FileOpenError.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
A serious but recoverable event.
Errors dispatching messages.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
DpWriterComponentBase(const char *compName="")
Construct DpWriterComponentBase object.
void log_WARNING_HI_FileOpenError(U32 status, const Fw::StringBase &file)
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
Enum representing event severity.
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
Reset throttle value for InvalidHeaderHash.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum) const
An error occurred when writing to a file.
uint8_t U8
8-bit unsigned integer
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType bufferSize, U32 minSize)
Channel ID for NumBytesWritten.
void regCommands()
Register commands with the Command Dispatcher.
Throttle reset count for InvalidHeaderHash.
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
void init()
Initialization function.
Channel ID for NumSuccessfulWrites.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_ACTIVITY_LO_FileWritten(U32 bytes, const Fw::StringBase &file) const
static constexpr FwIndexType getNum_cmdRegIn_OutputPorts()
Channel ID for NumBuffersReceived.
A message was sent requesting an exit of the loop.
Received buffer is too small to hold the data specified in the header.
virtual void CLEAR_EVENT_THROTTLE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_EVENT_THROTTLE.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_dpWrittenOut_OutputPorts()
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void addCallPort(InputLogPort *callPort)
Register an input port.
void log_WARNING_HI_FileWriteError(U32 status, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file)
void init()
Initialization function.
Received buffer is invalid.
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
RateGroupDivider component implementation.
Throttle reset count for FileWriteError.
message sent/received okay
Throttle reset count for InvalidHeader.
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
void tlmWrite_NumBytesWritten(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
void log_WARNING_HI_InvalidHeader(FwSizeType bufferSize, U32 errorCode)
void tlmWrite_NumSuccessfulWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
Reset throttle value for BufferTooSmallForPacket.
Message will return with status when space is unavailable.
Implementation of malloc based allocator.
void set_procBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to procBufferSendOut[portNum].
void init()
Initialization function.
void log_WARNING_HI_InvalidBuffer()
void init()
Initialization function.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
static constexpr FwSizeType CAPACITY
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.