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];
94 this->m_cmdIn_InputPort[port].
init();
99 this->m_cmdIn_InputPort[port].
setPortNum(port);
101 #if FW_OBJECT_NAMES == 1 104 "%s_cmdIn_InputPort[%" PRI_PlatformIntType
"]",
105 this->m_objName.toChar(),
108 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
118 this->m_bufferSendIn_InputPort[port].
init();
123 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
125 #if FW_OBJECT_NAMES == 1 128 "%s_bufferSendIn_InputPort[%" PRI_PlatformIntType
"]",
129 this->m_objName.toChar(),
132 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
142 this->m_comIn_InputPort[port].
init();
147 this->m_comIn_InputPort[port].
setPortNum(port);
149 #if FW_OBJECT_NAMES == 1 152 "%s_comIn_InputPort[%" PRI_PlatformIntType
"]",
153 this->m_objName.toChar(),
156 this->m_comIn_InputPort[port].setObjName(portName.
toChar());
166 this->m_pingIn_InputPort[port].
init();
171 this->m_pingIn_InputPort[port].
setPortNum(port);
173 #if FW_OBJECT_NAMES == 1 176 "%s_pingIn_InputPort[%" PRI_PlatformIntType
"]",
177 this->m_objName.toChar(),
180 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
190 this->m_schedIn_InputPort[port].
init();
195 this->m_schedIn_InputPort[port].
setPortNum(port);
197 #if FW_OBJECT_NAMES == 1 200 "%s_schedIn_InputPort[%" PRI_PlatformIntType
"]",
201 this->m_objName.toChar(),
204 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
214 this->m_cmdRegOut_OutputPort[port].
init();
216 #if FW_OBJECT_NAMES == 1 219 "%s_cmdRegOut_OutputPort[%" PRI_PlatformIntType
"]",
220 this->m_objName.toChar(),
223 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
233 this->m_cmdResponseOut_OutputPort[port].
init();
235 #if FW_OBJECT_NAMES == 1 238 "%s_cmdResponseOut_OutputPort[%" PRI_PlatformIntType
"]",
239 this->m_objName.toChar(),
242 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
252 this->m_eventOut_OutputPort[port].
init();
254 #if FW_OBJECT_NAMES == 1 257 "%s_eventOut_OutputPort[%" PRI_PlatformIntType
"]",
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 277 "%s_eventOutText_OutputPort[%" PRI_PlatformIntType
"]",
278 this->m_objName.toChar(),
281 this->m_eventOutText_OutputPort[port].setObjName(portName.
toChar());
292 this->m_timeCaller_OutputPort[port].
init();
294 #if FW_OBJECT_NAMES == 1 297 "%s_timeCaller_OutputPort[%" PRI_PlatformIntType
"]",
298 this->m_objName.toChar(),
301 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
311 this->m_tlmOut_OutputPort[port].
init();
313 #if FW_OBJECT_NAMES == 1 316 "%s_tlmOut_OutputPort[%" PRI_PlatformIntType
"]",
317 this->m_objName.toChar(),
320 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
330 this->m_bufferSendOut_OutputPort[port].
init();
332 #if FW_OBJECT_NAMES == 1 335 "%s_bufferSendOut_OutputPort[%" PRI_PlatformIntType
"]",
336 this->m_objName.toChar(),
339 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
349 this->m_pingOut_OutputPort[port].
init();
351 #if FW_OBJECT_NAMES == 1 354 "%s_pingOut_OutputPort[%" PRI_PlatformIntType
"]",
355 this->m_objName.toChar(),
358 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
365 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
369 static_cast<FwAssertArgType>(qStat)
382 static_cast<FwAssertArgType>(portNum)
385 return &this->m_cmdIn_InputPort[portNum];
397 static_cast<FwAssertArgType>(portNum)
400 return &this->m_bufferSendIn_InputPort[portNum];
408 static_cast<FwAssertArgType>(portNum)
411 return &this->m_comIn_InputPort[portNum];
419 static_cast<FwAssertArgType>(portNum)
422 return &this->m_pingIn_InputPort[portNum];
430 static_cast<FwAssertArgType>(portNum)
433 return &this->m_schedIn_InputPort[portNum];
448 static_cast<FwAssertArgType>(portNum)
451 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
462 static_cast<FwAssertArgType>(portNum)
465 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
476 static_cast<FwAssertArgType>(portNum)
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(),
492 static_cast<FwAssertArgType>(portNum)
495 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
508 static_cast<FwAssertArgType>(portNum)
511 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
522 static_cast<FwAssertArgType>(portNum)
525 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
540 static_cast<FwAssertArgType>(portNum)
543 this->m_bufferSendOut_OutputPort[portNum].
addCallPort(port);
554 static_cast<FwAssertArgType>(portNum)
557 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
560 #if FW_PORT_SERIALIZATION 569 Fw::InputSerializePort* port
574 static_cast<FwAssertArgType>(portNum)
577 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
583 Fw::InputSerializePort* port
588 static_cast<FwAssertArgType>(portNum)
591 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
597 Fw::InputSerializePort* port
602 static_cast<FwAssertArgType>(portNum)
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(),
618 static_cast<FwAssertArgType>(portNum)
621 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
629 Fw::InputSerializePort* port
634 static_cast<FwAssertArgType>(portNum)
637 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
643 Fw::InputSerializePort* port
648 static_cast<FwAssertArgType>(portNum)
651 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
656 #if FW_PORT_SERIALIZATION 665 Fw::InputSerializePort* port
670 static_cast<FwAssertArgType>(portNum)
673 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
679 Fw::InputSerializePort* port
684 static_cast<FwAssertArgType>(portNum)
687 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
699 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
701 this->m_cmdRegOut_OutputPort[0].
invoke(
705 this->m_cmdRegOut_OutputPort[0].
invoke(
709 this->m_cmdRegOut_OutputPort[0].
invoke(
713 this->m_cmdRegOut_OutputPort[0].
invoke(
724 Fw::ActiveComponentBase(compName)
795 #if FW_ENABLE_TEXT_LOGGING == 1 798 getNum_eventOutText_OutputPorts()
const 842 static_cast<FwAssertArgType>(portNum)
845 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
853 static_cast<FwAssertArgType>(portNum)
856 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
864 static_cast<FwAssertArgType>(portNum)
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(),
877 static_cast<FwAssertArgType>(portNum)
880 return this->m_eventOutText_OutputPort[portNum].isConnected();
890 static_cast<FwAssertArgType>(portNum)
893 return this->m_timeCaller_OutputPort[portNum].
isConnected();
901 static_cast<FwAssertArgType>(portNum)
904 return this->m_tlmOut_OutputPort[portNum].
isConnected();
916 static_cast<FwAssertArgType>(portNum)
919 return this->m_bufferSendOut_OutputPort[portNum].
isConnected();
927 static_cast<FwAssertArgType>(portNum)
930 return this->m_pingOut_OutputPort[portNum].
isConnected();
948 static_cast<FwAssertArgType>(portNum)
956 ComponentIpcSerializableBuffer msg;
960 _status = msg.serialize(
961 static_cast<FwEnumStoreType>(BUFFERSENDIN_BUFFERSEND)
965 static_cast<FwAssertArgType>(_status)
969 _status = msg.serialize(portNum);
972 static_cast<FwAssertArgType>(_status)
976 _status = msg.serialize(fwBuffer);
979 static_cast<FwAssertArgType>(_status)
988 static_cast<FwAssertArgType>(qStatus)
1002 static_cast<FwAssertArgType>(portNum)
1011 ComponentIpcSerializableBuffer msg;
1015 _status = msg.serialize(
1016 static_cast<FwEnumStoreType>(COMIN_COM)
1020 static_cast<FwAssertArgType>(_status)
1024 _status = msg.serialize(portNum);
1027 static_cast<FwAssertArgType>(_status)
1031 _status = msg.serialize(data);
1034 static_cast<FwAssertArgType>(_status)
1038 _status = msg.serialize(context);
1041 static_cast<FwAssertArgType>(_status)
1050 static_cast<FwAssertArgType>(qStatus)
1063 static_cast<FwAssertArgType>(portNum)
1071 ComponentIpcSerializableBuffer msg;
1075 _status = msg.serialize(
1076 static_cast<FwEnumStoreType>(PINGIN_PING)
1080 static_cast<FwAssertArgType>(_status)
1084 _status = msg.serialize(portNum);
1087 static_cast<FwAssertArgType>(_status)
1091 _status = msg.serialize(key);
1094 static_cast<FwAssertArgType>(_status)
1103 static_cast<FwAssertArgType>(qStatus)
1116 static_cast<FwAssertArgType>(portNum)
1124 ComponentIpcSerializableBuffer msg;
1128 _status = msg.serialize(
1129 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1133 static_cast<FwAssertArgType>(_status)
1137 _status = msg.serialize(portNum);
1140 static_cast<FwAssertArgType>(_status)
1144 _status = msg.serialize(context);
1147 static_cast<FwAssertArgType>(_status)
1156 static_cast<FwAssertArgType>(qStatus)
1217 static_cast<FwAssertArgType>(portNum)
1221 this->m_bufferSendOut_OutputPort[portNum].isConnected(),
1222 static_cast<FwAssertArgType>(portNum)
1224 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1237 static_cast<FwAssertArgType>(portNum)
1241 this->m_pingOut_OutputPort[portNum].isConnected(),
1242 static_cast<FwAssertArgType>(portNum)
1244 this->m_pingOut_OutputPort[portNum].
invoke(
1260 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1261 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1282 ComponentIpcSerializableBuffer msg;
1286 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_BL_OPENFILE));
1289 static_cast<FwAssertArgType>(_status)
1295 _status = msg.serialize(port);
1298 static_cast<FwAssertArgType>(_status)
1301 _status = msg.serialize(opCode);
1304 static_cast<FwAssertArgType>(_status)
1307 _status = msg.serialize(cmdSeq);
1310 static_cast<FwAssertArgType>(_status)
1313 _status = msg.serialize(args);
1316 static_cast<FwAssertArgType>(_status)
1325 static_cast<FwAssertArgType>(qStatus)
1341 ComponentIpcSerializableBuffer msg;
1345 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_BL_CLOSEFILE));
1348 static_cast<FwAssertArgType>(_status)
1354 _status = msg.serialize(port);
1357 static_cast<FwAssertArgType>(_status)
1360 _status = msg.serialize(opCode);
1363 static_cast<FwAssertArgType>(_status)
1366 _status = msg.serialize(cmdSeq);
1369 static_cast<FwAssertArgType>(_status)
1372 _status = msg.serialize(args);
1375 static_cast<FwAssertArgType>(_status)
1384 static_cast<FwAssertArgType>(qStatus)
1400 ComponentIpcSerializableBuffer msg;
1404 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_BL_SETLOGGING));
1407 static_cast<FwAssertArgType>(_status)
1413 _status = msg.serialize(port);
1416 static_cast<FwAssertArgType>(_status)
1419 _status = msg.serialize(opCode);
1422 static_cast<FwAssertArgType>(_status)
1425 _status = msg.serialize(cmdSeq);
1428 static_cast<FwAssertArgType>(_status)
1431 _status = msg.serialize(args);
1434 static_cast<FwAssertArgType>(_status)
1443 static_cast<FwAssertArgType>(qStatus)
1459 ComponentIpcSerializableBuffer msg;
1463 _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_BL_FLUSHFILE));
1466 static_cast<FwAssertArgType>(_status)
1472 _status = msg.serialize(port);
1475 static_cast<FwAssertArgType>(_status)
1478 _status = msg.serialize(opCode);
1481 static_cast<FwAssertArgType>(_status)
1484 _status = msg.serialize(cmdSeq);
1487 static_cast<FwAssertArgType>(_status)
1490 _status = msg.serialize(args);
1493 static_cast<FwAssertArgType>(_status)
1502 static_cast<FwAssertArgType>(qStatus)
1567 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1568 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1576 if (this->m_eventOut_OutputPort[0].isConnected()) {
1580 #if FW_AMPCS_COMPATIBLE 1582 _status = _logBuff.
serialize(static_cast<U8>(1));
1585 static_cast<FwAssertArgType>(_status)
1592 static_cast<FwAssertArgType>(_status)
1595 this->m_eventOut_OutputPort[0].
invoke(
1604 #if FW_ENABLE_TEXT_LOGGING 1605 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1606 #if FW_OBJECT_NAMES == 1 1607 const char* _formatString =
1608 "(%s) %s: File %s closed";
1610 const char* _formatString =
1611 "%s: File %s closed";
1618 this->m_objName.toChar(),
1620 "BL_LogFileClosed ",
1624 this->m_eventOutText_OutputPort[0].invoke(
1642 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1643 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1651 if (this->m_eventOut_OutputPort[0].isConnected()) {
1655 #if FW_AMPCS_COMPATIBLE 1657 _status = _logBuff.
serialize(static_cast<U8>(2));
1660 static_cast<FwAssertArgType>(_status)
1664 #if FW_AMPCS_COMPATIBLE 1667 static_cast<U8>(
sizeof(U32))
1671 static_cast<FwAssertArgType>(_status)
1677 static_cast<FwAssertArgType>(_status)
1683 static_cast<FwAssertArgType>(_status)
1686 this->m_eventOut_OutputPort[0].
invoke(
1695 #if FW_ENABLE_TEXT_LOGGING 1696 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1697 #if FW_OBJECT_NAMES == 1 1698 const char* _formatString =
1699 "(%s) %s: Error %" PRIu32
" opening file %s";
1701 const char* _formatString =
1702 "%s: Error %" PRIu32
" opening file %s";
1709 this->m_objName.toChar(),
1711 "BL_LogFileOpenError ",
1716 this->m_eventOutText_OutputPort[0].invoke(
1734 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1735 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1743 if (this->m_eventOut_OutputPort[0].isConnected()) {
1747 #if FW_AMPCS_COMPATIBLE 1749 _status = _logBuff.
serialize(static_cast<U8>(2));
1752 static_cast<FwAssertArgType>(_status)
1759 static_cast<FwAssertArgType>(_status)
1762 #if FW_AMPCS_COMPATIBLE 1765 static_cast<U8>(
sizeof(U32))
1769 static_cast<FwAssertArgType>(_status)
1775 static_cast<FwAssertArgType>(_status)
1778 this->m_eventOut_OutputPort[0].
invoke(
1787 #if FW_ENABLE_TEXT_LOGGING 1788 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1789 #if FW_OBJECT_NAMES == 1 1790 const char* _formatString =
1791 "(%s) %s: Failed creating validation file %s with status %" PRIu32
"";
1793 const char* _formatString =
1794 "%s: Failed creating validation file %s with status %" PRIu32
"";
1801 this->m_objName.toChar(),
1803 "BL_LogFileValidationError ",
1808 this->m_eventOutText_OutputPort[0].invoke(
1828 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1829 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1837 if (this->m_eventOut_OutputPort[0].isConnected()) {
1841 #if FW_AMPCS_COMPATIBLE 1843 _status = _logBuff.
serialize(static_cast<U8>(4));
1846 static_cast<FwAssertArgType>(_status)
1850 #if FW_AMPCS_COMPATIBLE 1853 static_cast<U8>(
sizeof(U32))
1857 static_cast<FwAssertArgType>(_status)
1863 static_cast<FwAssertArgType>(_status)
1866 #if FW_AMPCS_COMPATIBLE 1869 static_cast<U8>(
sizeof(U32))
1873 static_cast<FwAssertArgType>(_status)
1876 _status = _logBuff.
serialize(bytesWritten);
1879 static_cast<FwAssertArgType>(_status)
1882 #if FW_AMPCS_COMPATIBLE 1885 static_cast<U8>(
sizeof(U32))
1889 static_cast<FwAssertArgType>(_status)
1892 _status = _logBuff.
serialize(bytesToWrite);
1895 static_cast<FwAssertArgType>(_status)
1901 static_cast<FwAssertArgType>(_status)
1904 this->m_eventOut_OutputPort[0].
invoke(
1913 #if FW_ENABLE_TEXT_LOGGING 1914 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1915 #if FW_OBJECT_NAMES == 1 1916 const char* _formatString =
1917 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1919 const char* _formatString =
1920 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1927 this->m_objName.toChar(),
1929 "BL_LogFileWriteError ",
1936 this->m_eventOutText_OutputPort[0].invoke(
1951 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1952 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1960 if (this->m_eventOut_OutputPort[0].isConnected()) {
1963 #if FW_AMPCS_COMPATIBLE 1966 _status = _logBuff.
serialize(static_cast<U8>(0));
1969 static_cast<FwAssertArgType>(_status)
1973 this->m_eventOut_OutputPort[0].
invoke(
1982 #if FW_ENABLE_TEXT_LOGGING 1983 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1984 #if FW_OBJECT_NAMES == 1 1985 const char* _formatString =
1986 "(%s) %s: Buffer logger was activated";
1988 const char* _formatString =
1989 "%s: Buffer logger was activated";
1996 this->m_objName.toChar(),
2001 this->m_eventOutText_OutputPort[0].invoke(
2016 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2017 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2025 if (this->m_eventOut_OutputPort[0].isConnected()) {
2028 #if FW_AMPCS_COMPATIBLE 2031 _status = _logBuff.
serialize(static_cast<U8>(0));
2034 static_cast<FwAssertArgType>(_status)
2038 this->m_eventOut_OutputPort[0].
invoke(
2047 #if FW_ENABLE_TEXT_LOGGING 2048 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2049 #if FW_OBJECT_NAMES == 1 2050 const char* _formatString =
2051 "(%s) %s: Buffer logger was deactivated";
2053 const char* _formatString =
2054 "%s: Buffer logger was deactivated";
2061 this->m_objName.toChar(),
2066 this->m_eventOutText_OutputPort[0].invoke(
2081 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2082 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
2090 if (this->m_eventOut_OutputPort[0].isConnected()) {
2093 #if FW_AMPCS_COMPATIBLE 2096 _status = _logBuff.
serialize(static_cast<U8>(0));
2099 static_cast<FwAssertArgType>(_status)
2103 this->m_eventOut_OutputPort[0].
invoke(
2112 #if FW_ENABLE_TEXT_LOGGING 2113 if (this->m_eventOutText_OutputPort[0].isConnected()) {
2114 #if FW_OBJECT_NAMES == 1 2115 const char* _formatString =
2116 "(%s) %s: No log file open command";
2118 const char* _formatString =
2119 "%s: No log file open command";
2126 this->m_objName.toChar(),
2128 "BL_NoLogFileOpenInitError " 2131 this->m_eventOutText_OutputPort[0].invoke(
2151 if (this->m_tlmOut_OutputPort[0].isConnected()) {
2153 this->m_timeCaller_OutputPort[0].isConnected() &&
2156 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
2163 static_cast<FwAssertArgType>(_stat)
2170 this->m_tlmOut_OutputPort[0].
invoke(
2185 if (this->m_timeCaller_OutputPort[0].isConnected()) {
2187 this->m_timeCaller_OutputPort[0].
invoke(_time);
2202 ComponentIpcSerializableBuffer _msg;
2212 static_cast<FwAssertArgType>(_msgStatus)
2222 static_cast<FwAssertArgType>(_deserStatus)
2225 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2227 if (_msgType == BUFFERLOGGER_COMPONENT_EXIT) {
2232 _deserStatus = _msg.deserialize(portNum);
2235 static_cast<FwAssertArgType>(_deserStatus)
2240 case BUFFERSENDIN_BUFFERSEND: {
2243 _deserStatus = _msg.deserialize(fwBuffer);
2246 static_cast<FwAssertArgType>(_deserStatus)
2261 _deserStatus = _msg.deserialize(data);
2264 static_cast<FwAssertArgType>(_deserStatus)
2269 _deserStatus = _msg.deserialize(context);
2272 static_cast<FwAssertArgType>(_deserStatus)
2288 _deserStatus = _msg.deserialize(key);
2291 static_cast<FwAssertArgType>(_deserStatus)
2303 case SCHEDIN_SCHED: {
2306 _deserStatus = _msg.deserialize(context);
2309 static_cast<FwAssertArgType>(_deserStatus)
2321 case CMD_BL_OPENFILE: {
2324 _deserStatus = _msg.deserialize(_opCode);
2327 static_cast<FwAssertArgType>(_deserStatus)
2332 _deserStatus = _msg.deserialize(_cmdSeq);
2335 static_cast<FwAssertArgType>(_deserStatus)
2340 _deserStatus = _msg.deserialize(args);
2343 static_cast<FwAssertArgType>(_deserStatus)
2353 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2366 #if FW_CMD_CHECK_RESIDUAL 2368 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2386 case CMD_BL_CLOSEFILE: {
2389 _deserStatus = _msg.deserialize(_opCode);
2392 static_cast<FwAssertArgType>(_deserStatus)
2397 _deserStatus = _msg.deserialize(_cmdSeq);
2400 static_cast<FwAssertArgType>(_deserStatus)
2405 _deserStatus = _msg.deserialize(args);
2408 static_cast<FwAssertArgType>(_deserStatus)
2416 #if FW_CMD_CHECK_RESIDUAL 2418 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2433 case CMD_BL_SETLOGGING: {
2436 _deserStatus = _msg.deserialize(_opCode);
2439 static_cast<FwAssertArgType>(_deserStatus)
2444 _deserStatus = _msg.deserialize(_cmdSeq);
2447 static_cast<FwAssertArgType>(_deserStatus)
2452 _deserStatus = _msg.deserialize(args);
2455 static_cast<FwAssertArgType>(_deserStatus)
2465 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2478 #if FW_CMD_CHECK_RESIDUAL 2480 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2498 case CMD_BL_FLUSHFILE: {
2501 _deserStatus = _msg.deserialize(_opCode);
2504 static_cast<FwAssertArgType>(_deserStatus)
2509 _deserStatus = _msg.deserialize(_cmdSeq);
2512 static_cast<FwAssertArgType>(_deserStatus)
2517 _deserStatus = _msg.deserialize(args);
2520 static_cast<FwAssertArgType>(_deserStatus)
2528 #if FW_CMD_CHECK_RESIDUAL 2530 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2555 void BufferLoggerComponentBase ::
2567 const U32 idBase = callComp->
getIdBase();
2568 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
2571 switch (opCode - idBase) {
2573 compPtr->BL_OpenFile_cmdHandlerBase(
2582 compPtr->BL_CloseFile_cmdHandlerBase(
2591 compPtr->BL_SetLogging_cmdHandlerBase(
2600 compPtr->BL_FlushFile_cmdHandlerBase(
2614 void BufferLoggerComponentBase ::
2615 m_p_bufferSendIn_in(
2623 compPtr->bufferSendIn_handlerBase(
2629 void BufferLoggerComponentBase ::
2639 compPtr->comIn_handlerBase(
2646 void BufferLoggerComponentBase ::
2655 compPtr->pingIn_handlerBase(
2661 void BufferLoggerComponentBase ::
2670 compPtr->schedIn_handlerBase(
Serialization/Deserialization operation was successful.
void BL_SetLogging_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void addCallPort(InputTimePort *callPort)
Register an input port.
The Buffer Logger encountered an error writing to a log file.
void regCommands()
Register commands with the Command Dispatcher.
virtual void bufferSendIn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendIn.
Buffer logger was activated.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
Status
status returned from the queue send function
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
virtual void BL_SetLogging_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_SetLogging.
virtual void BL_CloseFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_CloseFile.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
PlatformSizeType FwSizeType
void invoke(U32 key) const
Invoke a port interface.
virtual void BL_SetLogging_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::BufferLogger_LogState state)=0
virtual void BL_OpenFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_OpenFile.
virtual void BL_FlushFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_FlushFile.
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void BL_OpenFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_cmdIn_InputPorts() const
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_tlmOut_OutputPorts() const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
void log_DIAGNOSTIC_BL_LogFileClosed(const Fw::StringBase &file) const
Enum representing a command response.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
PlatformIndexType FwIndexType
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
Os::Queue m_queue
queue object for active component
Software diagnostic events.
Close the currently open log file, if any.
Channel ID for BufferLogger_NumLoggedBuffers.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
The Buffer Logger encountered an error writing a validation file.
void init()
Object initializer.
SerializeStatus
forward declaration for string
virtual void comIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
Sets the volatile logging state.
FwIndexType getNum_bufferSendOut_OutputPorts() const
Message will block until space is available.
void log_WARNING_HI_BL_LogFileOpenError(U32 errornum, const Fw::StringBase &file) const
void log_ACTIVITY_LO_BL_Activated() const
Open a new log file with specified name; also resets unique file counter to 0.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum)
virtual void comIn_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port comIn.
FwIndexType getNum_cmdRegOut_OutputPorts() const
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
void set_bufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOut[portNum].
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
message to exit active component task
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
The Buffer Logger closed a log file.
#define FW_MIN(a, b)
MIN macro.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
void init()
Initialization function.
void tlmWrite_BufferLogger_NumLoggedBuffers(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port interface.
virtual void BL_FlushFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
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 addCallPort(InputPingPort *callPort)
Register an input port.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
void BL_CloseFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
FwIndexType getNum_eventOut_OutputPorts() const
void log_WARNING_HI_BL_LogFileWriteError(U32 errornum, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file) const
BufferLoggerComponentBase(const char *compName="")
Construct BufferLoggerComponentBase object.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void resetDeser()
reset deserialization to beginning
A serious but recoverable event.
Errors dispatching messages.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
uint8_t U8
8-bit unsigned integer
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
FwIndexType getNum_bufferSendIn_InputPorts() const
FwIndexType getNum_schedIn_InputPorts() const
void log_ACTIVITY_LO_BL_Deactivated() const
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
Command failed to deserialize.
The Buffer Logger encountered an error opening a log file.
void init()
Initialization function.
void comIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Flushes the current open log file to disk; a no-op with fprime's unbuffered file I/O, so always returns success.
PlatformQueuePriorityType FwQueuePriorityType
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferSendOut.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
A message was sent requesting an exit of the loop.
virtual ~BufferLoggerComponentBase()
Destroy BufferLoggerComponentBase object.
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
void init()
Initialization function.
message sent/received okay
No log file open command was received by BufferLogger.
FwIndexType getNum_cmdResponseOut_OutputPorts() const
FwIndexType getNum_comIn_InputPorts() const
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
void BL_FlushFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
Message will return with status when space is unavailable.
void log_WARNING_HI_BL_NoLogFileOpenInitError() const
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void init()
Initialization function.
FwIndexType getNum_pingOut_OutputPorts() const
virtual void BL_CloseFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
virtual void BL_OpenFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &file)=0
FwIndexType getNum_pingIn_InputPorts() const
Buffer logger was deactivated.
#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.
void log_WARNING_HI_BL_LogFileValidationError(const Fw::StringBase &validationFile, U32 status) const
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
FwIndexType getNum_timeCaller_OutputPorts() const