10 #if FW_ENABLE_TEXT_LOGGING 32 this->m_bufferGetCallee_InputPort[port].
init();
33 this->m_bufferGetCallee_InputPort[port].
addCallComp(
35 m_p_bufferGetCallee_in
37 this->m_bufferGetCallee_InputPort[port].
setPortNum(port);
39 #if FW_OBJECT_NAMES == 1 42 "%s_bufferGetCallee_InputPort[%" PRI_PlatformIntType
"]",
43 this->m_objName.toChar(),
46 this->m_bufferGetCallee_InputPort[port].setObjName(portName.
toChar());
56 this->m_bufferSendIn_InputPort[port].
init();
61 this->m_bufferSendIn_InputPort[port].
setPortNum(port);
63 #if FW_OBJECT_NAMES == 1 66 "%s_bufferSendIn_InputPort[%" PRI_PlatformIntType
"]",
67 this->m_objName.toChar(),
70 this->m_bufferSendIn_InputPort[port].setObjName(portName.
toChar());
80 this->m_schedIn_InputPort[port].
init();
85 this->m_schedIn_InputPort[port].
setPortNum(port);
87 #if FW_OBJECT_NAMES == 1 90 "%s_schedIn_InputPort[%" PRI_PlatformIntType
"]",
91 this->m_objName.toChar(),
94 this->m_schedIn_InputPort[port].setObjName(portName.
toChar());
104 this->m_eventOut_OutputPort[port].
init();
106 #if FW_OBJECT_NAMES == 1 109 "%s_eventOut_OutputPort[%" PRI_PlatformIntType
"]",
110 this->m_objName.toChar(),
113 this->m_eventOut_OutputPort[port].setObjName(portName.
toChar());
117 #if FW_ENABLE_TEXT_LOGGING == 1 121 port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
124 this->m_textEventOut_OutputPort[port].
init();
126 #if FW_OBJECT_NAMES == 1 129 "%s_textEventOut_OutputPort[%" PRI_PlatformIntType
"]",
130 this->m_objName.toChar(),
133 this->m_textEventOut_OutputPort[port].setObjName(portName.
toChar());
144 this->m_timeCaller_OutputPort[port].
init();
146 #if FW_OBJECT_NAMES == 1 149 "%s_timeCaller_OutputPort[%" PRI_PlatformIntType
"]",
150 this->m_objName.toChar(),
153 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
163 this->m_tlmOut_OutputPort[port].
init();
165 #if FW_OBJECT_NAMES == 1 168 "%s_tlmOut_OutputPort[%" PRI_PlatformIntType
"]",
169 this->m_objName.toChar(),
172 this->m_tlmOut_OutputPort[port].setObjName(portName.
toChar());
186 static_cast<FwAssertArgType>(portNum)
189 return &this->m_bufferGetCallee_InputPort[portNum];
197 static_cast<FwAssertArgType>(portNum)
200 return &this->m_bufferSendIn_InputPort[portNum];
208 static_cast<FwAssertArgType>(portNum)
211 return &this->m_schedIn_InputPort[portNum];
226 static_cast<FwAssertArgType>(portNum)
229 this->m_eventOut_OutputPort[portNum].
addCallPort(port);
232 #if FW_ENABLE_TEXT_LOGGING == 1 234 void BufferManagerComponentBase ::
235 set_textEventOut_OutputPort(
241 portNum < this->getNum_textEventOut_OutputPorts(),
242 static_cast<FwAssertArgType>(portNum)
245 this->m_textEventOut_OutputPort[portNum].addCallPort(port);
258 static_cast<FwAssertArgType>(portNum)
261 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
272 static_cast<FwAssertArgType>(portNum)
275 this->m_tlmOut_OutputPort[portNum].
addCallPort(port);
278 #if FW_PORT_SERIALIZATION 287 Fw::InputSerializePort* port
292 static_cast<FwAssertArgType>(portNum)
295 this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
298 #if FW_ENABLE_TEXT_LOGGING == 1 300 void BufferManagerComponentBase ::
301 set_textEventOut_OutputPort(
303 Fw::InputSerializePort* port
307 portNum < this->getNum_textEventOut_OutputPorts(),
308 static_cast<FwAssertArgType>(portNum)
311 this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
319 Fw::InputSerializePort* port
324 static_cast<FwAssertArgType>(portNum)
327 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
333 Fw::InputSerializePort* port
338 static_cast<FwAssertArgType>(portNum)
341 this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
352 Fw::PassiveComponentBase(compName)
355 this->m_first_update_TotalBuffs =
true;
356 this->m_last_TotalBuffs = 0;
359 this->m_first_update_CurrBuffs =
true;
360 this->m_last_CurrBuffs = 0;
363 this->m_first_update_HiBuffs =
true;
364 this->m_last_HiBuffs = 0;
367 this->m_first_update_NoBuffs =
true;
368 this->m_last_NoBuffs = 0;
371 this->m_first_update_EmptyBuffs =
true;
372 this->m_last_EmptyBuffs = 0;
374 this->m_NoBuffsAvailableThrottle = 0;
375 this->m_NullEmptyBufferThrottle = 0;
416 #if FW_ENABLE_TEXT_LOGGING == 1 419 getNum_textEventOut_OutputPorts()
const 447 static_cast<FwAssertArgType>(portNum)
450 return this->m_eventOut_OutputPort[portNum].
isConnected();
453 #if FW_ENABLE_TEXT_LOGGING == 1 455 bool BufferManagerComponentBase ::
456 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
459 portNum < this->getNum_textEventOut_OutputPorts(),
460 static_cast<FwAssertArgType>(portNum)
463 return this->m_textEventOut_OutputPort[portNum].isConnected();
473 static_cast<FwAssertArgType>(portNum)
476 return this->m_timeCaller_OutputPort[portNum].
isConnected();
484 static_cast<FwAssertArgType>(portNum)
487 return this->m_tlmOut_OutputPort[portNum].
isConnected();
505 static_cast<FwAssertArgType>(portNum)
534 static_cast<FwAssertArgType>(portNum)
559 static_cast<FwAssertArgType>(portNum)
581 this->m_NoBuffsAvailableThrottle++;
586 if (this->m_timeCaller_OutputPort[0].isConnected()) {
587 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
595 if (this->m_eventOut_OutputPort[0].isConnected()) {
599 #if FW_AMPCS_COMPATIBLE 601 _status = _logBuff.
serialize(static_cast<U8>(1));
604 static_cast<FwAssertArgType>(_status)
608 #if FW_AMPCS_COMPATIBLE 611 static_cast<U8>(
sizeof(U32))
615 static_cast<FwAssertArgType>(_status)
621 static_cast<FwAssertArgType>(_status)
624 this->m_eventOut_OutputPort[0].
invoke(
633 #if FW_ENABLE_TEXT_LOGGING 634 if (this->m_textEventOut_OutputPort[0].isConnected()) {
635 #if FW_OBJECT_NAMES == 1 636 const char* _formatString =
637 "(%s) %s: No available buffers of size %" PRIu32
"";
639 const char* _formatString =
640 "%s: No available buffers of size %" PRIu32
"";
647 this->m_objName.toChar(),
653 this->m_textEventOut_OutputPort[0].invoke(
671 this->m_NullEmptyBufferThrottle++;
676 if (this->m_timeCaller_OutputPort[0].isConnected()) {
677 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
685 if (this->m_eventOut_OutputPort[0].isConnected()) {
688 #if FW_AMPCS_COMPATIBLE 691 _status = _logBuff.
serialize(static_cast<U8>(0));
694 static_cast<FwAssertArgType>(_status)
698 this->m_eventOut_OutputPort[0].
invoke(
707 #if FW_ENABLE_TEXT_LOGGING 708 if (this->m_textEventOut_OutputPort[0].isConnected()) {
709 #if FW_OBJECT_NAMES == 1 710 const char* _formatString =
711 "(%s) %s: Received null pointer and zero size buffer";
713 const char* _formatString =
714 "%s: Received null pointer and zero size buffer";
721 this->m_objName.toChar(),
726 this->m_textEventOut_OutputPort[0].invoke(
744 this->m_NoBuffsAvailableThrottle = 0;
751 this->m_NullEmptyBufferThrottle = 0;
765 if (not this->m_first_update_TotalBuffs) {
767 if (arg == this->m_last_TotalBuffs) {
771 this->m_last_TotalBuffs = arg;
775 this->m_first_update_TotalBuffs =
false;
776 this->m_last_TotalBuffs = arg;
779 if (this->m_tlmOut_OutputPort[0].isConnected()) {
781 this->m_timeCaller_OutputPort[0].isConnected() &&
784 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
791 static_cast<FwAssertArgType>(_stat)
798 this->m_tlmOut_OutputPort[0].
invoke(
813 if (not this->m_first_update_CurrBuffs) {
815 if (arg == this->m_last_CurrBuffs) {
819 this->m_last_CurrBuffs = arg;
823 this->m_first_update_CurrBuffs =
false;
824 this->m_last_CurrBuffs = arg;
827 if (this->m_tlmOut_OutputPort[0].isConnected()) {
829 this->m_timeCaller_OutputPort[0].isConnected() &&
832 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
839 static_cast<FwAssertArgType>(_stat)
846 this->m_tlmOut_OutputPort[0].
invoke(
861 if (not this->m_first_update_HiBuffs) {
863 if (arg == this->m_last_HiBuffs) {
867 this->m_last_HiBuffs = arg;
871 this->m_first_update_HiBuffs =
false;
872 this->m_last_HiBuffs = arg;
875 if (this->m_tlmOut_OutputPort[0].isConnected()) {
877 this->m_timeCaller_OutputPort[0].isConnected() &&
880 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
887 static_cast<FwAssertArgType>(_stat)
894 this->m_tlmOut_OutputPort[0].
invoke(
909 if (not this->m_first_update_NoBuffs) {
911 if (arg == this->m_last_NoBuffs) {
915 this->m_last_NoBuffs = arg;
919 this->m_first_update_NoBuffs =
false;
920 this->m_last_NoBuffs = arg;
923 if (this->m_tlmOut_OutputPort[0].isConnected()) {
925 this->m_timeCaller_OutputPort[0].isConnected() &&
928 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
935 static_cast<FwAssertArgType>(_stat)
942 this->m_tlmOut_OutputPort[0].
invoke(
957 if (not this->m_first_update_EmptyBuffs) {
959 if (arg == this->m_last_EmptyBuffs) {
963 this->m_last_EmptyBuffs = arg;
967 this->m_first_update_EmptyBuffs =
false;
968 this->m_last_EmptyBuffs = arg;
971 if (this->m_tlmOut_OutputPort[0].isConnected()) {
973 this->m_timeCaller_OutputPort[0].isConnected() &&
976 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
983 static_cast<FwAssertArgType>(_stat)
990 this->m_tlmOut_OutputPort[0].
invoke(
1005 if (this->m_timeCaller_OutputPort[0].isConnected()) {
1007 this->m_timeCaller_OutputPort[0].
invoke(_time);
1025 this->m_guardedPortMutex.
lock();
1031 this->m_guardedPortMutex.
unLock();
1039 m_p_bufferGetCallee_in(
1053 void BufferManagerComponentBase ::
1054 m_p_bufferSendIn_in(
1062 compPtr->bufferSendIn_handlerBase(
1068 void BufferManagerComponentBase ::
1077 compPtr->schedIn_handlerBase(
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
virtual ~BufferManagerComponentBase()
Destroy BufferManagerComponentBase object.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
FwIndexType getNum_eventOut_OutputPorts() const
void unLock()
unlock the mutex and assert success
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void init()
Initialization function.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
FwIndexType getNum_bufferGetCallee_InputPorts() const
PlatformIndexType FwIndexType
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
The buffer manager received a null pointer and zero-sized buffer as a return. Probably undetected fai...
SerializeStatus
forward declaration for string
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
Channel ID for TotalBuffs.
FwIndexType getNum_bufferSendIn_InputPorts() const
FwIndexType getNum_timeCaller_OutputPorts() const
FwIndexType getNum_tlmOut_OutputPorts() const
void init()
Initialization function.
Channel ID for CurrBuffs.
The BufferManager was unable to allocate a requested buffer.
void log_WARNING_HI_NullEmptyBuffer()
void invoke(Fw::Time &time) const
Invoke a port interface.
void log_WARNING_HI_NoBuffsAvailable_ThrottleClear()
Reset throttle value for NoBuffsAvailable.
Fw::InputBufferGetPort * get_bufferGetCallee_InputPort(FwIndexType portNum)
const char * toChar() const
No time base has been established.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual Fw::Buffer bufferGetCallee_handler(FwIndexType portNum, U32 size)=0
Handler for input port bufferGetCallee.
A serious but recoverable event.
void tlmWrite_NoBuffs(U32 arg, Fw::Time _tlmTime=Fw::Time())
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
FwIndexType getNum_schedIn_InputPorts() const
Throttle reset count for NullEmptyBuffer.
void tlmWrite_CurrBuffs(U32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_HiBuffs(U32 arg, Fw::Time _tlmTime=Fw::Time())
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
virtual void unLock()
Unlock the guarded mutex.
void init()
Initialization function.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void tlmWrite_TotalBuffs(U32 arg, Fw::Time _tlmTime=Fw::Time())
virtual void lock()
Lock the guarded mutex.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void tlmWrite_EmptyBuffs(U32 arg, Fw::Time _tlmTime=Fw::Time())
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
void log_WARNING_HI_NullEmptyBuffer_ThrottleClear()
Reset throttle value for NullEmptyBuffer.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
Auto-generated base for BufferManager component.
Throttle reset count for NoBuffsAvailable.
void log_WARNING_HI_NoBuffsAvailable(U32 size)
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
BufferManagerComponentBase(const char *compName="")
Construct BufferManagerComponentBase object.
void lock()
lock the mutex and assert success
Fw::Buffer bufferGetCallee_handlerBase(FwIndexType portNum, U32 size)
Handler base-class function for input port bufferGetCallee.
Channel ID for EmptyBuffs.