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
47 char portName[2*FW_OBJ_NAME_MAX_SIZE];
55 this->m_bufferGetCallee_InputPort[port].setObjName(portName);
62 port < static_cast<PlatformIntType>(this->getNum_bufferSendIn_InputPorts());
65 this->m_bufferSendIn_InputPort[port].init();
66 this->m_bufferSendIn_InputPort[port].addCallComp(
70 this->m_bufferSendIn_InputPort[port].setPortNum(port);
72#if FW_OBJECT_NAMES == 1
79 char portName[2*FW_OBJ_NAME_MAX_SIZE];
87 this->m_bufferSendIn_InputPort[port].setObjName(portName);
94 port < static_cast<PlatformIntType>(this->getNum_schedIn_InputPorts());
97 this->m_schedIn_InputPort[port].init();
98 this->m_schedIn_InputPort[port].addCallComp(
102 this->m_schedIn_InputPort[port].setPortNum(port);
104#if FW_OBJECT_NAMES == 1
111 char portName[2*FW_OBJ_NAME_MAX_SIZE];
119 this->m_schedIn_InputPort[port].setObjName(portName);
126 port < static_cast<PlatformIntType>(this->getNum_eventOut_OutputPorts());
129 this->m_eventOut_OutputPort[port].init();
131#if FW_OBJECT_NAMES == 1
138 char portName[2*FW_OBJ_NAME_MAX_SIZE];
146 this->m_eventOut_OutputPort[port].setObjName(portName);
150#if FW_ENABLE_TEXT_LOGGING == 1
154 port < static_cast<PlatformIntType>(this->getNum_textEventOut_OutputPorts());
157 this->m_textEventOut_OutputPort[port].init();
159#if FW_OBJECT_NAMES == 1
166 char portName[2*FW_OBJ_NAME_MAX_SIZE];
174 this->m_textEventOut_OutputPort[port].setObjName(portName);
182 port < static_cast<PlatformIntType>(this->getNum_timeCaller_OutputPorts());
185 this->m_timeCaller_OutputPort[port].init();
187#if FW_OBJECT_NAMES == 1
194 char portName[2*FW_OBJ_NAME_MAX_SIZE];
202 this->m_timeCaller_OutputPort[port].setObjName(portName);
209 port < static_cast<PlatformIntType>(this->getNum_tlmOut_OutputPorts());
212 this->m_tlmOut_OutputPort[port].init();
214#if FW_OBJECT_NAMES == 1
221 char portName[2*FW_OBJ_NAME_MAX_SIZE];
229 this->m_tlmOut_OutputPort[port].setObjName(portName);
21 void BufferManagerComponentBase :: {
…}
242 portNum < this->getNum_bufferGetCallee_InputPorts(),
246 return &this->m_bufferGetCallee_InputPort[portNum];
253 portNum < this->getNum_bufferSendIn_InputPorts(),
257 return &this->m_bufferSendIn_InputPort[portNum];
264 portNum < this->getNum_schedIn_InputPorts(),
268 return &this->m_schedIn_InputPort[portNum];
275 void BufferManagerComponentBase ::
276 set_eventOut_OutputPort(
282 portNum < this->getNum_eventOut_OutputPorts(),
286 this->m_eventOut_OutputPort[portNum].addCallPort(port);
275 void BufferManagerComponentBase :: {
…}
289#if FW_ENABLE_TEXT_LOGGING == 1
291 void BufferManagerComponentBase ::
292 set_textEventOut_OutputPort(
298 portNum < this->getNum_textEventOut_OutputPorts(),
302 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
307 void BufferManagerComponentBase ::
308 set_timeCaller_OutputPort(
314 portNum < this->getNum_timeCaller_OutputPorts(),
318 this->m_timeCaller_OutputPort[portNum].addCallPort(port);
307 void BufferManagerComponentBase :: {
…}
321 void BufferManagerComponentBase ::
322 set_tlmOut_OutputPort(
328 portNum < this->getNum_tlmOut_OutputPorts(),
332 this->m_tlmOut_OutputPort[portNum].addCallPort(port);
321 void BufferManagerComponentBase :: {
…}
335#if FW_PORT_SERIALIZATION
341 void BufferManagerComponentBase ::
342 set_eventOut_OutputPort(
344 Fw::InputSerializePort* port
348 portNum < this->getNum_eventOut_OutputPorts(),
352 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
355#if FW_ENABLE_TEXT_LOGGING == 1
357 void BufferManagerComponentBase ::
358 set_textEventOut_OutputPort(
360 Fw::InputSerializePort* port
364 portNum < this->getNum_textEventOut_OutputPorts(),
368 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
373 void BufferManagerComponentBase ::
374 set_timeCaller_OutputPort(
376 Fw::InputSerializePort* port
380 portNum < this->getNum_timeCaller_OutputPorts(),
384 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
387 void BufferManagerComponentBase ::
388 set_tlmOut_OutputPort(
390 Fw::InputSerializePort* port
394 portNum < this->getNum_tlmOut_OutputPorts(),
398 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
407 BufferManagerComponentBase ::
408 BufferManagerComponentBase(
const char* compName) :
409 Fw::PassiveComponentBase(compName)
412 this->m_first_update_TotalBuffs =
true;
413 this->m_last_TotalBuffs = 0;
416 this->m_first_update_CurrBuffs =
true;
417 this->m_last_CurrBuffs = 0;
420 this->m_first_update_HiBuffs =
true;
421 this->m_last_HiBuffs = 0;
424 this->m_first_update_NoBuffs =
true;
425 this->m_last_NoBuffs = 0;
428 this->m_first_update_EmptyBuffs =
true;
429 this->m_last_EmptyBuffs = 0;
431 this->m_NoBuffsAvailableThrottle = 0;
432 this->m_ZeroSizeBufferThrottle = 0;
407 BufferManagerComponentBase :: {
…}
435 BufferManagerComponentBase ::
436 ~BufferManagerComponentBase()
435 BufferManagerComponentBase :: {
…}
446 getNum_bufferGetCallee_InputPorts()
const
452 getNum_bufferSendIn_InputPorts()
const
458 getNum_schedIn_InputPorts()
const
468 getNum_eventOut_OutputPorts()
const
473#if FW_ENABLE_TEXT_LOGGING == 1
476 getNum_textEventOut_OutputPorts()
const
484 getNum_timeCaller_OutputPorts()
const
490 getNum_tlmOut_OutputPorts()
const
499 bool BufferManagerComponentBase ::
503 portNum < this->getNum_eventOut_OutputPorts(),
507 return this->m_eventOut_OutputPort[portNum].isConnected();
499 bool BufferManagerComponentBase :: {
…}
510#if FW_ENABLE_TEXT_LOGGING == 1
512 bool BufferManagerComponentBase ::
516 portNum < this->getNum_textEventOut_OutputPorts(),
520 return this->m_textEventOut_OutputPort[portNum].isConnected();
525 bool BufferManagerComponentBase ::
529 portNum < this->getNum_timeCaller_OutputPorts(),
533 return this->m_timeCaller_OutputPort[portNum].isConnected();
525 bool BufferManagerComponentBase :: {
…}
536 bool BufferManagerComponentBase ::
540 portNum < this->getNum_tlmOut_OutputPorts(),
544 return this->m_tlmOut_OutputPort[portNum].isConnected();
536 bool BufferManagerComponentBase :: {
…}
554 bufferGetCallee_handlerBase(
561 portNum < this->getNum_bufferGetCallee_InputPorts(),
571 retVal = this->bufferGetCallee_handler(
582 void BufferManagerComponentBase ::
583 bufferSendIn_handlerBase(
590 portNum < this->getNum_bufferSendIn_InputPorts(),
598 this->bufferSendIn_handler(
582 void BufferManagerComponentBase :: {
…}
607 void BufferManagerComponentBase ::
615 portNum < this->getNum_schedIn_InputPorts(),
620 this->schedIn_handler(
607 void BufferManagerComponentBase :: {
…}
630 void BufferManagerComponentBase ::
631 log_WARNING_HI_NoBuffsAvailable(U32 size)
634 if (this->m_NoBuffsAvailableThrottle >= EVENTID_NOBUFFSAVAILABLE_THROTTLE) {
638 this->m_NoBuffsAvailableThrottle++;
643 if (this->m_timeCaller_OutputPort[0].isConnected()) {
644 this->m_timeCaller_OutputPort[0].invoke(_logTime);
649 _id = this->getIdBase() + EVENTID_NOBUFFSAVAILABLE;
652 if (this->m_eventOut_OutputPort[0].isConnected()) {
656#if FW_AMPCS_COMPATIBLE
665#if FW_AMPCS_COMPATIBLE
668 static_cast<U8>(
sizeof(U32))
681 this->m_eventOut_OutputPort[0].invoke(
690#if FW_ENABLE_TEXT_LOGGING
691 if (this->m_textEventOut_OutputPort[0].isConnected()) {
692#if FW_OBJECT_NAMES == 1
693 const char* _formatString =
694 "(%s) %s: No available buffers of size %" PRIu32
"";
696 const char* _formatString =
697 "%s: No available buffers of size %" PRIu32
"";
716 this->m_textEventOut_OutputPort[0].invoke(
630 void BufferManagerComponentBase :: {
…}
726 void BufferManagerComponentBase ::
727 log_WARNING_HI_ZeroSizeBuffer()
730 if (this->m_ZeroSizeBufferThrottle >= EVENTID_ZEROSIZEBUFFER_THROTTLE) {
734 this->m_ZeroSizeBufferThrottle++;
739 if (this->m_timeCaller_OutputPort[0].isConnected()) {
740 this->m_timeCaller_OutputPort[0].invoke(_logTime);
745 _id = this->getIdBase() + EVENTID_ZEROSIZEBUFFER;
748 if (this->m_eventOut_OutputPort[0].isConnected()) {
751#if FW_AMPCS_COMPATIBLE
761 this->m_eventOut_OutputPort[0].invoke(
770#if FW_ENABLE_TEXT_LOGGING
771 if (this->m_textEventOut_OutputPort[0].isConnected()) {
772#if FW_OBJECT_NAMES == 1
773 const char* _formatString =
774 "(%s) %s: Received zero size buffer";
776 const char* _formatString =
777 "%s: Received zero size buffer";
795 this->m_textEventOut_OutputPort[0].invoke(
726 void BufferManagerComponentBase :: {
…}
809 void BufferManagerComponentBase ::
810 log_WARNING_HI_NoBuffsAvailable_ThrottleClear()
813 this->m_NoBuffsAvailableThrottle = 0;
809 void BufferManagerComponentBase :: {
…}
816 void BufferManagerComponentBase ::
817 log_WARNING_HI_ZeroSizeBuffer_ThrottleClear()
820 this->m_ZeroSizeBufferThrottle = 0;
816 void BufferManagerComponentBase :: {
…}
827 void BufferManagerComponentBase ::
834 if (not this->m_first_update_TotalBuffs) {
836 if (arg == this->m_last_TotalBuffs) {
840 this->m_last_TotalBuffs = arg;
844 this->m_first_update_TotalBuffs =
false;
845 this->m_last_TotalBuffs = arg;
848 if (this->m_tlmOut_OutputPort[0].isConnected()) {
850 this->m_timeCaller_OutputPort[0].isConnected() &&
853 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
865 _id = this->getIdBase() + CHANNELID_TOTALBUFFS;
867 this->m_tlmOut_OutputPort[0].invoke(
827 void BufferManagerComponentBase :: {
…}
875 void BufferManagerComponentBase ::
882 if (not this->m_first_update_CurrBuffs) {
884 if (arg == this->m_last_CurrBuffs) {
888 this->m_last_CurrBuffs = arg;
892 this->m_first_update_CurrBuffs =
false;
893 this->m_last_CurrBuffs = arg;
896 if (this->m_tlmOut_OutputPort[0].isConnected()) {
898 this->m_timeCaller_OutputPort[0].isConnected() &&
901 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
913 _id = this->getIdBase() + CHANNELID_CURRBUFFS;
915 this->m_tlmOut_OutputPort[0].invoke(
875 void BufferManagerComponentBase :: {
…}
923 void BufferManagerComponentBase ::
930 if (not this->m_first_update_HiBuffs) {
932 if (arg == this->m_last_HiBuffs) {
936 this->m_last_HiBuffs = arg;
940 this->m_first_update_HiBuffs =
false;
941 this->m_last_HiBuffs = arg;
944 if (this->m_tlmOut_OutputPort[0].isConnected()) {
946 this->m_timeCaller_OutputPort[0].isConnected() &&
949 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
961 _id = this->getIdBase() + CHANNELID_HIBUFFS;
963 this->m_tlmOut_OutputPort[0].invoke(
923 void BufferManagerComponentBase :: {
…}
971 void BufferManagerComponentBase ::
978 if (not this->m_first_update_NoBuffs) {
980 if (arg == this->m_last_NoBuffs) {
984 this->m_last_NoBuffs = arg;
988 this->m_first_update_NoBuffs =
false;
989 this->m_last_NoBuffs = arg;
992 if (this->m_tlmOut_OutputPort[0].isConnected()) {
994 this->m_timeCaller_OutputPort[0].isConnected() &&
997 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
1009 _id = this->getIdBase() + CHANNELID_NOBUFFS;
1011 this->m_tlmOut_OutputPort[0].invoke(
971 void BufferManagerComponentBase :: {
…}
1019 void BufferManagerComponentBase ::
1020 tlmWrite_EmptyBuffs(
1026 if (not this->m_first_update_EmptyBuffs) {
1028 if (arg == this->m_last_EmptyBuffs) {
1032 this->m_last_EmptyBuffs = arg;
1036 this->m_first_update_EmptyBuffs =
false;
1037 this->m_last_EmptyBuffs = arg;
1040 if (this->m_tlmOut_OutputPort[0].isConnected()) {
1042 this->m_timeCaller_OutputPort[0].isConnected() &&
1045 this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
1057 _id = this->getIdBase() + CHANNELID_EMPTYBUFFS;
1059 this->m_tlmOut_OutputPort[0].invoke(
1019 void BufferManagerComponentBase :: {
…}
1074 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1076 this->m_timeCaller_OutputPort[0].invoke(_time);
1091 void BufferManagerComponentBase ::
1094 this->m_guardedPortMutex.lock();
1091 void BufferManagerComponentBase :: {
…}
1097 void BufferManagerComponentBase ::
1100 this->m_guardedPortMutex.unLock();
1097 void BufferManagerComponentBase :: {
…}
1108 m_p_bufferGetCallee_in(
1122 void BufferManagerComponentBase ::
1123 m_p_bufferSendIn_in(
1130 BufferManagerComponentBase* compPtr =
static_cast<BufferManagerComponentBase*
>(callComp);
1137 void BufferManagerComponentBase ::
1145 BufferManagerComponentBase* compPtr =
static_cast<BufferManagerComponentBase*
>(callComp);
1146 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.