23 BufferAccumulator(
const char *
const compName) :
24 BufferAccumulatorComponentBase(compName),
26 bufferMemory(nullptr),
35 void BufferAccumulator ::
41 BufferAccumulatorComponentBase::init(queueDepth, instance);
53 void BufferAccumulator ::
60 this->allocatorId = identifier;
64 allocator.
allocate(identifier, actualSize, recoverable));
67 bufferQueue.init(this->bufferMemory, actualBuffers);
70 void BufferAccumulator ::
73 allocator.
deallocate(this->allocatorId, (
void*)this->bufferMemory);
80 void BufferAccumulator ::
81 bufferSendInFill_handler(
86 const bool status = this->bufferQueue.enqueue(buffer);
88 if (this->numWarnings > 0) {
89 this->log_ACTIVITY_HI_BA_BufferAccepted();
91 this->numWarnings = 0;
94 if (this->numWarnings == 0) {
95 this->log_WARNING_HI_BA_QueueFull();
100 this->sendStoredBuffer();
104 void BufferAccumulator ::
105 bufferSendInReturn_handler(
110 this->bufferSendOutReturn_out(0, buffer);
112 this->sendStoredBuffer();
115 void BufferAccumulator ::
121 this->pingOut_out(0, key);
124 void BufferAccumulator ::
137 void BufferAccumulator ::
138 BA_SetMode_cmdHandler(
147 this->sendStoredBuffer();
152 this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
159 void BufferAccumulator ::
164 const bool status = this->bufferQueue.dequeue(buffer);
166 this->bufferSendOutDrain_out(0, buffer);
PlatformIntType NATIVE_INT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
C++-compatible configuration header for fprime configuration.
virtual void * allocate(const NATIVE_UINT_TYPE identifier, NATIVE_UINT_TYPE &size, bool &recoverable)=0
Allocate memory.
virtual void deallocate(const NATIVE_UINT_TYPE identifier, void *ptr)=0
Deallocate memory.