10#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
53 return sizeof(m_buff);
60 const U8* getBuffAddr()
const {
66 U8 m_buff[SERIALIZATION_SIZE];
75 void BufferAccumulatorComponentBase ::
87 port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
90 this->m_cmdIn_InputPort[port].init();
91 this->m_cmdIn_InputPort[port].addCallComp(
95 this->m_cmdIn_InputPort[port].setPortNum(port);
97#if FW_OBJECT_NAMES == 1
101 this->m_objName.toChar(),
104 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
111 port < static_cast<FwIndexType>(this->getNum_bufferSendInFill_InputPorts());
114 this->m_bufferSendInFill_InputPort[port].init();
115 this->m_bufferSendInFill_InputPort[port].addCallComp(
117 m_p_bufferSendInFill_in
119 this->m_bufferSendInFill_InputPort[port].setPortNum(port);
121#if FW_OBJECT_NAMES == 1
125 this->m_objName.toChar(),
128 this->m_bufferSendInFill_InputPort[port].setObjName(portName.
toChar());
135 port < static_cast<FwIndexType>(this->getNum_bufferSendInReturn_InputPorts());
138 this->m_bufferSendInReturn_InputPort[port].init();
139 this->m_bufferSendInReturn_InputPort[port].addCallComp(
141 m_p_bufferSendInReturn_in
143 this->m_bufferSendInReturn_InputPort[port].setPortNum(port);
145#if FW_OBJECT_NAMES == 1
149 this->m_objName.toChar(),
152 this->m_bufferSendInReturn_InputPort[port].setObjName(portName.
toChar());
159 port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
162 this->m_pingIn_InputPort[port].init();
163 this->m_pingIn_InputPort[port].addCallComp(
167 this->m_pingIn_InputPort[port].setPortNum(port);
169#if FW_OBJECT_NAMES == 1
173 this->m_objName.toChar(),
176 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
183 port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
186 this->m_cmdRegOut_OutputPort[port].init();
188#if FW_OBJECT_NAMES == 1
192 this->m_objName.toChar(),
195 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
202 port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
205 this->m_cmdResponseOut_OutputPort[port].init();
207#if FW_OBJECT_NAMES == 1
211 this->m_objName.toChar(),
214 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
221 port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
224 this->m_eventOut_OutputPort[port].init();
226#if FW_OBJECT_NAMES == 1
230 this->m_objName.toChar(),
233 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
237#if FW_ENABLE_TEXT_LOGGING == 1
241 port < static_cast<FwIndexType>(this->getNum_eventOutText_OutputPorts());
244 this->m_eventOutText_OutputPort[port].init();
246#if FW_OBJECT_NAMES == 1
250 this->m_objName.toChar(),
253 this->m_eventOutText_OutputPort[port].setObjName(portName.
toChar());
261 port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
264 this->m_timeCaller_OutputPort[port].init();
266#if FW_OBJECT_NAMES == 1
270 this->m_objName.toChar(),
273 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
280 port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
283 this->m_tlmOut_OutputPort[port].init();
285#if FW_OBJECT_NAMES == 1
289 this->m_objName.toChar(),
292 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
299 port < static_cast<FwIndexType>(this->getNum_bufferSendOutDrain_OutputPorts());
302 this->m_bufferSendOutDrain_OutputPort[port].init();
304#if FW_OBJECT_NAMES == 1
308 this->m_objName.toChar(),
311 this->m_bufferSendOutDrain_OutputPort[port].setObjName(portName.
toChar());
318 port < static_cast<FwIndexType>(this->getNum_bufferSendOutReturn_OutputPorts());
321 this->m_bufferSendOutReturn_OutputPort[port].init();
323#if FW_OBJECT_NAMES == 1
327 this->m_objName.toChar(),
330 this->m_bufferSendOutReturn_OutputPort[port].setObjName(portName.
toChar());
337 port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
340 this->m_pingOut_OutputPort[port].init();
342#if FW_OBJECT_NAMES == 1
346 this->m_objName.toChar(),
349 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
356 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
372 portNum < this->getNum_cmdIn_InputPorts(),
376 return &this->m_cmdIn_InputPort[portNum];
384 get_bufferSendInFill_InputPort(
FwIndexType portNum)
387 portNum < this->getNum_bufferSendInFill_InputPorts(),
391 return &this->m_bufferSendInFill_InputPort[portNum];
395 get_bufferSendInReturn_InputPort(
FwIndexType portNum)
398 portNum < this->getNum_bufferSendInReturn_InputPorts(),
402 return &this->m_bufferSendInReturn_InputPort[portNum];
409 portNum < this->getNum_pingIn_InputPorts(),
413 return &this->m_pingIn_InputPort[portNum];
420 void BufferAccumulatorComponentBase ::
421 set_cmdRegOut_OutputPort(
427 portNum < this->getNum_cmdRegOut_OutputPorts(),
431 this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
434 void BufferAccumulatorComponentBase ::
435 set_cmdResponseOut_OutputPort(
441 portNum < this->getNum_cmdResponseOut_OutputPorts(),
445 this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
448 void BufferAccumulatorComponentBase ::
449 set_eventOut_OutputPort(
455 portNum < this->getNum_eventOut_OutputPorts(),
459 this->m_eventOut_OutputPort[portNum].addCallPort(port);
462#if FW_ENABLE_TEXT_LOGGING == 1
464 void BufferAccumulatorComponentBase ::
465 set_eventOutText_OutputPort(
471 portNum < this->getNum_eventOutText_OutputPorts(),
475 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
480 void BufferAccumulatorComponentBase ::
481 set_timeCaller_OutputPort(
487 portNum < this->getNum_timeCaller_OutputPorts(),
491 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
494 void BufferAccumulatorComponentBase ::
495 set_tlmOut_OutputPort(
501 portNum < this->getNum_tlmOut_OutputPorts(),
505 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
512 void BufferAccumulatorComponentBase ::
513 set_bufferSendOutDrain_OutputPort(
519 portNum < this->getNum_bufferSendOutDrain_OutputPorts(),
523 this->m_bufferSendOutDrain_OutputPort[portNum].addCallPort(port);
526 void BufferAccumulatorComponentBase ::
527 set_bufferSendOutReturn_OutputPort(
533 portNum < this->getNum_bufferSendOutReturn_OutputPorts(),
537 this->m_bufferSendOutReturn_OutputPort[portNum].addCallPort(port);
540 void BufferAccumulatorComponentBase ::
541 set_pingOut_OutputPort(
547 portNum < this->getNum_pingOut_OutputPorts(),
551 this->m_pingOut_OutputPort[portNum].addCallPort(port);
554#if FW_PORT_SERIALIZATION
560 void BufferAccumulatorComponentBase ::
561 set_cmdRegOut_OutputPort(
563 Fw::InputSerializePort* port
567 portNum < this->getNum_cmdRegOut_OutputPorts(),
571 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
574 void BufferAccumulatorComponentBase ::
575 set_cmdResponseOut_OutputPort(
577 Fw::InputSerializePort* port
581 portNum < this->getNum_cmdResponseOut_OutputPorts(),
585 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
588 void BufferAccumulatorComponentBase ::
589 set_eventOut_OutputPort(
591 Fw::InputSerializePort* port
595 portNum < this->getNum_eventOut_OutputPorts(),
599 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
602#if FW_ENABLE_TEXT_LOGGING == 1
604 void BufferAccumulatorComponentBase ::
605 set_eventOutText_OutputPort(
607 Fw::InputSerializePort* port
611 portNum < this->getNum_eventOutText_OutputPorts(),
615 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
620 void BufferAccumulatorComponentBase ::
621 set_timeCaller_OutputPort(
623 Fw::InputSerializePort* port
627 portNum < this->getNum_timeCaller_OutputPorts(),
631 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
634 void BufferAccumulatorComponentBase ::
635 set_tlmOut_OutputPort(
637 Fw::InputSerializePort* port
641 portNum < this->getNum_tlmOut_OutputPorts(),
645 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
650#if FW_PORT_SERIALIZATION
656 void BufferAccumulatorComponentBase ::
657 set_bufferSendOutDrain_OutputPort(
659 Fw::InputSerializePort* port
663 portNum < this->getNum_bufferSendOutDrain_OutputPorts(),
667 this->m_bufferSendOutDrain_OutputPort[portNum].registerSerialPort(port);
670 void BufferAccumulatorComponentBase ::
671 set_bufferSendOutReturn_OutputPort(
673 Fw::InputSerializePort* port
677 portNum < this->getNum_bufferSendOutReturn_OutputPorts(),
681 this->m_bufferSendOutReturn_OutputPort[portNum].registerSerialPort(port);
684 void BufferAccumulatorComponentBase ::
685 set_pingOut_OutputPort(
687 Fw::InputSerializePort* port
691 portNum < this->getNum_pingOut_OutputPorts(),
695 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
704 void BufferAccumulatorComponentBase ::
707 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
709 this->m_cmdRegOut_OutputPort[0].invoke(
710 this->getIdBase() + OPCODE_BA_SETMODE
713 this->m_cmdRegOut_OutputPort[0].invoke(
714 this->getIdBase() + OPCODE_BA_DRAINBUFFERS
722 BufferAccumulatorComponentBase ::
723 BufferAccumulatorComponentBase(
const char* compName) :
724 Fw::ActiveComponentBase(compName)
729 BufferAccumulatorComponentBase ::
730 ~BufferAccumulatorComponentBase()
740 getNum_cmdIn_InputPorts()
const
750 getNum_bufferSendInFill_InputPorts()
const
756 getNum_bufferSendInReturn_InputPorts()
const
762 getNum_pingIn_InputPorts()
const
772 getNum_cmdRegOut_OutputPorts()
const
778 getNum_cmdResponseOut_OutputPorts()
const
784 getNum_eventOut_OutputPorts()
const
789#if FW_ENABLE_TEXT_LOGGING == 1
792 getNum_eventOutText_OutputPorts()
const
800 getNum_timeCaller_OutputPorts()
const
806 getNum_tlmOut_OutputPorts()
const
816 getNum_bufferSendOutDrain_OutputPorts()
const
822 getNum_bufferSendOutReturn_OutputPorts()
const
828 getNum_pingOut_OutputPorts()
const
837 bool BufferAccumulatorComponentBase ::
838 isConnected_cmdRegOut_OutputPort(
FwIndexType portNum)
841 portNum < this->getNum_cmdRegOut_OutputPorts(),
845 return this->m_cmdRegOut_OutputPort[portNum].isConnected();
848 bool BufferAccumulatorComponentBase ::
849 isConnected_cmdResponseOut_OutputPort(
FwIndexType portNum)
852 portNum < this->getNum_cmdResponseOut_OutputPorts(),
856 return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
859 bool BufferAccumulatorComponentBase ::
860 isConnected_eventOut_OutputPort(
FwIndexType portNum)
863 portNum < this->getNum_eventOut_OutputPorts(),
867 return this->m_eventOut_OutputPort[portNum].isConnected();
870#if FW_ENABLE_TEXT_LOGGING == 1
872 bool BufferAccumulatorComponentBase ::
873 isConnected_eventOutText_OutputPort(
FwIndexType portNum)
876 portNum < this->getNum_eventOutText_OutputPorts(),
880 return this->m_eventOutText_OutputPort[portNum].isConnected();
885 bool BufferAccumulatorComponentBase ::
886 isConnected_timeCaller_OutputPort(
FwIndexType portNum)
889 portNum < this->getNum_timeCaller_OutputPorts(),
893 return this->m_timeCaller_OutputPort[portNum].isConnected();
896 bool BufferAccumulatorComponentBase ::
900 portNum < this->getNum_tlmOut_OutputPorts(),
904 return this->m_tlmOut_OutputPort[portNum].isConnected();
911 bool BufferAccumulatorComponentBase ::
912 isConnected_bufferSendOutDrain_OutputPort(
FwIndexType portNum)
915 portNum < this->getNum_bufferSendOutDrain_OutputPorts(),
919 return this->m_bufferSendOutDrain_OutputPort[portNum].isConnected();
922 bool BufferAccumulatorComponentBase ::
923 isConnected_bufferSendOutReturn_OutputPort(
FwIndexType portNum)
926 portNum < this->getNum_bufferSendOutReturn_OutputPorts(),
930 return this->m_bufferSendOutReturn_OutputPort[portNum].isConnected();
933 bool BufferAccumulatorComponentBase ::
934 isConnected_pingOut_OutputPort(
FwIndexType portNum)
937 portNum < this->getNum_pingOut_OutputPorts(),
941 return this->m_pingOut_OutputPort[portNum].isConnected();
950 void BufferAccumulatorComponentBase ::
951 bufferSendInFill_handlerBase(
958 portNum < this->getNum_bufferSendInFill_InputPorts(),
963 bufferSendInFill_preMsgHook(
967 ComponentIpcSerializableBuffer msg;
971 _status = msg.serialize(
980 _status = msg.serialize(portNum);
987 _status = msg.serialize(fwBuffer);
1003 void BufferAccumulatorComponentBase ::
1004 bufferSendInReturn_handlerBase(
1011 portNum < this->getNum_bufferSendInReturn_InputPorts(),
1016 bufferSendInReturn_preMsgHook(
1020 ComponentIpcSerializableBuffer msg;
1024 _status = msg.serialize(
1033 _status = msg.serialize(portNum);
1040 _status = msg.serialize(fwBuffer);
1056 void BufferAccumulatorComponentBase ::
1064 portNum < this->getNum_pingIn_InputPorts(),
1073 ComponentIpcSerializableBuffer msg;
1077 _status = msg.serialize(
1086 _status = msg.serialize(portNum);
1093 _status = msg.serialize(key);
1117 void BufferAccumulatorComponentBase ::
1118 bufferSendInFill_preMsgHook(
1126 void BufferAccumulatorComponentBase ::
1127 bufferSendInReturn_preMsgHook(
1135 void BufferAccumulatorComponentBase ::
1148 void BufferAccumulatorComponentBase ::
1149 bufferSendOutDrain_out(
1155 portNum < this->getNum_bufferSendOutDrain_OutputPorts(),
1158 this->m_bufferSendOutDrain_OutputPort[portNum].invoke(
1163 void BufferAccumulatorComponentBase ::
1164 bufferSendOutReturn_out(
1170 portNum < this->getNum_bufferSendOutReturn_OutputPorts(),
1173 this->m_bufferSendOutReturn_OutputPort[portNum].invoke(
1178 void BufferAccumulatorComponentBase ::
1185 portNum < this->getNum_pingOut_OutputPorts(),
1188 this->m_pingOut_OutputPort[portNum].invoke(
1197 void BufferAccumulatorComponentBase ::
1204 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1205 this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
1214 void BufferAccumulatorComponentBase ::
1215 BA_SetMode_cmdHandlerBase(
1222 this->BA_SetMode_preMsgHook(opCode,cmdSeq);
1226 ComponentIpcSerializableBuffer msg;
1230 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BA_SETMODE));
1239 _status = msg.serialize(port);
1245 _status = msg.serialize(opCode);
1251 _status = msg.serialize(cmdSeq);
1257 _status = msg.serialize(args);
1273 void BufferAccumulatorComponentBase ::
1274 BA_DrainBuffers_cmdHandlerBase(
1281 this->BA_DrainBuffers_preMsgHook(opCode,cmdSeq);
1285 ComponentIpcSerializableBuffer msg;
1289 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BA_DRAINBUFFERS));
1298 _status = msg.serialize(port);
1304 _status = msg.serialize(opCode);
1310 _status = msg.serialize(cmdSeq);
1316 _status = msg.serialize(args);
1340 void BufferAccumulatorComponentBase ::
1341 BA_SetMode_preMsgHook(
1351 void BufferAccumulatorComponentBase ::
1352 BA_DrainBuffers_preMsgHook(
1366 void BufferAccumulatorComponentBase ::
1367 log_ACTIVITY_HI_BA_BufferAccepted()
const
1371 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1372 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1377 _id = this->getIdBase() + EVENTID_BA_BUFFERACCEPTED;
1380 if (this->m_eventOut_OutputPort[0].isConnected()) {
1383#if FW_AMPCS_COMPATIBLE
1393 this->m_eventOut_OutputPort[0].invoke(
1402#if FW_ENABLE_TEXT_LOGGING
1403 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1404#if FW_OBJECT_NAMES == 1
1405 const char* _formatString =
1406 "(%s) %s: Buffer accepted";
1408 const char* _formatString =
1409 "%s: Buffer accepted";
1416 this->m_objName.toChar(),
1418 "BA_BufferAccepted "
1421 this->m_eventOutText_OutputPort[0].invoke(
1431 void BufferAccumulatorComponentBase ::
1432 log_WARNING_HI_BA_QueueFull()
const
1436 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1437 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1442 _id = this->getIdBase() + EVENTID_BA_QUEUEFULL;
1445 if (this->m_eventOut_OutputPort[0].isConnected()) {
1448#if FW_AMPCS_COMPATIBLE
1458 this->m_eventOut_OutputPort[0].invoke(
1467#if FW_ENABLE_TEXT_LOGGING
1468 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1469#if FW_OBJECT_NAMES == 1
1470 const char* _formatString =
1471 "(%s) %s: Queue full";
1473 const char* _formatString =
1481 this->m_objName.toChar(),
1486 this->m_eventOutText_OutputPort[0].invoke(
1496 void BufferAccumulatorComponentBase ::
1497 log_WARNING_HI_BA_StillDraining(
1504 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1505 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1510 _id = this->getIdBase() + EVENTID_BA_STILLDRAINING;
1513 if (this->m_eventOut_OutputPort[0].isConnected()) {
1517#if FW_AMPCS_COMPATIBLE
1526#if FW_AMPCS_COMPATIBLE
1529 static_cast<U8>(
sizeof(U32))
1536 _status = _logBuff.
serialize(numDrained);
1542#if FW_AMPCS_COMPATIBLE
1545 static_cast<U8>(
sizeof(U32))
1552 _status = _logBuff.
serialize(numToDrain);
1558 this->m_eventOut_OutputPort[0].invoke(
1567#if FW_ENABLE_TEXT_LOGGING
1568 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1569#if FW_OBJECT_NAMES == 1
1570 const char* _formatString =
1571 "(%s) %s: Still draining %" PRIu32
" of %" PRIu32
"";
1573 const char* _formatString =
1574 "%s: Still draining %" PRIu32
" of %" PRIu32
"";
1581 this->m_objName.toChar(),
1583 "BA_StillDraining ",
1588 this->m_eventOutText_OutputPort[0].invoke(
1598 void BufferAccumulatorComponentBase ::
1599 log_WARNING_HI_BA_AlreadyDraining()
const
1603 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1604 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1609 _id = this->getIdBase() + EVENTID_BA_ALREADYDRAINING;
1612 if (this->m_eventOut_OutputPort[0].isConnected()) {
1615#if FW_AMPCS_COMPATIBLE
1625 this->m_eventOut_OutputPort[0].invoke(
1634#if FW_ENABLE_TEXT_LOGGING
1635 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1636#if FW_OBJECT_NAMES == 1
1637 const char* _formatString =
1638 "(%s) %s: Already in DRAIN mode";
1640 const char* _formatString =
1641 "%s: Already in DRAIN mode";
1648 this->m_objName.toChar(),
1650 "BA_AlreadyDraining "
1653 this->m_eventOutText_OutputPort[0].invoke(
1663 void BufferAccumulatorComponentBase ::
1664 log_WARNING_HI_BA_DrainStalled(
1671 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1672 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1677 _id = this->getIdBase() + EVENTID_BA_DRAINSTALLED;
1680 if (this->m_eventOut_OutputPort[0].isConnected()) {
1684#if FW_AMPCS_COMPATIBLE
1693#if FW_AMPCS_COMPATIBLE
1696 static_cast<U8>(
sizeof(U32))
1703 _status = _logBuff.
serialize(numDrained);
1709#if FW_AMPCS_COMPATIBLE
1712 static_cast<U8>(
sizeof(U32))
1719 _status = _logBuff.
serialize(numToDrain);
1725 this->m_eventOut_OutputPort[0].invoke(
1734#if FW_ENABLE_TEXT_LOGGING
1735 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1736#if FW_OBJECT_NAMES == 1
1737 const char* _formatString =
1738 "(%s) %s: Drain stalling - only drained %" PRIu32
" of %" PRIu32
"";
1740 const char* _formatString =
1741 "%s: Drain stalling - only drained %" PRIu32
" of %" PRIu32
"";
1748 this->m_objName.toChar(),
1755 this->m_eventOutText_OutputPort[0].invoke(
1765 void BufferAccumulatorComponentBase ::
1766 log_ACTIVITY_HI_BA_PartialDrainDone(U32 numDrained)
const
1770 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1771 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1776 _id = this->getIdBase() + EVENTID_BA_PARTIALDRAINDONE;
1779 if (this->m_eventOut_OutputPort[0].isConnected()) {
1783#if FW_AMPCS_COMPATIBLE
1792#if FW_AMPCS_COMPATIBLE
1795 static_cast<U8>(
sizeof(U32))
1802 _status = _logBuff.
serialize(numDrained);
1808 this->m_eventOut_OutputPort[0].invoke(
1817#if FW_ENABLE_TEXT_LOGGING
1818 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1819#if FW_OBJECT_NAMES == 1
1820 const char* _formatString =
1821 "(%s) %s: Partial drain of %" PRIu32
" finished";
1823 const char* _formatString =
1824 "%s: Partial drain of %" PRIu32
" finished";
1831 this->m_objName.toChar(),
1833 "BA_PartialDrainDone ",
1837 this->m_eventOutText_OutputPort[0].invoke(
1847 void BufferAccumulatorComponentBase ::
1848 log_WARNING_LO_BA_NonBlockDrain(
1855 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1856 this->m_timeCaller_OutputPort[0].invoke(_logTime);
1861 _id = this->getIdBase() + EVENTID_BA_NONBLOCKDRAIN;
1864 if (this->m_eventOut_OutputPort[0].isConnected()) {
1868#if FW_AMPCS_COMPATIBLE
1877#if FW_AMPCS_COMPATIBLE
1880 static_cast<U8>(
sizeof(U32))
1887 _status = _logBuff.
serialize(numWillDrain);
1893#if FW_AMPCS_COMPATIBLE
1896 static_cast<U8>(
sizeof(U32))
1903 _status = _logBuff.
serialize(numReqDrain);
1909 this->m_eventOut_OutputPort[0].invoke(
1918#if FW_ENABLE_TEXT_LOGGING
1919 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1920#if FW_OBJECT_NAMES == 1
1921 const char* _formatString =
1922 "(%s) %s: Only have %" PRIu32
"; requested drain of %" PRIu32
"";
1924 const char* _formatString =
1925 "%s: Only have %" PRIu32
"; requested drain of %" PRIu32
"";
1932 this->m_objName.toChar(),
1934 "BA_NonBlockDrain ",
1939 this->m_eventOutText_OutputPort[0].invoke(
1953 void BufferAccumulatorComponentBase ::
1954 tlmWrite_BA_NumQueuedBuffers(
1959 if (this->m_tlmOut_OutputPort[0].isConnected()) {
1961 this->m_timeCaller_OutputPort[0].isConnected() &&
1964 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
1976 _id = this->getIdBase() + CHANNELID_BA_NUMQUEUEDBUFFERS;
1978 this->m_tlmOut_OutputPort[0].invoke(
1993 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1995 this->m_timeCaller_OutputPort[0].invoke(_time);
2010 ComponentIpcSerializableBuffer msg;
2033 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2035 if (msgType == BUFFERACCUMULATOR_COMPONENT_EXIT) {
2036 return MSG_DISPATCH_EXIT;
2040 deserStatus = msg.deserialize(portNum);
2048 case BUFFERSENDINFILL_BUFFERSEND: {
2051 deserStatus = msg.deserialize(fwBuffer);
2057 this->bufferSendInFill_handler(
2066 case BUFFERSENDINRETURN_BUFFERSEND: {
2069 deserStatus = msg.deserialize(fwBuffer);
2075 this->bufferSendInReturn_handler(
2087 deserStatus = msg.deserialize(key);
2093 this->pingIn_handler(
2102 case CMD_BA_SETMODE: {
2105 deserStatus = msg.deserialize(opCode);
2113 deserStatus = msg.deserialize(cmdSeq);
2121 deserStatus = msg.deserialize(args);
2134 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2135 this->cmdResponse_out(
2147#if FW_CMD_CHECK_RESIDUAL
2149 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2158 this->BA_SetMode_cmdHandler(
2167 case CMD_BA_DRAINBUFFERS: {
2170 deserStatus = msg.deserialize(opCode);
2178 deserStatus = msg.deserialize(cmdSeq);
2186 deserStatus = msg.deserialize(args);
2199 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2200 this->cmdResponse_out(
2214 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2215 this->cmdResponse_out(
2227#if FW_CMD_CHECK_RESIDUAL
2229 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2238 this->BA_DrainBuffers_cmdHandler(
2248 return MSG_DISPATCH_ERROR;
2251 return MSG_DISPATCH_OK;
2258 void BufferAccumulatorComponentBase ::
2268 BufferAccumulatorComponentBase* compPtr =
static_cast<BufferAccumulatorComponentBase*
>(callComp);
2270 const U32 idBase = callComp->
getIdBase();
2274 switch (opCode - idBase) {
2275 case OPCODE_BA_SETMODE: {
2276 compPtr->BA_SetMode_cmdHandlerBase(
2284 case OPCODE_BA_DRAINBUFFERS: {
2285 compPtr->BA_DrainBuffers_cmdHandlerBase(
2299 void BufferAccumulatorComponentBase ::
2300 m_p_bufferSendInFill_in(
2307 BufferAccumulatorComponentBase* compPtr =
static_cast<BufferAccumulatorComponentBase*
>(callComp);
2308 compPtr->bufferSendInFill_handlerBase(
2314 void BufferAccumulatorComponentBase ::
2315 m_p_bufferSendInReturn_in(
2322 BufferAccumulatorComponentBase* compPtr =
static_cast<BufferAccumulatorComponentBase*
>(callComp);
2323 compPtr->bufferSendInReturn_handlerBase(
2329 void BufferAccumulatorComponentBase ::
2337 BufferAccumulatorComponentBase* compPtr =
static_cast<BufferAccumulatorComponentBase*
>(callComp);
2338 compPtr->pingIn_handlerBase(
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)/*#en...
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Enum representing a command response.
@ FORMAT_ERROR
Command failed to deserialize.
@ WARNING_HI
A serious but recoverable event.
@ ACTIVITY_HI
Important informational events.
@ WARNING_LO
A less serious but recoverable event.
void init()
Object initializer.
const char * toChar() const
NATIVE_UINT_TYPE SizeType
void resetDeser()
reset deserialization to beginning
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void format(const CHAR *formatString,...)
write formatted string to buffer
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
Status
status returned from the queue send function
@ OP_OK
message sent/received okay
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.