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];
87 this->m_cmdIn_InputPort[port].
init();
92 this->m_cmdIn_InputPort[port].
setPortNum(port);
94 #if FW_OBJECT_NAMES == 1 98 this->m_objName.toChar(),
101 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
111 this->m_bufferSendIn_InputPort[port].
init();
116 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
118 #if FW_OBJECT_NAMES == 1 122 this->m_objName.toChar(),
125 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
135 this->m_schedIn_InputPort[port].
init();
140 this->m_schedIn_InputPort[port].
setPortNum(port);
142 #if FW_OBJECT_NAMES == 1 146 this->m_objName.toChar(),
149 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
159 this->m_cmdRegIn_OutputPort[port].
init();
161 #if FW_OBJECT_NAMES == 1 165 this->m_objName.toChar(),
168 this->m_cmdRegIn_OutputPort[port].setObjName(portName.
toChar());
178 this->m_cmdResponseOut_OutputPort[port].
init();
180 #if FW_OBJECT_NAMES == 1 184 this->m_objName.toChar(),
187 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
197 this->m_eventOut_OutputPort[port].
init();
199 #if FW_OBJECT_NAMES == 1 203 this->m_objName.toChar(),
206 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
210 #if FW_ENABLE_TEXT_LOGGING == 1 214 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
217 this->m_textEventOut_OutputPort[port].
init();
219 #if FW_OBJECT_NAMES == 1 223 this->m_objName.toChar(),
226 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
237 this->m_timeGetOut_OutputPort[port].
init();
239 #if FW_OBJECT_NAMES == 1 243 this->m_objName.toChar(),
246 this->m_timeGetOut_OutputPort[port].setObjName(portName.
toChar());
256 this->m_tlmOut_OutputPort[port].
init();
258 #if FW_OBJECT_NAMES == 1 262 this->m_objName.toChar(),
265 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
275 this->m_deallocBufferSendOut_OutputPort[port].
init();
277 #if FW_OBJECT_NAMES == 1 281 this->m_objName.toChar(),
284 this->m_deallocBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
294 this->m_dpWrittenOut_OutputPort[port].
init();
296 #if FW_OBJECT_NAMES == 1 300 this->m_objName.toChar(),
303 this->m_dpWrittenOut_OutputPort[port].setObjName(portName.
toChar());
313 this->m_procBufferSendOut_OutputPort[port].
init();
315 #if FW_OBJECT_NAMES == 1 319 this->m_objName.toChar(),
322 this->m_procBufferSendOut_OutputPort[port].setObjName(portName.
toChar());
329 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
333 static_cast<FwAssertArgType>(qStat)
346 static_cast<FwAssertArgType>(portNum)
349 return &this->m_cmdIn_InputPort[portNum];
361 static_cast<FwAssertArgType>(portNum)
364 return &this->m_bufferSendIn_InputPort[portNum];
372 static_cast<FwAssertArgType>(portNum)
375 return &this->m_schedIn_InputPort[portNum];
390 static_cast<FwAssertArgType>(portNum)
393 this->m_cmdRegIn_OutputPort[portNum].
addCallPort(port);
404 static_cast<FwAssertArgType>(portNum)
407 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
418 static_cast<FwAssertArgType>(portNum)
421 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
424 #if FW_ENABLE_TEXT_LOGGING == 1 426 void DpWriterComponentBase ::
427 set_textEventOut_OutputPort(
433 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
434 static_cast<FwAssertArgType>(portNum)
437 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
450 static_cast<FwAssertArgType>(portNum)
453 this->m_timeGetOut_OutputPort[portNum].
addCallPort(port);
464 static_cast<FwAssertArgType>(portNum)
467 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
482 static_cast<FwAssertArgType>(portNum)
485 this->m_deallocBufferSendOut_OutputPort[portNum].
addCallPort(port);
496 static_cast<FwAssertArgType>(portNum)
499 this->m_dpWrittenOut_OutputPort[portNum].
addCallPort(port);
510 static_cast<FwAssertArgType>(portNum)
513 this->m_procBufferSendOut_OutputPort[portNum].
addCallPort(port);
516 #if FW_PORT_SERIALIZATION 525 Fw::InputSerializePort* port
530 static_cast<FwAssertArgType>(portNum)
533 this->m_cmdRegIn_OutputPort[portNum].registerSerialPort(port);
539 Fw::InputSerializePort* port
544 static_cast<FwAssertArgType>(portNum)
547 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
553 Fw::InputSerializePort* port
558 static_cast<FwAssertArgType>(portNum)
561 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
564 #if FW_ENABLE_TEXT_LOGGING == 1 566 void DpWriterComponentBase ::
567 set_textEventOut_OutputPort(
569 Fw::InputSerializePort* port
573 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
574 static_cast<FwAssertArgType>(portNum)
577 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
585 Fw::InputSerializePort* port
590 static_cast<FwAssertArgType>(portNum)
593 this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
599 Fw::InputSerializePort* port
604 static_cast<FwAssertArgType>(portNum)
607 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
612 #if FW_PORT_SERIALIZATION 621 Fw::InputSerializePort* port
626 static_cast<FwAssertArgType>(portNum)
629 this->m_deallocBufferSendOut_OutputPort[portNum].registerSerialPort(port);
635 Fw::InputSerializePort* port
640 static_cast<FwAssertArgType>(portNum)
643 this->m_dpWrittenOut_OutputPort[portNum].registerSerialPort(port);
649 Fw::InputSerializePort* port
654 static_cast<FwAssertArgType>(portNum)
657 this->m_procBufferSendOut_OutputPort[portNum].registerSerialPort(port);
669 FW_ASSERT(this->m_cmdRegIn_OutputPort[0].isConnected());
671 this->m_cmdRegIn_OutputPort[0].
invoke(
682 Fw::ActiveComponentBase(compName)
685 this->m_first_update_NumBuffersReceived =
true;
686 this->m_last_NumBuffersReceived = 0;
689 this->m_first_update_NumBytesWritten =
true;
690 this->m_last_NumBytesWritten = 0;
693 this->m_first_update_NumSuccessfulWrites =
true;
694 this->m_last_NumSuccessfulWrites = 0;
697 this->m_first_update_NumFailedWrites =
true;
698 this->m_last_NumFailedWrites = 0;
701 this->m_first_update_NumErrors =
true;
702 this->m_last_NumErrors = 0;
704 this->m_InvalidBufferThrottle = 0;
705 this->m_BufferTooSmallForPacketThrottle = 0;
706 this->m_InvalidHeaderHashThrottle = 0;
707 this->m_InvalidHeaderThrottle = 0;
708 this->m_BufferTooSmallForDataThrottle = 0;
709 this->m_FileOpenErrorThrottle = 0;
710 this->m_FileWriteErrorThrottle = 0;
767 #if FW_ENABLE_TEXT_LOGGING == 1 770 getNum_textEventOut_OutputPorts()
const 820 static_cast<FwAssertArgType>(portNum)
823 return this->m_cmdRegIn_OutputPort[portNum].
isConnected();
831 static_cast<FwAssertArgType>(portNum)
834 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
842 static_cast<FwAssertArgType>(portNum)
845 return this->m_eventOut_OutputPort[portNum].
isConnected();
848 #if FW_ENABLE_TEXT_LOGGING == 1 850 bool DpWriterComponentBase ::
851 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
854 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
855 static_cast<FwAssertArgType>(portNum)
858 return this->m_textEventOut_OutputPort[portNum].isConnected();
868 static_cast<FwAssertArgType>(portNum)
871 return this->m_timeGetOut_OutputPort[portNum].
isConnected();
879 static_cast<FwAssertArgType>(portNum)
882 return this->m_tlmOut_OutputPort[portNum].
isConnected();
894 static_cast<FwAssertArgType>(portNum)
897 return this->m_deallocBufferSendOut_OutputPort[portNum].
isConnected();
905 static_cast<FwAssertArgType>(portNum)
908 return this->m_dpWrittenOut_OutputPort[portNum].
isConnected();
916 static_cast<FwAssertArgType>(portNum)
919 return this->m_procBufferSendOut_OutputPort[portNum].
isConnected();
937 static_cast<FwAssertArgType>(portNum)
945 ComponentIpcSerializableBuffer msg;
949 _status = msg.serialize(
950 static_cast<FwEnumStoreType>(BUFFERSENDIN_BUFFERSEND)
954 static_cast<FwAssertArgType>(_status)
958 _status = msg.serialize(portNum);
961 static_cast<FwAssertArgType>(_status)
965 _status = msg.serialize(fwBuffer);
968 static_cast<FwAssertArgType>(_status)
977 static_cast<FwAssertArgType>(qStatus)
990 static_cast<FwAssertArgType>(portNum)
998 ComponentIpcSerializableBuffer msg;
1002 _status = msg.serialize(
1003 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1007 static_cast<FwAssertArgType>(_status)
1011 _status = msg.serialize(portNum);
1014 static_cast<FwAssertArgType>(_status)
1018 _status = msg.serialize(context);
1021 static_cast<FwAssertArgType>(_status)
1030 static_cast<FwAssertArgType>(qStatus)
1072 static_cast<FwAssertArgType>(portNum)
1076 this->m_deallocBufferSendOut_OutputPort[portNum].isConnected(),
1077 static_cast<FwAssertArgType>(portNum)
1079 this->m_deallocBufferSendOut_OutputPort[portNum].
invoke(
1094 static_cast<FwAssertArgType>(portNum)
1098 this->m_dpWrittenOut_OutputPort[portNum].isConnected(),
1099 static_cast<FwAssertArgType>(portNum)
1101 this->m_dpWrittenOut_OutputPort[portNum].
invoke(
1116 static_cast<FwAssertArgType>(portNum)
1120 this->m_procBufferSendOut_OutputPort[portNum].isConnected(),
1121 static_cast<FwAssertArgType>(portNum)
1123 this->m_procBufferSendOut_OutputPort[portNum].
invoke(
1139 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1140 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1161 ComponentIpcSerializableBuffer msg;
1165 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1168 static_cast<FwAssertArgType>(_status)
1174 _status = msg.serialize(port);
1177 static_cast<FwAssertArgType>(_status)
1180 _status = msg.serialize(opCode);
1183 static_cast<FwAssertArgType>(_status)
1186 _status = msg.serialize(cmdSeq);
1189 static_cast<FwAssertArgType>(_status)
1192 _status = msg.serialize(args);
1195 static_cast<FwAssertArgType>(_status)
1204 static_cast<FwAssertArgType>(qStatus)
1239 (void) this->m_InvalidBufferThrottle.fetch_add(1);
1244 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1245 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1253 if (this->m_eventOut_OutputPort[0].isConnected()) {
1256 #if FW_AMPCS_COMPATIBLE 1259 _status = _logBuff.
serialize(static_cast<U8>(0));
1262 static_cast<FwAssertArgType>(_status)
1266 this->m_eventOut_OutputPort[0].
invoke(
1275 #if FW_ENABLE_TEXT_LOGGING 1276 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1277 #if FW_OBJECT_NAMES == 1 1278 const char* _formatString =
1279 "(%s) %s: Received buffer is invalid";
1281 const char* _formatString =
1282 "%s: Received buffer is invalid";
1289 this->m_objName.toChar(),
1294 this->m_textEventOut_OutputPort[0].invoke(
1315 (void) this->m_BufferTooSmallForPacketThrottle.fetch_add(1);
1320 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1321 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1329 if (this->m_eventOut_OutputPort[0].isConnected()) {
1333 #if FW_AMPCS_COMPATIBLE 1335 _status = _logBuff.
serialize(static_cast<U8>(2));
1338 static_cast<FwAssertArgType>(_status)
1342 #if FW_AMPCS_COMPATIBLE 1345 static_cast<U8>(
sizeof(U32))
1349 static_cast<FwAssertArgType>(_status)
1352 _status = _logBuff.
serialize(bufferSize);
1355 static_cast<FwAssertArgType>(_status)
1358 #if FW_AMPCS_COMPATIBLE 1361 static_cast<U8>(
sizeof(U32))
1365 static_cast<FwAssertArgType>(_status)
1371 static_cast<FwAssertArgType>(_status)
1374 this->m_eventOut_OutputPort[0].
invoke(
1383 #if FW_ENABLE_TEXT_LOGGING 1384 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1385 #if FW_OBJECT_NAMES == 1 1386 const char* _formatString =
1387 "(%s) %s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1389 const char* _formatString =
1390 "%s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1397 this->m_objName.toChar(),
1399 "BufferTooSmallForPacket ",
1404 this->m_textEventOut_OutputPort[0].invoke(
1426 (void) this->m_InvalidHeaderHashThrottle.fetch_add(1);
1431 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1432 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1440 if (this->m_eventOut_OutputPort[0].isConnected()) {
1444 #if FW_AMPCS_COMPATIBLE 1446 _status = _logBuff.
serialize(static_cast<U8>(3));
1449 static_cast<FwAssertArgType>(_status)
1453 #if FW_AMPCS_COMPATIBLE 1456 static_cast<U8>(
sizeof(U32))
1460 static_cast<FwAssertArgType>(_status)
1463 _status = _logBuff.
serialize(bufferSize);
1466 static_cast<FwAssertArgType>(_status)
1469 #if FW_AMPCS_COMPATIBLE 1472 static_cast<U8>(
sizeof(U32))
1476 static_cast<FwAssertArgType>(_status)
1479 _status = _logBuff.
serialize(storedHash);
1482 static_cast<FwAssertArgType>(_status)
1485 #if FW_AMPCS_COMPATIBLE 1488 static_cast<U8>(
sizeof(U32))
1492 static_cast<FwAssertArgType>(_status)
1495 _status = _logBuff.
serialize(computedHash);
1498 static_cast<FwAssertArgType>(_status)
1501 this->m_eventOut_OutputPort[0].
invoke(
1510 #if FW_ENABLE_TEXT_LOGGING 1511 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1512 #if FW_OBJECT_NAMES == 1 1513 const char* _formatString =
1514 "(%s) %s: Received a buffer of size %" PRIu32
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1516 const char* _formatString =
1517 "%s: Received a buffer of size %" PRIu32
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1524 this->m_objName.toChar(),
1526 "InvalidHeaderHash ",
1532 this->m_textEventOut_OutputPort[0].invoke(
1553 (void) this->m_InvalidHeaderThrottle.fetch_add(1);
1558 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1559 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1567 if (this->m_eventOut_OutputPort[0].isConnected()) {
1571 #if FW_AMPCS_COMPATIBLE 1573 _status = _logBuff.
serialize(static_cast<U8>(2));
1576 static_cast<FwAssertArgType>(_status)
1580 #if FW_AMPCS_COMPATIBLE 1583 static_cast<U8>(
sizeof(U32))
1587 static_cast<FwAssertArgType>(_status)
1590 _status = _logBuff.
serialize(bufferSize);
1593 static_cast<FwAssertArgType>(_status)
1596 #if FW_AMPCS_COMPATIBLE 1599 static_cast<U8>(
sizeof(U32))
1603 static_cast<FwAssertArgType>(_status)
1606 _status = _logBuff.
serialize(errorCode);
1609 static_cast<FwAssertArgType>(_status)
1612 this->m_eventOut_OutputPort[0].
invoke(
1621 #if FW_ENABLE_TEXT_LOGGING 1622 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1623 #if FW_OBJECT_NAMES == 1 1624 const char* _formatString =
1625 "(%s) %s: Received buffer of size %" PRIu32
"; deserialization of packet header failed with error code %" PRIu32
"";
1627 const char* _formatString =
1628 "%s: Received buffer of size %" PRIu32
"; deserialization of packet header failed with error code %" PRIu32
"";
1635 this->m_objName.toChar(),
1642 this->m_textEventOut_OutputPort[0].invoke(
1663 (void) this->m_BufferTooSmallForDataThrottle.fetch_add(1);
1668 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1669 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1677 if (this->m_eventOut_OutputPort[0].isConnected()) {
1681 #if FW_AMPCS_COMPATIBLE 1683 _status = _logBuff.
serialize(static_cast<U8>(2));
1686 static_cast<FwAssertArgType>(_status)
1690 #if FW_AMPCS_COMPATIBLE 1693 static_cast<U8>(
sizeof(U32))
1697 static_cast<FwAssertArgType>(_status)
1700 _status = _logBuff.
serialize(bufferSize);
1703 static_cast<FwAssertArgType>(_status)
1706 #if FW_AMPCS_COMPATIBLE 1709 static_cast<U8>(
sizeof(U32))
1713 static_cast<FwAssertArgType>(_status)
1719 static_cast<FwAssertArgType>(_status)
1722 this->m_eventOut_OutputPort[0].
invoke(
1731 #if FW_ENABLE_TEXT_LOGGING 1732 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1733 #if FW_OBJECT_NAMES == 1 1734 const char* _formatString =
1735 "(%s) %s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1737 const char* _formatString =
1738 "%s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1745 this->m_objName.toChar(),
1747 "BufferTooSmallForData ",
1752 this->m_textEventOut_OutputPort[0].invoke(
1773 (void) this->m_FileOpenErrorThrottle.fetch_add(1);
1778 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1779 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1787 if (this->m_eventOut_OutputPort[0].isConnected()) {
1791 #if FW_AMPCS_COMPATIBLE 1793 _status = _logBuff.
serialize(static_cast<U8>(2));
1796 static_cast<FwAssertArgType>(_status)
1800 #if FW_AMPCS_COMPATIBLE 1803 static_cast<U8>(
sizeof(U32))
1807 static_cast<FwAssertArgType>(_status)
1813 static_cast<FwAssertArgType>(_status)
1819 static_cast<FwAssertArgType>(_status)
1822 this->m_eventOut_OutputPort[0].
invoke(
1831 #if FW_ENABLE_TEXT_LOGGING 1832 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1833 #if FW_OBJECT_NAMES == 1 1834 const char* _formatString =
1835 "(%s) %s: Error %" PRIu32
" opening file %s";
1837 const char* _formatString =
1838 "%s: Error %" PRIu32
" opening file %s";
1845 this->m_objName.toChar(),
1852 this->m_textEventOut_OutputPort[0].invoke(
1875 (void) this->m_FileWriteErrorThrottle.fetch_add(1);
1880 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1881 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1889 if (this->m_eventOut_OutputPort[0].isConnected()) {
1893 #if FW_AMPCS_COMPATIBLE 1895 _status = _logBuff.
serialize(static_cast<U8>(4));
1898 static_cast<FwAssertArgType>(_status)
1902 #if FW_AMPCS_COMPATIBLE 1905 static_cast<U8>(
sizeof(U32))
1909 static_cast<FwAssertArgType>(_status)
1915 static_cast<FwAssertArgType>(_status)
1918 #if FW_AMPCS_COMPATIBLE 1921 static_cast<U8>(
sizeof(U32))
1925 static_cast<FwAssertArgType>(_status)
1928 _status = _logBuff.
serialize(bytesWritten);
1931 static_cast<FwAssertArgType>(_status)
1934 #if FW_AMPCS_COMPATIBLE 1937 static_cast<U8>(
sizeof(U32))
1941 static_cast<FwAssertArgType>(_status)
1944 _status = _logBuff.
serialize(bytesToWrite);
1947 static_cast<FwAssertArgType>(_status)
1953 static_cast<FwAssertArgType>(_status)
1956 this->m_eventOut_OutputPort[0].
invoke(
1965 #if FW_ENABLE_TEXT_LOGGING 1966 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1967 #if FW_OBJECT_NAMES == 1 1968 const char* _formatString =
1969 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1971 const char* _formatString =
1972 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1979 this->m_objName.toChar(),
1988 this->m_textEventOut_OutputPort[0].invoke(
2006 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
2007 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
2015 if (this->m_eventOut_OutputPort[0].isConnected()) {
2019 #if FW_AMPCS_COMPATIBLE 2021 _status = _logBuff.
serialize(static_cast<U8>(2));
2024 static_cast<FwAssertArgType>(_status)
2028 #if FW_AMPCS_COMPATIBLE 2031 static_cast<U8>(
sizeof(U32))
2035 static_cast<FwAssertArgType>(_status)
2041 static_cast<FwAssertArgType>(_status)
2047 static_cast<FwAssertArgType>(_status)
2050 this->m_eventOut_OutputPort[0].
invoke(
2059 #if FW_ENABLE_TEXT_LOGGING 2060 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2061 #if FW_OBJECT_NAMES == 1 2062 const char* _formatString =
2063 "(%s) %s: Wrote %" PRIu32
" bytes to file %s";
2065 const char* _formatString =
2066 "%s: Wrote %" PRIu32
" bytes to file %s";
2073 this->m_objName.toChar(),
2080 this->m_textEventOut_OutputPort[0].invoke(
2098 this->m_InvalidBufferThrottle = 0;
2105 this->m_BufferTooSmallForPacketThrottle = 0;
2112 this->m_InvalidHeaderHashThrottle = 0;
2119 this->m_InvalidHeaderThrottle = 0;
2126 this->m_BufferTooSmallForDataThrottle = 0;
2133 this->m_FileOpenErrorThrottle = 0;
2140 this->m_FileWriteErrorThrottle = 0;
2154 if (not this->m_first_update_NumBuffersReceived) {
2156 if (arg == this->m_last_NumBuffersReceived) {
2160 this->m_last_NumBuffersReceived = arg;
2164 this->m_first_update_NumBuffersReceived =
false;
2165 this->m_last_NumBuffersReceived = arg;
2168 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2170 this->m_timeGetOut_OutputPort[0].isConnected() &&
2173 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2180 static_cast<FwAssertArgType>(_stat)
2187 this->m_tlmOut_OutputPort[0].
invoke(
2202 if (not this->m_first_update_NumBytesWritten) {
2204 if (arg == this->m_last_NumBytesWritten) {
2208 this->m_last_NumBytesWritten = arg;
2212 this->m_first_update_NumBytesWritten =
false;
2213 this->m_last_NumBytesWritten = arg;
2216 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2218 this->m_timeGetOut_OutputPort[0].isConnected() &&
2221 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2228 static_cast<FwAssertArgType>(_stat)
2235 this->m_tlmOut_OutputPort[0].
invoke(
2250 if (not this->m_first_update_NumSuccessfulWrites) {
2252 if (arg == this->m_last_NumSuccessfulWrites) {
2256 this->m_last_NumSuccessfulWrites = arg;
2260 this->m_first_update_NumSuccessfulWrites =
false;
2261 this->m_last_NumSuccessfulWrites = arg;
2264 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2266 this->m_timeGetOut_OutputPort[0].isConnected() &&
2269 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2276 static_cast<FwAssertArgType>(_stat)
2283 this->m_tlmOut_OutputPort[0].
invoke(
2298 if (not this->m_first_update_NumFailedWrites) {
2300 if (arg == this->m_last_NumFailedWrites) {
2304 this->m_last_NumFailedWrites = arg;
2308 this->m_first_update_NumFailedWrites =
false;
2309 this->m_last_NumFailedWrites = arg;
2312 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2314 this->m_timeGetOut_OutputPort[0].isConnected() &&
2317 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2324 static_cast<FwAssertArgType>(_stat)
2331 this->m_tlmOut_OutputPort[0].
invoke(
2346 if (not this->m_first_update_NumErrors) {
2348 if (arg == this->m_last_NumErrors) {
2352 this->m_last_NumErrors = arg;
2356 this->m_first_update_NumErrors =
false;
2357 this->m_last_NumErrors = arg;
2360 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2362 this->m_timeGetOut_OutputPort[0].isConnected() &&
2365 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2372 static_cast<FwAssertArgType>(_stat)
2379 this->m_tlmOut_OutputPort[0].
invoke(
2394 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
2396 this->m_timeGetOut_OutputPort[0].
invoke(_time);
2411 ComponentIpcSerializableBuffer _msg;
2421 static_cast<FwAssertArgType>(_msgStatus)
2431 static_cast<FwAssertArgType>(_deserStatus)
2434 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2436 if (_msgType == DPWRITER_COMPONENT_EXIT) {
2441 _deserStatus = _msg.deserialize(portNum);
2444 static_cast<FwAssertArgType>(_deserStatus)
2449 case BUFFERSENDIN_BUFFERSEND: {
2452 _deserStatus = _msg.deserialize(fwBuffer);
2455 static_cast<FwAssertArgType>(_deserStatus)
2467 case SCHEDIN_SCHED: {
2470 _deserStatus = _msg.deserialize(context);
2473 static_cast<FwAssertArgType>(_deserStatus)
2485 case CMD_CLEAR_EVENT_THROTTLE: {
2488 _deserStatus = _msg.deserialize(_opCode);
2491 static_cast<FwAssertArgType>(_deserStatus)
2496 _deserStatus = _msg.deserialize(_cmdSeq);
2499 static_cast<FwAssertArgType>(_deserStatus)
2504 _deserStatus = _msg.deserialize(args);
2507 static_cast<FwAssertArgType>(_deserStatus)
2515 #if FW_CMD_CHECK_RESIDUAL 2517 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2542 void DpWriterComponentBase ::
2554 const U32 idBase = callComp->
getIdBase();
2555 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2558 switch (opCode - idBase) {
2560 compPtr->CLEAR_EVENT_THROTTLE_cmdHandlerBase(
2574 void DpWriterComponentBase ::
2575 m_p_bufferSendIn_in(
2583 compPtr->bufferSendIn_handlerBase(
2589 void DpWriterComponentBase ::
2598 compPtr->schedIn_handlerBase(
Serialization/Deserialization operation was successful.
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocBufferSendOut.
void addCallPort(InputTimePort *callPort)
Register an input port.
FwIndexType getNum_cmdResponseOut_OutputPorts() const
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum)
void invoke(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke a port interface.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
Channel ID for NumSuccessfulWrites.
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
PlatformSizeType FwSizeType
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.
Status
status returned from the queue send function
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_BufferTooSmallForPacket(U32 bufferSize, U32 minSize)
void log_WARNING_HI_BufferTooSmallForData(U32 bufferSize, U32 minSize)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
An error occurred when writing to a file.
U32 FwChanIdType
The type of a telemetry channel identifier.
FwIndexType getNum_cmdRegIn_OutputPorts() 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.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
The received buffer has an invalid header hash.
Os::Queue m_queue
queue object for active component
void addCallPort(InputTlmPort *callPort)
Register an input port.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void tlmWrite_NumErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
FwIndexType getNum_schedIn_InputPorts() const
U32 FwEventIdType
The type of an event identifier.
SerializeStatus
forward declaration for string
Throttle reset count for FileOpenError.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
Message will block until space is available.
Received buffer is too small to hold a data product packet.
void log_WARNING_HI_InvalidBuffer_ThrottleClear()
Reset throttle value for InvalidBuffer.
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 interface.
Throttle reset count for InvalidBuffer.
U32 FwOpcodeType
The type of a command opcode.
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) ...
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
FwIndexType getNum_timeGetOut_OutputPorts() const
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum)
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Channel ID for NumBuffersReceived.
#define FW_MIN(a, b)
MIN macro.
Throttle reset count for FileWriteError.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port procBufferSendOut.
Channel ID for NumBytesWritten.
Throttle reset count for BufferTooSmallForPacket.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port interface.
void dpWrittenOut_out(FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
Invoke output port dpWrittenOut.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void set_deallocBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocBufferSendOut[portNum].
const char * toChar() const
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
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
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_BufferTooSmallForData_ThrottleClear()
Reset throttle value for BufferTooSmallForData.
void resetDeser()
reset deserialization to beginning
void log_WARNING_HI_FileOpenError_ThrottleClear()
Reset throttle value for FileOpenError.
message to exit active component task
A serious but recoverable event.
Errors dispatching messages.
An error occurred when opening a file.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
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.
Received buffer is too small to hold the data specified in the header.
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.
uint8_t U8
8-bit unsigned integer
void regCommands()
Register commands with the Command Dispatcher.
FwIndexType getNum_bufferSendIn_InputPorts() const
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Error occurred when deserializing the packet header.
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 interface.
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
Channel ID for NumErrors.
Channel ID for NumFailedWrites.
A message was sent requesting an exit of the loop.
virtual void CLEAR_EVENT_THROTTLE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_EVENT_THROTTLE.
No time base has been established.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
FwIndexType getNum_tlmOut_OutputPorts() const
PlatformIndexType FwIndexType
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
FwIndexType getNum_cmdIn_InputPorts() const
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void addCallPort(InputLogPort *callPort)
Register an input port.
FwIndexType getNum_dpWrittenOut_OutputPorts() const
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.
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum)
message sent/received okay
FwIndexType getNum_deallocBufferSendOut_OutputPorts() const
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_InvalidHeaderHash(U32 bufferSize, U32 storedHash, U32 computedHash)
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
Throttle reset count for InvalidHeader.
void log_WARNING_HI_InvalidHeader(U32 bufferSize, U32 errorCode)
Received buffer is invalid.
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.
void set_procBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to procBufferSendOut[portNum].
Throttle reset count for InvalidHeaderHash.
void init()
Initialization function.
Throttle reset count for BufferTooSmallForData.
void log_WARNING_HI_InvalidBuffer()
FwIndexType getNum_procBufferSendOut_OutputPorts() const
void init()
Initialization function.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
FwIndexType getNum_eventOut_OutputPorts() const
virtual const CHAR * toChar() const =0
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum)