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];
72 void DpWriterComponentBase ::
84 port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
87 this->m_cmdIn_InputPort[port].init();
88 this->m_cmdIn_InputPort[port].addCallComp(
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());
108 port < static_cast<FwIndexType>(this->getNum_bufferSendIn_InputPorts());
111 this->m_bufferSendIn_InputPort[port].init();
112 this->m_bufferSendIn_InputPort[port].addCallComp(
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());
132 port < static_cast<FwIndexType>(this->getNum_schedIn_InputPorts());
135 this->m_schedIn_InputPort[port].init();
136 this->m_schedIn_InputPort[port].addCallComp(
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());
156 port < static_cast<FwIndexType>(this->getNum_cmdRegIn_OutputPorts());
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());
175 port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
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());
194 port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
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());
234 port < static_cast<FwIndexType>(this->getNum_timeGetOut_OutputPorts());
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());
253 port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
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());
272 port < static_cast<FwIndexType>(this->getNum_deallocBufferSendOut_OutputPorts());
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());
291 port < static_cast<FwIndexType>(this->getNum_dpWrittenOut_OutputPorts());
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());
310 port < static_cast<FwIndexType>(this->getNum_procBufferSendOut_OutputPorts());
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)
345 portNum < this->getNum_cmdIn_InputPorts(),
349 return &this->m_cmdIn_InputPort[portNum];
360 portNum < this->getNum_bufferSendIn_InputPorts(),
364 return &this->m_bufferSendIn_InputPort[portNum];
371 portNum < this->getNum_schedIn_InputPorts(),
375 return &this->m_schedIn_InputPort[portNum];
382 void DpWriterComponentBase ::
383 set_cmdRegIn_OutputPort(
389 portNum < this->getNum_cmdRegIn_OutputPorts(),
393 this->m_cmdRegIn_OutputPort[portNum].addCallPort(port);
396 void DpWriterComponentBase ::
397 set_cmdResponseOut_OutputPort(
403 portNum < this->getNum_cmdResponseOut_OutputPorts(),
407 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
410 void DpWriterComponentBase ::
411 set_eventOut_OutputPort(
417 portNum < this->getNum_eventOut_OutputPorts(),
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(),
437 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
442 void DpWriterComponentBase ::
443 set_timeGetOut_OutputPort(
449 portNum < this->getNum_timeGetOut_OutputPorts(),
453 this->m_timeGetOut_OutputPort[portNum].addCallPort(port);
456 void DpWriterComponentBase ::
457 set_tlmOut_OutputPort(
463 portNum < this->getNum_tlmOut_OutputPorts(),
467 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
474 void DpWriterComponentBase ::
475 set_deallocBufferSendOut_OutputPort(
481 portNum < this->getNum_deallocBufferSendOut_OutputPorts(),
485 this->m_deallocBufferSendOut_OutputPort[portNum].addCallPort(port);
488 void DpWriterComponentBase ::
489 set_dpWrittenOut_OutputPort(
495 portNum < this->getNum_dpWrittenOut_OutputPorts(),
499 this->m_dpWrittenOut_OutputPort[portNum].addCallPort(port);
502 void DpWriterComponentBase ::
503 set_procBufferSendOut_OutputPort(
509 portNum < this->getNum_procBufferSendOut_OutputPorts(),
513 this->m_procBufferSendOut_OutputPort[portNum].addCallPort(port);
516#if FW_PORT_SERIALIZATION
522 void DpWriterComponentBase ::
523 set_cmdRegIn_OutputPort(
525 Fw::InputSerializePort* port
529 portNum < this->getNum_cmdRegIn_OutputPorts(),
533 this->m_cmdRegIn_OutputPort[portNum].registerSerialPort(port);
536 void DpWriterComponentBase ::
537 set_cmdResponseOut_OutputPort(
539 Fw::InputSerializePort* port
543 portNum < this->getNum_cmdResponseOut_OutputPorts(),
547 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
550 void DpWriterComponentBase ::
551 set_eventOut_OutputPort(
553 Fw::InputSerializePort* port
557 portNum < this->getNum_eventOut_OutputPorts(),
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(),
577 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
582 void DpWriterComponentBase ::
583 set_timeGetOut_OutputPort(
585 Fw::InputSerializePort* port
589 portNum < this->getNum_timeGetOut_OutputPorts(),
593 this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
596 void DpWriterComponentBase ::
597 set_tlmOut_OutputPort(
599 Fw::InputSerializePort* port
603 portNum < this->getNum_tlmOut_OutputPorts(),
607 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
612#if FW_PORT_SERIALIZATION
618 void DpWriterComponentBase ::
619 set_deallocBufferSendOut_OutputPort(
621 Fw::InputSerializePort* port
625 portNum < this->getNum_deallocBufferSendOut_OutputPorts(),
629 this->m_deallocBufferSendOut_OutputPort[portNum].registerSerialPort(port);
632 void DpWriterComponentBase ::
633 set_dpWrittenOut_OutputPort(
635 Fw::InputSerializePort* port
639 portNum < this->getNum_dpWrittenOut_OutputPorts(),
643 this->m_dpWrittenOut_OutputPort[portNum].registerSerialPort(port);
646 void DpWriterComponentBase ::
647 set_procBufferSendOut_OutputPort(
649 Fw::InputSerializePort* port
653 portNum < this->getNum_procBufferSendOut_OutputPorts(),
657 this->m_procBufferSendOut_OutputPort[portNum].registerSerialPort(port);
666 void DpWriterComponentBase ::
669 FW_ASSERT(this->m_cmdRegIn_OutputPort[0].isConnected());
671 this->m_cmdRegIn_OutputPort[0].invoke(
672 this->getIdBase() + OPCODE_CLEAR_EVENT_THROTTLE
680 DpWriterComponentBase ::
681 DpWriterComponentBase(
const char* compName) :
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;
713 DpWriterComponentBase ::
714 ~DpWriterComponentBase()
724 getNum_cmdIn_InputPorts()
const
734 getNum_bufferSendIn_InputPorts()
const
740 getNum_schedIn_InputPorts()
const
750 getNum_cmdRegIn_OutputPorts()
const
756 getNum_cmdResponseOut_OutputPorts()
const
762 getNum_eventOut_OutputPorts()
const
767#if FW_ENABLE_TEXT_LOGGING == 1
770 getNum_textEventOut_OutputPorts()
const
778 getNum_timeGetOut_OutputPorts()
const
784 getNum_tlmOut_OutputPorts()
const
794 getNum_deallocBufferSendOut_OutputPorts()
const
800 getNum_dpWrittenOut_OutputPorts()
const
806 getNum_procBufferSendOut_OutputPorts()
const
815 bool DpWriterComponentBase ::
816 isConnected_cmdRegIn_OutputPort(
FwIndexType portNum)
819 portNum < this->getNum_cmdRegIn_OutputPorts(),
823 return this->m_cmdRegIn_OutputPort[portNum].isConnected();
826 bool DpWriterComponentBase ::
827 isConnected_cmdResponseOut_OutputPort(
FwIndexType portNum)
830 portNum < this->getNum_cmdResponseOut_OutputPorts(),
834 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
837 bool DpWriterComponentBase ::
838 isConnected_eventOut_OutputPort(
FwIndexType portNum)
841 portNum < this->getNum_eventOut_OutputPorts(),
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(),
858 return this->m_textEventOut_OutputPort[portNum].isConnected();
863 bool DpWriterComponentBase ::
864 isConnected_timeGetOut_OutputPort(
FwIndexType portNum)
867 portNum < this->getNum_timeGetOut_OutputPorts(),
871 return this->m_timeGetOut_OutputPort[portNum].isConnected();
874 bool DpWriterComponentBase ::
878 portNum < this->getNum_tlmOut_OutputPorts(),
882 return this->m_tlmOut_OutputPort[portNum].isConnected();
889 bool DpWriterComponentBase ::
890 isConnected_deallocBufferSendOut_OutputPort(
FwIndexType portNum)
893 portNum < this->getNum_deallocBufferSendOut_OutputPorts(),
897 return this->m_deallocBufferSendOut_OutputPort[portNum].isConnected();
900 bool DpWriterComponentBase ::
901 isConnected_dpWrittenOut_OutputPort(
FwIndexType portNum)
904 portNum < this->getNum_dpWrittenOut_OutputPorts(),
908 return this->m_dpWrittenOut_OutputPort[portNum].isConnected();
911 bool DpWriterComponentBase ::
912 isConnected_procBufferSendOut_OutputPort(
FwIndexType portNum)
915 portNum < this->getNum_procBufferSendOut_OutputPorts(),
919 return this->m_procBufferSendOut_OutputPort[portNum].isConnected();
928 void DpWriterComponentBase ::
929 bufferSendIn_handlerBase(
936 portNum < this->getNum_bufferSendIn_InputPorts(),
941 bufferSendIn_preMsgHook(
945 ComponentIpcSerializableBuffer msg;
949 _status = msg.serialize(
958 _status = msg.serialize(portNum);
965 _status = msg.serialize(fwBuffer);
981 void DpWriterComponentBase ::
989 portNum < this->getNum_schedIn_InputPorts(),
998 ComponentIpcSerializableBuffer msg;
1002 _status = msg.serialize(
1011 _status = msg.serialize(portNum);
1018 _status = msg.serialize(context);
1042 void DpWriterComponentBase ::
1043 bufferSendIn_preMsgHook(
1051 void DpWriterComponentBase ::
1064 void DpWriterComponentBase ::
1065 deallocBufferSendOut_out(
1071 portNum < this->getNum_deallocBufferSendOut_OutputPorts(),
1074 this->m_deallocBufferSendOut_OutputPort[portNum].invoke(
1079 void DpWriterComponentBase ::
1088 portNum < this->getNum_dpWrittenOut_OutputPorts(),
1091 this->m_dpWrittenOut_OutputPort[portNum].invoke(
1098 void DpWriterComponentBase ::
1099 procBufferSendOut_out(
1105 portNum < this->getNum_procBufferSendOut_OutputPorts(),
1108 this->m_procBufferSendOut_OutputPort[portNum].invoke(
1117 void DpWriterComponentBase ::
1124 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1125 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1134 void DpWriterComponentBase ::
1135 CLEAR_EVENT_THROTTLE_cmdHandlerBase(
1142 this->CLEAR_EVENT_THROTTLE_preMsgHook(opCode,cmdSeq);
1146 ComponentIpcSerializableBuffer msg;
1150 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1159 _status = msg.serialize(port);
1165 _status = msg.serialize(opCode);
1171 _status = msg.serialize(cmdSeq);
1177 _status = msg.serialize(args);
1201 void DpWriterComponentBase ::
1202 CLEAR_EVENT_THROTTLE_preMsgHook(
1216 void DpWriterComponentBase ::
1217 log_WARNING_HI_InvalidBuffer()
1220 if (this->m_InvalidBufferThrottle >= EVENTID_INVALIDBUFFER_THROTTLE) {
1224 this->m_InvalidBufferThrottle++;
1229 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1230 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1235 _id = this->getIdBase() + EVENTID_INVALIDBUFFER;
1238 if (this->m_eventOut_OutputPort[0].isConnected()) {
1241#if FW_AMPCS_COMPATIBLE
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(
1289 void DpWriterComponentBase ::
1290 log_WARNING_HI_BufferTooSmallForPacket(
1296 if (this->m_BufferTooSmallForPacketThrottle >= EVENTID_BUFFERTOOSMALLFORPACKET_THROTTLE) {
1300 this->m_BufferTooSmallForPacketThrottle++;
1305 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1306 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1311 _id = this->getIdBase() + EVENTID_BUFFERTOOSMALLFORPACKET;
1314 if (this->m_eventOut_OutputPort[0].isConnected()) {
1318#if FW_AMPCS_COMPATIBLE
1327#if FW_AMPCS_COMPATIBLE
1330 static_cast<U8>(
sizeof(U32))
1337 _status = _logBuff.
serialize(bufferSize);
1343#if FW_AMPCS_COMPATIBLE
1346 static_cast<U8>(
sizeof(U32))
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(
1399 void DpWriterComponentBase ::
1400 log_WARNING_HI_InvalidHeaderHash(
1407 if (this->m_InvalidHeaderHashThrottle >= EVENTID_INVALIDHEADERHASH_THROTTLE) {
1411 this->m_InvalidHeaderHashThrottle++;
1416 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1417 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1422 _id = this->getIdBase() + EVENTID_INVALIDHEADERHASH;
1425 if (this->m_eventOut_OutputPort[0].isConnected()) {
1429#if FW_AMPCS_COMPATIBLE
1438#if FW_AMPCS_COMPATIBLE
1441 static_cast<U8>(
sizeof(U32))
1448 _status = _logBuff.
serialize(bufferSize);
1454#if FW_AMPCS_COMPATIBLE
1457 static_cast<U8>(
sizeof(U32))
1464 _status = _logBuff.
serialize(storedHash);
1470#if FW_AMPCS_COMPATIBLE
1473 static_cast<U8>(
sizeof(U32))
1480 _status = _logBuff.
serialize(computedHash);
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(
1527 void DpWriterComponentBase ::
1528 log_WARNING_HI_InvalidHeader(
1534 if (this->m_InvalidHeaderThrottle >= EVENTID_INVALIDHEADER_THROTTLE) {
1538 this->m_InvalidHeaderThrottle++;
1543 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1544 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1549 _id = this->getIdBase() + EVENTID_INVALIDHEADER;
1552 if (this->m_eventOut_OutputPort[0].isConnected()) {
1556#if FW_AMPCS_COMPATIBLE
1565#if FW_AMPCS_COMPATIBLE
1568 static_cast<U8>(
sizeof(U32))
1575 _status = _logBuff.
serialize(bufferSize);
1581#if FW_AMPCS_COMPATIBLE
1584 static_cast<U8>(
sizeof(U32))
1591 _status = _logBuff.
serialize(errorCode);
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(
1637 void DpWriterComponentBase ::
1638 log_WARNING_HI_BufferTooSmallForData(
1644 if (this->m_BufferTooSmallForDataThrottle >= EVENTID_BUFFERTOOSMALLFORDATA_THROTTLE) {
1648 this->m_BufferTooSmallForDataThrottle++;
1653 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1654 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1659 _id = this->getIdBase() + EVENTID_BUFFERTOOSMALLFORDATA;
1662 if (this->m_eventOut_OutputPort[0].isConnected()) {
1666#if FW_AMPCS_COMPATIBLE
1675#if FW_AMPCS_COMPATIBLE
1678 static_cast<U8>(
sizeof(U32))
1685 _status = _logBuff.
serialize(bufferSize);
1691#if FW_AMPCS_COMPATIBLE
1694 static_cast<U8>(
sizeof(U32))
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(
1747 void DpWriterComponentBase ::
1748 log_WARNING_HI_FileOpenError(
1754 if (this->m_FileOpenErrorThrottle >= EVENTID_FILEOPENERROR_THROTTLE) {
1758 this->m_FileOpenErrorThrottle++;
1763 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1764 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1769 _id = this->getIdBase() + EVENTID_FILEOPENERROR;
1772 if (this->m_eventOut_OutputPort[0].isConnected()) {
1776#if FW_AMPCS_COMPATIBLE
1785#if FW_AMPCS_COMPATIBLE
1788 static_cast<U8>(
sizeof(U32))
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(
1847 void DpWriterComponentBase ::
1848 log_WARNING_HI_FileWriteError(
1856 if (this->m_FileWriteErrorThrottle >= EVENTID_FILEWRITEERROR_THROTTLE) {
1860 this->m_FileWriteErrorThrottle++;
1865 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1866 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1871 _id = this->getIdBase() + EVENTID_FILEWRITEERROR;
1874 if (this->m_eventOut_OutputPort[0].isConnected()) {
1878#if FW_AMPCS_COMPATIBLE
1887#if FW_AMPCS_COMPATIBLE
1890 static_cast<U8>(
sizeof(U32))
1903#if FW_AMPCS_COMPATIBLE
1906 static_cast<U8>(
sizeof(U32))
1913 _status = _logBuff.
serialize(bytesWritten);
1919#if FW_AMPCS_COMPATIBLE
1922 static_cast<U8>(
sizeof(U32))
1929 _status = _logBuff.
serialize(bytesToWrite);
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(
1983 void DpWriterComponentBase ::
1984 log_ACTIVITY_LO_FileWritten(
1991 if (this->m_timeGetOut_OutputPort[0].isConnected()) {
1992 this->m_timeGetOut_OutputPort[0].invoke(_logTime);
1997 _id = this->getIdBase() + EVENTID_FILEWRITTEN;
2000 if (this->m_eventOut_OutputPort[0].isConnected()) {
2004#if FW_AMPCS_COMPATIBLE
2013#if FW_AMPCS_COMPATIBLE
2016 static_cast<U8>(
sizeof(U32))
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(
2079 void DpWriterComponentBase ::
2080 log_WARNING_HI_InvalidBuffer_ThrottleClear()
2083 this->m_InvalidBufferThrottle = 0;
2086 void DpWriterComponentBase ::
2087 log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
2090 this->m_BufferTooSmallForPacketThrottle = 0;
2093 void DpWriterComponentBase ::
2094 log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
2097 this->m_InvalidHeaderHashThrottle = 0;
2100 void DpWriterComponentBase ::
2101 log_WARNING_HI_InvalidHeader_ThrottleClear()
2104 this->m_InvalidHeaderThrottle = 0;
2107 void DpWriterComponentBase ::
2108 log_WARNING_HI_BufferTooSmallForData_ThrottleClear()
2111 this->m_BufferTooSmallForDataThrottle = 0;
2114 void DpWriterComponentBase ::
2115 log_WARNING_HI_FileOpenError_ThrottleClear()
2118 this->m_FileOpenErrorThrottle = 0;
2121 void DpWriterComponentBase ::
2122 log_WARNING_HI_FileWriteError_ThrottleClear()
2125 this->m_FileWriteErrorThrottle = 0;
2132 void DpWriterComponentBase ::
2133 tlmWrite_NumBuffersReceived(
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);
2170 _id = this->getIdBase() + CHANNELID_NUMBUFFERSRECEIVED;
2172 this->m_tlmOut_OutputPort[0].invoke(
2180 void DpWriterComponentBase ::
2181 tlmWrite_NumBytesWritten(
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);
2218 _id = this->getIdBase() + CHANNELID_NUMBYTESWRITTEN;
2220 this->m_tlmOut_OutputPort[0].invoke(
2228 void DpWriterComponentBase ::
2229 tlmWrite_NumSuccessfulWrites(
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);
2266 _id = this->getIdBase() + CHANNELID_NUMSUCCESSFULWRITES;
2268 this->m_tlmOut_OutputPort[0].invoke(
2276 void DpWriterComponentBase ::
2277 tlmWrite_NumFailedWrites(
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);
2314 _id = this->getIdBase() + CHANNELID_NUMFAILEDWRITES;
2316 this->m_tlmOut_OutputPort[0].invoke(
2324 void DpWriterComponentBase ::
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);
2362 _id = this->getIdBase() + CHANNELID_NUMERRORS;
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;
2419 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2421 if (msgType == DPWRITER_COMPONENT_EXIT) {
2422 return MSG_DISPATCH_EXIT;
2426 deserStatus = msg.deserialize(portNum);
2434 case BUFFERSENDIN_BUFFERSEND: {
2437 deserStatus = msg.deserialize(fwBuffer);
2443 this->bufferSendIn_handler(
2452 case SCHEDIN_SCHED: {
2455 deserStatus = msg.deserialize(context);
2461 this->schedIn_handler(
2470 case CMD_CLEAR_EVENT_THROTTLE: {
2473 deserStatus = msg.deserialize(opCode);
2481 deserStatus = msg.deserialize(cmdSeq);
2489 deserStatus = msg.deserialize(args);
2500#if FW_CMD_CHECK_RESIDUAL
2502 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2511 this->CLEAR_EVENT_THROTTLE_cmdHandler(opCode, cmdSeq);
2517 return MSG_DISPATCH_ERROR;
2520 return MSG_DISPATCH_OK;
2527 void DpWriterComponentBase ::
2537 DpWriterComponentBase* compPtr =
static_cast<DpWriterComponentBase*
>(callComp);
2539 const U32 idBase = callComp->
getIdBase();
2543 switch (opCode - idBase) {
2544 case OPCODE_CLEAR_EVENT_THROTTLE: {
2545 compPtr->CLEAR_EVENT_THROTTLE_cmdHandlerBase(
2559 void DpWriterComponentBase ::
2560 m_p_bufferSendIn_in(
2567 DpWriterComponentBase* compPtr =
static_cast<DpWriterComponentBase*
>(callComp);
2568 compPtr->bufferSendIn_handlerBase(
2574 void DpWriterComponentBase ::
2582 DpWriterComponentBase* compPtr =
static_cast<DpWriterComponentBase*
>(callComp);
2583 compPtr->schedIn_handlerBase(
#define FW_MIN(a, b)
MIN macro.
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)/*#en...
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ WARNING_HI
A serious but recoverable event.
@ ACTIVITY_LO
Less important informational events.
void init()
Object initializer.
const char * toChar() const
NATIVE_UINT_TYPE SizeType
void resetDeser()
reset deserialization to beginning
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
virtual const CHAR * toChar() const =0
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
Status
status returned from the queue send function
@ OP_OK
message sent/received okay
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.