10 #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 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 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 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)
1074 this->m_deallocBufferSendOut_OutputPort[portNum].
invoke(
1089 static_cast<FwAssertArgType>(portNum)
1091 this->m_dpWrittenOut_OutputPort[portNum].
invoke(
1106 static_cast<FwAssertArgType>(portNum)
1108 this->m_procBufferSendOut_OutputPort[portNum].
invoke(
1124 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1125 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1146 ComponentIpcSerializableBuffer msg;
1150 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1153 static_cast<FwAssertArgType>(_status)
1159 _status = msg.serialize(port);
1162 static_cast<FwAssertArgType>(_status)
1165 _status = msg.serialize(opCode);
1168 static_cast<FwAssertArgType>(_status)
1171 _status = msg.serialize(cmdSeq);
1174 static_cast<FwAssertArgType>(_status)
1177 _status = msg.serialize(args);
1180 static_cast<FwAssertArgType>(_status)
1189 static_cast<FwAssertArgType>(qStatus)
1224 this->m_InvalidBufferThrottle++;
1229 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1230 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1238 if (this->m_eventOut_OutputPort[0].isConnected()) {
1241 #if FW_AMPCS_COMPATIBLE 1244 _status = _logBuff.
serialize(static_cast<U8>(0));
1247 static_cast<FwAssertArgType>(_status)
1251 this->m_eventOut_OutputPort[0].
invoke(
1260 #if FW_ENABLE_TEXT_LOGGING 1261 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1262 #if FW_OBJECT_NAMES == 1 1263 const char* _formatString =
1264 "(%s) %s: Received buffer is invalid";
1266 const char* _formatString =
1267 "%s: Received buffer is invalid";
1274 this->m_objName.toChar(),
1279 this->m_textEventOut_OutputPort[0].invoke(
1300 this->m_BufferTooSmallForPacketThrottle++;
1305 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1306 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1314 if (this->m_eventOut_OutputPort[0].isConnected()) {
1318 #if FW_AMPCS_COMPATIBLE 1320 _status = _logBuff.
serialize(static_cast<U8>(2));
1323 static_cast<FwAssertArgType>(_status)
1327 #if FW_AMPCS_COMPATIBLE 1330 static_cast<U8>(
sizeof(U32))
1334 static_cast<FwAssertArgType>(_status)
1337 _status = _logBuff.
serialize(bufferSize);
1340 static_cast<FwAssertArgType>(_status)
1343 #if FW_AMPCS_COMPATIBLE 1346 static_cast<U8>(
sizeof(U32))
1350 static_cast<FwAssertArgType>(_status)
1356 static_cast<FwAssertArgType>(_status)
1359 this->m_eventOut_OutputPort[0].
invoke(
1368 #if FW_ENABLE_TEXT_LOGGING 1369 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1370 #if FW_OBJECT_NAMES == 1 1371 const char* _formatString =
1372 "(%s) %s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1374 const char* _formatString =
1375 "%s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1382 this->m_objName.toChar(),
1384 "BufferTooSmallForPacket ",
1389 this->m_textEventOut_OutputPort[0].invoke(
1411 this->m_InvalidHeaderHashThrottle++;
1416 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1417 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1425 if (this->m_eventOut_OutputPort[0].isConnected()) {
1429 #if FW_AMPCS_COMPATIBLE 1431 _status = _logBuff.
serialize(static_cast<U8>(3));
1434 static_cast<FwAssertArgType>(_status)
1438 #if FW_AMPCS_COMPATIBLE 1441 static_cast<U8>(
sizeof(U32))
1445 static_cast<FwAssertArgType>(_status)
1448 _status = _logBuff.
serialize(bufferSize);
1451 static_cast<FwAssertArgType>(_status)
1454 #if FW_AMPCS_COMPATIBLE 1457 static_cast<U8>(
sizeof(U32))
1461 static_cast<FwAssertArgType>(_status)
1464 _status = _logBuff.
serialize(storedHash);
1467 static_cast<FwAssertArgType>(_status)
1470 #if FW_AMPCS_COMPATIBLE 1473 static_cast<U8>(
sizeof(U32))
1477 static_cast<FwAssertArgType>(_status)
1480 _status = _logBuff.
serialize(computedHash);
1483 static_cast<FwAssertArgType>(_status)
1486 this->m_eventOut_OutputPort[0].
invoke(
1495 #if FW_ENABLE_TEXT_LOGGING 1496 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1497 #if FW_OBJECT_NAMES == 1 1498 const char* _formatString =
1499 "(%s) %s: Received a buffer of size %" PRIu32
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1501 const char* _formatString =
1502 "%s: Received a buffer of size %" PRIu32
" with an invalid header hash (stored %" PRIx32
", computed %" PRIx32
")";
1509 this->m_objName.toChar(),
1511 "InvalidHeaderHash ",
1517 this->m_textEventOut_OutputPort[0].invoke(
1538 this->m_InvalidHeaderThrottle++;
1543 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1544 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1552 if (this->m_eventOut_OutputPort[0].isConnected()) {
1556 #if FW_AMPCS_COMPATIBLE 1558 _status = _logBuff.
serialize(static_cast<U8>(2));
1561 static_cast<FwAssertArgType>(_status)
1565 #if FW_AMPCS_COMPATIBLE 1568 static_cast<U8>(
sizeof(U32))
1572 static_cast<FwAssertArgType>(_status)
1575 _status = _logBuff.
serialize(bufferSize);
1578 static_cast<FwAssertArgType>(_status)
1581 #if FW_AMPCS_COMPATIBLE 1584 static_cast<U8>(
sizeof(U32))
1588 static_cast<FwAssertArgType>(_status)
1591 _status = _logBuff.
serialize(errorCode);
1594 static_cast<FwAssertArgType>(_status)
1597 this->m_eventOut_OutputPort[0].
invoke(
1606 #if FW_ENABLE_TEXT_LOGGING 1607 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1608 #if FW_OBJECT_NAMES == 1 1609 const char* _formatString =
1610 "(%s) %s: Received buffer of size %" PRIu32
"; deserialization of packet header failed with error code %" PRIu32
"";
1612 const char* _formatString =
1613 "%s: Received buffer of size %" PRIu32
"; deserialization of packet header failed with error code %" PRIu32
"";
1620 this->m_objName.toChar(),
1627 this->m_textEventOut_OutputPort[0].invoke(
1648 this->m_BufferTooSmallForDataThrottle++;
1653 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1654 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1662 if (this->m_eventOut_OutputPort[0].isConnected()) {
1666 #if FW_AMPCS_COMPATIBLE 1668 _status = _logBuff.
serialize(static_cast<U8>(2));
1671 static_cast<FwAssertArgType>(_status)
1675 #if FW_AMPCS_COMPATIBLE 1678 static_cast<U8>(
sizeof(U32))
1682 static_cast<FwAssertArgType>(_status)
1685 _status = _logBuff.
serialize(bufferSize);
1688 static_cast<FwAssertArgType>(_status)
1691 #if FW_AMPCS_COMPATIBLE 1694 static_cast<U8>(
sizeof(U32))
1698 static_cast<FwAssertArgType>(_status)
1704 static_cast<FwAssertArgType>(_status)
1707 this->m_eventOut_OutputPort[0].
invoke(
1716 #if FW_ENABLE_TEXT_LOGGING 1717 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1718 #if FW_OBJECT_NAMES == 1 1719 const char* _formatString =
1720 "(%s) %s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1722 const char* _formatString =
1723 "%s: Received buffer has size %" PRIu32
"; minimum required size is %" PRIu32
"";
1730 this->m_objName.toChar(),
1732 "BufferTooSmallForData ",
1737 this->m_textEventOut_OutputPort[0].invoke(
1758 this->m_FileOpenErrorThrottle++;
1763 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1764 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1772 if (this->m_eventOut_OutputPort[0].isConnected()) {
1776 #if FW_AMPCS_COMPATIBLE 1778 _status = _logBuff.
serialize(static_cast<U8>(2));
1781 static_cast<FwAssertArgType>(_status)
1785 #if FW_AMPCS_COMPATIBLE 1788 static_cast<U8>(
sizeof(U32))
1792 static_cast<FwAssertArgType>(_status)
1798 static_cast<FwAssertArgType>(_status)
1804 static_cast<FwAssertArgType>(_status)
1807 this->m_eventOut_OutputPort[0].
invoke(
1816 #if FW_ENABLE_TEXT_LOGGING 1817 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1818 #if FW_OBJECT_NAMES == 1 1819 const char* _formatString =
1820 "(%s) %s: Error %" PRIu32
" opening file %s";
1822 const char* _formatString =
1823 "%s: Error %" PRIu32
" opening file %s";
1830 this->m_objName.toChar(),
1837 this->m_textEventOut_OutputPort[0].invoke(
1860 this->m_FileWriteErrorThrottle++;
1865 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1866 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
1874 if (this->m_eventOut_OutputPort[0].isConnected()) {
1878 #if FW_AMPCS_COMPATIBLE 1880 _status = _logBuff.
serialize(static_cast<U8>(4));
1883 static_cast<FwAssertArgType>(_status)
1887 #if FW_AMPCS_COMPATIBLE 1890 static_cast<U8>(
sizeof(U32))
1894 static_cast<FwAssertArgType>(_status)
1900 static_cast<FwAssertArgType>(_status)
1903 #if FW_AMPCS_COMPATIBLE 1906 static_cast<U8>(
sizeof(U32))
1910 static_cast<FwAssertArgType>(_status)
1913 _status = _logBuff.
serialize(bytesWritten);
1916 static_cast<FwAssertArgType>(_status)
1919 #if FW_AMPCS_COMPATIBLE 1922 static_cast<U8>(
sizeof(U32))
1926 static_cast<FwAssertArgType>(_status)
1929 _status = _logBuff.
serialize(bytesToWrite);
1932 static_cast<FwAssertArgType>(_status)
1938 static_cast<FwAssertArgType>(_status)
1941 this->m_eventOut_OutputPort[0].
invoke(
1950 #if FW_ENABLE_TEXT_LOGGING 1951 if (this->m_textEventOut_OutputPort[0].isConnected()) {
1952 #if FW_OBJECT_NAMES == 1 1953 const char* _formatString =
1954 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1956 const char* _formatString =
1957 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1964 this->m_objName.toChar(),
1973 this->m_textEventOut_OutputPort[0].invoke(
1991 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1992 this->m_timeGetOut_OutputPort[0].
invoke(_logTime);
2000 if (this->m_eventOut_OutputPort[0].isConnected()) {
2004 #if FW_AMPCS_COMPATIBLE 2006 _status = _logBuff.
serialize(static_cast<U8>(2));
2009 static_cast<FwAssertArgType>(_status)
2013 #if FW_AMPCS_COMPATIBLE 2016 static_cast<U8>(
sizeof(U32))
2020 static_cast<FwAssertArgType>(_status)
2026 static_cast<FwAssertArgType>(_status)
2032 static_cast<FwAssertArgType>(_status)
2035 this->m_eventOut_OutputPort[0].
invoke(
2044 #if FW_ENABLE_TEXT_LOGGING 2045 if (this->m_textEventOut_OutputPort[0].isConnected()) {
2046 #if FW_OBJECT_NAMES == 1 2047 const char* _formatString =
2048 "(%s) %s: Wrote %" PRIu32
" bytes to file %s";
2050 const char* _formatString =
2051 "%s: Wrote %" PRIu32
" bytes to file %s";
2058 this->m_objName.toChar(),
2065 this->m_textEventOut_OutputPort[0].invoke(
2083 this->m_InvalidBufferThrottle = 0;
2090 this->m_BufferTooSmallForPacketThrottle = 0;
2097 this->m_InvalidHeaderHashThrottle = 0;
2104 this->m_InvalidHeaderThrottle = 0;
2111 this->m_BufferTooSmallForDataThrottle = 0;
2118 this->m_FileOpenErrorThrottle = 0;
2125 this->m_FileWriteErrorThrottle = 0;
2139 if (not this->m_first_update_NumBuffersReceived) {
2141 if (arg == this->m_last_NumBuffersReceived) {
2145 this->m_last_NumBuffersReceived = arg;
2149 this->m_first_update_NumBuffersReceived =
false;
2150 this->m_last_NumBuffersReceived = arg;
2153 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2155 this->m_timeGetOut_OutputPort[0].isConnected() &&
2158 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2165 static_cast<FwAssertArgType>(_stat)
2172 this->m_tlmOut_OutputPort[0].
invoke(
2187 if (not this->m_first_update_NumBytesWritten) {
2189 if (arg == this->m_last_NumBytesWritten) {
2193 this->m_last_NumBytesWritten = arg;
2197 this->m_first_update_NumBytesWritten =
false;
2198 this->m_last_NumBytesWritten = arg;
2201 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2203 this->m_timeGetOut_OutputPort[0].isConnected() &&
2206 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2213 static_cast<FwAssertArgType>(_stat)
2220 this->m_tlmOut_OutputPort[0].
invoke(
2235 if (not this->m_first_update_NumSuccessfulWrites) {
2237 if (arg == this->m_last_NumSuccessfulWrites) {
2241 this->m_last_NumSuccessfulWrites = arg;
2245 this->m_first_update_NumSuccessfulWrites =
false;
2246 this->m_last_NumSuccessfulWrites = arg;
2249 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2251 this->m_timeGetOut_OutputPort[0].isConnected() &&
2254 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2261 static_cast<FwAssertArgType>(_stat)
2268 this->m_tlmOut_OutputPort[0].
invoke(
2283 if (not this->m_first_update_NumFailedWrites) {
2285 if (arg == this->m_last_NumFailedWrites) {
2289 this->m_last_NumFailedWrites = arg;
2293 this->m_first_update_NumFailedWrites =
false;
2294 this->m_last_NumFailedWrites = arg;
2297 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2299 this->m_timeGetOut_OutputPort[0].isConnected() &&
2302 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2309 static_cast<FwAssertArgType>(_stat)
2316 this->m_tlmOut_OutputPort[0].
invoke(
2331 if (not this->m_first_update_NumErrors) {
2333 if (arg == this->m_last_NumErrors) {
2337 this->m_last_NumErrors = arg;
2341 this->m_first_update_NumErrors =
false;
2342 this->m_last_NumErrors = arg;
2345 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2347 this->m_timeGetOut_OutputPort[0].isConnected() &&
2350 this->m_timeGetOut_OutputPort[0].
invoke(_tlmTime);
2357 static_cast<FwAssertArgType>(_stat)
2364 this->m_tlmOut_OutputPort[0].
invoke(
2379 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
2381 this->m_timeGetOut_OutputPort[0].
invoke(_time);
2396 ComponentIpcSerializableBuffer msg;
2406 static_cast<FwAssertArgType>(msgStatus)
2416 static_cast<FwAssertArgType>(deserStatus)
2419 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2421 if (msgType == DPWRITER_COMPONENT_EXIT) {
2426 deserStatus = msg.deserialize(portNum);
2429 static_cast<FwAssertArgType>(deserStatus)
2434 case BUFFERSENDIN_BUFFERSEND: {
2437 deserStatus = msg.deserialize(fwBuffer);
2440 static_cast<FwAssertArgType>(deserStatus)
2452 case SCHEDIN_SCHED: {
2455 deserStatus = msg.deserialize(context);
2458 static_cast<FwAssertArgType>(deserStatus)
2470 case CMD_CLEAR_EVENT_THROTTLE: {
2473 deserStatus = msg.deserialize(opCode);
2476 static_cast<FwAssertArgType>(deserStatus)
2481 deserStatus = msg.deserialize(cmdSeq);
2484 static_cast<FwAssertArgType>(deserStatus)
2489 deserStatus = msg.deserialize(args);
2492 static_cast<FwAssertArgType>(deserStatus)
2500 #if FW_CMD_CHECK_RESIDUAL 2502 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2527 void DpWriterComponentBase ::
2539 const U32 idBase = callComp->
getIdBase();
2540 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2543 switch (opCode - idBase) {
2545 compPtr->CLEAR_EVENT_THROTTLE_cmdHandlerBase(
2559 void DpWriterComponentBase ::
2560 m_p_bufferSendIn_in(
2568 compPtr->bufferSendIn_handlerBase(
2574 void DpWriterComponentBase ::
2583 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.
Received buffer is too small to hold the data specified in the header.
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
Throttle reset count for BufferTooSmallForData.
void addCallPort(InputDpWrittenPort *callPort)
Register an input port.
NATIVE_UINT_TYPE SizeType
Status
status returned from the queue send function
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Throttle reset count for InvalidBuffer.
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.
PlatformSizeType FwSizeType
The received buffer has an invalid header hash.
An error occurred when opening a file.
Throttle reset count for BufferTooSmallForPacket.
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.
PlatformIndexType FwIndexType
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
SerializeStatus
forward declaration for string
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.
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 InvalidHeaderHash.
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
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)
Received buffer is invalid.
Received buffer is too small to hold a data product packet.
#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.
Throttle reset count for FileWriteError.
Throttle reset count for FileOpenError.
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.
No time base has been established.
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 NumErrors.
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.
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)
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
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
#define PRI_PlatformIntType
An error occurred when writing to a file.
void regCommands()
Register commands with the Command Dispatcher.
FwIndexType getNum_bufferSendIn_InputPorts() const
Command failed to deserialize.
Channel ID for NumBytesWritten.
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.
PlatformQueuePriorityType FwQueuePriorityType
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
message to exit active component task
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.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
FwIndexType getNum_tlmOut_OutputPorts() const
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].
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum)
message sent/received okay
FwIndexType getNum_deallocBufferSendOut_OutputPorts() const
Channel ID for NumBuffersReceived.
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
void log_WARNING_HI_InvalidHeader(U32 bufferSize, U32 errorCode)
void tlmWrite_NumSuccessfulWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
Throttle reset count for InvalidHeader.
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
Reset throttle value for BufferTooSmallForPacket.
Message will return with status when space is unavailable.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void set_procBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to procBufferSendOut[portNum].
void init()
Initialization function.
void log_WARNING_HI_InvalidBuffer()
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
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
Channel ID for NumFailedWrites.
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
virtual const CHAR * toChar() const =0
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum)