9 #if FW_ENABLE_TEXT_LOGGING 26 #if !FW_DIRECT_PORT_CALLS 33 this->m_portIn_InputPort[port].
init();
38 this->m_portIn_InputPort[port].
setPortNum(port);
40 #if FW_OBJECT_NAMES == 1 44 this->m_objName.toChar(),
47 this->m_portIn_InputPort[port].setObjName(portName.
toChar());
52 #if !FW_DIRECT_PORT_CALLS 59 this->m_Log_OutputPort[port].
init();
61 #if FW_OBJECT_NAMES == 1 65 this->m_objName.toChar(),
68 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
73 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 77 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
80 this->m_LogText_OutputPort[port].
init();
82 #if FW_OBJECT_NAMES == 1 86 this->m_objName.toChar(),
89 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
94 #if !FW_DIRECT_PORT_CALLS 101 this->m_Time_OutputPort[port].
init();
103 #if FW_OBJECT_NAMES == 1 107 this->m_objName.toChar(),
110 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
115 #if !FW_DIRECT_PORT_CALLS 122 this->m_allocate_OutputPort[port].
init();
124 #if FW_OBJECT_NAMES == 1 128 this->m_objName.toChar(),
131 this->m_allocate_OutputPort[port].setObjName(portName.
toChar());
136 #if !FW_DIRECT_PORT_CALLS 143 this->m_deallocate_OutputPort[port].
init();
145 #if FW_OBJECT_NAMES == 1 149 this->m_objName.toChar(),
152 this->m_deallocate_OutputPort[port].setObjName(portName.
toChar());
157 #if !FW_DIRECT_PORT_CALLS 164 this->m_portOut_OutputPort[port].
init();
166 #if FW_OBJECT_NAMES == 1 170 this->m_objName.toChar(),
173 this->m_portOut_OutputPort[port].setObjName(portName.
toChar());
179 #if !FW_DIRECT_PORT_CALLS 190 static_cast<FwAssertArgType>(portNum)
193 return &this->m_portIn_InputPort[portNum];
198 #if !FW_DIRECT_PORT_CALLS 212 static_cast<FwAssertArgType>(portNum)
218 #if FW_ENABLE_TEXT_LOGGING == 1 220 void BufferRepeaterComponentBase ::
221 set_LogText_OutputPort(
227 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
228 static_cast<FwAssertArgType>(portNum)
231 this->m_LogText_OutputPort[portNum].addCallPort(port);
244 static_cast<FwAssertArgType>(portNum)
247 this->m_Time_OutputPort[portNum].
addCallPort(port);
252 #if !FW_DIRECT_PORT_CALLS 266 static_cast<FwAssertArgType>(portNum)
269 this->m_allocate_OutputPort[portNum].
addCallPort(port);
280 static_cast<FwAssertArgType>(portNum)
283 this->m_deallocate_OutputPort[portNum].
addCallPort(port);
294 static_cast<FwAssertArgType>(portNum)
297 this->m_portOut_OutputPort[portNum].
addCallPort(port);
302 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 311 Fw::InputSerializePort* port
316 static_cast<FwAssertArgType>(portNum)
319 this->m_Log_OutputPort[portNum].registerSerialPort(port);
322 #if FW_ENABLE_TEXT_LOGGING == 1 324 void BufferRepeaterComponentBase ::
325 set_LogText_OutputPort(
327 Fw::InputSerializePort* port
331 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
332 static_cast<FwAssertArgType>(portNum)
335 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
343 Fw::InputSerializePort* port
348 static_cast<FwAssertArgType>(portNum)
351 this->m_Time_OutputPort[portNum].registerSerialPort(port);
356 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 365 Fw::InputSerializePort* port
370 static_cast<FwAssertArgType>(portNum)
373 this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
379 Fw::InputSerializePort* port
384 static_cast<FwAssertArgType>(portNum)
387 this->m_portOut_OutputPort[portNum].registerSerialPort(port);
398 Fw::PassiveComponentBase(compName)
409 #if !FW_DIRECT_PORT_CALLS 420 static_cast<FwAssertArgType>(portNum)
423 return this->m_Log_OutputPort[portNum].
isConnected();
426 #if FW_ENABLE_TEXT_LOGGING == 1 428 bool BufferRepeaterComponentBase ::
429 isConnected_LogText_OutputPort(
FwIndexType portNum)
const 432 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
433 static_cast<FwAssertArgType>(portNum)
436 return this->m_LogText_OutputPort[portNum].isConnected();
446 static_cast<FwAssertArgType>(portNum)
449 return this->m_Time_OutputPort[portNum].
isConnected();
454 #if !FW_DIRECT_PORT_CALLS 465 static_cast<FwAssertArgType>(portNum)
468 return this->m_allocate_OutputPort[portNum].
isConnected();
476 static_cast<FwAssertArgType>(portNum)
479 return this->m_deallocate_OutputPort[portNum].
isConnected();
487 static_cast<FwAssertArgType>(portNum)
490 return this->m_portOut_OutputPort[portNum].
isConnected();
510 static_cast<FwAssertArgType>(portNum)
520 #if !FW_DIRECT_PORT_CALLS 534 static_cast<FwAssertArgType>(portNum)
538 this->m_allocate_OutputPort[portNum].isConnected(),
539 static_cast<FwAssertArgType>(portNum)
541 return this->m_allocate_OutputPort[portNum].
invoke(
554 static_cast<FwAssertArgType>(portNum)
558 this->m_deallocate_OutputPort[portNum].isConnected(),
559 static_cast<FwAssertArgType>(portNum)
561 this->m_deallocate_OutputPort[portNum].
invoke(
574 static_cast<FwAssertArgType>(portNum)
578 this->m_portOut_OutputPort[portNum].isConnected(),
579 static_cast<FwAssertArgType>(portNum)
581 this->m_portOut_OutputPort[portNum].
invoke(
601 this->Time_out(0, _logTime);
611 #if FW_AMPCS_COMPATIBLE 616 static_cast<FwAssertArgType>(_status)
620 #if FW_AMPCS_COMPATIBLE 623 static_cast<U8>(
sizeof(I32))
627 static_cast<FwAssertArgType>(_status)
633 static_cast<FwAssertArgType>(_status)
636 #if FW_AMPCS_COMPATIBLE 643 static_cast<FwAssertArgType>(_status)
649 static_cast<FwAssertArgType>(_status)
662 #if FW_ENABLE_TEXT_LOGGING 663 if (this->isConnected_LogText_OutputPort(0)) {
664 #if FW_OBJECT_NAMES == 1 665 const char* _formatString =
666 "(%s) %s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu64
"";
668 const char* _formatString =
669 "%s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu64
"";
676 this->m_objName.toChar(),
678 "AllocationSoftFailure ",
703 this->Time_out(0, _logTime);
713 #if FW_AMPCS_COMPATIBLE 718 static_cast<FwAssertArgType>(_status)
725 static_cast<FwAssertArgType>(_status)
731 static_cast<FwAssertArgType>(_status)
735 #if FW_AMPCS_COMPATIBLE 738 static_cast<U8>(
sizeof(I32))
742 static_cast<FwAssertArgType>(_status)
748 static_cast<FwAssertArgType>(_status)
751 #if FW_AMPCS_COMPATIBLE 758 static_cast<FwAssertArgType>(_status)
764 static_cast<FwAssertArgType>(_status)
777 #if FW_ENABLE_TEXT_LOGGING 778 if (this->isConnected_LogText_OutputPort(0)) {
779 #if FW_OBJECT_NAMES == 1 780 const char* _formatString =
781 "(%s) %s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu64
"";
783 const char* _formatString =
784 "%s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu64
"";
791 this->m_objName.toChar(),
793 "AllocationHardFailure ",
818 this->Time_out(0, _time);
830 void BufferRepeaterComponentBase ::
845 #if !FW_DIRECT_PORT_CALLS 851 void BufferRepeaterComponentBase ::
862 static_cast<FwAssertArgType>(portNum)
866 this->m_Log_OutputPort[portNum].isConnected(),
867 static_cast<FwAssertArgType>(portNum)
869 this->m_Log_OutputPort[portNum].
invoke(
877 #if FW_ENABLE_TEXT_LOGGING 879 void BufferRepeaterComponentBase ::
889 (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
890 static_cast<FwAssertArgType>(portNum)
894 this->m_LogText_OutputPort[portNum].isConnected(),
895 static_cast<FwAssertArgType>(portNum)
897 this->m_LogText_OutputPort[portNum].invoke(
907 void BufferRepeaterComponentBase ::
915 static_cast<FwAssertArgType>(portNum)
919 this->m_Time_OutputPort[portNum].isConnected(),
920 static_cast<FwAssertArgType>(portNum)
922 this->m_Time_OutputPort[portNum].
invoke(
Serialization/Deserialization operation was successful.
bool isConnected_portOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputTimePort *callPort)
Register an input port.
static constexpr FwIndexType getNum_portIn_InputPorts()
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
FwIdType getIdBase() const
PlatformSizeType FwSizeType
Hard failure in allocation.
Soft failure in allocation.
bool isConnected_Time_OutputPort(FwIndexType portNum) const
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void log_WARNING_HI_AllocationSoftFailure(I32 port, FwSizeType size) const
No time base has been established (Required)
static constexpr FwIndexType getNum_portOut_OutputPorts()
void init()
Object initializer.
void portOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port portOut.
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_allocate_OutputPorts()
FwIdType FwEventIdType
The type of an event identifier.
BufferRepeaterComponentBase(const char *compName="")
Construct BufferRepeaterComponentBase object.
virtual void portIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port portIn.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
bool isConnected_Log_OutputPort(FwIndexType portNum) const
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void set_portOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to portOut[portNum].
static constexpr FwIndexType getNum_Time_OutputPorts()
void invoke(Fw::Time &time) const
Invoke a port connection.
const char * toChar() const
Convert to a C-style char*.
static constexpr FwIndexType getNum_deallocate_OutputPorts()
A serious but recoverable event.
Fw::InputBufferSendPort * get_portIn_InputPort(FwIndexType portNum)
Enum representing event severity.
virtual ~BufferRepeaterComponentBase()
Destroy BufferRepeaterComponentBase object.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void portIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port portIn.
Fw::Buffer invoke(FwSizeType size) const
void init()
Initialization function.
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Fw::Buffer allocate_out(FwIndexType portNum, FwSizeType size) const
Invoke output port allocate.
void log_FATAL_AllocationHardFailure(I32 port, FwSizeType size) const
PlatformIndexType FwIndexType
A fatal non-recoverable event.
static constexpr FwIndexType getNum_Log_OutputPorts()
void addCallPort(InputLogPort *callPort)
Register an input port.
bool isConnected_deallocate_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
RateGroupDivider component implementation.
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocate.
Auto-generated base for BufferRepeater component.
bool isConnected_allocate_OutputPort(FwIndexType portNum) const
Implementation of malloc based allocator.
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].