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)
684 this->m_InvalidBufferThrottle = 0;
685 this->m_BufferTooSmallForPacketThrottle = 0;
686 this->m_InvalidHeaderHashThrottle = 0;
687 this->m_InvalidHeaderThrottle = 0;
688 this->m_BufferTooSmallForDataThrottle = 0;
689 this->m_FileOpenErrorThrottle = 0;
690 this->m_FileWriteErrorThrottle = 0;
708 static_cast<FwAssertArgType>(portNum)
711 return this->m_cmdRegIn_OutputPort[portNum].
isConnected();
719 static_cast<FwAssertArgType>(portNum)
722 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
730 static_cast<FwAssertArgType>(portNum)
733 return this->m_eventOut_OutputPort[portNum].
isConnected();
736 #if FW_ENABLE_TEXT_LOGGING == 1 738 bool DpWriterComponentBase ::
739 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
742 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
743 static_cast<FwAssertArgType>(portNum)
746 return this->m_textEventOut_OutputPort[portNum].isConnected();
756 static_cast<FwAssertArgType>(portNum)
759 return this->m_timeGetOut_OutputPort[portNum].
isConnected();
767 static_cast<FwAssertArgType>(portNum)
770 return this->m_tlmOut_OutputPort[portNum].
isConnected();
782 static_cast<FwAssertArgType>(portNum)
785 return this->m_deallocBufferSendOut_OutputPort[portNum].
isConnected();
793 static_cast<FwAssertArgType>(portNum)
796 return this->m_dpWrittenOut_OutputPort[portNum].
isConnected();
804 static_cast<FwAssertArgType>(portNum)
807 return this->m_procBufferSendOut_OutputPort[portNum].
isConnected();
825 static_cast<FwAssertArgType>(portNum)
833 ComponentIpcSerializableBuffer msg;
837 _status = msg.serializeFrom(
838 static_cast<FwEnumStoreType>(BUFFERSENDIN_BUFFERSEND)
842 static_cast<FwAssertArgType>(_status)
846 _status = msg.serializeFrom(portNum);
849 static_cast<FwAssertArgType>(_status)
853 _status = msg.serializeFrom(fwBuffer);
856 static_cast<FwAssertArgType>(_status)
865 static_cast<FwAssertArgType>(qStatus)
878 static_cast<FwAssertArgType>(portNum)
886 ComponentIpcSerializableBuffer msg;
890 _status = msg.serializeFrom(
891 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
895 static_cast<FwAssertArgType>(_status)
899 _status = msg.serializeFrom(portNum);
902 static_cast<FwAssertArgType>(_status)
906 _status = msg.serializeFrom(context);
909 static_cast<FwAssertArgType>(_status)
918 static_cast<FwAssertArgType>(qStatus)
960 static_cast<FwAssertArgType>(portNum)
964 this->m_deallocBufferSendOut_OutputPort[portNum].isConnected(),
965 static_cast<FwAssertArgType>(portNum)
967 this->m_deallocBufferSendOut_OutputPort[portNum].
invoke(
982 static_cast<FwAssertArgType>(portNum)
986 this->m_dpWrittenOut_OutputPort[portNum].isConnected(),
987 static_cast<FwAssertArgType>(portNum)
989 this->m_dpWrittenOut_OutputPort[portNum].
invoke(
1004 static_cast<FwAssertArgType>(portNum)
1008 this->m_procBufferSendOut_OutputPort[portNum].isConnected(),
1009 static_cast<FwAssertArgType>(portNum)
1011 this->m_procBufferSendOut_OutputPort[portNum].
invoke(
1027 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1028 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1049 ComponentIpcSerializableBuffer msg;
1053 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1056 static_cast<FwAssertArgType>(_status)
1062 _status = msg.serializeFrom(port);
1065 static_cast<FwAssertArgType>(_status)
1068 _status = msg.serializeFrom(opCode);
1071 static_cast<FwAssertArgType>(_status)
1074 _status = msg.serializeFrom(cmdSeq);
1077 static_cast<FwAssertArgType>(_status)
1080 _status = msg.serializeFrom(args);
1083 static_cast<FwAssertArgType>(_status)
1092 static_cast<FwAssertArgType>(qStatus)
1127 this->m_InvalidBufferThrottle++;
1132 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1133 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1141 if (this->m_eventOut_OutputPort[0].isConnected()) {
1144 #if FW_AMPCS_COMPATIBLE 1150 static_cast<FwAssertArgType>(_status)
1154 this->m_eventOut_OutputPort[0].
invoke(
1163 #if FW_ENABLE_TEXT_LOGGING 1164 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1165 #if FW_OBJECT_NAMES == 1 1166 const char* _formatString =
1167 "(%s) %s: Received buffer is invalid";
1169 const char* _formatString =
1170 "%s: Received buffer is invalid";
1177 this->m_objName.toChar(),
1182 this->m_textEventOut_OutputPort[0].invoke(
1203 this->m_BufferTooSmallForPacketThrottle++;
1208 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1209 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1217 if (this->m_eventOut_OutputPort[0].isConnected()) {
1221 #if FW_AMPCS_COMPATIBLE 1226 static_cast<FwAssertArgType>(_status)
1230 #if FW_AMPCS_COMPATIBLE 1237 static_cast<FwAssertArgType>(_status)
1243 static_cast<FwAssertArgType>(_status)
1246 #if FW_AMPCS_COMPATIBLE 1249 static_cast<U8>(
sizeof(U32))
1253 static_cast<FwAssertArgType>(_status)
1259 static_cast<FwAssertArgType>(_status)
1262 this->m_eventOut_OutputPort[0].
invoke(
1271 #if FW_ENABLE_TEXT_LOGGING 1272 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1273 #if FW_OBJECT_NAMES == 1 1274 const char* _formatString =
1275 "(%s) %s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1277 const char* _formatString =
1278 "%s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1285 this->m_objName.toChar(),
1287 "BufferTooSmallForPacket ",
1292 this->m_textEventOut_OutputPort[0].invoke(
1314 this->m_InvalidHeaderHashThrottle++;
1319 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1320 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1328 if (this->m_eventOut_OutputPort[0].isConnected()) {
1332 #if FW_AMPCS_COMPATIBLE 1337 static_cast<FwAssertArgType>(_status)
1341 #if FW_AMPCS_COMPATIBLE 1348 static_cast<FwAssertArgType>(_status)
1354 static_cast<FwAssertArgType>(_status)
1357 #if FW_AMPCS_COMPATIBLE 1360 static_cast<U8>(
sizeof(U32))
1364 static_cast<FwAssertArgType>(_status)
1370 static_cast<FwAssertArgType>(_status)
1373 #if FW_AMPCS_COMPATIBLE 1376 static_cast<U8>(
sizeof(U32))
1380 static_cast<FwAssertArgType>(_status)
1386 static_cast<FwAssertArgType>(_status)
1389 this->m_eventOut_OutputPort[0].
invoke(
1398 #if FW_ENABLE_TEXT_LOGGING 1399 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1400 #if FW_OBJECT_NAMES == 1 1401 const char* _formatString =
1402 "(%s) %s: Received a buffer of size %" PRIu64
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1404 const char* _formatString =
1405 "%s: Received a buffer of size %" PRIu64
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1412 this->m_objName.toChar(),
1414 "InvalidHeaderHash ",
1420 this->m_textEventOut_OutputPort[0].invoke(
1441 this->m_InvalidHeaderThrottle++;
1446 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1447 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1455 if (this->m_eventOut_OutputPort[0].isConnected()) {
1459 #if FW_AMPCS_COMPATIBLE 1464 static_cast<FwAssertArgType>(_status)
1468 #if FW_AMPCS_COMPATIBLE 1475 static_cast<FwAssertArgType>(_status)
1481 static_cast<FwAssertArgType>(_status)
1484 #if FW_AMPCS_COMPATIBLE 1487 static_cast<U8>(
sizeof(U32))
1491 static_cast<FwAssertArgType>(_status)
1497 static_cast<FwAssertArgType>(_status)
1500 this->m_eventOut_OutputPort[0].
invoke(
1509 #if FW_ENABLE_TEXT_LOGGING 1510 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1511 #if FW_OBJECT_NAMES == 1 1512 const char* _formatString =
1513 "(%s) %s: Received buffer of size %" PRIu64
"; deserialization of packet header failed with error code %" PRIu32
"";
1515 const char* _formatString =
1516 "%s: Received buffer of size %" PRIu64
"; deserialization of packet header failed with error code %" PRIu32
"";
1523 this->m_objName.toChar(),
1530 this->m_textEventOut_OutputPort[0].invoke(
1551 this->m_BufferTooSmallForDataThrottle++;
1556 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1557 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1565 if (this->m_eventOut_OutputPort[0].isConnected()) {
1569 #if FW_AMPCS_COMPATIBLE 1574 static_cast<FwAssertArgType>(_status)
1578 #if FW_AMPCS_COMPATIBLE 1585 static_cast<FwAssertArgType>(_status)
1591 static_cast<FwAssertArgType>(_status)
1594 #if FW_AMPCS_COMPATIBLE 1597 static_cast<U8>(
sizeof(U32))
1601 static_cast<FwAssertArgType>(_status)
1607 static_cast<FwAssertArgType>(_status)
1610 this->m_eventOut_OutputPort[0].
invoke(
1619 #if FW_ENABLE_TEXT_LOGGING 1620 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1621 #if FW_OBJECT_NAMES == 1 1622 const char* _formatString =
1623 "(%s) %s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1625 const char* _formatString =
1626 "%s: Received buffer has size %" PRIu64
"; minimum required size is %" PRIu32
"";
1633 this->m_objName.toChar(),
1635 "BufferTooSmallForData ",
1640 this->m_textEventOut_OutputPort[0].invoke(
1661 this->m_FileOpenErrorThrottle++;
1666 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1667 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1675 if (this->m_eventOut_OutputPort[0].isConnected()) {
1679 #if FW_AMPCS_COMPATIBLE 1684 static_cast<FwAssertArgType>(_status)
1688 #if FW_AMPCS_COMPATIBLE 1691 static_cast<U8>(
sizeof(U32))
1695 static_cast<FwAssertArgType>(_status)
1701 static_cast<FwAssertArgType>(_status)
1707 static_cast<FwAssertArgType>(_status)
1710 this->m_eventOut_OutputPort[0].
invoke(
1719 #if FW_ENABLE_TEXT_LOGGING 1720 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1721 #if FW_OBJECT_NAMES == 1 1722 const char* _formatString =
1723 "(%s) %s: Error %" PRIu32
" opening file %s";
1725 const char* _formatString =
1726 "%s: Error %" PRIu32
" opening file %s";
1733 this->m_objName.toChar(),
1740 this->m_textEventOut_OutputPort[0].invoke(
1763 this->m_FileWriteErrorThrottle++;
1768 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1769 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1777 if (this->m_eventOut_OutputPort[0].isConnected()) {
1781 #if FW_AMPCS_COMPATIBLE 1786 static_cast<FwAssertArgType>(_status)
1790 #if FW_AMPCS_COMPATIBLE 1793 static_cast<U8>(
sizeof(U32))
1797 static_cast<FwAssertArgType>(_status)
1803 static_cast<FwAssertArgType>(_status)
1806 #if FW_AMPCS_COMPATIBLE 1809 static_cast<U8>(
sizeof(U32))
1813 static_cast<FwAssertArgType>(_status)
1819 static_cast<FwAssertArgType>(_status)
1822 #if FW_AMPCS_COMPATIBLE 1825 static_cast<U8>(
sizeof(U32))
1829 static_cast<FwAssertArgType>(_status)
1835 static_cast<FwAssertArgType>(_status)
1841 static_cast<FwAssertArgType>(_status)
1844 this->m_eventOut_OutputPort[0].
invoke(
1853 #if FW_ENABLE_TEXT_LOGGING 1854 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1855 #if FW_OBJECT_NAMES == 1 1856 const char* _formatString =
1857 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1859 const char* _formatString =
1860 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1867 this->m_objName.toChar(),
1876 this->m_textEventOut_OutputPort[0].invoke(
1894 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1895 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1903 if (this->m_eventOut_OutputPort[0].isConnected()) {
1907 #if FW_AMPCS_COMPATIBLE 1912 static_cast<FwAssertArgType>(_status)
1916 #if FW_AMPCS_COMPATIBLE 1919 static_cast<U8>(
sizeof(U32))
1923 static_cast<FwAssertArgType>(_status)
1929 static_cast<FwAssertArgType>(_status)
1935 static_cast<FwAssertArgType>(_status)
1938 this->m_eventOut_OutputPort[0].
invoke(
1947 #if FW_ENABLE_TEXT_LOGGING 1948 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1949 #if FW_OBJECT_NAMES == 1 1950 const char* _formatString =
1951 "(%s) %s: Wrote %" PRIu32
" bytes to file %s";
1953 const char* _formatString =
1954 "%s: Wrote %" PRIu32
" bytes to file %s";
1961 this->m_objName.toChar(),
1968 this->m_textEventOut_OutputPort[0].invoke(
1986 this->m_InvalidBufferThrottle = 0;
1993 this->m_BufferTooSmallForPacketThrottle = 0;
2000 this->m_InvalidHeaderHashThrottle = 0;
2007 this->m_InvalidHeaderThrottle = 0;
2014 this->m_BufferTooSmallForDataThrottle = 0;
2021 this->m_FileOpenErrorThrottle = 0;
2028 this->m_FileWriteErrorThrottle = 0;
2042 if (not this->m_first_update_NumBuffersReceived) {
2044 if (arg == this->m_last_NumBuffersReceived) {
2048 this->m_last_NumBuffersReceived = arg;
2052 this->m_first_update_NumBuffersReceived =
false;
2053 this->m_last_NumBuffersReceived = arg;
2056 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2058 this->m_timeGetOut_OutputPort[0].isConnected() &&
2061 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2068 static_cast<FwAssertArgType>(_stat)
2075 this->m_tlmOut_OutputPort[0].
invoke(
2090 if (not this->m_first_update_NumBytesWritten) {
2092 if (arg == this->m_last_NumBytesWritten) {
2096 this->m_last_NumBytesWritten = arg;
2100 this->m_first_update_NumBytesWritten =
false;
2101 this->m_last_NumBytesWritten = arg;
2104 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2106 this->m_timeGetOut_OutputPort[0].isConnected() &&
2109 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2116 static_cast<FwAssertArgType>(_stat)
2123 this->m_tlmOut_OutputPort[0].
invoke(
2138 if (not this->m_first_update_NumSuccessfulWrites) {
2140 if (arg == this->m_last_NumSuccessfulWrites) {
2144 this->m_last_NumSuccessfulWrites = arg;
2148 this->m_first_update_NumSuccessfulWrites =
false;
2149 this->m_last_NumSuccessfulWrites = arg;
2152 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2154 this->m_timeGetOut_OutputPort[0].isConnected() &&
2157 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2164 static_cast<FwAssertArgType>(_stat)
2171 this->m_tlmOut_OutputPort[0].
invoke(
2186 if (not this->m_first_update_NumFailedWrites) {
2188 if (arg == this->m_last_NumFailedWrites) {
2192 this->m_last_NumFailedWrites = arg;
2196 this->m_first_update_NumFailedWrites =
false;
2197 this->m_last_NumFailedWrites = arg;
2200 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2202 this->m_timeGetOut_OutputPort[0].isConnected() &&
2205 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2212 static_cast<FwAssertArgType>(_stat)
2219 this->m_tlmOut_OutputPort[0].
invoke(
2234 if (not this->m_first_update_NumErrors) {
2236 if (arg == this->m_last_NumErrors) {
2240 this->m_last_NumErrors = arg;
2244 this->m_first_update_NumErrors =
false;
2245 this->m_last_NumErrors = arg;
2248 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2250 this->m_timeGetOut_OutputPort[0].isConnected() &&
2253 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2260 static_cast<FwAssertArgType>(_stat)
2267 this->m_tlmOut_OutputPort[0].
invoke(
2282 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
2284 this->m_timeGetOut_OutputPort[0].
invoke(_time);
2299 ComponentIpcSerializableBuffer _msg;
2309 static_cast<FwAssertArgType>(_msgStatus)
2319 static_cast<FwAssertArgType>(_deserStatus)
2322 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2324 if (_msgType == DPWRITER_COMPONENT_EXIT) {
2329 _deserStatus = _msg.deserializeTo(portNum);
2332 static_cast<FwAssertArgType>(_deserStatus)
2337 case BUFFERSENDIN_BUFFERSEND: {
2340 _deserStatus = _msg.deserializeTo(fwBuffer);
2343 static_cast<FwAssertArgType>(_deserStatus)
2355 case SCHEDIN_SCHED: {
2358 _deserStatus = _msg.deserializeTo(context);
2361 static_cast<FwAssertArgType>(_deserStatus)
2373 case CMD_CLEAR_EVENT_THROTTLE: {
2376 _deserStatus = _msg.deserializeTo(_opCode);
2379 static_cast<FwAssertArgType>(_deserStatus)
2384 _deserStatus = _msg.deserializeTo(_cmdSeq);
2387 static_cast<FwAssertArgType>(_deserStatus)
2392 _deserStatus = _msg.deserializeTo(args);
2395 static_cast<FwAssertArgType>(_deserStatus)
2403 #if FW_CMD_CHECK_RESIDUAL 2405 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2430 void DpWriterComponentBase ::
2442 const U32 idBase = callComp->
getIdBase();
2443 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2446 switch (opCode - idBase) {
2448 compPtr->CLEAR_EVENT_THROTTLE_cmdHandlerBase(
2462 void DpWriterComponentBase ::
2463 m_p_bufferSendIn_in(
2471 compPtr->bufferSendIn_handlerBase(
2477 void DpWriterComponentBase ::
2486 compPtr->schedIn_handlerBase(
Serialization/Deserialization operation was successful.
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocBufferSendOut.
void addCallPort(InputTimePort *callPort)
Register an input port.
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
Throttle reset count for FileWriteError.
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum)
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 interface.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
FwIdType getIdBase() const
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
PlatformSizeType FwSizeType
Throttle reset count for InvalidHeader.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
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
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum)
Throttle reset count for BufferTooSmallForData.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
An error occurred when opening a file.
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()
static constexpr FwIndexType getNum_deallocBufferSendOut_OutputPorts()
Os::Queue m_queue
queue object for active component
Received buffer is too small to hold the data specified in the header.
Channel ID for NumBuffersReceived.
Throttle reset count for InvalidHeaderHash.
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.
SerializeStatus
forward declaration for string
Received buffer is invalid.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
Message will block until space is available.
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 interface.
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.
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum)
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
#define FW_MIN(a, b)
MIN macro.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port procBufferSendOut.
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 log_WARNING_HI_InvalidHeaderHash(FwSizeType bufferSize, U32 storedHash, U32 computedHash)
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.
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
Channel ID for NumBytesWritten.
static constexpr FwIndexType getNum_procBufferSendOut_OutputPorts()
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.
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 interface.
DpWriterComponentBase(const char *compName="")
Construct DpWriterComponentBase object.
void log_WARNING_HI_FileOpenError(U32 status, const Fw::StringBase &file)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG)
serialize 8-bit unsigned int
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
Reset throttle value for InvalidHeaderHash.
Throttle reset count for InvalidBuffer.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
uint8_t U8
8-bit unsigned integer
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType bufferSize, U32 minSize)
An error occurred when writing to a file.
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].
Error occurred when deserializing the packet header.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Throttle reset count for BufferTooSmallForPacket.
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()
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.
message to exit active component task
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].
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
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].
SerializeStatus serializeTo(SerializeBufferBase &buffer, Endianness mode=Endianness::BIG) const override
serialize contents to buffer
RateGroupDivider component implementation.
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum)
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())
Received buffer is too small to hold a data product packet.
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].
The received buffer has an invalid header hash.
Channel ID for NumSuccessfulWrites.
void init()
Initialization function.
Channel ID for NumFailedWrites.
void log_WARNING_HI_InvalidBuffer()
void init()
Initialization function.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
Throttle reset count for FileOpenError.
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
virtual const CHAR * toChar() const =0
Channel ID for NumErrors.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_cmdIn_InputPorts()