9 #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
56 ComponentIpcSerializableBuffer() :
Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
62 U8 m_buff[SERIALIZATION_SIZE];
80 #if !FW_DIRECT_PORT_CALLS 87 this->m_cmdIn_InputPort[port].
init();
92 this->m_cmdIn_InputPort[port].
setPortNum(port);
94 #if FW_OBJECT_NAMES == 1 98 this->m_objName.toChar(),
101 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
106 #if !FW_DIRECT_PORT_CALLS 113 this->m_bufferSendIn_InputPort[port].
init();
118 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
120 #if FW_OBJECT_NAMES == 1 124 this->m_objName.toChar(),
127 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
132 #if !FW_DIRECT_PORT_CALLS 139 this->m_comIn_InputPort[port].
init();
144 this->m_comIn_InputPort[port].
setPortNum(port);
146 #if FW_OBJECT_NAMES == 1 150 this->m_objName.toChar(),
153 this->m_comIn_InputPort[port].setObjName(portName.
toChar());
158 #if !FW_DIRECT_PORT_CALLS 165 this->m_pingIn_InputPort[port].
init();
170 this->m_pingIn_InputPort[port].
setPortNum(port);
172 #if FW_OBJECT_NAMES == 1 176 this->m_objName.toChar(),
179 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
184 #if !FW_DIRECT_PORT_CALLS 191 this->m_schedIn_InputPort[port].
init();
196 this->m_schedIn_InputPort[port].
setPortNum(port);
198 #if FW_OBJECT_NAMES == 1 202 this->m_objName.toChar(),
205 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
210 #if !FW_DIRECT_PORT_CALLS 217 this->m_cmdRegOut_OutputPort[port].
init();
219 #if FW_OBJECT_NAMES == 1 223 this->m_objName.toChar(),
226 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
231 #if !FW_DIRECT_PORT_CALLS 238 this->m_cmdResponseOut_OutputPort[port].
init();
240 #if FW_OBJECT_NAMES == 1 244 this->m_objName.toChar(),
247 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
252 #if !FW_DIRECT_PORT_CALLS 259 this->m_eventOut_OutputPort[port].
init();
261 #if FW_OBJECT_NAMES == 1 265 this->m_objName.toChar(),
268 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
273 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 277 port < static_cast<FwIndexType>(this->getNum_eventOutText_OutputPorts());
280 this->m_eventOutText_OutputPort[port].
init();
282 #if FW_OBJECT_NAMES == 1 286 this->m_objName.toChar(),
289 this->m_eventOutText_OutputPort[port].setObjName(portName.
toChar());
294 #if !FW_DIRECT_PORT_CALLS 301 this->m_timeCaller_OutputPort[port].
init();
303 #if FW_OBJECT_NAMES == 1 307 this->m_objName.toChar(),
310 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
315 #if !FW_DIRECT_PORT_CALLS 322 this->m_tlmOut_OutputPort[port].
init();
324 #if FW_OBJECT_NAMES == 1 328 this->m_objName.toChar(),
331 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
336 #if !FW_DIRECT_PORT_CALLS 343 this->m_bufferSendOut_OutputPort[port].
init();
345 #if FW_OBJECT_NAMES == 1 349 this->m_objName.toChar(),
352 this->m_bufferSendOut_OutputPort[port].setObjName(portName.
toChar());
357 #if !FW_DIRECT_PORT_CALLS 364 this->m_pingOut_OutputPort[port].
init();
366 #if FW_OBJECT_NAMES == 1 370 this->m_objName.toChar(),
373 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
381 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
385 static_cast<FwAssertArgType>(qStat)
389 #if !FW_DIRECT_PORT_CALLS 400 static_cast<FwAssertArgType>(portNum)
403 return &this->m_cmdIn_InputPort[portNum];
408 #if !FW_DIRECT_PORT_CALLS 419 static_cast<FwAssertArgType>(portNum)
422 return &this->m_bufferSendIn_InputPort[portNum];
430 static_cast<FwAssertArgType>(portNum)
433 return &this->m_comIn_InputPort[portNum];
441 static_cast<FwAssertArgType>(portNum)
444 return &this->m_pingIn_InputPort[portNum];
452 static_cast<FwAssertArgType>(portNum)
455 return &this->m_schedIn_InputPort[portNum];
460 #if !FW_DIRECT_PORT_CALLS 474 static_cast<FwAssertArgType>(portNum)
477 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
488 static_cast<FwAssertArgType>(portNum)
491 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
502 static_cast<FwAssertArgType>(portNum)
505 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
508 #if FW_ENABLE_TEXT_LOGGING == 1 510 void BufferLoggerComponentBase ::
511 set_eventOutText_OutputPort(
517 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
518 static_cast<FwAssertArgType>(portNum)
521 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
534 static_cast<FwAssertArgType>(portNum)
537 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
548 static_cast<FwAssertArgType>(portNum)
551 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
556 #if !FW_DIRECT_PORT_CALLS 570 static_cast<FwAssertArgType>(portNum)
573 this->m_bufferSendOut_OutputPort[portNum].
addCallPort(port);
584 static_cast<FwAssertArgType>(portNum)
587 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
592 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 601 Fw::InputSerializePort* port
606 static_cast<FwAssertArgType>(portNum)
609 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
615 Fw::InputSerializePort* port
620 static_cast<FwAssertArgType>(portNum)
623 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
629 Fw::InputSerializePort* port
634 static_cast<FwAssertArgType>(portNum)
637 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
640 #if FW_ENABLE_TEXT_LOGGING == 1 642 void BufferLoggerComponentBase ::
643 set_eventOutText_OutputPort(
645 Fw::InputSerializePort* port
649 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
650 static_cast<FwAssertArgType>(portNum)
653 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
661 Fw::InputSerializePort* port
666 static_cast<FwAssertArgType>(portNum)
669 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
675 Fw::InputSerializePort* port
680 static_cast<FwAssertArgType>(portNum)
683 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
688 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 697 Fw::InputSerializePort* port
702 static_cast<FwAssertArgType>(portNum)
705 this->m_bufferSendOut_OutputPort[portNum].registerSerialPort(port);
711 Fw::InputSerializePort* port
716 static_cast<FwAssertArgType>(portNum)
719 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
760 Fw::ActiveComponentBase(compName)
771 #if !FW_DIRECT_PORT_CALLS 782 static_cast<FwAssertArgType>(portNum)
785 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
793 static_cast<FwAssertArgType>(portNum)
796 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
804 static_cast<FwAssertArgType>(portNum)
807 return this->m_eventOut_OutputPort[portNum].
isConnected();
810 #if FW_ENABLE_TEXT_LOGGING == 1 812 bool BufferLoggerComponentBase ::
813 isConnected_eventOutText_OutputPort(
FwIndexType portNum)
const 816 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
817 static_cast<FwAssertArgType>(portNum)
820 return this->m_eventOutText_OutputPort[portNum].isConnected();
830 static_cast<FwAssertArgType>(portNum)
833 return this->m_timeCaller_OutputPort[portNum].
isConnected();
841 static_cast<FwAssertArgType>(portNum)
844 return this->m_tlmOut_OutputPort[portNum].
isConnected();
849 #if !FW_DIRECT_PORT_CALLS 860 static_cast<FwAssertArgType>(portNum)
863 return this->m_bufferSendOut_OutputPort[portNum].
isConnected();
871 static_cast<FwAssertArgType>(portNum)
874 return this->m_pingOut_OutputPort[portNum].
isConnected();
895 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
898 switch (opCode - idBase) {
955 static_cast<FwAssertArgType>(portNum)
963 ComponentIpcSerializableBuffer msg;
967 _status = msg.serializeFrom(
968 static_cast<FwEnumStoreType>(BUFFERSENDIN_BUFFERSEND)
972 static_cast<FwAssertArgType>(_status)
976 _status = msg.serializeFrom(portNum);
979 static_cast<FwAssertArgType>(_status)
983 _status = msg.serializeFrom(fwBuffer);
986 static_cast<FwAssertArgType>(_status)
995 static_cast<FwAssertArgType>(qStatus)
1009 static_cast<FwAssertArgType>(portNum)
1018 ComponentIpcSerializableBuffer msg;
1022 _status = msg.serializeFrom(
1023 static_cast<FwEnumStoreType>(COMIN_COM)
1027 static_cast<FwAssertArgType>(_status)
1031 _status = msg.serializeFrom(portNum);
1034 static_cast<FwAssertArgType>(_status)
1038 _status = msg.serializeFrom(data);
1041 static_cast<FwAssertArgType>(_status)
1045 _status = msg.serializeFrom(context);
1048 static_cast<FwAssertArgType>(_status)
1057 static_cast<FwAssertArgType>(qStatus)
1070 static_cast<FwAssertArgType>(portNum)
1078 ComponentIpcSerializableBuffer msg;
1082 _status = msg.serializeFrom(
1083 static_cast<FwEnumStoreType>(PINGIN_PING)
1087 static_cast<FwAssertArgType>(_status)
1091 _status = msg.serializeFrom(portNum);
1094 static_cast<FwAssertArgType>(_status)
1098 _status = msg.serializeFrom(key);
1101 static_cast<FwAssertArgType>(_status)
1108 if (qStatus == Os::Queue::Status::FULL) {
1115 static_cast<FwAssertArgType>(qStatus)
1128 static_cast<FwAssertArgType>(portNum)
1136 ComponentIpcSerializableBuffer msg;
1140 _status = msg.serializeFrom(
1141 static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1145 static_cast<FwAssertArgType>(_status)
1149 _status = msg.serializeFrom(portNum);
1152 static_cast<FwAssertArgType>(_status)
1156 _status = msg.serializeFrom(context);
1159 static_cast<FwAssertArgType>(_status)
1168 static_cast<FwAssertArgType>(qStatus)
1217 #if !FW_DIRECT_PORT_CALLS 1231 static_cast<FwAssertArgType>(portNum)
1235 this->m_bufferSendOut_OutputPort[portNum].isConnected(),
1236 static_cast<FwAssertArgType>(portNum)
1238 this->m_bufferSendOut_OutputPort[portNum].
invoke(
1251 static_cast<FwAssertArgType>(portNum)
1255 this->m_pingOut_OutputPort[portNum].isConnected(),
1256 static_cast<FwAssertArgType>(portNum)
1258 this->m_pingOut_OutputPort[portNum].
invoke(
1277 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1298 ComponentIpcSerializableBuffer msg;
1302 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_BL_OPENFILE));
1305 static_cast<FwAssertArgType>(_status)
1311 _status = msg.serializeFrom(port);
1314 static_cast<FwAssertArgType>(_status)
1317 _status = msg.serializeFrom(opCode);
1320 static_cast<FwAssertArgType>(_status)
1323 _status = msg.serializeFrom(cmdSeq);
1326 static_cast<FwAssertArgType>(_status)
1329 _status = msg.serializeFrom(args);
1332 static_cast<FwAssertArgType>(_status)
1341 static_cast<FwAssertArgType>(qStatus)
1357 ComponentIpcSerializableBuffer msg;
1361 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_BL_CLOSEFILE));
1364 static_cast<FwAssertArgType>(_status)
1370 _status = msg.serializeFrom(port);
1373 static_cast<FwAssertArgType>(_status)
1376 _status = msg.serializeFrom(opCode);
1379 static_cast<FwAssertArgType>(_status)
1382 _status = msg.serializeFrom(cmdSeq);
1385 static_cast<FwAssertArgType>(_status)
1388 _status = msg.serializeFrom(args);
1391 static_cast<FwAssertArgType>(_status)
1400 static_cast<FwAssertArgType>(qStatus)
1416 ComponentIpcSerializableBuffer msg;
1420 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_BL_SETLOGGING));
1423 static_cast<FwAssertArgType>(_status)
1429 _status = msg.serializeFrom(port);
1432 static_cast<FwAssertArgType>(_status)
1435 _status = msg.serializeFrom(opCode);
1438 static_cast<FwAssertArgType>(_status)
1441 _status = msg.serializeFrom(cmdSeq);
1444 static_cast<FwAssertArgType>(_status)
1447 _status = msg.serializeFrom(args);
1450 static_cast<FwAssertArgType>(_status)
1459 static_cast<FwAssertArgType>(qStatus)
1475 ComponentIpcSerializableBuffer msg;
1479 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_BL_FLUSHFILE));
1482 static_cast<FwAssertArgType>(_status)
1488 _status = msg.serializeFrom(port);
1491 static_cast<FwAssertArgType>(_status)
1494 _status = msg.serializeFrom(opCode);
1497 static_cast<FwAssertArgType>(_status)
1500 _status = msg.serializeFrom(cmdSeq);
1503 static_cast<FwAssertArgType>(_status)
1506 _status = msg.serializeFrom(args);
1509 static_cast<FwAssertArgType>(_status)
1518 static_cast<FwAssertArgType>(qStatus)
1584 this->timeCaller_out(0, _logTime);
1594 #if FW_AMPCS_COMPATIBLE 1599 static_cast<FwAssertArgType>(_status)
1609 static_cast<FwAssertArgType>(_status)
1622 #if FW_ENABLE_TEXT_LOGGING 1623 if (this->isConnected_eventOutText_OutputPort(0)) {
1624 #if FW_OBJECT_NAMES == 1 1625 const char* _formatString =
1626 "(%s) %s: File %s closed";
1628 const char* _formatString =
1629 "%s: File %s closed";
1633 (void) _logString.
format(
1636 this->m_objName.toChar(),
1638 "BL_LogFileClosed ",
1642 this->eventOutText_out(
1662 this->timeCaller_out(0, _logTime);
1672 #if FW_AMPCS_COMPATIBLE 1677 static_cast<FwAssertArgType>(_status)
1681 #if FW_AMPCS_COMPATIBLE 1684 static_cast<U8>(
sizeof(U32))
1688 static_cast<FwAssertArgType>(_status)
1694 static_cast<FwAssertArgType>(_status)
1703 static_cast<FwAssertArgType>(_status)
1716 #if FW_ENABLE_TEXT_LOGGING 1717 if (this->isConnected_eventOutText_OutputPort(0)) {
1718 #if FW_OBJECT_NAMES == 1 1719 const char* _formatString =
1720 "(%s) %s: Error %" PRIu32
" opening file %s";
1722 const char* _formatString =
1723 "%s: Error %" PRIu32
" opening file %s";
1727 (void) _logString.
format(
1730 this->m_objName.toChar(),
1732 "BL_LogFileOpenError ",
1737 this->eventOutText_out(
1757 this->timeCaller_out(0, _logTime);
1767 #if FW_AMPCS_COMPATIBLE 1772 static_cast<FwAssertArgType>(_status)
1782 static_cast<FwAssertArgType>(_status)
1785 #if FW_AMPCS_COMPATIBLE 1788 static_cast<U8>(
sizeof(U32))
1792 static_cast<FwAssertArgType>(_status)
1798 static_cast<FwAssertArgType>(_status)
1811 #if FW_ENABLE_TEXT_LOGGING 1812 if (this->isConnected_eventOutText_OutputPort(0)) {
1813 #if FW_OBJECT_NAMES == 1 1814 const char* _formatString =
1815 "(%s) %s: Failed creating validation file %s with status %" PRIu32
"";
1817 const char* _formatString =
1818 "%s: Failed creating validation file %s with status %" PRIu32
"";
1822 (void) _logString.
format(
1825 this->m_objName.toChar(),
1827 "BL_LogFileValidationError ",
1832 this->eventOutText_out(
1854 this->timeCaller_out(0, _logTime);
1864 #if FW_AMPCS_COMPATIBLE 1869 static_cast<FwAssertArgType>(_status)
1873 #if FW_AMPCS_COMPATIBLE 1876 static_cast<U8>(
sizeof(U32))
1880 static_cast<FwAssertArgType>(_status)
1886 static_cast<FwAssertArgType>(_status)
1889 #if FW_AMPCS_COMPATIBLE 1892 static_cast<U8>(
sizeof(U32))
1896 static_cast<FwAssertArgType>(_status)
1902 static_cast<FwAssertArgType>(_status)
1905 #if FW_AMPCS_COMPATIBLE 1908 static_cast<U8>(
sizeof(U32))
1912 static_cast<FwAssertArgType>(_status)
1918 static_cast<FwAssertArgType>(_status)
1927 static_cast<FwAssertArgType>(_status)
1940 #if FW_ENABLE_TEXT_LOGGING 1941 if (this->isConnected_eventOutText_OutputPort(0)) {
1942 #if FW_OBJECT_NAMES == 1 1943 const char* _formatString =
1944 "(%s) %s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1946 const char* _formatString =
1947 "%s: Error %" PRIu32
" while writing %" PRIu32
" of %" PRIu32
" bytes to %s";
1951 (void) _logString.
format(
1954 this->m_objName.toChar(),
1956 "BL_LogFileWriteError ",
1963 this->eventOutText_out(
1980 this->timeCaller_out(0, _logTime);
1989 #if FW_AMPCS_COMPATIBLE 1995 static_cast<FwAssertArgType>(_status)
2009 #if FW_ENABLE_TEXT_LOGGING 2010 if (this->isConnected_eventOutText_OutputPort(0)) {
2011 #if FW_OBJECT_NAMES == 1 2012 const char* _formatString =
2013 "(%s) %s: Buffer logger was activated";
2015 const char* _formatString =
2016 "%s: Buffer logger was activated";
2020 (void) _logString.
format(
2023 this->m_objName.toChar(),
2028 this->eventOutText_out(
2045 this->timeCaller_out(0, _logTime);
2054 #if FW_AMPCS_COMPATIBLE 2060 static_cast<FwAssertArgType>(_status)
2074 #if FW_ENABLE_TEXT_LOGGING 2075 if (this->isConnected_eventOutText_OutputPort(0)) {
2076 #if FW_OBJECT_NAMES == 1 2077 const char* _formatString =
2078 "(%s) %s: Buffer logger was deactivated";
2080 const char* _formatString =
2081 "%s: Buffer logger was deactivated";
2085 (void) _logString.
format(
2088 this->m_objName.toChar(),
2093 this->eventOutText_out(
2110 this->timeCaller_out(0, _logTime);
2119 #if FW_AMPCS_COMPATIBLE 2125 static_cast<FwAssertArgType>(_status)
2139 #if FW_ENABLE_TEXT_LOGGING 2140 if (this->isConnected_eventOutText_OutputPort(0)) {
2141 #if FW_OBJECT_NAMES == 1 2142 const char* _formatString =
2143 "(%s) %s: No log file open command";
2145 const char* _formatString =
2146 "%s: No log file open command";
2150 (void) _logString.
format(
2153 this->m_objName.toChar(),
2155 "BL_NoLogFileOpenInitError " 2158 this->eventOutText_out(
2175 this->timeCaller_out(0, _logTime);
2185 #if FW_AMPCS_COMPATIBLE 2190 static_cast<FwAssertArgType>(_status)
2194 #if FW_AMPCS_COMPATIBLE 2201 static_cast<FwAssertArgType>(_status)
2207 static_cast<FwAssertArgType>(_status)
2220 #if FW_ENABLE_TEXT_LOGGING 2221 if (this->isConnected_eventOutText_OutputPort(0)) {
2222 #if FW_OBJECT_NAMES == 1 2223 const char* _formatString =
2224 "(%s) %s: Error %s formatting log file name";
2226 const char* _formatString =
2227 "%s: Error %s formatting log file name";
2231 status.toString(statusStr);
2234 (void) _logString.
format(
2237 this->m_objName.toChar(),
2239 "BL_LogFileNameError ",
2243 this->eventOutText_out(
2270 this->timeCaller_out(0, _tlmTime);
2300 static_cast<FwAssertArgType>(_stat)
2320 this->timeCaller_out(0, _time);
2335 ComponentIpcSerializableBuffer _msg;
2345 static_cast<FwAssertArgType>(_msgStatus)
2355 static_cast<FwAssertArgType>(_deserStatus)
2358 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2360 if (_msgType == BUFFERLOGGER_COMPONENT_EXIT) {
2365 _deserStatus = _msg.deserializeTo(portNum);
2368 static_cast<FwAssertArgType>(_deserStatus)
2373 case BUFFERSENDIN_BUFFERSEND: {
2376 _deserStatus = _msg.deserializeTo(fwBuffer);
2379 static_cast<FwAssertArgType>(_deserStatus)
2394 _deserStatus = _msg.deserializeTo(data);
2397 static_cast<FwAssertArgType>(_deserStatus)
2402 _deserStatus = _msg.deserializeTo(context);
2405 static_cast<FwAssertArgType>(_deserStatus)
2421 _deserStatus = _msg.deserializeTo(key);
2424 static_cast<FwAssertArgType>(_deserStatus)
2436 case SCHEDIN_SCHED: {
2439 _deserStatus = _msg.deserializeTo(context);
2442 static_cast<FwAssertArgType>(_deserStatus)
2454 case CMD_BL_OPENFILE: {
2457 _deserStatus = _msg.deserializeTo(_opCode);
2460 static_cast<FwAssertArgType>(_deserStatus)
2465 _deserStatus = _msg.deserializeTo(_cmdSeq);
2468 static_cast<FwAssertArgType>(_deserStatus)
2473 _deserStatus = _msg.deserializeTo(args);
2476 static_cast<FwAssertArgType>(_deserStatus)
2499 #if FW_CMD_CHECK_RESIDUAL 2519 case CMD_BL_CLOSEFILE: {
2522 _deserStatus = _msg.deserializeTo(_opCode);
2525 static_cast<FwAssertArgType>(_deserStatus)
2530 _deserStatus = _msg.deserializeTo(_cmdSeq);
2533 static_cast<FwAssertArgType>(_deserStatus)
2538 _deserStatus = _msg.deserializeTo(args);
2541 static_cast<FwAssertArgType>(_deserStatus)
2549 #if FW_CMD_CHECK_RESIDUAL 2566 case CMD_BL_SETLOGGING: {
2569 _deserStatus = _msg.deserializeTo(_opCode);
2572 static_cast<FwAssertArgType>(_deserStatus)
2577 _deserStatus = _msg.deserializeTo(_cmdSeq);
2580 static_cast<FwAssertArgType>(_deserStatus)
2585 _deserStatus = _msg.deserializeTo(args);
2588 static_cast<FwAssertArgType>(_deserStatus)
2611 #if FW_CMD_CHECK_RESIDUAL 2631 case CMD_BL_FLUSHFILE: {
2634 _deserStatus = _msg.deserializeTo(_opCode);
2637 static_cast<FwAssertArgType>(_deserStatus)
2642 _deserStatus = _msg.deserializeTo(_cmdSeq);
2645 static_cast<FwAssertArgType>(_deserStatus)
2650 _deserStatus = _msg.deserializeTo(args);
2653 static_cast<FwAssertArgType>(_deserStatus)
2661 #if FW_CMD_CHECK_RESIDUAL 2688 void BufferLoggerComponentBase ::
2699 compPtr->cmdIn_handlerBase(
2711 void BufferLoggerComponentBase ::
2712 m_p_bufferSendIn_in(
2720 compPtr->bufferSendIn_handlerBase(
2726 void BufferLoggerComponentBase ::
2736 compPtr->comIn_handlerBase(
2743 void BufferLoggerComponentBase ::
2752 compPtr->pingIn_handlerBase(
2758 void BufferLoggerComponentBase ::
2767 compPtr->schedIn_handlerBase(
2773 #if !FW_DIRECT_PORT_CALLS 2779 void BufferLoggerComponentBase ::
2787 static_cast<FwAssertArgType>(portNum)
2791 this->m_cmdRegOut_OutputPort[portNum].isConnected(),
2792 static_cast<FwAssertArgType>(portNum)
2794 this->m_cmdRegOut_OutputPort[portNum].
invoke(
2799 void BufferLoggerComponentBase ::
2809 static_cast<FwAssertArgType>(portNum)
2813 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
2814 static_cast<FwAssertArgType>(portNum)
2816 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
2823 void BufferLoggerComponentBase ::
2834 static_cast<FwAssertArgType>(portNum)
2838 this->m_eventOut_OutputPort[portNum].isConnected(),
2839 static_cast<FwAssertArgType>(portNum)
2841 this->m_eventOut_OutputPort[portNum].
invoke(
2849 #if FW_ENABLE_TEXT_LOGGING 2851 void BufferLoggerComponentBase ::
2861 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
2862 static_cast<FwAssertArgType>(portNum)
2866 this->m_eventOutText_OutputPort[portNum].isConnected(),
2867 static_cast<FwAssertArgType>(portNum)
2869 this->m_eventOutText_OutputPort[portNum].invoke(
2879 void BufferLoggerComponentBase ::
2887 static_cast<FwAssertArgType>(portNum)
2891 this->m_timeCaller_OutputPort[portNum].isConnected(),
2892 static_cast<FwAssertArgType>(portNum)
2894 this->m_timeCaller_OutputPort[portNum].
invoke(
2899 void BufferLoggerComponentBase ::
2909 static_cast<FwAssertArgType>(portNum)
2913 this->m_tlmOut_OutputPort[portNum].isConnected(),
2914 static_cast<FwAssertArgType>(portNum)
2916 this->m_tlmOut_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
void BL_SetLogging_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
The Buffer Logger encountered an error opening a log file.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void addCallPort(InputTimePort *callPort)
Register an input port.
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.
static constexpr FwSizeType CAPACITY
FwIdType FwOpcodeType
The type of a command opcode.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
static constexpr FwIndexType getNum_pingIn_InputPorts()
Status
status returned from the queue send function
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
virtual void BL_SetLogging_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_SetLogging.
static constexpr FwSizeType CAPACITY
virtual void BL_CloseFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_CloseFile.
void invoke(U32 key) const
Invoke a port connection.
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
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.
Open a new log file with specified name; also resets unique file counter to 0.
void BL_OpenFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Buffer logger was deactivated.
Sets the volatile logging state.
void init()
Initialization function.
void log_DIAGNOSTIC_BL_LogFileClosed(const Fw::StringBase &file) const
Enum representing a command response.
No time base has been established (Required)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
The Buffer Logger encountered an error writing to a log file.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
The Buffer Logger encountered an error formatting a log file name.
Os::Queue m_queue
queue object for active component
Software diagnostic events.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
void init()
Object initializer.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
SerializeStatus
forward declaration for string
virtual void comIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
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
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
FwIdType FwEventIdType
The type of an event identifier.
virtual void comIn_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port comIn.
static constexpr FwIndexType getNum_schedIn_InputPorts()
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
static constexpr FwSizeType CAPACITY
void set_bufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOut[portNum].
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void init()
Initialization function.
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
static constexpr FwSizeType CAPACITY
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
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 connection.
virtual void BL_FlushFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
Close the currently open log file, if any.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
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
Buffer logger was activated.
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum) const
void BL_CloseFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_BL_LogFileWriteError(U32 errornum, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file) const
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
BufferLoggerComponentBase(const char *compName="")
Construct BufferLoggerComponentBase object.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void log_WARNING_HI_BL_LogFileNameError(const Fw::StringFormatStatus &status) const
A serious but recoverable event.
Errors dispatching messages.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
const char * toChar() const
Convert to a C-style char*.
Enum representing event severity.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferSendOut.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
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.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
uint8_t U8
8-bit unsigned integer
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_ACTIVITY_LO_BL_Deactivated() const
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
virtual void BL_SetLogging_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Svc::BufferLogger_LogState &state)=0
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 connection.
The Buffer Logger closed a log file.
message to exit active component task
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
static constexpr FwIndexType getNum_bufferSendOut_OutputPorts()
A message was sent requesting an exit of the loop.
virtual ~BufferLoggerComponentBase()
Destroy BufferLoggerComponentBase object.
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void addCallPort(InputLogPort *callPort)
Register an input port.
void init()
Initialization function.
void incNumMsgDropped()
increment the number of messages dropped
RateGroupDivider component implementation.
message sent/received okay
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void BL_FlushFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
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.
Implementation of malloc based allocator.
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
void log_WARNING_HI_BL_NoLogFileOpenInitError() const
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_comIn_InputPorts()
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void init()
Initialization function.
virtual void BL_CloseFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Channel ID for BufferLogger_NumLoggedBuffers.
virtual void BL_OpenFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &file)=0
Flushes the current open log file to disk; a no-op with fprime's unbuffered file I/O, so always returns success.
The Buffer Logger encountered an error writing a validation file.
static constexpr FwSizeType CAPACITY
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void log_WARNING_HI_BL_LogFileValidationError(const Fw::StringBase &validationFile, U32 status) const
No log file open command was received by BufferLogger.
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].