10#if FW_ENABLE_TEXT_LOGGING
20 void BufferRepeaterComponentBase ::
29 port < static_cast<FwIndexType>(this->getNum_portIn_InputPorts());
32 this->m_portIn_InputPort[port].init();
33 this->m_portIn_InputPort[port].addCallComp(
37 this->m_portIn_InputPort[port].setPortNum(port);
39#if FW_OBJECT_NAMES == 1
43 this->m_objName.toChar(),
46 this->m_portIn_InputPort[port].setObjName(portName.
toChar());
53 port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
56 this->m_Log_OutputPort[port].init();
58#if FW_OBJECT_NAMES == 1
62 this->m_objName.toChar(),
65 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
69#if FW_ENABLE_TEXT_LOGGING == 1
73 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
76 this->m_LogText_OutputPort[port].init();
78#if FW_OBJECT_NAMES == 1
82 this->m_objName.toChar(),
85 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
93 port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
96 this->m_Time_OutputPort[port].init();
98#if FW_OBJECT_NAMES == 1
102 this->m_objName.toChar(),
105 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
112 port < static_cast<FwIndexType>(this->getNum_allocate_OutputPorts());
115 this->m_allocate_OutputPort[port].init();
117#if FW_OBJECT_NAMES == 1
121 this->m_objName.toChar(),
124 this->m_allocate_OutputPort[port].setObjName(portName.
toChar());
131 port < static_cast<FwIndexType>(this->getNum_deallocate_OutputPorts());
134 this->m_deallocate_OutputPort[port].init();
136#if FW_OBJECT_NAMES == 1
140 this->m_objName.toChar(),
143 this->m_deallocate_OutputPort[port].setObjName(portName.
toChar());
150 port < static_cast<FwIndexType>(this->getNum_portOut_OutputPorts());
153 this->m_portOut_OutputPort[port].init();
155#if FW_OBJECT_NAMES == 1
159 this->m_objName.toChar(),
162 this->m_portOut_OutputPort[port].setObjName(portName.
toChar());
175 portNum < this->getNum_portIn_InputPorts(),
179 return &this->m_portIn_InputPort[portNum];
186 void BufferRepeaterComponentBase ::
193 portNum < this->getNum_Log_OutputPorts(),
197 this->m_Log_OutputPort[portNum].addCallPort(port);
200#if FW_ENABLE_TEXT_LOGGING == 1
202 void BufferRepeaterComponentBase ::
203 set_LogText_OutputPort(
209 portNum < this->getNum_LogText_OutputPorts(),
213 this->m_LogText_OutputPort[portNum].addCallPort(port);
218 void BufferRepeaterComponentBase ::
225 portNum < this->getNum_Time_OutputPorts(),
229 this->m_Time_OutputPort[portNum].addCallPort(port);
236 void BufferRepeaterComponentBase ::
237 set_allocate_OutputPort(
243 portNum < this->getNum_allocate_OutputPorts(),
247 this->m_allocate_OutputPort[portNum].addCallPort(port);
250 void BufferRepeaterComponentBase ::
251 set_deallocate_OutputPort(
257 portNum < this->getNum_deallocate_OutputPorts(),
261 this->m_deallocate_OutputPort[portNum].addCallPort(port);
264 void BufferRepeaterComponentBase ::
265 set_portOut_OutputPort(
271 portNum < this->getNum_portOut_OutputPorts(),
275 this->m_portOut_OutputPort[portNum].addCallPort(port);
278#if FW_PORT_SERIALIZATION
284 void BufferRepeaterComponentBase ::
287 Fw::InputSerializePort* port
291 portNum < this->getNum_Log_OutputPorts(),
295 this->m_Log_OutputPort[portNum].registerSerialPort(port);
298#if FW_ENABLE_TEXT_LOGGING == 1
300 void BufferRepeaterComponentBase ::
301 set_LogText_OutputPort(
303 Fw::InputSerializePort* port
307 portNum < this->getNum_LogText_OutputPorts(),
311 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
316 void BufferRepeaterComponentBase ::
319 Fw::InputSerializePort* port
323 portNum < this->getNum_Time_OutputPorts(),
327 this->m_Time_OutputPort[portNum].registerSerialPort(port);
332#if FW_PORT_SERIALIZATION
338 void BufferRepeaterComponentBase ::
339 set_deallocate_OutputPort(
341 Fw::InputSerializePort* port
345 portNum < this->getNum_deallocate_OutputPorts(),
349 this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
352 void BufferRepeaterComponentBase ::
353 set_portOut_OutputPort(
355 Fw::InputSerializePort* port
359 portNum < this->getNum_portOut_OutputPorts(),
363 this->m_portOut_OutputPort[portNum].registerSerialPort(port);
372 BufferRepeaterComponentBase ::
373 BufferRepeaterComponentBase(
const char* compName) :
374 Fw::PassiveComponentBase(compName)
379 BufferRepeaterComponentBase ::
380 ~BufferRepeaterComponentBase()
390 getNum_portIn_InputPorts()
const
400 getNum_Log_OutputPorts()
const
405#if FW_ENABLE_TEXT_LOGGING == 1
408 getNum_LogText_OutputPorts()
const
416 getNum_Time_OutputPorts()
const
426 getNum_allocate_OutputPorts()
const
432 getNum_deallocate_OutputPorts()
const
438 getNum_portOut_OutputPorts()
const
447 bool BufferRepeaterComponentBase ::
451 portNum < this->getNum_Log_OutputPorts(),
455 return this->m_Log_OutputPort[portNum].isConnected();
458#if FW_ENABLE_TEXT_LOGGING == 1
460 bool BufferRepeaterComponentBase ::
461 isConnected_LogText_OutputPort(
FwIndexType portNum)
464 portNum < this->getNum_LogText_OutputPorts(),
468 return this->m_LogText_OutputPort[portNum].isConnected();
473 bool BufferRepeaterComponentBase ::
477 portNum < this->getNum_Time_OutputPorts(),
481 return this->m_Time_OutputPort[portNum].isConnected();
488 bool BufferRepeaterComponentBase ::
489 isConnected_allocate_OutputPort(
FwIndexType portNum)
492 portNum < this->getNum_allocate_OutputPorts(),
496 return this->m_allocate_OutputPort[portNum].isConnected();
499 bool BufferRepeaterComponentBase ::
500 isConnected_deallocate_OutputPort(
FwIndexType portNum)
503 portNum < this->getNum_deallocate_OutputPorts(),
507 return this->m_deallocate_OutputPort[portNum].isConnected();
510 bool BufferRepeaterComponentBase ::
511 isConnected_portOut_OutputPort(
FwIndexType portNum)
514 portNum < this->getNum_portOut_OutputPorts(),
518 return this->m_portOut_OutputPort[portNum].isConnected();
527 void BufferRepeaterComponentBase ::
535 portNum < this->getNum_portIn_InputPorts(),
540 this->portIn_handler(
557 portNum < this->getNum_allocate_OutputPorts(),
560 return this->m_allocate_OutputPort[portNum].invoke(
565 void BufferRepeaterComponentBase ::
572 portNum < this->getNum_deallocate_OutputPorts(),
575 this->m_deallocate_OutputPort[portNum].invoke(
580 void BufferRepeaterComponentBase ::
587 portNum < this->getNum_portOut_OutputPorts(),
590 this->m_portOut_OutputPort[portNum].invoke(
599 void BufferRepeaterComponentBase ::
600 log_WARNING_HI_AllocationSoftFailure(
607 if (this->m_Time_OutputPort[0].isConnected()) {
608 this->m_Time_OutputPort[0].invoke(_logTime);
613 _id = this->getIdBase() + EVENTID_ALLOCATIONSOFTFAILURE;
616 if (this->m_Log_OutputPort[0].isConnected()) {
620#if FW_AMPCS_COMPATIBLE
629#if FW_AMPCS_COMPATIBLE
632 static_cast<U8>(
sizeof(I32))
645#if FW_AMPCS_COMPATIBLE
648 static_cast<U8>(
sizeof(U32))
661 this->m_Log_OutputPort[0].invoke(
670#if FW_ENABLE_TEXT_LOGGING
671 if (this->m_LogText_OutputPort[0].isConnected()) {
672#if FW_OBJECT_NAMES == 1
673 const char* _formatString =
674 "(%s) %s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
676 const char* _formatString =
677 "%s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
684 this->m_objName.toChar(),
686 "AllocationSoftFailure ",
691 this->m_LogText_OutputPort[0].invoke(
701 void BufferRepeaterComponentBase ::
702 log_FATAL_AllocationHardFailure(
709 if (this->m_Time_OutputPort[0].isConnected()) {
710 this->m_Time_OutputPort[0].invoke(_logTime);
715 _id = this->getIdBase() + EVENTID_ALLOCATIONHARDFAILURE;
718 if (this->m_Log_OutputPort[0].isConnected()) {
722#if FW_AMPCS_COMPATIBLE
724 _status = _logBuff.
serialize(
static_cast<U8>(2 + 1));
737 _status = _logBuff.
serialize(
static_cast<U32
>(0));
744#if FW_AMPCS_COMPATIBLE
747 static_cast<U8>(
sizeof(I32))
760#if FW_AMPCS_COMPATIBLE
763 static_cast<U8>(
sizeof(U32))
776 this->m_Log_OutputPort[0].invoke(
785#if FW_ENABLE_TEXT_LOGGING
786 if (this->m_LogText_OutputPort[0].isConnected()) {
787#if FW_OBJECT_NAMES == 1
788 const char* _formatString =
789 "(%s) %s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
791 const char* _formatString =
792 "%s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
799 this->m_objName.toChar(),
801 "AllocationHardFailure ",
806 this->m_LogText_OutputPort[0].invoke(
823 if (this->m_Time_OutputPort[0].isConnected()) {
825 this->m_Time_OutputPort[0].invoke(_time);
837 void BufferRepeaterComponentBase ::
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)/*#en...
@ WARNING_HI
A serious but recoverable event.
@ FATAL
A fatal non-recoverable event.
void init()
Object initializer.
const char * toChar() const
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void format(const CHAR *formatString,...)
write formatted string to buffer
Auto-generated base for BufferRepeater component.
void portIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port portIn.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.