9 #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 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 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 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 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 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 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 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 (0 <= portNum) && (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 (0 <= portNum) && (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)
354 this->m_NoBuffsAvailableThrottle = 0;
355 this->m_NullEmptyBufferThrottle = 0;
373 static_cast<FwAssertArgType>(portNum)
376 return this->m_eventOut_OutputPort[portNum].
isConnected();
379 #if FW_ENABLE_TEXT_LOGGING == 1 381 bool BufferManagerComponentBase ::
382 isConnected_textEventOut_OutputPort(
FwIndexType portNum)
385 (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
386 static_cast<FwAssertArgType>(portNum)
389 return this->m_textEventOut_OutputPort[portNum].isConnected();
399 static_cast<FwAssertArgType>(portNum)
402 return this->m_timeCaller_OutputPort[portNum].
isConnected();
410 static_cast<FwAssertArgType>(portNum)
413 return this->m_tlmOut_OutputPort[portNum].
isConnected();
431 static_cast<FwAssertArgType>(portNum)
460 static_cast<FwAssertArgType>(portNum)
485 static_cast<FwAssertArgType>(portNum)
507 this->m_NoBuffsAvailableThrottle++;
512 if (this->m_timeCaller_OutputPort[0].isConnected()) {
513 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
521 if (this->m_eventOut_OutputPort[0].isConnected()) {
525 #if FW_AMPCS_COMPATIBLE 530 static_cast<FwAssertArgType>(_status)
534 #if FW_AMPCS_COMPATIBLE 541 static_cast<FwAssertArgType>(_status)
547 static_cast<FwAssertArgType>(_status)
550 this->m_eventOut_OutputPort[0].
invoke(
559 #if FW_ENABLE_TEXT_LOGGING 560 if (this->m_textEventOut_OutputPort[0].isConnected()) {
561 #if FW_OBJECT_NAMES == 1 562 const char* _formatString =
563 "(%s) %s: No available buffers of size %" PRIu64
"";
565 const char* _formatString =
566 "%s: No available buffers of size %" PRIu64
"";
573 this->m_objName.toChar(),
579 this->m_textEventOut_OutputPort[0].invoke(
597 this->m_NullEmptyBufferThrottle++;
602 if (this->m_timeCaller_OutputPort[0].isConnected()) {
603 this->m_timeCaller_OutputPort[0].
invoke(_logTime);
611 if (this->m_eventOut_OutputPort[0].isConnected()) {
614 #if FW_AMPCS_COMPATIBLE 620 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: Received null pointer and zero size buffer";
639 const char* _formatString =
640 "%s: Received null pointer and zero size buffer";
647 this->m_objName.toChar(),
652 this->m_textEventOut_OutputPort[0].invoke(
670 this->m_NoBuffsAvailableThrottle = 0;
677 this->m_NullEmptyBufferThrottle = 0;
691 if (not this->m_first_update_TotalBuffs) {
693 if (arg == this->m_last_TotalBuffs) {
697 this->m_last_TotalBuffs = arg;
701 this->m_first_update_TotalBuffs =
false;
702 this->m_last_TotalBuffs = arg;
705 if (this->m_tlmOut_OutputPort[0].isConnected()) {
707 this->m_timeCaller_OutputPort[0].isConnected() &&
710 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
717 static_cast<FwAssertArgType>(_stat)
724 this->m_tlmOut_OutputPort[0].
invoke(
739 if (not this->m_first_update_CurrBuffs) {
741 if (arg == this->m_last_CurrBuffs) {
745 this->m_last_CurrBuffs = arg;
749 this->m_first_update_CurrBuffs =
false;
750 this->m_last_CurrBuffs = arg;
753 if (this->m_tlmOut_OutputPort[0].isConnected()) {
755 this->m_timeCaller_OutputPort[0].isConnected() &&
758 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
765 static_cast<FwAssertArgType>(_stat)
772 this->m_tlmOut_OutputPort[0].
invoke(
787 if (not this->m_first_update_HiBuffs) {
789 if (arg == this->m_last_HiBuffs) {
793 this->m_last_HiBuffs = arg;
797 this->m_first_update_HiBuffs =
false;
798 this->m_last_HiBuffs = arg;
801 if (this->m_tlmOut_OutputPort[0].isConnected()) {
803 this->m_timeCaller_OutputPort[0].isConnected() &&
806 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
813 static_cast<FwAssertArgType>(_stat)
820 this->m_tlmOut_OutputPort[0].
invoke(
835 if (not this->m_first_update_NoBuffs) {
837 if (arg == this->m_last_NoBuffs) {
841 this->m_last_NoBuffs = arg;
845 this->m_first_update_NoBuffs =
false;
846 this->m_last_NoBuffs = arg;
849 if (this->m_tlmOut_OutputPort[0].isConnected()) {
851 this->m_timeCaller_OutputPort[0].isConnected() &&
854 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
861 static_cast<FwAssertArgType>(_stat)
868 this->m_tlmOut_OutputPort[0].
invoke(
883 if (not this->m_first_update_EmptyBuffs) {
885 if (arg == this->m_last_EmptyBuffs) {
889 this->m_last_EmptyBuffs = arg;
893 this->m_first_update_EmptyBuffs =
false;
894 this->m_last_EmptyBuffs = arg;
897 if (this->m_tlmOut_OutputPort[0].isConnected()) {
899 this->m_timeCaller_OutputPort[0].isConnected() &&
902 this->m_timeCaller_OutputPort[0].
invoke(_tlmTime);
909 static_cast<FwAssertArgType>(_stat)
916 this->m_tlmOut_OutputPort[0].
invoke(
931 if (this->m_timeCaller_OutputPort[0].isConnected()) {
933 this->m_timeCaller_OutputPort[0].
invoke(_time);
951 this->m_guardedPortMutex.
lock();
957 this->m_guardedPortMutex.
unLock();
965 m_p_bufferGetCallee_in(
979 void BufferManagerComponentBase ::
988 compPtr->bufferSendIn_handlerBase(
994 void BufferManagerComponentBase ::
1003 compPtr->schedIn_handlerBase(
void log_WARNING_HI_NoBuffsAvailable(FwSizeType size)
Serialization/Deserialization operation was successful.
static constexpr FwIndexType getNum_bufferGetCallee_InputPorts()
void addCallPort(InputTimePort *callPort)
Register an input port.
virtual ~BufferManagerComponentBase()
Destroy BufferManagerComponentBase object.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
Fw::Buffer bufferGetCallee_handlerBase(FwIndexType portNum, FwSizeType size)
Handler base-class function for input port bufferGetCallee.
static constexpr FwIndexType getNum_schedIn_InputPorts()
void unLock()
unlock the mutex and assert success
Channel ID for EmptyBuffs.
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.
No time base has been established (Required)
The buffer manager received a null pointer and zero-sized buffer as a return. Probably undetected fai...
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
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 CurrBuffs.
FwIdType FwEventIdType
The type of an event identifier.
Channel ID for TotalBuffs.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
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
Convert to a C-style char*.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
The BufferManager was unable to allocate a requested buffer.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
A serious but recoverable event.
void tlmWrite_NoBuffs(U32 arg, Fw::Time _tlmTime=Fw::Time())
Throttle reset count for NullEmptyBuffer.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
Throttle reset count for NoBuffsAvailable.
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.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
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())
PlatformIndexType FwIndexType
void addCallPort(InputLogPort *callPort)
Register an input port.
void log_WARNING_HI_NullEmptyBuffer_ThrottleClear()
Reset throttle value for NullEmptyBuffer.
RateGroupDivider component implementation.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
virtual Fw::Buffer bufferGetCallee_handler(FwIndexType portNum, FwSizeType size)=0
Handler for input port bufferGetCallee.
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.
Implementation of malloc based allocator.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
BufferManagerComponentBase(const char *compName="")
Construct BufferManagerComponentBase object.
void lock()
lock the mutex and assert success