10#if FW_ENABLE_TEXT_LOGGING
19 BUFFERSENDIN_BUFFERSEND,
41 class ComponentIpcSerializableBuffer :
51 MAX_DATA_SIZE =
sizeof(BuffUnion),
53 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
57 return sizeof(m_buff);
64 const U8* getBuffAddr()
const {
70 U8 m_buff[SERIALIZATION_SIZE];
79 void BufferLoggerComponentBase ::
91 port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
94 this->m_cmdIn_InputPort[port].init();
95 this->m_cmdIn_InputPort[port].addCallComp(
99 this->m_cmdIn_InputPort[port].setPortNum(port);
101#if FW_OBJECT_NAMES == 1
105 this->m_objName.toChar(),
108 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
115 port < static_cast<FwIndexType>(this->getNum_bufferSendIn_InputPorts());
118 this->m_bufferSendIn_InputPort[port].init();
119 this->m_bufferSendIn_InputPort[port].addCallComp(
123 this->m_bufferSendIn_InputPort[port].setPortNum(port);
125#if FW_OBJECT_NAMES == 1
129 this->m_objName.toChar(),
132 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
139 port < static_cast<FwIndexType>(this->getNum_comIn_InputPorts());
142 this->m_comIn_InputPort[port].init();
143 this->m_comIn_InputPort[port].addCallComp(
147 this->m_comIn_InputPort[port].setPortNum(port);
149#if FW_OBJECT_NAMES == 1
153 this->m_objName.toChar(),
156 this->m_comIn_InputPort[port].setObjName(portName.
toChar());
163 port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
166 this->m_pingIn_InputPort[port].init();
167 this->m_pingIn_InputPort[port].addCallComp(
171 this->m_pingIn_InputPort[port].setPortNum(port);
173#if FW_OBJECT_NAMES == 1
177 this->m_objName.toChar(),
180 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
187 port < static_cast<FwIndexType>(this->getNum_schedIn_InputPorts());
190 this->m_schedIn_InputPort[port].init();
191 this->m_schedIn_InputPort[port].addCallComp(
195 this->m_schedIn_InputPort[port].setPortNum(port);
197#if FW_OBJECT_NAMES == 1
201 this->m_objName.toChar(),
204 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
211 port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
214 this->m_cmdRegOut_OutputPort[port].init();
216#if FW_OBJECT_NAMES == 1
220 this->m_objName.toChar(),
223 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
230 port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
233 this->m_cmdResponseOut_OutputPort[port].init();
235#if FW_OBJECT_NAMES == 1
239 this->m_objName.toChar(),
242 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
249 port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
252 this->m_eventOut_OutputPort[port].init();
254#if FW_OBJECT_NAMES == 1
258 this->m_objName.toChar(),
261 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
265#if FW_ENABLE_TEXT_LOGGING == 1
269 port < static_cast<FwIndexType>(this->getNum_eventOutText_OutputPorts());
272 this->m_eventOutText_OutputPort[port].init();
274#if FW_OBJECT_NAMES == 1
278 this->m_objName.toChar(),
281 this->m_eventOutText_OutputPort[port].setObjName(portName.
toChar());
289 port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
292 this->m_timeCaller_OutputPort[port].init();
294#if FW_OBJECT_NAMES == 1
298 this->m_objName.toChar(),
301 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
308 port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
311 this->m_tlmOut_OutputPort[port].init();
313#if FW_OBJECT_NAMES == 1
317 this->m_objName.toChar(),
320 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
327 port < static_cast<FwIndexType>(this->getNum_bufferSendOut_OutputPorts());
330 this->m_bufferSendOut_OutputPort[port].init();
332#if FW_OBJECT_NAMES == 1
336 this->m_objName.toChar(),
339 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
346 port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
349 this->m_pingOut_OutputPort[port].init();
351#if FW_OBJECT_NAMES == 1
355 this->m_objName.toChar(),
358 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
365 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
381 portNum < this->getNum_cmdIn_InputPorts(),
385 return &this->m_cmdIn_InputPort[portNum];
396 portNum < this->getNum_bufferSendIn_InputPorts(),
400 return &this->m_bufferSendIn_InputPort[portNum];
407 portNum < this->getNum_comIn_InputPorts(),
411 return &this->m_comIn_InputPort[portNum];
418 portNum < this->getNum_pingIn_InputPorts(),
422 return &this->m_pingIn_InputPort[portNum];
429 portNum < this->getNum_schedIn_InputPorts(),
433 return &this->m_schedIn_InputPort[portNum];
440 void BufferLoggerComponentBase ::
441 set_cmdRegOut_OutputPort(
447 portNum < this->getNum_cmdRegOut_OutputPorts(),
451 this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
454 void BufferLoggerComponentBase ::
455 set_cmdResponseOut_OutputPort(
461 portNum < this->getNum_cmdResponseOut_OutputPorts(),
465 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
468 void BufferLoggerComponentBase ::
469 set_eventOut_OutputPort(
475 portNum < this->getNum_eventOut_OutputPorts(),
479 this->m_eventOut_OutputPort[portNum].addCallPort(port);
482#if FW_ENABLE_TEXT_LOGGING == 1
484 void BufferLoggerComponentBase ::
485 set_eventOutText_OutputPort(
491 portNum < this->getNum_eventOutText_OutputPorts(),
495 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
500 void BufferLoggerComponentBase ::
501 set_timeCaller_OutputPort(
507 portNum < this->getNum_timeCaller_OutputPorts(),
511 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
514 void BufferLoggerComponentBase ::
515 set_tlmOut_OutputPort(
521 portNum < this->getNum_tlmOut_OutputPorts(),
525 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
532 void BufferLoggerComponentBase ::
533 set_bufferSendOut_OutputPort(
539 portNum < this->getNum_bufferSendOut_OutputPorts(),
543 this->m_bufferSendOut_OutputPort[portNum].addCallPort(port);
546 void BufferLoggerComponentBase ::
547 set_pingOut_OutputPort(
553 portNum < this->getNum_pingOut_OutputPorts(),
557 this->m_pingOut_OutputPort[portNum].addCallPort(port);
560#if FW_PORT_SERIALIZATION
566 void BufferLoggerComponentBase ::
567 set_cmdRegOut_OutputPort(
569 Fw::InputSerializePort* port
573 portNum < this->getNum_cmdRegOut_OutputPorts(),
577 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
580 void BufferLoggerComponentBase ::
581 set_cmdResponseOut_OutputPort(
583 Fw::InputSerializePort* port
587 portNum < this->getNum_cmdResponseOut_OutputPorts(),
591 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
594 void BufferLoggerComponentBase ::
595 set_eventOut_OutputPort(
597 Fw::InputSerializePort* port
601 portNum < this->getNum_eventOut_OutputPorts(),
605 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
608#if FW_ENABLE_TEXT_LOGGING == 1
610 void BufferLoggerComponentBase ::
611 set_eventOutText_OutputPort(
613 Fw::InputSerializePort* port
617 portNum < this->getNum_eventOutText_OutputPorts(),
621 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
626 void BufferLoggerComponentBase ::
627 set_timeCaller_OutputPort(
629 Fw::InputSerializePort* port
633 portNum < this->getNum_timeCaller_OutputPorts(),
637 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
640 void BufferLoggerComponentBase ::
641 set_tlmOut_OutputPort(
643 Fw::InputSerializePort* port
647 portNum < this->getNum_tlmOut_OutputPorts(),
651 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
656#if FW_PORT_SERIALIZATION
662 void BufferLoggerComponentBase ::
663 set_bufferSendOut_OutputPort(
665 Fw::InputSerializePort* port
669 portNum < this->getNum_bufferSendOut_OutputPorts(),
673 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
676 void BufferLoggerComponentBase ::
677 set_pingOut_OutputPort(
679 Fw::InputSerializePort* port
683 portNum < this->getNum_pingOut_OutputPorts(),
687 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
696 void BufferLoggerComponentBase ::
699 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
701 this->m_cmdRegOut_OutputPort[0].invoke(
702 this->getIdBase() + OPCODE_BL_OPENFILE
705 this->m_cmdRegOut_OutputPort[0].invoke(
706 this->getIdBase() + OPCODE_BL_CLOSEFILE
709 this->m_cmdRegOut_OutputPort[0].invoke(
710 this->getIdBase() + OPCODE_BL_SETLOGGING
713 this->m_cmdRegOut_OutputPort[0].invoke(
714 this->getIdBase() + OPCODE_BL_FLUSHFILE
722 BufferLoggerComponentBase ::
723 BufferLoggerComponentBase(
const char* compName) :
724 Fw::ActiveComponentBase(compName)
729 BufferLoggerComponentBase ::
730 ~BufferLoggerComponentBase()
740 getNum_cmdIn_InputPorts()
const
750 getNum_bufferSendIn_InputPorts()
const
756 getNum_comIn_InputPorts()
const
762 getNum_pingIn_InputPorts()
const
768 getNum_schedIn_InputPorts()
const
778 getNum_cmdRegOut_OutputPorts()
const
784 getNum_cmdResponseOut_OutputPorts()
const
790 getNum_eventOut_OutputPorts()
const
795#if FW_ENABLE_TEXT_LOGGING == 1
798 getNum_eventOutText_OutputPorts()
const
806 getNum_timeCaller_OutputPorts()
const
812 getNum_tlmOut_OutputPorts()
const
822 getNum_bufferSendOut_OutputPorts()
const
828 getNum_pingOut_OutputPorts()
const
837 bool BufferLoggerComponentBase ::
838 isConnected_cmdRegOut_OutputPort(
FwIndexType portNum)
841 portNum < this->getNum_cmdRegOut_OutputPorts(),
845 return this->m_cmdRegOut_OutputPort[portNum].isConnected();
848 bool BufferLoggerComponentBase ::
849 isConnected_cmdResponseOut_OutputPort(
FwIndexType portNum)
852 portNum < this->getNum_cmdResponseOut_OutputPorts(),
856 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
859 bool BufferLoggerComponentBase ::
860 isConnected_eventOut_OutputPort(
FwIndexType portNum)
863 portNum < this->getNum_eventOut_OutputPorts(),
867 return this->m_eventOut_OutputPort[portNum].isConnected();
870#if FW_ENABLE_TEXT_LOGGING == 1
872 bool BufferLoggerComponentBase ::
873 isConnected_eventOutText_OutputPort(
FwIndexType portNum)
876 portNum < this->getNum_eventOutText_OutputPorts(),
880 return this->m_eventOutText_OutputPort[portNum].isConnected();
885 bool BufferLoggerComponentBase ::
886 isConnected_timeCaller_OutputPort(
FwIndexType portNum)
889 portNum < this->getNum_timeCaller_OutputPorts(),
893 return this->m_timeCaller_OutputPort[portNum].isConnected();
896 bool BufferLoggerComponentBase ::
900 portNum < this->getNum_tlmOut_OutputPorts(),
904 return this->m_tlmOut_OutputPort[portNum].isConnected();
911 bool BufferLoggerComponentBase ::
912 isConnected_bufferSendOut_OutputPort(
FwIndexType portNum)
915 portNum < this->getNum_bufferSendOut_OutputPorts(),
919 return this->m_bufferSendOut_OutputPort[portNum].isConnected();
922 bool BufferLoggerComponentBase ::
923 isConnected_pingOut_OutputPort(
FwIndexType portNum)
926 portNum < this->getNum_pingOut_OutputPorts(),
930 return this->m_pingOut_OutputPort[portNum].isConnected();
939 void BufferLoggerComponentBase ::
940 bufferSendIn_handlerBase(
947 portNum < this->getNum_bufferSendIn_InputPorts(),
952 bufferSendIn_preMsgHook(
956 ComponentIpcSerializableBuffer msg;
960 _status = msg.serialize(
969 _status = msg.serialize(portNum);
976 _status = msg.serialize(fwBuffer);
992 void BufferLoggerComponentBase ::
1001 portNum < this->getNum_comIn_InputPorts(),
1011 ComponentIpcSerializableBuffer msg;
1015 _status = msg.serialize(
1024 _status = msg.serialize(portNum);
1031 _status = msg.serialize(data);
1038 _status = msg.serialize(context);
1054 void BufferLoggerComponentBase ::
1062 portNum < this->getNum_pingIn_InputPorts(),
1071 ComponentIpcSerializableBuffer msg;
1075 _status = msg.serialize(
1084 _status = msg.serialize(portNum);
1091 _status = msg.serialize(key);
1107 void BufferLoggerComponentBase ::
1108 schedIn_handlerBase(
1115 portNum < this->getNum_schedIn_InputPorts(),
1124 ComponentIpcSerializableBuffer msg;
1128 _status = msg.serialize(
1137 _status = msg.serialize(portNum);
1144 _status = msg.serialize(context);
1168 void BufferLoggerComponentBase ::
1169 bufferSendIn_preMsgHook(
1177 void BufferLoggerComponentBase ::
1187 void BufferLoggerComponentBase ::
1196 void BufferLoggerComponentBase ::
1209 void BufferLoggerComponentBase ::
1216 portNum < this->getNum_bufferSendOut_OutputPorts(),
1219 this->m_bufferSendOut_OutputPort[portNum].invoke(
1224 void BufferLoggerComponentBase ::
1231 portNum < this->getNum_pingOut_OutputPorts(),
1234 this->m_pingOut_OutputPort[portNum].invoke(
1243 void BufferLoggerComponentBase ::
1250 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1251 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1260 void BufferLoggerComponentBase ::
1261 BL_OpenFile_cmdHandlerBase(
1268 this->BL_OpenFile_preMsgHook(opCode,cmdSeq);
1272 ComponentIpcSerializableBuffer msg;
1276 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BL_OPENFILE));
1285 _status = msg.serialize(port);
1291 _status = msg.serialize(opCode);
1297 _status = msg.serialize(cmdSeq);
1303 _status = msg.serialize(args);
1319 void BufferLoggerComponentBase ::
1320 BL_CloseFile_cmdHandlerBase(
1327 this->BL_CloseFile_preMsgHook(opCode,cmdSeq);
1331 ComponentIpcSerializableBuffer msg;
1335 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BL_CLOSEFILE));
1344 _status = msg.serialize(port);
1350 _status = msg.serialize(opCode);
1356 _status = msg.serialize(cmdSeq);
1362 _status = msg.serialize(args);
1378 void BufferLoggerComponentBase ::
1379 BL_SetLogging_cmdHandlerBase(
1386 this->BL_SetLogging_preMsgHook(opCode,cmdSeq);
1390 ComponentIpcSerializableBuffer msg;
1394 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BL_SETLOGGING));
1403 _status = msg.serialize(port);
1409 _status = msg.serialize(opCode);
1415 _status = msg.serialize(cmdSeq);
1421 _status = msg.serialize(args);
1437 void BufferLoggerComponentBase ::
1438 BL_FlushFile_cmdHandlerBase(
1445 this->BL_FlushFile_preMsgHook(opCode,cmdSeq);
1449 ComponentIpcSerializableBuffer msg;
1453 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BL_FLUSHFILE));
1462 _status = msg.serialize(port);
1468 _status = msg.serialize(opCode);
1474 _status = msg.serialize(cmdSeq);
1480 _status = msg.serialize(args);
1504 void BufferLoggerComponentBase ::
1505 BL_OpenFile_preMsgHook(
1515 void BufferLoggerComponentBase ::
1516 BL_CloseFile_preMsgHook(
1526 void BufferLoggerComponentBase ::
1527 BL_SetLogging_preMsgHook(
1537 void BufferLoggerComponentBase ::
1538 BL_FlushFile_preMsgHook(
1552 void BufferLoggerComponentBase ::
1553 log_DIAGNOSTIC_BL_LogFileClosed(
const Fw::StringBase& file)
const
1557 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1558 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1563 _id = this->getIdBase() + EVENTID_BL_LOGFILECLOSED;
1566 if (this->m_eventOut_OutputPort[0].isConnected()) {
1570#if FW_AMPCS_COMPATIBLE
1585 this->m_eventOut_OutputPort[0].invoke(
1594#if FW_ENABLE_TEXT_LOGGING
1595 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1596#if FW_OBJECT_NAMES == 1
1597 const char* _formatString =
1598 "(%s) %s: File %s closed";
1600 const char* _formatString =
1601 "%s: File %s closed";
1608 this->m_objName.toChar(),
1610 "BL_LogFileClosed ",
1614 this->m_eventOutText_OutputPort[0].invoke(
1624 void BufferLoggerComponentBase ::
1625 log_WARNING_HI_BL_LogFileOpenError(
1632 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1633 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1638 _id = this->getIdBase() + EVENTID_BL_LOGFILEOPENERROR;
1641 if (this->m_eventOut_OutputPort[0].isConnected()) {
1645#if FW_AMPCS_COMPATIBLE
1654#if FW_AMPCS_COMPATIBLE
1657 static_cast<U8>(
sizeof(U32))
1676 this->m_eventOut_OutputPort[0].invoke(
1685#if FW_ENABLE_TEXT_LOGGING
1686 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1687#if FW_OBJECT_NAMES == 1
1688 const char* _formatString =
1689 "(%s) %s: Error %" PRIu32
" opening file %s";
1691 const char* _formatString =
1692 "%s: Error %" PRIu32
" opening file %s";
1699 this->m_objName.toChar(),
1701 "BL_LogFileOpenError ",
1706 this->m_eventOutText_OutputPort[0].invoke(
1716 void BufferLoggerComponentBase ::
1717 log_WARNING_HI_BL_LogFileValidationError(
1724 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1725 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1730 _id = this->getIdBase() + EVENTID_BL_LOGFILEVALIDATIONERROR;
1733 if (this->m_eventOut_OutputPort[0].isConnected()) {
1737#if FW_AMPCS_COMPATIBLE
1752#if FW_AMPCS_COMPATIBLE
1755 static_cast<U8>(
sizeof(U32))
1768 this->m_eventOut_OutputPort[0].invoke(
1777#if FW_ENABLE_TEXT_LOGGING
1778 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1779#if FW_OBJECT_NAMES == 1
1780 const char* _formatString =
1781 "(%s) %s: Failed creating validation file %s with status %" PRIu32
"";
1783 const char* _formatString =
1784 "%s: Failed creating validation file %s with status %" PRIu32
"";
1791 this->m_objName.toChar(),
1793 "BL_LogFileValidationError ",
1798 this->m_eventOutText_OutputPort[0].invoke(
1808 void BufferLoggerComponentBase ::
1809 log_WARNING_HI_BL_LogFileWriteError(
1818 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1819 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1824 _id = this->getIdBase() + EVENTID_BL_LOGFILEWRITEERROR;
1827 if (this->m_eventOut_OutputPort[0].isConnected()) {
1831#if FW_AMPCS_COMPATIBLE
1840#if FW_AMPCS_COMPATIBLE
1843 static_cast<U8>(
sizeof(U32))
1856#if FW_AMPCS_COMPATIBLE
1859 static_cast<U8>(
sizeof(U32))
1866 _status = _logBuff.
serialize(bytesWritten);
1872#if FW_AMPCS_COMPATIBLE
1875 static_cast<U8>(
sizeof(U32))
1882 _status = _logBuff.
serialize(bytesToWrite);
1894 this->m_eventOut_OutputPort[0].invoke(
1903#if FW_ENABLE_TEXT_LOGGING
1904 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1905#if FW_OBJECT_NAMES == 1
1906 const char* _formatString =
1907 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1909 const char* _formatString =
1910 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1917 this->m_objName.toChar(),
1919 "BL_LogFileWriteError ",
1926 this->m_eventOutText_OutputPort[0].invoke(
1936 void BufferLoggerComponentBase ::
1937 log_ACTIVITY_LO_BL_Activated()
const
1941 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1942 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1947 _id = this->getIdBase() + EVENTID_BL_ACTIVATED;
1950 if (this->m_eventOut_OutputPort[0].isConnected()) {
1953#if FW_AMPCS_COMPATIBLE
1963 this->m_eventOut_OutputPort[0].invoke(
1972#if FW_ENABLE_TEXT_LOGGING
1973 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1974#if FW_OBJECT_NAMES == 1
1975 const char* _formatString =
1976 "(%s) %s: Buffer logger was activated";
1978 const char* _formatString =
1979 "%s: Buffer logger was activated";
1986 this->m_objName.toChar(),
1991 this->m_eventOutText_OutputPort[0].invoke(
2001 void BufferLoggerComponentBase ::
2002 log_ACTIVITY_LO_BL_Deactivated()
const
2006 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2007 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2012 _id = this->getIdBase() + EVENTID_BL_DEACTIVATED;
2015 if (this->m_eventOut_OutputPort[0].isConnected()) {
2018#if FW_AMPCS_COMPATIBLE
2028 this->m_eventOut_OutputPort[0].invoke(
2037#if FW_ENABLE_TEXT_LOGGING
2038 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2039#if FW_OBJECT_NAMES == 1
2040 const char* _formatString =
2041 "(%s) %s: Buffer logger was deactivated";
2043 const char* _formatString =
2044 "%s: Buffer logger was deactivated";
2051 this->m_objName.toChar(),
2056 this->m_eventOutText_OutputPort[0].invoke(
2066 void BufferLoggerComponentBase ::
2067 log_WARNING_HI_BL_NoLogFileOpenInitError()
const
2071 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2072 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2077 _id = this->getIdBase() + EVENTID_BL_NOLOGFILEOPENINITERROR;
2080 if (this->m_eventOut_OutputPort[0].isConnected()) {
2083#if FW_AMPCS_COMPATIBLE
2093 this->m_eventOut_OutputPort[0].invoke(
2102#if FW_ENABLE_TEXT_LOGGING
2103 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2104#if FW_OBJECT_NAMES == 1
2105 const char* _formatString =
2106 "(%s) %s: No log file open command";
2108 const char* _formatString =
2109 "%s: No log file open command";
2116 this->m_objName.toChar(),
2118 "BL_NoLogFileOpenInitError "
2121 this->m_eventOutText_OutputPort[0].invoke(
2135 void BufferLoggerComponentBase ::
2136 tlmWrite_BufferLogger_NumLoggedBuffers(
2141 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2143 this->m_timeCaller_OutputPort[0].isConnected() &&
2146 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2158 _id = this->getIdBase() + CHANNELID_BUFFERLOGGER_NUMLOGGEDBUFFERS;
2160 this->m_tlmOut_OutputPort[0].invoke(
2175 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2177 this->m_timeCaller_OutputPort[0].invoke(_time);
2192 ComponentIpcSerializableBuffer msg;
2215 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2217 if (msgType == BUFFERLOGGER_COMPONENT_EXIT) {
2218 return MSG_DISPATCH_EXIT;
2222 deserStatus = msg.deserialize(portNum);
2230 case BUFFERSENDIN_BUFFERSEND: {
2233 deserStatus = msg.deserialize(fwBuffer);
2239 this->bufferSendIn_handler(
2251 deserStatus = msg.deserialize(data);
2259 deserStatus = msg.deserialize(context);
2265 this->comIn_handler(
2278 deserStatus = msg.deserialize(key);
2284 this->pingIn_handler(
2293 case SCHEDIN_SCHED: {
2296 deserStatus = msg.deserialize(context);
2302 this->schedIn_handler(
2311 case CMD_BL_OPENFILE: {
2314 deserStatus = msg.deserialize(opCode);
2322 deserStatus = msg.deserialize(cmdSeq);
2330 deserStatus = msg.deserialize(args);
2343 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2344 this->cmdResponse_out(
2356#if FW_CMD_CHECK_RESIDUAL
2358 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2367 this->BL_OpenFile_cmdHandler(
2376 case CMD_BL_CLOSEFILE: {
2379 deserStatus = msg.deserialize(opCode);
2387 deserStatus = msg.deserialize(cmdSeq);
2395 deserStatus = msg.deserialize(args);
2406#if FW_CMD_CHECK_RESIDUAL
2408 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2417 this->BL_CloseFile_cmdHandler(opCode, cmdSeq);
2423 case CMD_BL_SETLOGGING: {
2426 deserStatus = msg.deserialize(opCode);
2434 deserStatus = msg.deserialize(cmdSeq);
2442 deserStatus = msg.deserialize(args);
2455 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2456 this->cmdResponse_out(
2468#if FW_CMD_CHECK_RESIDUAL
2470 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2479 this->BL_SetLogging_cmdHandler(
2488 case CMD_BL_FLUSHFILE: {
2491 deserStatus = msg.deserialize(opCode);
2499 deserStatus = msg.deserialize(cmdSeq);
2507 deserStatus = msg.deserialize(args);
2518#if FW_CMD_CHECK_RESIDUAL
2520 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2529 this->BL_FlushFile_cmdHandler(opCode, cmdSeq);
2535 return MSG_DISPATCH_ERROR;
2538 return MSG_DISPATCH_OK;
2545 void BufferLoggerComponentBase ::
2555 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2557 const U32 idBase = callComp->
getIdBase();
2561 switch (opCode - idBase) {
2562 case OPCODE_BL_OPENFILE: {
2563 compPtr->BL_OpenFile_cmdHandlerBase(
2571 case OPCODE_BL_CLOSEFILE: {
2572 compPtr->BL_CloseFile_cmdHandlerBase(
2580 case OPCODE_BL_SETLOGGING: {
2581 compPtr->BL_SetLogging_cmdHandlerBase(
2589 case OPCODE_BL_FLUSHFILE: {
2590 compPtr->BL_FlushFile_cmdHandlerBase(
2604 void BufferLoggerComponentBase ::
2605 m_p_bufferSendIn_in(
2612 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2613 compPtr->bufferSendIn_handlerBase(
2619 void BufferLoggerComponentBase ::
2628 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2629 compPtr->comIn_handlerBase(
2636 void BufferLoggerComponentBase ::
2644 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2645 compPtr->pingIn_handlerBase(
2651 void BufferLoggerComponentBase ::
2659 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2660 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.
@ DIAGNOSTIC
Software diagnostic events.
@ 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 deserialize(U8 &val)
deserialize 8-bit unsigned int
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.