11#if FW_ENABLE_TEXT_LOGGING
20 BUFFERSENDIN_BUFFERSEND,
42 class ComponentIpcSerializableBuffer :
57 return sizeof(m_buff);
64 const U8* getBuffAddr()
const {
70 U8 m_buff[SERIALIZATION_SIZE];
79 void BufferLoggerComponentBase ::
91 port < static_cast<PlatformIntType>(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
108 char portName[2*FW_OBJ_NAME_MAX_SIZE];
116 this->m_cmdIn_InputPort[port].setObjName(portName);
123 port < static_cast<PlatformIntType>(this->getNum_bufferSendIn_InputPorts());
126 this->m_bufferSendIn_InputPort[port].init();
127 this->m_bufferSendIn_InputPort[port].addCallComp(
131 this->m_bufferSendIn_InputPort[port].setPortNum(port);
133#if FW_OBJECT_NAMES == 1
140 char portName[2*FW_OBJ_NAME_MAX_SIZE];
148 this->m_bufferSendIn_InputPort[port].setObjName(portName);
155 port < static_cast<PlatformIntType>(this->getNum_comIn_InputPorts());
158 this->m_comIn_InputPort[port].init();
159 this->m_comIn_InputPort[port].addCallComp(
163 this->m_comIn_InputPort[port].setPortNum(port);
165#if FW_OBJECT_NAMES == 1
172 char portName[2*FW_OBJ_NAME_MAX_SIZE];
180 this->m_comIn_InputPort[port].setObjName(portName);
187 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
190 this->m_pingIn_InputPort[port].init();
191 this->m_pingIn_InputPort[port].addCallComp(
195 this->m_pingIn_InputPort[port].setPortNum(port);
197#if FW_OBJECT_NAMES == 1
204 char portName[2*FW_OBJ_NAME_MAX_SIZE];
212 this->m_pingIn_InputPort[port].setObjName(portName);
219 port < static_cast<PlatformIntType>(this->getNum_schedIn_InputPorts());
222 this->m_schedIn_InputPort[port].init();
223 this->m_schedIn_InputPort[port].addCallComp(
227 this->m_schedIn_InputPort[port].setPortNum(port);
229#if FW_OBJECT_NAMES == 1
236 char portName[2*FW_OBJ_NAME_MAX_SIZE];
244 this->m_schedIn_InputPort[port].setObjName(portName);
251 port < static_cast<PlatformIntType>(this->getNum_cmdRegOut_OutputPorts());
254 this->m_cmdRegOut_OutputPort[port].init();
256#if FW_OBJECT_NAMES == 1
263 char portName[2*FW_OBJ_NAME_MAX_SIZE];
271 this->m_cmdRegOut_OutputPort[port].setObjName(portName);
278 port < static_cast<PlatformIntType>(this->getNum_cmdResponseOut_OutputPorts());
281 this->m_cmdResponseOut_OutputPort[port].init();
283#if FW_OBJECT_NAMES == 1
290 char portName[2*FW_OBJ_NAME_MAX_SIZE];
298 this->m_cmdResponseOut_OutputPort[port].setObjName(portName);
305 port < static_cast<PlatformIntType>(this->getNum_eventOut_OutputPorts());
308 this->m_eventOut_OutputPort[port].init();
310#if FW_OBJECT_NAMES == 1
317 char portName[2*FW_OBJ_NAME_MAX_SIZE];
325 this->m_eventOut_OutputPort[port].setObjName(portName);
329#if FW_ENABLE_TEXT_LOGGING == 1
333 port < static_cast<PlatformIntType>(this->getNum_eventOutText_OutputPorts());
336 this->m_eventOutText_OutputPort[port].init();
338#if FW_OBJECT_NAMES == 1
345 char portName[2*FW_OBJ_NAME_MAX_SIZE];
353 this->m_eventOutText_OutputPort[port].setObjName(portName);
361 port < static_cast<PlatformIntType>(this->getNum_timeCaller_OutputPorts());
364 this->m_timeCaller_OutputPort[port].init();
366#if FW_OBJECT_NAMES == 1
373 char portName[2*FW_OBJ_NAME_MAX_SIZE];
381 this->m_timeCaller_OutputPort[port].setObjName(portName);
388 port < static_cast<PlatformIntType>(this->getNum_tlmOut_OutputPorts());
391 this->m_tlmOut_OutputPort[port].init();
393#if FW_OBJECT_NAMES == 1
400 char portName[2*FW_OBJ_NAME_MAX_SIZE];
408 this->m_tlmOut_OutputPort[port].setObjName(portName);
415 port < static_cast<PlatformIntType>(this->getNum_bufferSendOut_OutputPorts());
418 this->m_bufferSendOut_OutputPort[port].init();
420#if FW_OBJECT_NAMES == 1
427 char portName[2*FW_OBJ_NAME_MAX_SIZE];
435 this->m_bufferSendOut_OutputPort[port].setObjName(portName);
442 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
445 this->m_pingOut_OutputPort[port].init();
447#if FW_OBJECT_NAMES == 1
454 char portName[2*FW_OBJ_NAME_MAX_SIZE];
462 this->m_pingOut_OutputPort[port].setObjName(portName);
468 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
79 void BufferLoggerComponentBase :: {
…}
484 portNum < this->getNum_cmdIn_InputPorts(),
488 return &this->m_cmdIn_InputPort[portNum];
499 portNum < this->getNum_bufferSendIn_InputPorts(),
503 return &this->m_bufferSendIn_InputPort[portNum];
510 portNum < this->getNum_comIn_InputPorts(),
514 return &this->m_comIn_InputPort[portNum];
521 portNum < this->getNum_pingIn_InputPorts(),
525 return &this->m_pingIn_InputPort[portNum];
532 portNum < this->getNum_schedIn_InputPorts(),
536 return &this->m_schedIn_InputPort[portNum];
543 void BufferLoggerComponentBase ::
544 set_cmdRegOut_OutputPort(
550 portNum < this->getNum_cmdRegOut_OutputPorts(),
554 this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
543 void BufferLoggerComponentBase :: {
…}
557 void BufferLoggerComponentBase ::
558 set_cmdResponseOut_OutputPort(
564 portNum < this->getNum_cmdResponseOut_OutputPorts(),
568 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
557 void BufferLoggerComponentBase :: {
…}
571 void BufferLoggerComponentBase ::
572 set_eventOut_OutputPort(
578 portNum < this->getNum_eventOut_OutputPorts(),
582 this->m_eventOut_OutputPort[portNum].addCallPort(port);
571 void BufferLoggerComponentBase :: {
…}
585#if FW_ENABLE_TEXT_LOGGING == 1
587 void BufferLoggerComponentBase ::
588 set_eventOutText_OutputPort(
594 portNum < this->getNum_eventOutText_OutputPorts(),
598 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
603 void BufferLoggerComponentBase ::
604 set_timeCaller_OutputPort(
610 portNum < this->getNum_timeCaller_OutputPorts(),
614 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
603 void BufferLoggerComponentBase :: {
…}
617 void BufferLoggerComponentBase ::
618 set_tlmOut_OutputPort(
624 portNum < this->getNum_tlmOut_OutputPorts(),
628 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
617 void BufferLoggerComponentBase :: {
…}
635 void BufferLoggerComponentBase ::
636 set_bufferSendOut_OutputPort(
642 portNum < this->getNum_bufferSendOut_OutputPorts(),
646 this->m_bufferSendOut_OutputPort[portNum].addCallPort(port);
635 void BufferLoggerComponentBase :: {
…}
649 void BufferLoggerComponentBase ::
650 set_pingOut_OutputPort(
656 portNum < this->getNum_pingOut_OutputPorts(),
660 this->m_pingOut_OutputPort[portNum].addCallPort(port);
649 void BufferLoggerComponentBase :: {
…}
663#if FW_PORT_SERIALIZATION
669 void BufferLoggerComponentBase ::
670 set_cmdRegOut_OutputPort(
672 Fw::InputSerializePort* port
676 portNum < this->getNum_cmdRegOut_OutputPorts(),
680 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
683 void BufferLoggerComponentBase ::
684 set_cmdResponseOut_OutputPort(
686 Fw::InputSerializePort* port
690 portNum < this->getNum_cmdResponseOut_OutputPorts(),
694 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
697 void BufferLoggerComponentBase ::
698 set_eventOut_OutputPort(
700 Fw::InputSerializePort* port
704 portNum < this->getNum_eventOut_OutputPorts(),
708 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
711#if FW_ENABLE_TEXT_LOGGING == 1
713 void BufferLoggerComponentBase ::
714 set_eventOutText_OutputPort(
716 Fw::InputSerializePort* port
720 portNum < this->getNum_eventOutText_OutputPorts(),
724 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
729 void BufferLoggerComponentBase ::
730 set_timeCaller_OutputPort(
732 Fw::InputSerializePort* port
736 portNum < this->getNum_timeCaller_OutputPorts(),
740 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
743 void BufferLoggerComponentBase ::
744 set_tlmOut_OutputPort(
746 Fw::InputSerializePort* port
750 portNum < this->getNum_tlmOut_OutputPorts(),
754 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
759#if FW_PORT_SERIALIZATION
765 void BufferLoggerComponentBase ::
766 set_bufferSendOut_OutputPort(
768 Fw::InputSerializePort* port
772 portNum < this->getNum_bufferSendOut_OutputPorts(),
776 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
779 void BufferLoggerComponentBase ::
780 set_pingOut_OutputPort(
782 Fw::InputSerializePort* port
786 portNum < this->getNum_pingOut_OutputPorts(),
790 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
799 void BufferLoggerComponentBase ::
802 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
804 this->m_cmdRegOut_OutputPort[0].invoke(
805 this->getIdBase() + OPCODE_BL_OPENFILE
808 this->m_cmdRegOut_OutputPort[0].invoke(
809 this->getIdBase() + OPCODE_BL_CLOSEFILE
812 this->m_cmdRegOut_OutputPort[0].invoke(
813 this->getIdBase() + OPCODE_BL_SETLOGGING
816 this->m_cmdRegOut_OutputPort[0].invoke(
817 this->getIdBase() + OPCODE_BL_FLUSHFILE
799 void BufferLoggerComponentBase :: {
…}
825 BufferLoggerComponentBase ::
826 BufferLoggerComponentBase(
const char* compName) :
827 Fw::ActiveComponentBase(compName)
825 BufferLoggerComponentBase :: {
…}
832 BufferLoggerComponentBase ::
833 ~BufferLoggerComponentBase()
832 BufferLoggerComponentBase :: {
…}
843 getNum_cmdIn_InputPorts()
const
853 getNum_bufferSendIn_InputPorts()
const
859 getNum_comIn_InputPorts()
const
865 getNum_pingIn_InputPorts()
const
871 getNum_schedIn_InputPorts()
const
881 getNum_cmdRegOut_OutputPorts()
const
887 getNum_cmdResponseOut_OutputPorts()
const
893 getNum_eventOut_OutputPorts()
const
898#if FW_ENABLE_TEXT_LOGGING == 1
901 getNum_eventOutText_OutputPorts()
const
909 getNum_timeCaller_OutputPorts()
const
915 getNum_tlmOut_OutputPorts()
const
925 getNum_bufferSendOut_OutputPorts()
const
931 getNum_pingOut_OutputPorts()
const
940 bool BufferLoggerComponentBase ::
944 portNum < this->getNum_cmdRegOut_OutputPorts(),
948 return this->m_cmdRegOut_OutputPort[portNum].isConnected();
940 bool BufferLoggerComponentBase :: {
…}
951 bool BufferLoggerComponentBase ::
955 portNum < this->getNum_cmdResponseOut_OutputPorts(),
959 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
951 bool BufferLoggerComponentBase :: {
…}
962 bool BufferLoggerComponentBase ::
966 portNum < this->getNum_eventOut_OutputPorts(),
970 return this->m_eventOut_OutputPort[portNum].isConnected();
962 bool BufferLoggerComponentBase :: {
…}
973#if FW_ENABLE_TEXT_LOGGING == 1
975 bool BufferLoggerComponentBase ::
979 portNum < this->getNum_eventOutText_OutputPorts(),
983 return this->m_eventOutText_OutputPort[portNum].isConnected();
988 bool BufferLoggerComponentBase ::
992 portNum < this->getNum_timeCaller_OutputPorts(),
996 return this->m_timeCaller_OutputPort[portNum].isConnected();
988 bool BufferLoggerComponentBase :: {
…}
999 bool BufferLoggerComponentBase ::
1003 portNum < this->getNum_tlmOut_OutputPorts(),
1007 return this->m_tlmOut_OutputPort[portNum].isConnected();
999 bool BufferLoggerComponentBase :: {
…}
1014 bool BufferLoggerComponentBase ::
1018 portNum < this->getNum_bufferSendOut_OutputPorts(),
1022 return this->m_bufferSendOut_OutputPort[portNum].isConnected();
1014 bool BufferLoggerComponentBase :: {
…}
1025 bool BufferLoggerComponentBase ::
1029 portNum < this->getNum_pingOut_OutputPorts(),
1033 return this->m_pingOut_OutputPort[portNum].isConnected();
1025 bool BufferLoggerComponentBase :: {
…}
1042 void BufferLoggerComponentBase ::
1043 bufferSendIn_handlerBase(
1050 portNum < this->getNum_bufferSendIn_InputPorts(),
1055 bufferSendIn_preMsgHook(
1059 ComponentIpcSerializableBuffer msg;
1063 _status = msg.serialize(
1072 _status = msg.serialize(portNum);
1079 _status = msg.serialize(fwBuffer);
1042 void BufferLoggerComponentBase :: {
…}
1095 void BufferLoggerComponentBase ::
1104 portNum < this->getNum_comIn_InputPorts(),
1114 ComponentIpcSerializableBuffer msg;
1118 _status = msg.serialize(
1127 _status = msg.serialize(portNum);
1134 _status = msg.serialize(data);
1141 _status = msg.serialize(context);
1095 void BufferLoggerComponentBase :: {
…}
1157 void BufferLoggerComponentBase ::
1165 portNum < this->getNum_pingIn_InputPorts(),
1174 ComponentIpcSerializableBuffer msg;
1178 _status = msg.serialize(
1187 _status = msg.serialize(portNum);
1194 _status = msg.serialize(key);
1157 void BufferLoggerComponentBase :: {
…}
1210 void BufferLoggerComponentBase ::
1211 schedIn_handlerBase(
1218 portNum < this->getNum_schedIn_InputPorts(),
1227 ComponentIpcSerializableBuffer msg;
1231 _status = msg.serialize(
1240 _status = msg.serialize(portNum);
1247 _status = msg.serialize(context);
1210 void BufferLoggerComponentBase :: {
…}
1271 void BufferLoggerComponentBase ::
1272 bufferSendIn_preMsgHook(
1271 void BufferLoggerComponentBase :: {
…}
1280 void BufferLoggerComponentBase ::
1280 void BufferLoggerComponentBase :: {
…}
1290 void BufferLoggerComponentBase ::
1290 void BufferLoggerComponentBase :: {
…}
1299 void BufferLoggerComponentBase ::
1299 void BufferLoggerComponentBase :: {
…}
1312 void BufferLoggerComponentBase ::
1319 portNum < this->getNum_bufferSendOut_OutputPorts(),
1322 this->m_bufferSendOut_OutputPort[portNum].invoke(
1312 void BufferLoggerComponentBase :: {
…}
1327 void BufferLoggerComponentBase ::
1334 portNum < this->getNum_pingOut_OutputPorts(),
1337 this->m_pingOut_OutputPort[portNum].invoke(
1327 void BufferLoggerComponentBase :: {
…}
1346 void BufferLoggerComponentBase ::
1353 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1354 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1346 void BufferLoggerComponentBase :: {
…}
1363 void BufferLoggerComponentBase ::
1364 BL_OpenFile_cmdHandlerBase(
1371 this->BL_OpenFile_preMsgHook(opCode,cmdSeq);
1375 ComponentIpcSerializableBuffer msg;
1379 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_BL_OPENFILE));
1388 _status = msg.serialize(port);
1394 _status = msg.serialize(opCode);
1400 _status = msg.serialize(cmdSeq);
1406 _status = msg.serialize(args);
1363 void BufferLoggerComponentBase :: {
…}
1422 void BufferLoggerComponentBase ::
1423 BL_CloseFile_cmdHandlerBase(
1430 this->BL_CloseFile_preMsgHook(opCode,cmdSeq);
1434 ComponentIpcSerializableBuffer msg;
1438 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_BL_CLOSEFILE));
1447 _status = msg.serialize(port);
1453 _status = msg.serialize(opCode);
1459 _status = msg.serialize(cmdSeq);
1465 _status = msg.serialize(args);
1422 void BufferLoggerComponentBase :: {
…}
1481 void BufferLoggerComponentBase ::
1482 BL_SetLogging_cmdHandlerBase(
1489 this->BL_SetLogging_preMsgHook(opCode,cmdSeq);
1493 ComponentIpcSerializableBuffer msg;
1497 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_BL_SETLOGGING));
1506 _status = msg.serialize(port);
1512 _status = msg.serialize(opCode);
1518 _status = msg.serialize(cmdSeq);
1524 _status = msg.serialize(args);
1481 void BufferLoggerComponentBase :: {
…}
1540 void BufferLoggerComponentBase ::
1541 BL_FlushFile_cmdHandlerBase(
1548 this->BL_FlushFile_preMsgHook(opCode,cmdSeq);
1552 ComponentIpcSerializableBuffer msg;
1556 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(CMD_BL_FLUSHFILE));
1565 _status = msg.serialize(port);
1571 _status = msg.serialize(opCode);
1577 _status = msg.serialize(cmdSeq);
1583 _status = msg.serialize(args);
1540 void BufferLoggerComponentBase :: {
…}
1607 void BufferLoggerComponentBase ::
1608 BL_OpenFile_preMsgHook(
1607 void BufferLoggerComponentBase :: {
…}
1618 void BufferLoggerComponentBase ::
1619 BL_CloseFile_preMsgHook(
1618 void BufferLoggerComponentBase :: {
…}
1629 void BufferLoggerComponentBase ::
1630 BL_SetLogging_preMsgHook(
1629 void BufferLoggerComponentBase :: {
…}
1640 void BufferLoggerComponentBase ::
1641 BL_FlushFile_preMsgHook(
1640 void BufferLoggerComponentBase :: {
…}
1655 void BufferLoggerComponentBase ::
1660 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1661 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1666 _id = this->getIdBase() + EVENTID_BL_LOGFILECLOSED;
1669 if (this->m_eventOut_OutputPort[0].isConnected()) {
1673#if FW_AMPCS_COMPATIBLE
1682 _status = file.
serialize(_logBuff, 256);
1688 this->m_eventOut_OutputPort[0].invoke(
1697#if FW_ENABLE_TEXT_LOGGING
1698 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1699#if FW_OBJECT_NAMES == 1
1700 const char* _formatString =
1701 "(%s) %s: File %s closed";
1703 const char* _formatString =
1704 "%s: File %s closed";
1716 "BL_LogFileClosed ",
1723 this->m_eventOutText_OutputPort[0].invoke(
1655 void BufferLoggerComponentBase :: {
…}
1733 void BufferLoggerComponentBase ::
1734 log_WARNING_HI_BL_LogFileOpenError(
1741 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1742 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1747 _id = this->getIdBase() + EVENTID_BL_LOGFILEOPENERROR;
1750 if (this->m_eventOut_OutputPort[0].isConnected()) {
1754#if FW_AMPCS_COMPATIBLE
1763#if FW_AMPCS_COMPATIBLE
1766 static_cast<U8>(
sizeof(U32))
1779 _status = file.
serialize(_logBuff, 256);
1785 this->m_eventOut_OutputPort[0].invoke(
1794#if FW_ENABLE_TEXT_LOGGING
1795 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1796#if FW_OBJECT_NAMES == 1
1797 const char* _formatString =
1798 "(%s) %s: Error %" PRIu32
" opening file %s";
1800 const char* _formatString =
1801 "%s: Error %" PRIu32
" opening file %s";
1813 "BL_LogFileOpenError ",
1821 this->m_eventOutText_OutputPort[0].invoke(
1733 void BufferLoggerComponentBase :: {
…}
1831 void BufferLoggerComponentBase ::
1832 log_WARNING_HI_BL_LogFileValidationError(
1839 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1840 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1845 _id = this->getIdBase() + EVENTID_BL_LOGFILEVALIDATIONERROR;
1848 if (this->m_eventOut_OutputPort[0].isConnected()) {
1852#if FW_AMPCS_COMPATIBLE
1861 _status = validationFile.
serialize(_logBuff, 256);
1867#if FW_AMPCS_COMPATIBLE
1870 static_cast<U8>(
sizeof(U32))
1883 this->m_eventOut_OutputPort[0].invoke(
1892#if FW_ENABLE_TEXT_LOGGING
1893 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1894#if FW_OBJECT_NAMES == 1
1895 const char* _formatString =
1896 "(%s) %s: Failed creating validation file %s with status %" PRIu32
"";
1898 const char* _formatString =
1899 "%s: Failed creating validation file %s with status %" PRIu32
"";
1911 "BL_LogFileValidationError ",
1919 this->m_eventOutText_OutputPort[0].invoke(
1831 void BufferLoggerComponentBase :: {
…}
1929 void BufferLoggerComponentBase ::
1930 log_WARNING_HI_BL_LogFileWriteError(
1939 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1940 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1945 _id = this->getIdBase() + EVENTID_BL_LOGFILEWRITEERROR;
1948 if (this->m_eventOut_OutputPort[0].isConnected()) {
1952#if FW_AMPCS_COMPATIBLE
1961#if FW_AMPCS_COMPATIBLE
1964 static_cast<U8>(
sizeof(U32))
1977#if FW_AMPCS_COMPATIBLE
1980 static_cast<U8>(
sizeof(U32))
1987 _status = _logBuff.
serialize(bytesWritten);
1993#if FW_AMPCS_COMPATIBLE
1996 static_cast<U8>(
sizeof(U32))
2003 _status = _logBuff.
serialize(bytesToWrite);
2009 _status = file.
serialize(_logBuff, 256);
2015 this->m_eventOut_OutputPort[0].invoke(
2024#if FW_ENABLE_TEXT_LOGGING
2025 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2026#if FW_OBJECT_NAMES == 1
2027 const char* _formatString =
2028 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
2030 const char* _formatString =
2031 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
2043 "BL_LogFileWriteError ",
2053 this->m_eventOutText_OutputPort[0].invoke(
1929 void BufferLoggerComponentBase :: {
…}
2063 void BufferLoggerComponentBase ::
2064 log_ACTIVITY_LO_BL_Activated()
2068 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2069 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2074 _id = this->getIdBase() + EVENTID_BL_ACTIVATED;
2077 if (this->m_eventOut_OutputPort[0].isConnected()) {
2080#if FW_AMPCS_COMPATIBLE
2090 this->m_eventOut_OutputPort[0].invoke(
2099#if FW_ENABLE_TEXT_LOGGING
2100 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2101#if FW_OBJECT_NAMES == 1
2102 const char* _formatString =
2103 "(%s) %s: Buffer logger was activated";
2105 const char* _formatString =
2106 "%s: Buffer logger was activated";
2124 this->m_eventOutText_OutputPort[0].invoke(
2063 void BufferLoggerComponentBase :: {
…}
2134 void BufferLoggerComponentBase ::
2135 log_ACTIVITY_LO_BL_Deactivated()
2139 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2140 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2145 _id = this->getIdBase() + EVENTID_BL_DEACTIVATED;
2148 if (this->m_eventOut_OutputPort[0].isConnected()) {
2151#if FW_AMPCS_COMPATIBLE
2161 this->m_eventOut_OutputPort[0].invoke(
2170#if FW_ENABLE_TEXT_LOGGING
2171 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2172#if FW_OBJECT_NAMES == 1
2173 const char* _formatString =
2174 "(%s) %s: Buffer logger was deactivated";
2176 const char* _formatString =
2177 "%s: Buffer logger was deactivated";
2195 this->m_eventOutText_OutputPort[0].invoke(
2134 void BufferLoggerComponentBase :: {
…}
2205 void BufferLoggerComponentBase ::
2206 log_WARNING_HI_BL_NoLogFileOpenInitError()
2210 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2211 this->m_timeCaller_OutputPort[0].invoke(_logTime);
2216 _id = this->getIdBase() + EVENTID_BL_NOLOGFILEOPENINITERROR;
2219 if (this->m_eventOut_OutputPort[0].isConnected()) {
2222#if FW_AMPCS_COMPATIBLE
2232 this->m_eventOut_OutputPort[0].invoke(
2241#if FW_ENABLE_TEXT_LOGGING
2242 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2243#if FW_OBJECT_NAMES == 1
2244 const char* _formatString =
2245 "(%s) %s: No log file open command";
2247 const char* _formatString =
2248 "%s: No log file open command";
2260 "BL_NoLogFileOpenInitError "
2266 this->m_eventOutText_OutputPort[0].invoke(
2205 void BufferLoggerComponentBase :: {
…}
2280 void BufferLoggerComponentBase ::
2281 tlmWrite_BufferLogger_NumLoggedBuffers(
2286 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2288 this->m_timeCaller_OutputPort[0].isConnected() &&
2291 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
2303 _id = this->getIdBase() + CHANNELID_BUFFERLOGGER_NUMLOGGEDBUFFERS;
2305 this->m_tlmOut_OutputPort[0].invoke(
2280 void BufferLoggerComponentBase :: {
…}
2320 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2322 this->m_timeCaller_OutputPort[0].invoke(_time);
2337 ComponentIpcSerializableBuffer msg;
2360 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2362 if (msgType == BUFFERLOGGER_COMPONENT_EXIT) {
2363 return MSG_DISPATCH_EXIT;
2367 deserStatus = msg.deserialize(portNum);
2375 case BUFFERSENDIN_BUFFERSEND: {
2378 deserStatus = msg.deserialize(fwBuffer);
2384 this->bufferSendIn_handler(
2396 deserStatus = msg.deserialize(data);
2404 deserStatus = msg.deserialize(context);
2410 this->comIn_handler(
2423 deserStatus = msg.deserialize(key);
2429 this->pingIn_handler(
2438 case SCHEDIN_SCHED: {
2441 deserStatus = msg.deserialize(context);
2447 this->schedIn_handler(
2456 case CMD_BL_OPENFILE: {
2459 deserStatus = msg.deserialize(opCode);
2467 deserStatus = msg.deserialize(cmdSeq);
2475 deserStatus = msg.deserialize(args);
2488 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2489 this->cmdResponse_out(
2501#if FW_CMD_CHECK_RESIDUAL
2503 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2512 this->BL_OpenFile_cmdHandler(
2521 case CMD_BL_CLOSEFILE: {
2524 deserStatus = msg.deserialize(opCode);
2532 deserStatus = msg.deserialize(cmdSeq);
2540 deserStatus = msg.deserialize(args);
2551#if FW_CMD_CHECK_RESIDUAL
2553 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2562 this->BL_CloseFile_cmdHandler(opCode, cmdSeq);
2568 case CMD_BL_SETLOGGING: {
2571 deserStatus = msg.deserialize(opCode);
2579 deserStatus = msg.deserialize(cmdSeq);
2587 deserStatus = msg.deserialize(args);
2600 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2601 this->cmdResponse_out(
2613#if FW_CMD_CHECK_RESIDUAL
2615 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2624 this->BL_SetLogging_cmdHandler(
2633 case CMD_BL_FLUSHFILE: {
2636 deserStatus = msg.deserialize(opCode);
2644 deserStatus = msg.deserialize(cmdSeq);
2652 deserStatus = msg.deserialize(args);
2663#if FW_CMD_CHECK_RESIDUAL
2665 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2674 this->BL_FlushFile_cmdHandler(opCode, cmdSeq);
2680 return MSG_DISPATCH_ERROR;
2683 return MSG_DISPATCH_OK;
2690 void BufferLoggerComponentBase ::
2700 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2702 const U32 idBase = callComp->
getIdBase();
2703 FW_ASSERT(opCode >= idBase, opCode, idBase);
2706 switch (opCode - idBase) {
2707 case OPCODE_BL_OPENFILE: {
2708 compPtr->BL_OpenFile_cmdHandlerBase(
2716 case OPCODE_BL_CLOSEFILE: {
2717 compPtr->BL_CloseFile_cmdHandlerBase(
2725 case OPCODE_BL_SETLOGGING: {
2726 compPtr->BL_SetLogging_cmdHandlerBase(
2734 case OPCODE_BL_FLUSHFILE: {
2735 compPtr->BL_FlushFile_cmdHandlerBase(
2749 void BufferLoggerComponentBase ::
2750 m_p_bufferSendIn_in(
2757 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2758 compPtr->bufferSendIn_handlerBase(
2764 void BufferLoggerComponentBase ::
2773 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2774 compPtr->comIn_handlerBase(
2781 void BufferLoggerComponentBase ::
2789 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2790 compPtr->pingIn_handlerBase(
2796 void BufferLoggerComponentBase ::
2804 BufferLoggerComponentBase* compPtr =
static_cast<BufferLoggerComponentBase*
>(callComp);
2805 compPtr->schedIn_handlerBase(
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
PlatformUIntType NATIVE_UINT_TYPE
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ 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.
const char * toChar() const override
SerializeStatus serialize(SerializeBufferBase &buffer) const override
serialization function
void init()
Object initializer.
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
void resetDeser()
reset deserialization to beginning
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
@ QUEUE_OK
message sent/received okay
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.