11#if FW_ENABLE_TEXT_LOGGING
21 void BufferManagerComponentBase ::
30 port < static_cast<PlatformIntType>(this->getNum_bufferGetCallee_InputPorts());
33 this->m_bufferGetCallee_InputPort[port].init();
34 this->m_bufferGetCallee_InputPort[port].addCallComp(
36 m_p_bufferGetCallee_in
38 this->m_bufferGetCallee_InputPort[port].setPortNum(port);
40#if FW_OBJECT_NAMES == 1
49 this->m_bufferGetCallee_InputPort[port].setObjName(portName);
56 port < static_cast<PlatformIntType>(this->getNum_bufferSendIn_InputPorts());
59 this->m_bufferSendIn_InputPort[port].init();
60 this->m_bufferSendIn_InputPort[port].addCallComp(
64 this->m_bufferSendIn_InputPort[port].setPortNum(port);
66#if FW_OBJECT_NAMES == 1
75 this->m_bufferSendIn_InputPort[port].setObjName(portName);
82 port < static_cast<PlatformIntType>(this->getNum_schedIn_InputPorts());
85 this->m_schedIn_InputPort[port].init();
86 this->m_schedIn_InputPort[port].addCallComp(
90 this->m_schedIn_InputPort[port].setPortNum(port);
92#if FW_OBJECT_NAMES == 1
101 this->m_schedIn_InputPort[port].setObjName(portName);
108 port < static_cast<PlatformIntType>(this->getNum_eventOut_OutputPorts());
111 this->m_eventOut_OutputPort[port].init();
113#if FW_OBJECT_NAMES == 1
122 this->m_eventOut_OutputPort[port].setObjName(portName);
126#if FW_ENABLE_TEXT_LOGGING == 1
130 port < static_cast<PlatformIntType>(this->getNum_textEventOut_OutputPorts());
133 this->m_textEventOut_OutputPort[port].init();
135#if FW_OBJECT_NAMES == 1
144 this->m_textEventOut_OutputPort[port].setObjName(portName);
152 port < static_cast<PlatformIntType>(this->getNum_timeCaller_OutputPorts());
155 this->m_timeCaller_OutputPort[port].init();
157#if FW_OBJECT_NAMES == 1
166 this->m_timeCaller_OutputPort[port].setObjName(portName);
173 port < static_cast<PlatformIntType>(this->getNum_tlmOut_OutputPorts());
176 this->m_tlmOut_OutputPort[port].init();
178#if FW_OBJECT_NAMES == 1
187 this->m_tlmOut_OutputPort[port].setObjName(portName);
21 void BufferManagerComponentBase :: {
…}
200 portNum < this->getNum_bufferGetCallee_InputPorts(),
204 return &this->m_bufferGetCallee_InputPort[portNum];
211 portNum < this->getNum_bufferSendIn_InputPorts(),
215 return &this->m_bufferSendIn_InputPort[portNum];
222 portNum < this->getNum_schedIn_InputPorts(),
226 return &this->m_schedIn_InputPort[portNum];
233 void BufferManagerComponentBase ::
234 set_eventOut_OutputPort(
240 portNum < this->getNum_eventOut_OutputPorts(),
244 this->m_eventOut_OutputPort[portNum].addCallPort(port);
233 void BufferManagerComponentBase :: {
…}
247#if FW_ENABLE_TEXT_LOGGING == 1
249 void BufferManagerComponentBase ::
250 set_textEventOut_OutputPort(
256 portNum < this->getNum_textEventOut_OutputPorts(),
260 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
265 void BufferManagerComponentBase ::
266 set_timeCaller_OutputPort(
272 portNum < this->getNum_timeCaller_OutputPorts(),
276 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
265 void BufferManagerComponentBase :: {
…}
279 void BufferManagerComponentBase ::
280 set_tlmOut_OutputPort(
286 portNum < this->getNum_tlmOut_OutputPorts(),
290 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
279 void BufferManagerComponentBase :: {
…}
293#if FW_PORT_SERIALIZATION
299 void BufferManagerComponentBase ::
300 set_eventOut_OutputPort(
302 Fw::InputSerializePort* port
306 portNum < this->getNum_eventOut_OutputPorts(),
310 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
313#if FW_ENABLE_TEXT_LOGGING == 1
315 void BufferManagerComponentBase ::
316 set_textEventOut_OutputPort(
318 Fw::InputSerializePort* port
322 portNum < this->getNum_textEventOut_OutputPorts(),
326 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
331 void BufferManagerComponentBase ::
332 set_timeCaller_OutputPort(
334 Fw::InputSerializePort* port
338 portNum < this->getNum_timeCaller_OutputPorts(),
342 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
345 void BufferManagerComponentBase ::
346 set_tlmOut_OutputPort(
348 Fw::InputSerializePort* port
352 portNum < this->getNum_tlmOut_OutputPorts(),
356 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
365 BufferManagerComponentBase ::
366 BufferManagerComponentBase(
const char* compName) :
367 Fw::PassiveComponentBase(compName)
370 this->m_first_update_TotalBuffs =
true;
371 this->m_last_TotalBuffs = 0;
374 this->m_first_update_CurrBuffs =
true;
375 this->m_last_CurrBuffs = 0;
378 this->m_first_update_HiBuffs =
true;
379 this->m_last_HiBuffs = 0;
382 this->m_first_update_NoBuffs =
true;
383 this->m_last_NoBuffs = 0;
386 this->m_first_update_EmptyBuffs =
true;
387 this->m_last_EmptyBuffs = 0;
389 this->m_NoBuffsAvailableThrottle = 0;
390 this->m_ZeroSizeBufferThrottle = 0;
365 BufferManagerComponentBase :: {
…}
393 BufferManagerComponentBase ::
394 ~BufferManagerComponentBase()
393 BufferManagerComponentBase :: {
…}
404 getNum_bufferGetCallee_InputPorts()
const
410 getNum_bufferSendIn_InputPorts()
const
416 getNum_schedIn_InputPorts()
const
426 getNum_eventOut_OutputPorts()
const
431#if FW_ENABLE_TEXT_LOGGING == 1
434 getNum_textEventOut_OutputPorts()
const
442 getNum_timeCaller_OutputPorts()
const
448 getNum_tlmOut_OutputPorts()
const
457 bool BufferManagerComponentBase ::
461 portNum < this->getNum_eventOut_OutputPorts(),
465 return this->m_eventOut_OutputPort[portNum].isConnected();
457 bool BufferManagerComponentBase :: {
…}
468#if FW_ENABLE_TEXT_LOGGING == 1
470 bool BufferManagerComponentBase ::
474 portNum < this->getNum_textEventOut_OutputPorts(),
478 return this->m_textEventOut_OutputPort[portNum].isConnected();
483 bool BufferManagerComponentBase ::
487 portNum < this->getNum_timeCaller_OutputPorts(),
491 return this->m_timeCaller_OutputPort[portNum].isConnected();
483 bool BufferManagerComponentBase :: {
…}
494 bool BufferManagerComponentBase ::
498 portNum < this->getNum_tlmOut_OutputPorts(),
502 return this->m_tlmOut_OutputPort[portNum].isConnected();
494 bool BufferManagerComponentBase :: {
…}
512 bufferGetCallee_handlerBase(
519 portNum < this->getNum_bufferGetCallee_InputPorts(),
529 retVal = this->bufferGetCallee_handler(
540 void BufferManagerComponentBase ::
541 bufferSendIn_handlerBase(
548 portNum < this->getNum_bufferSendIn_InputPorts(),
556 this->bufferSendIn_handler(
540 void BufferManagerComponentBase :: {
…}
565 void BufferManagerComponentBase ::
573 portNum < this->getNum_schedIn_InputPorts(),
578 this->schedIn_handler(
565 void BufferManagerComponentBase :: {
…}
588 void BufferManagerComponentBase ::
589 log_WARNING_HI_NoBuffsAvailable(U32 size)
592 if (this->m_NoBuffsAvailableThrottle >= EVENTID_NOBUFFSAVAILABLE_THROTTLE) {
596 this->m_NoBuffsAvailableThrottle++;
601 if (this->m_timeCaller_OutputPort[0].isConnected()) {
602 this->m_timeCaller_OutputPort[0].invoke(_logTime);
607 _id = this->getIdBase() + EVENTID_NOBUFFSAVAILABLE;
610 if (this->m_eventOut_OutputPort[0].isConnected()) {
614#if FW_AMPCS_COMPATIBLE
623#if FW_AMPCS_COMPATIBLE
626 static_cast<U8>(
sizeof(U32))
639 this->m_eventOut_OutputPort[0].invoke(
648#if FW_ENABLE_TEXT_LOGGING
649 if (this->m_textEventOut_OutputPort[0].isConnected()) {
650#if FW_OBJECT_NAMES == 1
651 const char* _formatString =
652 "(%s) %s: No available buffers of size %" PRIu32
"";
654 const char* _formatString =
655 "%s: No available buffers of size %" PRIu32
"";
674 this->m_textEventOut_OutputPort[0].invoke(
588 void BufferManagerComponentBase :: {
…}
684 void BufferManagerComponentBase ::
685 log_WARNING_HI_ZeroSizeBuffer()
688 if (this->m_ZeroSizeBufferThrottle >= EVENTID_ZEROSIZEBUFFER_THROTTLE) {
692 this->m_ZeroSizeBufferThrottle++;
697 if (this->m_timeCaller_OutputPort[0].isConnected()) {
698 this->m_timeCaller_OutputPort[0].invoke(_logTime);
703 _id = this->getIdBase() + EVENTID_ZEROSIZEBUFFER;
706 if (this->m_eventOut_OutputPort[0].isConnected()) {
709#if FW_AMPCS_COMPATIBLE
719 this->m_eventOut_OutputPort[0].invoke(
728#if FW_ENABLE_TEXT_LOGGING
729 if (this->m_textEventOut_OutputPort[0].isConnected()) {
730#if FW_OBJECT_NAMES == 1
731 const char* _formatString =
732 "(%s) %s: Received zero size buffer";
734 const char* _formatString =
735 "%s: Received zero size buffer";
753 this->m_textEventOut_OutputPort[0].invoke(
684 void BufferManagerComponentBase :: {
…}
767 void BufferManagerComponentBase ::
768 log_WARNING_HI_NoBuffsAvailable_ThrottleClear()
771 this->m_NoBuffsAvailableThrottle = 0;
767 void BufferManagerComponentBase :: {
…}
774 void BufferManagerComponentBase ::
775 log_WARNING_HI_ZeroSizeBuffer_ThrottleClear()
778 this->m_ZeroSizeBufferThrottle = 0;
774 void BufferManagerComponentBase :: {
…}
785 void BufferManagerComponentBase ::
792 if (not this->m_first_update_TotalBuffs) {
794 if (arg == this->m_last_TotalBuffs) {
798 this->m_last_TotalBuffs = arg;
802 this->m_first_update_TotalBuffs =
false;
803 this->m_last_TotalBuffs = arg;
806 if (this->m_tlmOut_OutputPort[0].isConnected()) {
808 this->m_timeCaller_OutputPort[0].isConnected() &&
811 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
823 _id = this->getIdBase() + CHANNELID_TOTALBUFFS;
825 this->m_tlmOut_OutputPort[0].invoke(
785 void BufferManagerComponentBase :: {
…}
833 void BufferManagerComponentBase ::
840 if (not this->m_first_update_CurrBuffs) {
842 if (arg == this->m_last_CurrBuffs) {
846 this->m_last_CurrBuffs = arg;
850 this->m_first_update_CurrBuffs =
false;
851 this->m_last_CurrBuffs = arg;
854 if (this->m_tlmOut_OutputPort[0].isConnected()) {
856 this->m_timeCaller_OutputPort[0].isConnected() &&
859 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
871 _id = this->getIdBase() + CHANNELID_CURRBUFFS;
873 this->m_tlmOut_OutputPort[0].invoke(
833 void BufferManagerComponentBase :: {
…}
881 void BufferManagerComponentBase ::
888 if (not this->m_first_update_HiBuffs) {
890 if (arg == this->m_last_HiBuffs) {
894 this->m_last_HiBuffs = arg;
898 this->m_first_update_HiBuffs =
false;
899 this->m_last_HiBuffs = arg;
902 if (this->m_tlmOut_OutputPort[0].isConnected()) {
904 this->m_timeCaller_OutputPort[0].isConnected() &&
907 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
919 _id = this->getIdBase() + CHANNELID_HIBUFFS;
921 this->m_tlmOut_OutputPort[0].invoke(
881 void BufferManagerComponentBase :: {
…}
929 void BufferManagerComponentBase ::
936 if (not this->m_first_update_NoBuffs) {
938 if (arg == this->m_last_NoBuffs) {
942 this->m_last_NoBuffs = arg;
946 this->m_first_update_NoBuffs =
false;
947 this->m_last_NoBuffs = arg;
950 if (this->m_tlmOut_OutputPort[0].isConnected()) {
952 this->m_timeCaller_OutputPort[0].isConnected() &&
955 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
967 _id = this->getIdBase() + CHANNELID_NOBUFFS;
969 this->m_tlmOut_OutputPort[0].invoke(
929 void BufferManagerComponentBase :: {
…}
977 void BufferManagerComponentBase ::
984 if (not this->m_first_update_EmptyBuffs) {
986 if (arg == this->m_last_EmptyBuffs) {
990 this->m_last_EmptyBuffs = arg;
994 this->m_first_update_EmptyBuffs =
false;
995 this->m_last_EmptyBuffs = arg;
998 if (this->m_tlmOut_OutputPort[0].isConnected()) {
1000 this->m_timeCaller_OutputPort[0].isConnected() &&
1003 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
1015 _id = this->getIdBase() + CHANNELID_EMPTYBUFFS;
1017 this->m_tlmOut_OutputPort[0].invoke(
977 void BufferManagerComponentBase :: {
…}
1032 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1034 this->m_timeCaller_OutputPort[0].invoke(_time);
1049 void BufferManagerComponentBase ::
1052 this->m_guardedPortMutex.lock();
1049 void BufferManagerComponentBase :: {
…}
1055 void BufferManagerComponentBase ::
1058 this->m_guardedPortMutex.unLock();
1055 void BufferManagerComponentBase :: {
…}
1066 m_p_bufferGetCallee_in(
1080 void BufferManagerComponentBase ::
1081 m_p_bufferSendIn_in(
1088 BufferManagerComponentBase* compPtr =
static_cast<BufferManagerComponentBase*
>(callComp);
1095 void BufferManagerComponentBase ::
1103 BufferManagerComponentBase* compPtr =
static_cast<BufferManagerComponentBase*
>(callComp);
1104 compPtr->schedIn_handlerBase(
PlatformIntType NATIVE_INT_TYPE
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
PlatformUIntType NATIVE_UINT_TYPE
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ WARNING_HI
A serious but recoverable event.
void init()
Object initializer.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Auto-generated base for BufferManager component.
Fw::Buffer bufferGetCallee_handlerBase(NATIVE_INT_TYPE portNum, U32 size)
Handler base-class function for input port bufferGetCallee.
void bufferSendIn_handlerBase(NATIVE_INT_TYPE portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.