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
49 ComponentIpcSerializableBuffer() :
Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
55 U8 m_buff[SERIALIZATION_SIZE];
73 #if !FW_DIRECT_PORT_CALLS 80 this->m_cmdIn_InputPort[port].
init();
85 this->m_cmdIn_InputPort[port].
setPortNum(port);
87 #if FW_OBJECT_NAMES == 1 91 this->m_objName.toChar(),
94 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
99 #if !FW_DIRECT_PORT_CALLS 106 this->m_bufferSendIn_InputPort[port].
init();
111 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
113 #if FW_OBJECT_NAMES == 1 117 this->m_objName.toChar(),
120 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
125 #if !FW_DIRECT_PORT_CALLS 132 this->m_schedIn_InputPort[port].
init();
137 this->m_schedIn_InputPort[port].
setPortNum(port);
139 #if FW_OBJECT_NAMES == 1 143 this->m_objName.toChar(),
146 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
151 #if !FW_DIRECT_PORT_CALLS 158 this->m_cmdRegIn_OutputPort[port].
init();
160 #if FW_OBJECT_NAMES == 1 164 this->m_objName.toChar(),
167 this->m_cmdRegIn_OutputPort[port].setObjName(portName.
toChar());
172 #if !FW_DIRECT_PORT_CALLS 179 this->m_cmdResponseOut_OutputPort[port].
init();
181 #if FW_OBJECT_NAMES == 1 185 this->m_objName.toChar(),
188 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
193 #if !FW_DIRECT_PORT_CALLS 200 this->m_eventOut_OutputPort[port].
init();
202 #if FW_OBJECT_NAMES == 1 206 this->m_objName.toChar(),
209 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
214 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 218 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
221 this->m_textEventOut_OutputPort[port].
init();
223 #if FW_OBJECT_NAMES == 1 227 this->m_objName.toChar(),
230 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
235 #if !FW_DIRECT_PORT_CALLS 242 this->m_timeGetOut_OutputPort[port].
init();
244 #if FW_OBJECT_NAMES == 1 248 this->m_objName.toChar(),
251 this->m_timeGetOut_OutputPort[port].setObjName(portName.
toChar());
256 #if !FW_DIRECT_PORT_CALLS 263 this->m_tlmOut_OutputPort[port].
init();
265 #if FW_OBJECT_NAMES == 1 269 this->m_objName.toChar(),
272 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
277 #if !FW_DIRECT_PORT_CALLS 284 this->m_deallocBufferSendOut_OutputPort[port].
init();
286 #if FW_OBJECT_NAMES == 1 290 this->m_objName.toChar(),
293 this->m_deallocBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
298 #if !FW_DIRECT_PORT_CALLS 305 this->m_dpWrittenOut_OutputPort[port].
init();
307 #if FW_OBJECT_NAMES == 1 311 this->m_objName.toChar(),
314 this->m_dpWrittenOut_OutputPort[port].setObjName(portName.
toChar());
319 #if !FW_DIRECT_PORT_CALLS 326 this->m_procBufferSendOut_OutputPort[port].
init();
328 #if FW_OBJECT_NAMES == 1 332 this->m_objName.toChar(),
335 this->m_procBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
343 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
347 static_cast<FwAssertArgType>(qStat)
351 #if !FW_DIRECT_PORT_CALLS 362 static_cast<FwAssertArgType>(portNum)
365 return &this->m_cmdIn_InputPort[portNum];
370 #if !FW_DIRECT_PORT_CALLS 381 static_cast<FwAssertArgType>(portNum)
384 return &this->m_bufferSendIn_InputPort[portNum];
392 static_cast<FwAssertArgType>(portNum)
395 return &this->m_schedIn_InputPort[portNum];
400 #if !FW_DIRECT_PORT_CALLS 414 static_cast<FwAssertArgType>(portNum)
417 this->m_cmdRegIn_OutputPort[portNum].
addCallPort(port);
428 static_cast<FwAssertArgType>(portNum)
431 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
442 static_cast<FwAssertArgType>(portNum)
445 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
448 #if FW_ENABLE_TEXT_LOGGING == 1 450 void DpWriterComponentBase ::
451 set_textEventOut_OutputPort(
457 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
458 static_cast<FwAssertArgType>(portNum)
461 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
474 static_cast<FwAssertArgType>(portNum)
477 this->m_timeGetOut_OutputPort[portNum].
addCallPort(port);
488 static_cast<FwAssertArgType>(portNum)
491 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
496 #if !FW_DIRECT_PORT_CALLS 510 static_cast<FwAssertArgType>(portNum)
513 this->m_deallocBufferSendOut_OutputPort[portNum].
addCallPort(port);
524 static_cast<FwAssertArgType>(portNum)
527 this->m_dpWrittenOut_OutputPort[portNum].
addCallPort(port);
538 static_cast<FwAssertArgType>(portNum)
541 this->m_procBufferSendOut_OutputPort[portNum].
addCallPort(port);
546 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 555 Fw::InputSerializePort* port
560 static_cast<FwAssertArgType>(portNum)
563 this->m_cmdRegIn_OutputPort[portNum].registerSerialPort(port);
569 Fw::InputSerializePort* port
574 static_cast<FwAssertArgType>(portNum)
577 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
583 Fw::InputSerializePort* port
588 static_cast<FwAssertArgType>(portNum)
591 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
594 #if FW_ENABLE_TEXT_LOGGING == 1 596 void DpWriterComponentBase ::
597 set_textEventOut_OutputPort(
599 Fw::InputSerializePort* port
603 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
604 static_cast<FwAssertArgType>(portNum)
607 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
615 Fw::InputSerializePort* port
620 static_cast<FwAssertArgType>(portNum)
623 this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
629 Fw::InputSerializePort* port
634 static_cast<FwAssertArgType>(portNum)
637 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
642 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 651 Fw::InputSerializePort* port
656 static_cast<FwAssertArgType>(portNum)
659 this->m_deallocBufferSendOut_OutputPort[portNum].registerSerialPort(port);
665 Fw::InputSerializePort* port
670 static_cast<FwAssertArgType>(portNum)
673 this->m_dpWrittenOut_OutputPort[portNum].registerSerialPort(port);
679 Fw::InputSerializePort* port
684 static_cast<FwAssertArgType>(portNum)
687 this->m_procBufferSendOut_OutputPort[portNum].registerSerialPort(port);
713 Fw::ActiveComponentBase(compName)
715 this->m_InvalidBufferThrottle = 0;
716 this->m_BufferTooSmallForPacketThrottle = 0;
717 this->m_InvalidHeaderHashThrottle = 0;
718 this->m_InvalidHeaderThrottle = 0;
719 this->m_BufferTooSmallForDataThrottle = 0;
720 this->m_FileNameFormatErrorThrottle = 0;
721 this->m_FileOpenErrorThrottle = 0;
722 this->m_FileWriteErrorThrottle = 0;
731 #if !FW_DIRECT_PORT_CALLS 742 static_cast<FwAssertArgType>(portNum)
745 return this->m_cmdRegIn_OutputPort[portNum].
isConnected();
753 static_cast<FwAssertArgType>(portNum)
756 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
764 static_cast<FwAssertArgType>(portNum)
767 return this->m_eventOut_OutputPort[portNum].
isConnected();
770 #if FW_ENABLE_TEXT_LOGGING == 1 772 bool DpWriterComponentBase ::
773 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
const 776 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
777 static_cast<FwAssertArgType>(portNum)
780 return this->m_textEventOut_OutputPort[portNum].isConnected();
790 static_cast<FwAssertArgType>(portNum)
793 return this->m_timeGetOut_OutputPort[portNum].
isConnected();
801 static_cast<FwAssertArgType>(portNum)
804 return this->m_tlmOut_OutputPort[portNum].
isConnected();
809 #if !FW_DIRECT_PORT_CALLS 820 static_cast<FwAssertArgType>(portNum)
823 return this->m_deallocBufferSendOut_OutputPort[portNum].
isConnected();
831 static_cast<FwAssertArgType>(portNum)
834 return this->m_dpWrittenOut_OutputPort[portNum].
isConnected();
842 static_cast<FwAssertArgType>(portNum)
845 return this->m_procBufferSendOut_OutputPort[portNum].
isConnected();
866 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
869 switch (opCode - idBase) {
899 static_cast<FwAssertArgType>(portNum)
907 ComponentIpcSerializableBuffer msg;
911 _status = msg.serializeFrom(
912 static_cast<FwEnumStoreType>(BUFFERSENDIN_BUFFERSEND)
916 static_cast<FwAssertArgType>(_status)
920 _status = msg.serializeFrom(portNum);
923 static_cast<FwAssertArgType>(_status)
927 _status = msg.serializeFrom(fwBuffer);
930 static_cast<FwAssertArgType>(_status)
939 static_cast<FwAssertArgType>(qStatus)
952 static_cast<FwAssertArgType>(portNum)
960 ComponentIpcSerializableBuffer msg;
964 _status = msg.serializeFrom(
965 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
969 static_cast<FwAssertArgType>(_status)
973 _status = msg.serializeFrom(portNum);
976 static_cast<FwAssertArgType>(_status)
980 _status = msg.serializeFrom(context);
983 static_cast<FwAssertArgType>(_status)
992 static_cast<FwAssertArgType>(qStatus)
1022 #if !FW_DIRECT_PORT_CALLS 1036 static_cast<FwAssertArgType>(portNum)
1040 this->m_deallocBufferSendOut_OutputPort[portNum].isConnected(),
1041 static_cast<FwAssertArgType>(portNum)
1043 this->m_deallocBufferSendOut_OutputPort[portNum].
invoke(
1058 static_cast<FwAssertArgType>(portNum)
1062 this->m_dpWrittenOut_OutputPort[portNum].isConnected(),
1063 static_cast<FwAssertArgType>(portNum)
1065 this->m_dpWrittenOut_OutputPort[portNum].
invoke(
1080 static_cast<FwAssertArgType>(portNum)
1084 this->m_procBufferSendOut_OutputPort[portNum].isConnected(),
1085 static_cast<FwAssertArgType>(portNum)
1087 this->m_procBufferSendOut_OutputPort[portNum].
invoke(
1106 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1127 ComponentIpcSerializableBuffer msg;
1131 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1134 static_cast<FwAssertArgType>(_status)
1140 _status = msg.serializeFrom(port);
1143 static_cast<FwAssertArgType>(_status)
1146 _status = msg.serializeFrom(opCode);
1149 static_cast<FwAssertArgType>(_status)
1152 _status = msg.serializeFrom(cmdSeq);
1155 static_cast<FwAssertArgType>(_status)
1158 _status = msg.serializeFrom(args);
1161 static_cast<FwAssertArgType>(_status)
1170 static_cast<FwAssertArgType>(qStatus)
1205 this->m_InvalidBufferThrottle++;
1211 this->timeGetOut_out(0, _logTime);
1220 #if FW_AMPCS_COMPATIBLE 1226 static_cast<FwAssertArgType>(_status)
1240 #if FW_ENABLE_TEXT_LOGGING 1241 if (this->isConnected_textEventOut_OutputPort(0)) {
1242 #if FW_OBJECT_NAMES == 1 1243 const char* _formatString =
1244 "(%s) %s: Received buffer is invalid";
1246 const char* _formatString =
1247 "%s: Received buffer is invalid";
1251 (void) _logString.
format(
1254 this->m_objName.toChar(),
1259 this->textEventOut_out(
1281 this->m_BufferTooSmallForPacketThrottle++;
1287 this->timeGetOut_out(0, _logTime);
1297 #if FW_AMPCS_COMPATIBLE 1302 static_cast<FwAssertArgType>(_status)
1306 #if FW_AMPCS_COMPATIBLE 1313 static_cast<FwAssertArgType>(_status)
1319 static_cast<FwAssertArgType>(_status)
1322 #if FW_AMPCS_COMPATIBLE 1325 static_cast<U8>(
sizeof(U32))
1329 static_cast<FwAssertArgType>(_status)
1335 static_cast<FwAssertArgType>(_status)
1348 #if FW_ENABLE_TEXT_LOGGING 1349 if (this->isConnected_textEventOut_OutputPort(0)) {
1350 #if FW_OBJECT_NAMES == 1 1351 const char* _formatString =
1352 "(%s) %s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1354 const char* _formatString =
1355 "%s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1359 (void) _logString.
format(
1362 this->m_objName.toChar(),
1364 "BufferTooSmallForPacket ",
1369 this->textEventOut_out(
1392 this->m_InvalidHeaderHashThrottle++;
1398 this->timeGetOut_out(0, _logTime);
1408 #if FW_AMPCS_COMPATIBLE 1413 static_cast<FwAssertArgType>(_status)
1417 #if FW_AMPCS_COMPATIBLE 1424 static_cast<FwAssertArgType>(_status)
1430 static_cast<FwAssertArgType>(_status)
1433 #if FW_AMPCS_COMPATIBLE 1436 static_cast<U8>(
sizeof(U32))
1440 static_cast<FwAssertArgType>(_status)
1446 static_cast<FwAssertArgType>(_status)
1449 #if FW_AMPCS_COMPATIBLE 1452 static_cast<U8>(
sizeof(U32))
1456 static_cast<FwAssertArgType>(_status)
1462 static_cast<FwAssertArgType>(_status)
1475 #if FW_ENABLE_TEXT_LOGGING 1476 if (this->isConnected_textEventOut_OutputPort(0)) {
1477 #if FW_OBJECT_NAMES == 1 1478 const char* _formatString =
1479 "(%s) %s: Received a buffer of size %" PRIu64
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1481 const char* _formatString =
1482 "%s: Received a buffer of size %" PRIu64
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1486 (void) _logString.
format(
1489 this->m_objName.toChar(),
1491 "InvalidHeaderHash ",
1497 this->textEventOut_out(
1519 this->m_InvalidHeaderThrottle++;
1525 this->timeGetOut_out(0, _logTime);
1535 #if FW_AMPCS_COMPATIBLE 1540 static_cast<FwAssertArgType>(_status)
1544 #if FW_AMPCS_COMPATIBLE 1551 static_cast<FwAssertArgType>(_status)
1557 static_cast<FwAssertArgType>(_status)
1560 #if FW_AMPCS_COMPATIBLE 1563 static_cast<U8>(
sizeof(U32))
1567 static_cast<FwAssertArgType>(_status)
1573 static_cast<FwAssertArgType>(_status)
1586 #if FW_ENABLE_TEXT_LOGGING 1587 if (this->isConnected_textEventOut_OutputPort(0)) {
1588 #if FW_OBJECT_NAMES == 1 1589 const char* _formatString =
1590 "(%s) %s: Received buffer of size %" PRIu64
"; deserialization of packet header failed with error code %" PRIu32
"";
1592 const char* _formatString =
1593 "%s: Received buffer of size %" PRIu64
"; deserialization of packet header failed with error code %" PRIu32
"";
1597 (void) _logString.
format(
1600 this->m_objName.toChar(),
1607 this->textEventOut_out(
1629 this->m_BufferTooSmallForDataThrottle++;
1635 this->timeGetOut_out(0, _logTime);
1645 #if FW_AMPCS_COMPATIBLE 1650 static_cast<FwAssertArgType>(_status)
1654 #if FW_AMPCS_COMPATIBLE 1661 static_cast<FwAssertArgType>(_status)
1667 static_cast<FwAssertArgType>(_status)
1670 #if FW_AMPCS_COMPATIBLE 1673 static_cast<U8>(
sizeof(U32))
1677 static_cast<FwAssertArgType>(_status)
1683 static_cast<FwAssertArgType>(_status)
1696 #if FW_ENABLE_TEXT_LOGGING 1697 if (this->isConnected_textEventOut_OutputPort(0)) {
1698 #if FW_OBJECT_NAMES == 1 1699 const char* _formatString =
1700 "(%s) %s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1702 const char* _formatString =
1703 "%s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1707 (void) _logString.
format(
1710 this->m_objName.toChar(),
1712 "BufferTooSmallForData ",
1717 this->textEventOut_out(
1736 this->m_FileNameFormatErrorThrottle++;
1742 this->timeGetOut_out(0, _logTime);
1752 #if FW_AMPCS_COMPATIBLE 1757 static_cast<FwAssertArgType>(_status)
1761 #if FW_AMPCS_COMPATIBLE 1768 static_cast<FwAssertArgType>(_status)
1774 static_cast<FwAssertArgType>(_status)
1787 #if FW_ENABLE_TEXT_LOGGING 1788 if (this->isConnected_textEventOut_OutputPort(0)) {
1789 #if FW_OBJECT_NAMES == 1 1790 const char* _formatString =
1791 "(%s) %s: Error %s formatting DP file name";
1793 const char* _formatString =
1794 "%s: Error %s formatting DP file name";
1798 status.toString(statusStr);
1801 (void) _logString.
format(
1804 this->m_objName.toChar(),
1806 "FileNameFormatError ",
1810 this->textEventOut_out(
1832 this->m_FileOpenErrorThrottle++;
1838 this->timeGetOut_out(0, _logTime);
1848 #if FW_AMPCS_COMPATIBLE 1853 static_cast<FwAssertArgType>(_status)
1857 #if FW_AMPCS_COMPATIBLE 1860 static_cast<U8>(
sizeof(U32))
1864 static_cast<FwAssertArgType>(_status)
1870 static_cast<FwAssertArgType>(_status)
1879 static_cast<FwAssertArgType>(_status)
1892 #if FW_ENABLE_TEXT_LOGGING 1893 if (this->isConnected_textEventOut_OutputPort(0)) {
1894 #if FW_OBJECT_NAMES == 1 1895 const char* _formatString =
1896 "(%s) %s: Error %" PRIu32
" opening file %s";
1898 const char* _formatString =
1899 "%s: Error %" PRIu32
" opening file %s";
1903 (void) _logString.
format(
1906 this->m_objName.toChar(),
1913 this->textEventOut_out(
1937 this->m_FileWriteErrorThrottle++;
1943 this->timeGetOut_out(0, _logTime);
1953 #if FW_AMPCS_COMPATIBLE 1958 static_cast<FwAssertArgType>(_status)
1962 #if FW_AMPCS_COMPATIBLE 1965 static_cast<U8>(
sizeof(U32))
1969 static_cast<FwAssertArgType>(_status)
1975 static_cast<FwAssertArgType>(_status)
1978 #if FW_AMPCS_COMPATIBLE 1981 static_cast<U8>(
sizeof(U32))
1985 static_cast<FwAssertArgType>(_status)
1991 static_cast<FwAssertArgType>(_status)
1994 #if FW_AMPCS_COMPATIBLE 1997 static_cast<U8>(
sizeof(U32))
2001 static_cast<FwAssertArgType>(_status)
2007 static_cast<FwAssertArgType>(_status)
2016 static_cast<FwAssertArgType>(_status)
2029 #if FW_ENABLE_TEXT_LOGGING 2030 if (this->isConnected_textEventOut_OutputPort(0)) {
2031 #if FW_OBJECT_NAMES == 1 2032 const char* _formatString =
2033 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
2035 const char* _formatString =
2036 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
2040 (void) _logString.
format(
2043 this->m_objName.toChar(),
2052 this->textEventOut_out(
2072 this->timeGetOut_out(0, _logTime);
2082 #if FW_AMPCS_COMPATIBLE 2087 static_cast<FwAssertArgType>(_status)
2091 #if FW_AMPCS_COMPATIBLE 2094 static_cast<U8>(
sizeof(U32))
2098 static_cast<FwAssertArgType>(_status)
2104 static_cast<FwAssertArgType>(_status)
2113 static_cast<FwAssertArgType>(_status)
2126 #if FW_ENABLE_TEXT_LOGGING 2127 if (this->isConnected_textEventOut_OutputPort(0)) {
2128 #if FW_OBJECT_NAMES == 1 2129 const char* _formatString =
2130 "(%s) %s: Wrote %" PRIu32
" bytes to file %s";
2132 const char* _formatString =
2133 "%s: Wrote %" PRIu32
" bytes to file %s";
2137 (void) _logString.
format(
2140 this->m_objName.toChar(),
2147 this->textEventOut_out(
2166 this->m_InvalidBufferThrottle = 0;
2173 this->m_BufferTooSmallForPacketThrottle = 0;
2180 this->m_InvalidHeaderHashThrottle = 0;
2187 this->m_InvalidHeaderThrottle = 0;
2194 this->m_BufferTooSmallForDataThrottle = 0;
2201 this->m_FileNameFormatErrorThrottle = 0;
2208 this->m_FileOpenErrorThrottle = 0;
2215 this->m_FileWriteErrorThrottle = 0;
2234 this->timeGetOut_out(0, _tlmTime);
2260 if (not this->m_first_update_NumBuffersReceived) {
2262 if (arg == this->m_last_NumBuffersReceived) {
2266 this->m_last_NumBuffersReceived = arg;
2270 this->m_first_update_NumBuffersReceived =
false;
2271 this->m_last_NumBuffersReceived = arg;
2279 static_cast<FwAssertArgType>(_stat)
2297 if (not this->m_first_update_NumBytesWritten) {
2299 if (arg == this->m_last_NumBytesWritten) {
2303 this->m_last_NumBytesWritten = arg;
2307 this->m_first_update_NumBytesWritten =
false;
2308 this->m_last_NumBytesWritten = arg;
2316 static_cast<FwAssertArgType>(_stat)
2334 if (not this->m_first_update_NumSuccessfulWrites) {
2336 if (arg == this->m_last_NumSuccessfulWrites) {
2340 this->m_last_NumSuccessfulWrites = arg;
2344 this->m_first_update_NumSuccessfulWrites =
false;
2345 this->m_last_NumSuccessfulWrites = arg;
2353 static_cast<FwAssertArgType>(_stat)
2371 if (not this->m_first_update_NumFailedWrites) {
2373 if (arg == this->m_last_NumFailedWrites) {
2377 this->m_last_NumFailedWrites = arg;
2381 this->m_first_update_NumFailedWrites =
false;
2382 this->m_last_NumFailedWrites = arg;
2390 static_cast<FwAssertArgType>(_stat)
2408 if (not this->m_first_update_NumErrors) {
2410 if (arg == this->m_last_NumErrors) {
2414 this->m_last_NumErrors = arg;
2418 this->m_first_update_NumErrors =
false;
2419 this->m_last_NumErrors = arg;
2427 static_cast<FwAssertArgType>(_stat)
2447 this->timeGetOut_out(0, _time);
2462 ComponentIpcSerializableBuffer _msg;
2472 static_cast<FwAssertArgType>(_msgStatus)
2482 static_cast<FwAssertArgType>(_deserStatus)
2485 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2487 if (_msgType == DPWRITER_COMPONENT_EXIT) {
2492 _deserStatus = _msg.deserializeTo(portNum);
2495 static_cast<FwAssertArgType>(_deserStatus)
2500 case BUFFERSENDIN_BUFFERSEND: {
2503 _deserStatus = _msg.deserializeTo(fwBuffer);
2506 static_cast<FwAssertArgType>(_deserStatus)
2518 case SCHEDIN_SCHED: {
2521 _deserStatus = _msg.deserializeTo(context);
2524 static_cast<FwAssertArgType>(_deserStatus)
2536 case CMD_CLEAR_EVENT_THROTTLE: {
2539 _deserStatus = _msg.deserializeTo(_opCode);
2542 static_cast<FwAssertArgType>(_deserStatus)
2547 _deserStatus = _msg.deserializeTo(_cmdSeq);
2550 static_cast<FwAssertArgType>(_deserStatus)
2555 _deserStatus = _msg.deserializeTo(args);
2558 static_cast<FwAssertArgType>(_deserStatus)
2566 #if FW_CMD_CHECK_RESIDUAL 2593 void DpWriterComponentBase ::
2604 compPtr->cmdIn_handlerBase(
2616 void DpWriterComponentBase ::
2617 m_p_bufferSendIn_in(
2625 compPtr->bufferSendIn_handlerBase(
2631 void DpWriterComponentBase ::
2640 compPtr->schedIn_handlerBase(
2646 #if !FW_DIRECT_PORT_CALLS 2652 void DpWriterComponentBase ::
2660 static_cast<FwAssertArgType>(portNum)
2664 this->m_cmdRegIn_OutputPort[portNum].isConnected(),
2665 static_cast<FwAssertArgType>(portNum)
2667 this->m_cmdRegIn_OutputPort[portNum].
invoke(
2672 void DpWriterComponentBase ::
2682 static_cast<FwAssertArgType>(portNum)
2686 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
2687 static_cast<FwAssertArgType>(portNum)
2689 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
2696 void DpWriterComponentBase ::
2707 static_cast<FwAssertArgType>(portNum)
2711 this->m_eventOut_OutputPort[portNum].isConnected(),
2712 static_cast<FwAssertArgType>(portNum)
2714 this->m_eventOut_OutputPort[portNum].
invoke(
2722 #if FW_ENABLE_TEXT_LOGGING 2724 void DpWriterComponentBase ::
2734 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
2735 static_cast<FwAssertArgType>(portNum)
2739 this->m_textEventOut_OutputPort[portNum].isConnected(),
2740 static_cast<FwAssertArgType>(portNum)
2742 this->m_textEventOut_OutputPort[portNum].invoke(
2752 void DpWriterComponentBase ::
2760 static_cast<FwAssertArgType>(portNum)
2764 this->m_timeGetOut_OutputPort[portNum].isConnected(),
2765 static_cast<FwAssertArgType>(portNum)
2767 this->m_timeGetOut_OutputPort[portNum].
invoke(
2772 void DpWriterComponentBase ::
2782 static_cast<FwAssertArgType>(portNum)
2786 this->m_tlmOut_OutputPort[portNum].isConnected(),
2787 static_cast<FwAssertArgType>(portNum)
2789 this->m_tlmOut_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
void addCallPort(InputTimePort *callPort)
Register an input port.
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
An error occurred when formatting a file name.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
static constexpr FwSizeType CAPACITY
Throttle reset count for BufferTooSmallForPacket.
FwIdType FwOpcodeType
The type of a command opcode.
Channel ID for NumSuccessfulWrites.
void log_WARNING_HI_BufferTooSmallForData(FwSizeType bufferSize, U32 minSize)
void invoke(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke a port connection.
Throttle reset count for FileOpenError.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
Channel ID for NumErrors.
FwIdType getIdBase() const
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
PlatformSizeType FwSizeType
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
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
Channel ID for NumFailedWrites.
message to exit active component task
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.
void log_WARNING_HI_FileNameFormatError_ThrottleClear()
Reset throttle value for FileNameFormatError.
An error occurred when opening a file.
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
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)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
Throttle reset count for BufferTooSmallForData.
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
Received buffer is too small to hold a data product packet.
An error occurred when writing to a file.
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
Throttle reset count for InvalidHeaderHash.
SerializeStatus
forward declaration for string
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
Message will block until space is available.
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.
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.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Received buffer is too small to hold the data specified in the header.
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].
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.
Received buffer is invalid.
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.
Channel ID for NumBytesWritten.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
DpWriterComponentBase(const char *compName="")
Construct DpWriterComponentBase object.
const char * toChar() const
Convert to a C-style char*.
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_FileNameFormatError(const Fw::StringFormatStatus &status)
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
uint8_t U8
8-bit unsigned integer
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType bufferSize, U32 minSize)
The received buffer has an invalid header hash.
void regCommands()
Register commands with the Command Dispatcher.
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
void init()
Initialization function.
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()
Throttle reset count for InvalidBuffer.
A message was sent requesting an exit of the loop.
Channel ID for NumBuffersReceived.
Throttle reset count for FileWriteError.
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.
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
RateGroupDivider component implementation.
message sent/received okay
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()
Throttle reset count for InvalidHeader.
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.
Error occurred when deserializing the packet header.
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.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]
Throttle reset count for FileNameFormatError.