9 #if FW_ENABLE_TEXT_LOGGING 19 BUFFERSENDINFILL_BUFFERSEND,
20 BUFFERSENDINRETURN_BUFFERSEND,
37 class ComponentIpcSerializableBuffer :
47 MAX_DATA_SIZE =
sizeof(BuffUnion),
49 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
52 ComponentIpcSerializableBuffer() :
Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
58 U8 m_buff[SERIALIZATION_SIZE];
76 #if !FW_DIRECT_PORT_CALLS 83 this->m_cmdIn_InputPort[port].
init();
88 this->m_cmdIn_InputPort[port].
setPortNum(port);
90 #if FW_OBJECT_NAMES == 1 94 this->m_objName.toChar(),
97 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
102 #if !FW_DIRECT_PORT_CALLS 109 this->m_bufferSendInFill_InputPort[port].
init();
110 this->m_bufferSendInFill_InputPort[port].
addCallComp(
112 m_p_bufferSendInFill_in
114 this->m_bufferSendInFill_InputPort[port].
setPortNum(port);
116 #if FW_OBJECT_NAMES == 1 120 this->m_objName.toChar(),
123 this->m_bufferSendInFill_InputPort[port].setObjName(portName.
toChar());
128 #if !FW_DIRECT_PORT_CALLS 135 this->m_bufferSendInReturn_InputPort[port].
init();
136 this->m_bufferSendInReturn_InputPort[port].
addCallComp(
138 m_p_bufferSendInReturn_in
140 this->m_bufferSendInReturn_InputPort[port].
setPortNum(port);
142 #if FW_OBJECT_NAMES == 1 146 this->m_objName.toChar(),
149 this->m_bufferSendInReturn_InputPort[port].setObjName(portName.
toChar());
154 #if !FW_DIRECT_PORT_CALLS 161 this->m_pingIn_InputPort[port].
init();
166 this->m_pingIn_InputPort[port].
setPortNum(port);
168 #if FW_OBJECT_NAMES == 1 172 this->m_objName.toChar(),
175 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
180 #if !FW_DIRECT_PORT_CALLS 187 this->m_cmdRegOut_OutputPort[port].
init();
189 #if FW_OBJECT_NAMES == 1 193 this->m_objName.toChar(),
196 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
201 #if !FW_DIRECT_PORT_CALLS 208 this->m_cmdResponseOut_OutputPort[port].
init();
210 #if FW_OBJECT_NAMES == 1 214 this->m_objName.toChar(),
217 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
222 #if !FW_DIRECT_PORT_CALLS 229 this->m_eventOut_OutputPort[port].
init();
231 #if FW_OBJECT_NAMES == 1 235 this->m_objName.toChar(),
238 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
243 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 247 port < static_cast<FwIndexType>(this->getNum_eventOutText_OutputPorts());
250 this->m_eventOutText_OutputPort[port].
init();
252 #if FW_OBJECT_NAMES == 1 256 this->m_objName.toChar(),
259 this->m_eventOutText_OutputPort[port].setObjName(portName.
toChar());
264 #if !FW_DIRECT_PORT_CALLS 271 this->m_timeCaller_OutputPort[port].
init();
273 #if FW_OBJECT_NAMES == 1 277 this->m_objName.toChar(),
280 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
285 #if !FW_DIRECT_PORT_CALLS 292 this->m_tlmOut_OutputPort[port].
init();
294 #if FW_OBJECT_NAMES == 1 298 this->m_objName.toChar(),
301 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
306 #if !FW_DIRECT_PORT_CALLS 313 this->m_bufferSendOutDrain_OutputPort[port].
init();
315 #if FW_OBJECT_NAMES == 1 319 this->m_objName.toChar(),
322 this->m_bufferSendOutDrain_OutputPort[port].setObjName(portName.
toChar());
327 #if !FW_DIRECT_PORT_CALLS 334 this->m_bufferSendOutReturn_OutputPort[port].
init();
336 #if FW_OBJECT_NAMES == 1 340 this->m_objName.toChar(),
343 this->m_bufferSendOutReturn_OutputPort[port].setObjName(portName.
toChar());
348 #if !FW_DIRECT_PORT_CALLS 355 this->m_pingOut_OutputPort[port].
init();
357 #if FW_OBJECT_NAMES == 1 361 this->m_objName.toChar(),
364 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
372 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
376 static_cast<FwAssertArgType>(qStat)
380 #if !FW_DIRECT_PORT_CALLS 391 static_cast<FwAssertArgType>(portNum)
394 return &this->m_cmdIn_InputPort[portNum];
399 #if !FW_DIRECT_PORT_CALLS 410 static_cast<FwAssertArgType>(portNum)
413 return &this->m_bufferSendInFill_InputPort[portNum];
421 static_cast<FwAssertArgType>(portNum)
424 return &this->m_bufferSendInReturn_InputPort[portNum];
432 static_cast<FwAssertArgType>(portNum)
435 return &this->m_pingIn_InputPort[portNum];
440 #if !FW_DIRECT_PORT_CALLS 454 static_cast<FwAssertArgType>(portNum)
457 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
468 static_cast<FwAssertArgType>(portNum)
471 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
482 static_cast<FwAssertArgType>(portNum)
485 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
488 #if FW_ENABLE_TEXT_LOGGING == 1 490 void BufferAccumulatorComponentBase ::
491 set_eventOutText_OutputPort(
497 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
498 static_cast<FwAssertArgType>(portNum)
501 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
514 static_cast<FwAssertArgType>(portNum)
517 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
528 static_cast<FwAssertArgType>(portNum)
531 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
536 #if !FW_DIRECT_PORT_CALLS 550 static_cast<FwAssertArgType>(portNum)
553 this->m_bufferSendOutDrain_OutputPort[portNum].
addCallPort(port);
564 static_cast<FwAssertArgType>(portNum)
567 this->m_bufferSendOutReturn_OutputPort[portNum].
addCallPort(port);
578 static_cast<FwAssertArgType>(portNum)
581 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
586 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 595 Fw::InputSerializePort* port
600 static_cast<FwAssertArgType>(portNum)
603 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
609 Fw::InputSerializePort* port
614 static_cast<FwAssertArgType>(portNum)
617 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
623 Fw::InputSerializePort* port
628 static_cast<FwAssertArgType>(portNum)
631 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
634 #if FW_ENABLE_TEXT_LOGGING == 1 636 void BufferAccumulatorComponentBase ::
637 set_eventOutText_OutputPort(
639 Fw::InputSerializePort* port
643 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
644 static_cast<FwAssertArgType>(portNum)
647 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
655 Fw::InputSerializePort* port
660 static_cast<FwAssertArgType>(portNum)
663 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
669 Fw::InputSerializePort* port
674 static_cast<FwAssertArgType>(portNum)
677 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
682 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 691 Fw::InputSerializePort* port
696 static_cast<FwAssertArgType>(portNum)
699 this->m_bufferSendOutDrain_OutputPort[portNum].registerSerialPort(port);
705 Fw::InputSerializePort* port
710 static_cast<FwAssertArgType>(portNum)
713 this->m_bufferSendOutReturn_OutputPort[portNum].registerSerialPort(port);
719 Fw::InputSerializePort* port
724 static_cast<FwAssertArgType>(portNum)
727 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
758 Fw::ActiveComponentBase(compName)
769 #if !FW_DIRECT_PORT_CALLS 780 static_cast<FwAssertArgType>(portNum)
783 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
791 static_cast<FwAssertArgType>(portNum)
794 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
802 static_cast<FwAssertArgType>(portNum)
805 return this->m_eventOut_OutputPort[portNum].
isConnected();
808 #if FW_ENABLE_TEXT_LOGGING == 1 810 bool BufferAccumulatorComponentBase ::
811 isConnected_eventOutText_OutputPort(
FwIndexType portNum)
const 814 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
815 static_cast<FwAssertArgType>(portNum)
818 return this->m_eventOutText_OutputPort[portNum].isConnected();
828 static_cast<FwAssertArgType>(portNum)
831 return this->m_timeCaller_OutputPort[portNum].
isConnected();
839 static_cast<FwAssertArgType>(portNum)
842 return this->m_tlmOut_OutputPort[portNum].
isConnected();
847 #if !FW_DIRECT_PORT_CALLS 858 static_cast<FwAssertArgType>(portNum)
861 return this->m_bufferSendOutDrain_OutputPort[portNum].
isConnected();
869 static_cast<FwAssertArgType>(portNum)
872 return this->m_bufferSendOutReturn_OutputPort[portNum].
isConnected();
880 static_cast<FwAssertArgType>(portNum)
883 return this->m_pingOut_OutputPort[portNum].
isConnected();
904 FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
907 switch (opCode - idBase) {
946 static_cast<FwAssertArgType>(portNum)
954 ComponentIpcSerializableBuffer msg;
958 _status = msg.serializeFrom(
959 static_cast<FwEnumStoreType>(BUFFERSENDINFILL_BUFFERSEND)
963 static_cast<FwAssertArgType>(_status)
967 _status = msg.serializeFrom(portNum);
970 static_cast<FwAssertArgType>(_status)
974 _status = msg.serializeFrom(fwBuffer);
977 static_cast<FwAssertArgType>(_status)
986 static_cast<FwAssertArgType>(qStatus)
999 static_cast<FwAssertArgType>(portNum)
1007 ComponentIpcSerializableBuffer msg;
1011 _status = msg.serializeFrom(
1012 static_cast<FwEnumStoreType>(BUFFERSENDINRETURN_BUFFERSEND)
1016 static_cast<FwAssertArgType>(_status)
1020 _status = msg.serializeFrom(portNum);
1023 static_cast<FwAssertArgType>(_status)
1027 _status = msg.serializeFrom(fwBuffer);
1030 static_cast<FwAssertArgType>(_status)
1039 static_cast<FwAssertArgType>(qStatus)
1052 static_cast<FwAssertArgType>(portNum)
1060 ComponentIpcSerializableBuffer msg;
1064 _status = msg.serializeFrom(
1065 static_cast<FwEnumStoreType>(PINGIN_PING)
1069 static_cast<FwAssertArgType>(_status)
1073 _status = msg.serializeFrom(portNum);
1076 static_cast<FwAssertArgType>(_status)
1080 _status = msg.serializeFrom(key);
1083 static_cast<FwAssertArgType>(_status)
1090 if (qStatus == Os::Queue::Status::FULL) {
1097 static_cast<FwAssertArgType>(qStatus)
1136 #if !FW_DIRECT_PORT_CALLS 1150 static_cast<FwAssertArgType>(portNum)
1154 this->m_bufferSendOutDrain_OutputPort[portNum].isConnected(),
1155 static_cast<FwAssertArgType>(portNum)
1157 this->m_bufferSendOutDrain_OutputPort[portNum].
invoke(
1170 static_cast<FwAssertArgType>(portNum)
1174 this->m_bufferSendOutReturn_OutputPort[portNum].isConnected(),
1175 static_cast<FwAssertArgType>(portNum)
1177 this->m_bufferSendOutReturn_OutputPort[portNum].
invoke(
1190 static_cast<FwAssertArgType>(portNum)
1194 this->m_pingOut_OutputPort[portNum].isConnected(),
1195 static_cast<FwAssertArgType>(portNum)
1197 this->m_pingOut_OutputPort[portNum].
invoke(
1216 this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1237 ComponentIpcSerializableBuffer msg;
1241 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_BA_SETMODE));
1244 static_cast<FwAssertArgType>(_status)
1250 _status = msg.serializeFrom(port);
1253 static_cast<FwAssertArgType>(_status)
1256 _status = msg.serializeFrom(opCode);
1259 static_cast<FwAssertArgType>(_status)
1262 _status = msg.serializeFrom(cmdSeq);
1265 static_cast<FwAssertArgType>(_status)
1268 _status = msg.serializeFrom(args);
1271 static_cast<FwAssertArgType>(_status)
1280 static_cast<FwAssertArgType>(qStatus)
1296 ComponentIpcSerializableBuffer msg;
1300 _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_BA_DRAINBUFFERS));
1303 static_cast<FwAssertArgType>(_status)
1309 _status = msg.serializeFrom(port);
1312 static_cast<FwAssertArgType>(_status)
1315 _status = msg.serializeFrom(opCode);
1318 static_cast<FwAssertArgType>(_status)
1321 _status = msg.serializeFrom(cmdSeq);
1324 static_cast<FwAssertArgType>(_status)
1327 _status = msg.serializeFrom(args);
1330 static_cast<FwAssertArgType>(_status)
1339 static_cast<FwAssertArgType>(qStatus)
1383 this->timeCaller_out(0, _logTime);
1392 #if FW_AMPCS_COMPATIBLE 1398 static_cast<FwAssertArgType>(_status)
1412 #if FW_ENABLE_TEXT_LOGGING 1413 if (this->isConnected_eventOutText_OutputPort(0)) {
1414 #if FW_OBJECT_NAMES == 1 1415 const char* _formatString =
1416 "(%s) %s: Buffer accepted";
1418 const char* _formatString =
1419 "%s: Buffer accepted";
1423 (void) _logString.
format(
1426 this->m_objName.toChar(),
1428 "BA_BufferAccepted " 1431 this->eventOutText_out(
1448 this->timeCaller_out(0, _logTime);
1457 #if FW_AMPCS_COMPATIBLE 1463 static_cast<FwAssertArgType>(_status)
1477 #if FW_ENABLE_TEXT_LOGGING 1478 if (this->isConnected_eventOutText_OutputPort(0)) {
1479 #if FW_OBJECT_NAMES == 1 1480 const char* _formatString =
1481 "(%s) %s: Queue full";
1483 const char* _formatString =
1488 (void) _logString.
format(
1491 this->m_objName.toChar(),
1496 this->eventOutText_out(
1516 this->timeCaller_out(0, _logTime);
1526 #if FW_AMPCS_COMPATIBLE 1531 static_cast<FwAssertArgType>(_status)
1535 #if FW_AMPCS_COMPATIBLE 1538 static_cast<U8>(
sizeof(U32))
1542 static_cast<FwAssertArgType>(_status)
1548 static_cast<FwAssertArgType>(_status)
1551 #if FW_AMPCS_COMPATIBLE 1554 static_cast<U8>(
sizeof(U32))
1558 static_cast<FwAssertArgType>(_status)
1564 static_cast<FwAssertArgType>(_status)
1577 #if FW_ENABLE_TEXT_LOGGING 1578 if (this->isConnected_eventOutText_OutputPort(0)) {
1579 #if FW_OBJECT_NAMES == 1 1580 const char* _formatString =
1581 "(%s) %s: Still draining %" PRIu32
" of %" PRIu32
"";
1583 const char* _formatString =
1584 "%s: Still draining %" PRIu32
" of %" PRIu32
"";
1588 (void) _logString.
format(
1591 this->m_objName.toChar(),
1593 "BA_StillDraining ",
1598 this->eventOutText_out(
1615 this->timeCaller_out(0, _logTime);
1624 #if FW_AMPCS_COMPATIBLE 1630 static_cast<FwAssertArgType>(_status)
1644 #if FW_ENABLE_TEXT_LOGGING 1645 if (this->isConnected_eventOutText_OutputPort(0)) {
1646 #if FW_OBJECT_NAMES == 1 1647 const char* _formatString =
1648 "(%s) %s: Already in DRAIN mode";
1650 const char* _formatString =
1651 "%s: Already in DRAIN mode";
1655 (void) _logString.
format(
1658 this->m_objName.toChar(),
1660 "BA_AlreadyDraining " 1663 this->eventOutText_out(
1683 this->timeCaller_out(0, _logTime);
1693 #if FW_AMPCS_COMPATIBLE 1698 static_cast<FwAssertArgType>(_status)
1702 #if FW_AMPCS_COMPATIBLE 1705 static_cast<U8>(
sizeof(U32))
1709 static_cast<FwAssertArgType>(_status)
1715 static_cast<FwAssertArgType>(_status)
1718 #if FW_AMPCS_COMPATIBLE 1721 static_cast<U8>(
sizeof(U32))
1725 static_cast<FwAssertArgType>(_status)
1731 static_cast<FwAssertArgType>(_status)
1744 #if FW_ENABLE_TEXT_LOGGING 1745 if (this->isConnected_eventOutText_OutputPort(0)) {
1746 #if FW_OBJECT_NAMES == 1 1747 const char* _formatString =
1748 "(%s) %s: Drain stalling - only drained %" PRIu32
" of %" PRIu32
"";
1750 const char* _formatString =
1751 "%s: Drain stalling - only drained %" PRIu32
" of %" PRIu32
"";
1755 (void) _logString.
format(
1758 this->m_objName.toChar(),
1765 this->eventOutText_out(
1782 this->timeCaller_out(0, _logTime);
1792 #if FW_AMPCS_COMPATIBLE 1797 static_cast<FwAssertArgType>(_status)
1801 #if FW_AMPCS_COMPATIBLE 1804 static_cast<U8>(
sizeof(U32))
1808 static_cast<FwAssertArgType>(_status)
1814 static_cast<FwAssertArgType>(_status)
1827 #if FW_ENABLE_TEXT_LOGGING 1828 if (this->isConnected_eventOutText_OutputPort(0)) {
1829 #if FW_OBJECT_NAMES == 1 1830 const char* _formatString =
1831 "(%s) %s: Partial drain of %" PRIu32
" finished";
1833 const char* _formatString =
1834 "%s: Partial drain of %" PRIu32
" finished";
1838 (void) _logString.
format(
1841 this->m_objName.toChar(),
1843 "BA_PartialDrainDone ",
1847 this->eventOutText_out(
1867 this->timeCaller_out(0, _logTime);
1877 #if FW_AMPCS_COMPATIBLE 1882 static_cast<FwAssertArgType>(_status)
1886 #if FW_AMPCS_COMPATIBLE 1889 static_cast<U8>(
sizeof(U32))
1893 static_cast<FwAssertArgType>(_status)
1899 static_cast<FwAssertArgType>(_status)
1902 #if FW_AMPCS_COMPATIBLE 1905 static_cast<U8>(
sizeof(U32))
1909 static_cast<FwAssertArgType>(_status)
1915 static_cast<FwAssertArgType>(_status)
1928 #if FW_ENABLE_TEXT_LOGGING 1929 if (this->isConnected_eventOutText_OutputPort(0)) {
1930 #if FW_OBJECT_NAMES == 1 1931 const char* _formatString =
1932 "(%s) %s: Only have %" PRIu32
"; requested drain of %" PRIu32
"";
1934 const char* _formatString =
1935 "%s: Only have %" PRIu32
"; requested drain of %" PRIu32
"";
1939 (void) _logString.
format(
1942 this->m_objName.toChar(),
1944 "BA_NonBlockDrain ",
1949 this->eventOutText_out(
1976 this->timeCaller_out(0, _tlmTime);
2006 static_cast<FwAssertArgType>(_stat)
2026 this->timeCaller_out(0, _time);
2041 ComponentIpcSerializableBuffer _msg;
2051 static_cast<FwAssertArgType>(_msgStatus)
2061 static_cast<FwAssertArgType>(_deserStatus)
2064 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
2066 if (_msgType == BUFFERACCUMULATOR_COMPONENT_EXIT) {
2071 _deserStatus = _msg.deserializeTo(portNum);
2074 static_cast<FwAssertArgType>(_deserStatus)
2079 case BUFFERSENDINFILL_BUFFERSEND: {
2082 _deserStatus = _msg.deserializeTo(fwBuffer);
2085 static_cast<FwAssertArgType>(_deserStatus)
2097 case BUFFERSENDINRETURN_BUFFERSEND: {
2100 _deserStatus = _msg.deserializeTo(fwBuffer);
2103 static_cast<FwAssertArgType>(_deserStatus)
2118 _deserStatus = _msg.deserializeTo(key);
2121 static_cast<FwAssertArgType>(_deserStatus)
2133 case CMD_BA_SETMODE: {
2136 _deserStatus = _msg.deserializeTo(_opCode);
2139 static_cast<FwAssertArgType>(_deserStatus)
2144 _deserStatus = _msg.deserializeTo(_cmdSeq);
2147 static_cast<FwAssertArgType>(_deserStatus)
2152 _deserStatus = _msg.deserializeTo(args);
2155 static_cast<FwAssertArgType>(_deserStatus)
2178 #if FW_CMD_CHECK_RESIDUAL 2198 case CMD_BA_DRAINBUFFERS: {
2201 _deserStatus = _msg.deserializeTo(_opCode);
2204 static_cast<FwAssertArgType>(_deserStatus)
2209 _deserStatus = _msg.deserializeTo(_cmdSeq);
2212 static_cast<FwAssertArgType>(_deserStatus)
2217 _deserStatus = _msg.deserializeTo(args);
2220 static_cast<FwAssertArgType>(_deserStatus)
2258 #if FW_CMD_CHECK_RESIDUAL 2289 void BufferAccumulatorComponentBase ::
2300 compPtr->cmdIn_handlerBase(
2312 void BufferAccumulatorComponentBase ::
2313 m_p_bufferSendInFill_in(
2321 compPtr->bufferSendInFill_handlerBase(
2327 void BufferAccumulatorComponentBase ::
2328 m_p_bufferSendInReturn_in(
2336 compPtr->bufferSendInReturn_handlerBase(
2342 void BufferAccumulatorComponentBase ::
2351 compPtr->pingIn_handlerBase(
2357 #if !FW_DIRECT_PORT_CALLS 2363 void BufferAccumulatorComponentBase ::
2371 static_cast<FwAssertArgType>(portNum)
2375 this->m_cmdRegOut_OutputPort[portNum].isConnected(),
2376 static_cast<FwAssertArgType>(portNum)
2378 this->m_cmdRegOut_OutputPort[portNum].
invoke(
2383 void BufferAccumulatorComponentBase ::
2393 static_cast<FwAssertArgType>(portNum)
2397 this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
2398 static_cast<FwAssertArgType>(portNum)
2400 this->m_cmdResponseOut_OutputPort[portNum].
invoke(
2407 void BufferAccumulatorComponentBase ::
2418 static_cast<FwAssertArgType>(portNum)
2422 this->m_eventOut_OutputPort[portNum].isConnected(),
2423 static_cast<FwAssertArgType>(portNum)
2425 this->m_eventOut_OutputPort[portNum].
invoke(
2433 #if FW_ENABLE_TEXT_LOGGING 2435 void BufferAccumulatorComponentBase ::
2445 (0 <= portNum) && (portNum < this->getNum_eventOutText_OutputPorts()),
2446 static_cast<FwAssertArgType>(portNum)
2450 this->m_eventOutText_OutputPort[portNum].isConnected(),
2451 static_cast<FwAssertArgType>(portNum)
2453 this->m_eventOutText_OutputPort[portNum].invoke(
2463 void BufferAccumulatorComponentBase ::
2471 static_cast<FwAssertArgType>(portNum)
2475 this->m_timeCaller_OutputPort[portNum].isConnected(),
2476 static_cast<FwAssertArgType>(portNum)
2478 this->m_timeCaller_OutputPort[portNum].
invoke(
2483 void BufferAccumulatorComponentBase ::
2493 static_cast<FwAssertArgType>(portNum)
2497 this->m_tlmOut_OutputPort[portNum].isConnected(),
2498 static_cast<FwAssertArgType>(portNum)
2500 this->m_tlmOut_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Drain the commanded number of buffers.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
static constexpr FwSizeType CAPACITY
static constexpr FwIndexType getNum_pingIn_InputPorts()
FwIdType FwOpcodeType
The type of a command opcode.
virtual void bufferSendInReturn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendInReturn.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
FwIdType getIdBase() const
PlatformSizeType FwSizeType
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
void bufferSendOutReturn_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferSendOutReturn.
Status
status returned from the queue send function
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
virtual ~BufferAccumulatorComponentBase()
Destroy BufferAccumulatorComponentBase object.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
static constexpr FwIndexType getNum_bufferSendInReturn_InputPorts()
Got DrainBuffers command while executing DrainBuffers command.
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
static constexpr FwSizeType CAPACITY
void invoke(U32 key) const
Invoke a port connection.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
static constexpr FwIndexType getNum_bufferSendInFill_InputPorts()
void init()
Initialization function.
void log_ACTIVITY_HI_BA_PartialDrainDone(U32 numDrained) const
Enum representing a command response.
void log_ACTIVITY_HI_BA_BufferAccepted() const
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.
BufferAccumulatorComponentBase(const char *compName="")
Construct BufferAccumulatorComponentBase object.
Os::Queue m_queue
queue object for active component
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
SerializeStatus
forward declaration for string
void log_WARNING_LO_BA_NonBlockDrain(U32 numWillDrain, U32 numReqDrain) const
Message will block until space is available.
static constexpr FwIndexType getNum_bufferSendOutDrain_OutputPorts()
FwIdType FwEventIdType
The type of an event identifier.
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
void set_bufferSendOutReturn_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOutReturn[portNum].
static constexpr FwSizeType CAPACITY
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
virtual void BA_SetMode_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Svc::BufferAccumulator_OpState &mode)=0
void log_WARNING_HI_BA_StillDraining(U32 numDrained, U32 numToDrain) const
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void tlmWrite_BA_NumQueuedBuffers(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
virtual void BA_DrainBuffers_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 numToDrain, const Svc::BufferAccumulator_BlockMode &blockMode)=0
A less serious but recoverable event.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
Got DrainBuffers command while in DRAIN mode.
void init()
Initialization function.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
virtual void bufferSendInFill_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendInFill.
void invoke(Fw::Time &time) const
Invoke a port connection.
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
void BA_DrainBuffers_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
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 regCommands()
Register commands with the Command Dispatcher.
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
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
A serious but recoverable event.
void BA_SetMode_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Errors dispatching messages.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
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.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
The Buffer Accumulator instance received a buffer when its queue was full. To avoid uncontrolled send...
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
virtual void BA_DrainBuffers_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BA_DrainBuffers.
uint8_t U8
8-bit unsigned integer
Channel ID for BA_NumQueuedBuffers.
Command failed to deserialize.
void set_bufferSendOutDrain_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOutDrain[portNum].
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Important informational events.
Ran out of buffers while executing DrainBuffers command.
void init()
Initialization function.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
Fw::InputBufferSendPort * get_bufferSendInReturn_InputPort(FwIndexType portNum)
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
message to exit active component task
virtual void bufferSendInFill_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendInFill.
A message was sent requesting an exit of the loop.
void log_WARNING_HI_BA_AlreadyDraining() const
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
PlatformIndexType FwIndexType
void bufferSendOutDrain_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferSendOutDrain.
static constexpr FwIndexType getNum_bufferSendOutReturn_OutputPorts()
The Buffer Accumulator instance accepted and enqueued a buffer. To avoid uncontrolled sending of even...
void addCallPort(InputLogPort *callPort)
Register an input port.
bool isConnected_bufferSendOutReturn_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
Fw::InputBufferSendPort * get_bufferSendInFill_InputPort(FwIndexType portNum)
void init()
Initialization function.
void incNumMsgDropped()
increment the number of messages dropped
void log_WARNING_HI_BA_DrainStalled(U32 numDrained, U32 numToDrain) const
void log_WARNING_HI_BA_QueueFull() const
RateGroupDivider component implementation.
Not enough buffers to complete requested drain, and NOBLOCK was set; will only drain what we have...
message sent/received okay
Finished DrainBuffers command.
virtual void bufferSendInReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendInReturn.
void bufferSendInFill_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendInFill.
Message will return with status when space is unavailable.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
Implementation of malloc based allocator.
bool isConnected_bufferSendOutDrain_OutputPort(FwIndexType portNum) const
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void init()
Initialization function.
void bufferSendInReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendInReturn.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
virtual void BA_SetMode_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BA_SetMode.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]