10 #if FW_ENABLE_TEXT_LOGGING
19 BUFFERSENDINFILL_BUFFERSEND,
20 BUFFERSENDINRETURN_BUFFERSEND,
37 class ComponentIpcSerializableBuffer :
52 return sizeof(m_buff);
59 const U8* getBuffAddr()
const {
65 U8 m_buff[SERIALIZATION_SIZE];
89 this->m_cmdIn_InputPort[port].
init();
94 this->m_cmdIn_InputPort[port].
setPortNum(port);
96 #if FW_OBJECT_NAMES == 1
100 this->m_objName.toChar(),
103 this->m_cmdIn_InputPort[port].setObjName(portName.
toChar());
113 this->m_bufferSendInFill_InputPort[port].
init();
114 this->m_bufferSendInFill_InputPort[port].
addCallComp(
116 m_p_bufferSendInFill_in
118 this->m_bufferSendInFill_InputPort[port].
setPortNum(port);
120 #if FW_OBJECT_NAMES == 1
124 this->m_objName.toChar(),
127 this->m_bufferSendInFill_InputPort[port].setObjName(portName.
toChar());
137 this->m_bufferSendInReturn_InputPort[port].
init();
138 this->m_bufferSendInReturn_InputPort[port].
addCallComp(
140 m_p_bufferSendInReturn_in
142 this->m_bufferSendInReturn_InputPort[port].
setPortNum(port);
144 #if FW_OBJECT_NAMES == 1
148 this->m_objName.toChar(),
151 this->m_bufferSendInReturn_InputPort[port].setObjName(portName.
toChar());
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());
185 this->m_cmdRegOut_OutputPort[port].
init();
187 #if FW_OBJECT_NAMES == 1
191 this->m_objName.toChar(),
194 this->m_cmdRegOut_OutputPort[port].setObjName(portName.
toChar());
204 this->m_cmdResponseOut_OutputPort[port].
init();
206 #if FW_OBJECT_NAMES == 1
210 this->m_objName.toChar(),
213 this->m_cmdResponseOut_OutputPort[port].setObjName(portName.
toChar());
223 this->m_eventOut_OutputPort[port].
init();
225 #if FW_OBJECT_NAMES == 1
229 this->m_objName.toChar(),
232 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
236 #if FW_ENABLE_TEXT_LOGGING == 1
240 port < static_cast<FwIndexType>(this->getNum_eventOutText_OutputPorts());
243 this->m_eventOutText_OutputPort[port].
init();
245 #if FW_OBJECT_NAMES == 1
249 this->m_objName.toChar(),
252 this->m_eventOutText_OutputPort[port].setObjName(portName.
toChar());
263 this->m_timeCaller_OutputPort[port].
init();
265 #if FW_OBJECT_NAMES == 1
269 this->m_objName.toChar(),
272 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
282 this->m_tlmOut_OutputPort[port].
init();
284 #if FW_OBJECT_NAMES == 1
288 this->m_objName.toChar(),
291 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
301 this->m_bufferSendOutDrain_OutputPort[port].
init();
303 #if FW_OBJECT_NAMES == 1
307 this->m_objName.toChar(),
310 this->m_bufferSendOutDrain_OutputPort[port].setObjName(portName.
toChar());
320 this->m_bufferSendOutReturn_OutputPort[port].
init();
322 #if FW_OBJECT_NAMES == 1
326 this->m_objName.toChar(),
329 this->m_bufferSendOutReturn_OutputPort[port].setObjName(portName.
toChar());
339 this->m_pingOut_OutputPort[port].
init();
341 #if FW_OBJECT_NAMES == 1
345 this->m_objName.toChar(),
348 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
354 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
374 return &this->m_cmdIn_InputPort[portNum];
389 return &this->m_bufferSendInFill_InputPort[portNum];
400 return &this->m_bufferSendInReturn_InputPort[portNum];
411 return &this->m_pingIn_InputPort[portNum];
429 this->m_cmdRegOut_OutputPort[portNum].
addCallPort(port);
443 this->m_cmdResponseOut_OutputPort[portNum].
addCallPort(port);
457 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
460 #if FW_ENABLE_TEXT_LOGGING == 1
462 void BufferAccumulatorComponentBase ::
463 set_eventOutText_OutputPort(
469 portNum < this->getNum_eventOutText_OutputPorts(),
473 this->m_eventOutText_OutputPort[portNum].addCallPort(port);
489 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
503 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
521 this->m_bufferSendOutDrain_OutputPort[portNum].
addCallPort(port);
535 this->m_bufferSendOutReturn_OutputPort[portNum].
addCallPort(port);
549 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
552 #if FW_PORT_SERIALIZATION
561 Fw::InputSerializePort* port
569 this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
575 Fw::InputSerializePort* port
583 this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
589 Fw::InputSerializePort* port
597 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
600 #if FW_ENABLE_TEXT_LOGGING == 1
602 void BufferAccumulatorComponentBase ::
603 set_eventOutText_OutputPort(
605 Fw::InputSerializePort* port
609 portNum < this->getNum_eventOutText_OutputPorts(),
613 this->m_eventOutText_OutputPort[portNum].registerSerialPort(port);
621 Fw::InputSerializePort* port
629 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
635 Fw::InputSerializePort* port
643 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
648 #if FW_PORT_SERIALIZATION
657 Fw::InputSerializePort* port
665 this->m_bufferSendOutDrain_OutputPort[portNum].registerSerialPort(port);
671 Fw::InputSerializePort* port
679 this->m_bufferSendOutReturn_OutputPort[portNum].registerSerialPort(port);
685 Fw::InputSerializePort* port
693 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
705 FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
707 this->m_cmdRegOut_OutputPort[0].
invoke(
711 this->m_cmdRegOut_OutputPort[0].
invoke(
722 Fw::ActiveComponentBase(compName)
787 #if FW_ENABLE_TEXT_LOGGING == 1
790 getNum_eventOutText_OutputPorts()
const
843 return this->m_cmdRegOut_OutputPort[portNum].
isConnected();
854 return this->m_cmdResponseOut_OutputPort[portNum].
isConnected();
865 return this->m_eventOut_OutputPort[portNum].
isConnected();
868 #if FW_ENABLE_TEXT_LOGGING == 1
870 bool BufferAccumulatorComponentBase ::
871 isConnected_eventOutText_OutputPort(
FwIndexType portNum)
874 portNum < this->getNum_eventOutText_OutputPorts(),
878 return this->m_eventOutText_OutputPort[portNum].isConnected();
891 return this->m_timeCaller_OutputPort[portNum].
isConnected();
902 return this->m_tlmOut_OutputPort[portNum].
isConnected();
917 return this->m_bufferSendOutDrain_OutputPort[portNum].
isConnected();
928 return this->m_bufferSendOutReturn_OutputPort[portNum].
isConnected();
939 return this->m_pingOut_OutputPort[portNum].
isConnected();
965 ComponentIpcSerializableBuffer msg;
969 _status = msg.serialize(
978 _status = msg.serialize(portNum);
985 _status = msg.serialize(fwBuffer);
1018 ComponentIpcSerializableBuffer msg;
1022 _status = msg.serialize(
1031 _status = msg.serialize(portNum);
1038 _status = msg.serialize(fwBuffer);
1071 ComponentIpcSerializableBuffer msg;
1075 _status = msg.serialize(
1084 _status = msg.serialize(portNum);
1091 _status = msg.serialize(key);
1156 this->m_bufferSendOutDrain_OutputPort[portNum].
invoke(
1171 this->m_bufferSendOutReturn_OutputPort[portNum].
invoke(
1186 this->m_pingOut_OutputPort[portNum].
invoke(
1202 FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
1203 this->m_cmdResponseOut_OutputPort[0].
invoke(opCode, cmdSeq, response);
1224 ComponentIpcSerializableBuffer msg;
1228 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BA_SETMODE));
1237 _status = msg.serialize(port);
1243 _status = msg.serialize(opCode);
1249 _status = msg.serialize(cmdSeq);
1255 _status = msg.serialize(args);
1283 ComponentIpcSerializableBuffer msg;
1287 _status = msg.serialize(
static_cast<FwEnumStoreType>(CMD_BA_DRAINBUFFERS));
1296 _status = msg.serialize(port);
1302 _status = msg.serialize(opCode);
1308 _status = msg.serialize(cmdSeq);
1314 _status = msg.serialize(args);
1369 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1370 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1378 if (this->m_eventOut_OutputPort[0].isConnected()) {
1381 #if FW_AMPCS_COMPATIBLE
1391 this->m_eventOut_OutputPort[0].
invoke(
1400 #if FW_ENABLE_TEXT_LOGGING
1401 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1402 #if FW_OBJECT_NAMES == 1
1403 const char* _formatString =
1404 "(%s) %s: Buffer accepted";
1406 const char* _formatString =
1407 "%s: Buffer accepted";
1414 this->m_objName.toChar(),
1416 "BA_BufferAccepted "
1419 this->m_eventOutText_OutputPort[0].invoke(
1434 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1435 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1443 if (this->m_eventOut_OutputPort[0].isConnected()) {
1446 #if FW_AMPCS_COMPATIBLE
1456 this->m_eventOut_OutputPort[0].
invoke(
1465 #if FW_ENABLE_TEXT_LOGGING
1466 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1467 #if FW_OBJECT_NAMES == 1
1468 const char* _formatString =
1469 "(%s) %s: Queue full";
1471 const char* _formatString =
1479 this->m_objName.toChar(),
1484 this->m_eventOutText_OutputPort[0].invoke(
1502 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1503 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1511 if (this->m_eventOut_OutputPort[0].isConnected()) {
1515 #if FW_AMPCS_COMPATIBLE
1524 #if FW_AMPCS_COMPATIBLE
1527 static_cast<U8>(
sizeof(U32))
1534 _status = _logBuff.
serialize(numDrained);
1540 #if FW_AMPCS_COMPATIBLE
1543 static_cast<U8>(
sizeof(U32))
1550 _status = _logBuff.
serialize(numToDrain);
1556 this->m_eventOut_OutputPort[0].
invoke(
1565 #if FW_ENABLE_TEXT_LOGGING
1566 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1567 #if FW_OBJECT_NAMES == 1
1568 const char* _formatString =
1569 "(%s) %s: Still draining %" PRIu32
" of %" PRIu32
"";
1571 const char* _formatString =
1572 "%s: Still draining %" PRIu32
" of %" PRIu32
"";
1579 this->m_objName.toChar(),
1581 "BA_StillDraining ",
1586 this->m_eventOutText_OutputPort[0].invoke(
1601 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1602 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1610 if (this->m_eventOut_OutputPort[0].isConnected()) {
1613 #if FW_AMPCS_COMPATIBLE
1623 this->m_eventOut_OutputPort[0].
invoke(
1632 #if FW_ENABLE_TEXT_LOGGING
1633 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1634 #if FW_OBJECT_NAMES == 1
1635 const char* _formatString =
1636 "(%s) %s: Already in DRAIN mode";
1638 const char* _formatString =
1639 "%s: Already in DRAIN mode";
1646 this->m_objName.toChar(),
1648 "BA_AlreadyDraining "
1651 this->m_eventOutText_OutputPort[0].invoke(
1669 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1670 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1678 if (this->m_eventOut_OutputPort[0].isConnected()) {
1682 #if FW_AMPCS_COMPATIBLE
1691 #if FW_AMPCS_COMPATIBLE
1694 static_cast<U8>(
sizeof(U32))
1701 _status = _logBuff.
serialize(numDrained);
1707 #if FW_AMPCS_COMPATIBLE
1710 static_cast<U8>(
sizeof(U32))
1717 _status = _logBuff.
serialize(numToDrain);
1723 this->m_eventOut_OutputPort[0].
invoke(
1732 #if FW_ENABLE_TEXT_LOGGING
1733 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1734 #if FW_OBJECT_NAMES == 1
1735 const char* _formatString =
1736 "(%s) %s: Drain stalling - only drained %" PRIu32
" of %" PRIu32
"";
1738 const char* _formatString =
1739 "%s: Drain stalling - only drained %" PRIu32
" of %" PRIu32
"";
1746 this->m_objName.toChar(),
1753 this->m_eventOutText_OutputPort[0].invoke(
1768 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1769 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1777 if (this->m_eventOut_OutputPort[0].isConnected()) {
1781 #if FW_AMPCS_COMPATIBLE
1790 #if FW_AMPCS_COMPATIBLE
1793 static_cast<U8>(
sizeof(U32))
1800 _status = _logBuff.
serialize(numDrained);
1806 this->m_eventOut_OutputPort[0].
invoke(
1815 #if FW_ENABLE_TEXT_LOGGING
1816 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1817 #if FW_OBJECT_NAMES == 1
1818 const char* _formatString =
1819 "(%s) %s: Partial drain of %" PRIu32
" finished";
1821 const char* _formatString =
1822 "%s: Partial drain of %" PRIu32
" finished";
1829 this->m_objName.toChar(),
1831 "BA_PartialDrainDone ",
1835 this->m_eventOutText_OutputPort[0].invoke(
1853 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1854 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
1862 if (this->m_eventOut_OutputPort[0].isConnected()) {
1866 #if FW_AMPCS_COMPATIBLE
1875 #if FW_AMPCS_COMPATIBLE
1878 static_cast<U8>(
sizeof(U32))
1885 _status = _logBuff.
serialize(numWillDrain);
1891 #if FW_AMPCS_COMPATIBLE
1894 static_cast<U8>(
sizeof(U32))
1901 _status = _logBuff.
serialize(numReqDrain);
1907 this->m_eventOut_OutputPort[0].
invoke(
1916 #if FW_ENABLE_TEXT_LOGGING
1917 if (this->m_eventOutText_OutputPort[0].isConnected()) {
1918 #if FW_OBJECT_NAMES == 1
1919 const char* _formatString =
1920 "(%s) %s: Only have %" PRIu32
"; requested drain of %" PRIu32
"";
1922 const char* _formatString =
1923 "%s: Only have %" PRIu32
"; requested drain of %" PRIu32
"";
1930 this->m_objName.toChar(),
1932 "BA_NonBlockDrain ",
1937 this->m_eventOutText_OutputPort[0].invoke(
1957 if (this->m_tlmOut_OutputPort[0].isConnected()) {
1959 this->m_timeCaller_OutputPort[0].isConnected() &&
1962 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
1976 this->m_tlmOut_OutputPort[0].
invoke(
1991 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1993 this->m_timeCaller_OutputPort[0].
invoke(_time);
2008 ComponentIpcSerializableBuffer msg;
2031 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
2033 if (msgType == BUFFERACCUMULATOR_COMPONENT_EXIT) {
2038 deserStatus = msg.deserialize(portNum);
2046 case BUFFERSENDINFILL_BUFFERSEND: {
2064 case BUFFERSENDINRETURN_BUFFERSEND: {
2085 deserStatus = msg.deserialize(key);
2100 case CMD_BA_SETMODE: {
2103 deserStatus = msg.deserialize(opCode);
2111 deserStatus = msg.deserialize(cmdSeq);
2132 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2145 #if FW_CMD_CHECK_RESIDUAL
2147 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2165 case CMD_BA_DRAINBUFFERS: {
2168 deserStatus = msg.deserialize(opCode);
2176 deserStatus = msg.deserialize(cmdSeq);
2197 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2212 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2225 #if FW_CMD_CHECK_RESIDUAL
2227 if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
2256 void BufferAccumulatorComponentBase ::
2268 const U32 idBase = callComp->
getIdBase();
2272 switch (opCode - idBase) {
2274 compPtr->BA_SetMode_cmdHandlerBase(
2283 compPtr->BA_DrainBuffers_cmdHandlerBase(
2297 void BufferAccumulatorComponentBase ::
2298 m_p_bufferSendInFill_in(
2306 compPtr->bufferSendInFill_handlerBase(
2312 void BufferAccumulatorComponentBase ::
2313 m_p_bufferSendInReturn_in(
2321 compPtr->bufferSendInReturn_handlerBase(
2327 void BufferAccumulatorComponentBase ::
2336 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)
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
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
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Buffer &fwBuffer)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode)
Invoke a port interface.
void init()
Initialization function.
void init()
Initialization function.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke a port interface.
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
void addCallPort(InputLogPort *callPort)
Register an input port.
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Os::Queue m_queue
queue object for active component
@ MSG_DISPATCH_OK
Dispatch was normal.
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
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
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
@ 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
void bufferSendOutReturn_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferSendOutReturn.
FwIndexType getNum_bufferSendOutDrain_OutputPorts() const
FwIndexType getNum_cmdResponseOut_OutputPorts() const
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void log_WARNING_HI_BA_StillDraining(U32 numDrained, U32 numToDrain)
virtual void bufferSendInReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendInReturn.
BufferAccumulatorComponentBase(const char *compName="")
Construct BufferAccumulatorComponentBase object.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
bool isConnected_bufferSendOutReturn_OutputPort(FwIndexType portNum)
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
virtual void bufferSendInFill_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendInFill.
FwIndexType getNum_timeCaller_OutputPorts() const
FwIndexType getNum_bufferSendInFill_InputPorts() const
void log_ACTIVITY_HI_BA_PartialDrainDone(U32 numDrained)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
virtual void BA_DrainBuffers_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 numToDrain, Svc::BufferAccumulator_BlockMode blockMode)=0
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
virtual void BA_DrainBuffers_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BA_DrainBuffers.
void log_ACTIVITY_HI_BA_BufferAccepted()
virtual void bufferSendInFill_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendInFill.
FwIndexType getNum_tlmOut_OutputPorts() const
bool isConnected_bufferSendOutDrain_OutputPort(FwIndexType portNum)
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
FwIndexType getNum_pingIn_InputPorts() const
void bufferSendInFill_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendInFill.
FwIndexType getNum_bufferSendInReturn_InputPorts() const
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
virtual void BA_SetMode_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::BufferAccumulator_OpState mode)=0
void BA_DrainBuffers_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void log_WARNING_HI_BA_QueueFull()
void bufferSendOutDrain_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferSendOutDrain.
virtual ~BufferAccumulatorComponentBase()
Destroy BufferAccumulatorComponentBase object.
FwIndexType getNum_cmdRegOut_OutputPorts() const
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
FwIndexType getNum_eventOut_OutputPorts() const
void log_WARNING_HI_BA_AlreadyDraining()
void log_WARNING_LO_BA_NonBlockDrain(U32 numWillDrain, U32 numReqDrain)
@ OPCODE_BA_SETMODE
Set the mode.
@ OPCODE_BA_DRAINBUFFERS
Drain the commanded number of buffers.
Fw::InputBufferSendPort * get_bufferSendInReturn_InputPort(FwIndexType portNum)
void log_WARNING_HI_BA_DrainStalled(U32 numDrained, U32 numToDrain)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void set_bufferSendOutDrain_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOutDrain[portNum].
FwIndexType getNum_cmdIn_InputPorts() const
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void tlmWrite_BA_NumQueuedBuffers(U32 arg, Fw::Time _tlmTime=Fw::Time())
FwIndexType getNum_bufferSendOutReturn_OutputPorts() const
virtual void BA_SetMode_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BA_SetMode.
Fw::InputBufferSendPort * get_bufferSendInFill_InputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void set_bufferSendOutReturn_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOutReturn[portNum].
@ CHANNELID_BA_NUMQUEUEDBUFFERS
Channel ID for BA_NumQueuedBuffers.
void BA_SetMode_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void regCommands()
Register commands with the Command Dispatcher.
virtual void bufferSendInReturn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendInReturn.
void bufferSendInReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendInReturn.
FwIndexType getNum_pingOut_OutputPorts() const
@ EVENTID_BA_BUFFERACCEPTED
The Buffer Accumulator instance accepted and enqueued a buffer. To avoid uncontrolled sending of even...
@ EVENTID_BA_DRAINSTALLED
Ran out of buffers while executing DrainBuffers command.
@ EVENTID_BA_PARTIALDRAINDONE
Finished DrainBuffers command.
@ EVENTID_BA_QUEUEFULL
The Buffer Accumulator instance received a buffer when its queue was full. To avoid uncontrolled send...
@ EVENTID_BA_STILLDRAINING
Got DrainBuffers command while executing DrainBuffers command.
@ EVENTID_BA_NONBLOCKDRAIN
Not enough buffers to complete requested drain, and NOBLOCK was set; will only drain what we have.
@ EVENTID_BA_ALREADYDRAINING
Got DrainBuffers command while in DRAIN mode.
void invoke(U32 key)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputPingPort *callPort)
Register an input port.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ OP_OK
Operation succeeded.