11#if FW_ENABLE_TEXT_LOGGING
25 class ComponentIpcSerializableBuffer :
40 return sizeof(m_buff);
47 const U8* getBuffAddr()
const {
53 U8 m_buff[SERIALIZATION_SIZE];
62 void BufferRepeaterComponentBase ::
71 port < static_cast<PlatformIntType>(this->getNum_portIn_InputPorts());
74 this->m_portIn_InputPort[port].init();
75 this->m_portIn_InputPort[port].addCallComp(
79 this->m_portIn_InputPort[port].setPortNum(port);
81#if FW_OBJECT_NAMES == 1
90 this->m_portIn_InputPort[port].setObjName(portName);
97 port < static_cast<PlatformIntType>(this->getNum_Log_OutputPorts());
100 this->m_Log_OutputPort[port].init();
102#if FW_OBJECT_NAMES == 1
111 this->m_Log_OutputPort[port].setObjName(portName);
115#if FW_ENABLE_TEXT_LOGGING == 1
119 port < static_cast<PlatformIntType>(this->getNum_LogText_OutputPorts());
122 this->m_LogText_OutputPort[port].init();
124#if FW_OBJECT_NAMES == 1
133 this->m_LogText_OutputPort[port].setObjName(portName);
141 port < static_cast<PlatformIntType>(this->getNum_Time_OutputPorts());
144 this->m_Time_OutputPort[port].init();
146#if FW_OBJECT_NAMES == 1
155 this->m_Time_OutputPort[port].setObjName(portName);
162 port < static_cast<PlatformIntType>(this->getNum_allocate_OutputPorts());
165 this->m_allocate_OutputPort[port].init();
167#if FW_OBJECT_NAMES == 1
176 this->m_allocate_OutputPort[port].setObjName(portName);
183 port < static_cast<PlatformIntType>(this->getNum_deallocate_OutputPorts());
186 this->m_deallocate_OutputPort[port].init();
188#if FW_OBJECT_NAMES == 1
197 this->m_deallocate_OutputPort[port].setObjName(portName);
204 port < static_cast<PlatformIntType>(this->getNum_portOut_OutputPorts());
207 this->m_portOut_OutputPort[port].init();
209#if FW_OBJECT_NAMES == 1
218 this->m_portOut_OutputPort[port].setObjName(portName);
62 void BufferRepeaterComponentBase :: {
…}
231 portNum < this->getNum_portIn_InputPorts(),
235 return &this->m_portIn_InputPort[portNum];
242 void BufferRepeaterComponentBase ::
249 portNum < this->getNum_Log_OutputPorts(),
253 this->m_Log_OutputPort[portNum].addCallPort(port);
242 void BufferRepeaterComponentBase :: {
…}
256#if FW_ENABLE_TEXT_LOGGING == 1
258 void BufferRepeaterComponentBase ::
259 set_LogText_OutputPort(
265 portNum < this->getNum_LogText_OutputPorts(),
269 this->m_LogText_OutputPort[portNum].addCallPort(port);
274 void BufferRepeaterComponentBase ::
281 portNum < this->getNum_Time_OutputPorts(),
285 this->m_Time_OutputPort[portNum].addCallPort(port);
274 void BufferRepeaterComponentBase :: {
…}
292 void BufferRepeaterComponentBase ::
293 set_allocate_OutputPort(
299 portNum < this->getNum_allocate_OutputPorts(),
303 this->m_allocate_OutputPort[portNum].addCallPort(port);
292 void BufferRepeaterComponentBase :: {
…}
306 void BufferRepeaterComponentBase ::
307 set_deallocate_OutputPort(
313 portNum < this->getNum_deallocate_OutputPorts(),
317 this->m_deallocate_OutputPort[portNum].addCallPort(port);
306 void BufferRepeaterComponentBase :: {
…}
320 void BufferRepeaterComponentBase ::
321 set_portOut_OutputPort(
327 portNum < this->getNum_portOut_OutputPorts(),
331 this->m_portOut_OutputPort[portNum].addCallPort(port);
320 void BufferRepeaterComponentBase :: {
…}
334#if FW_PORT_SERIALIZATION
340 void BufferRepeaterComponentBase ::
343 Fw::InputSerializePort* port
347 portNum < this->getNum_Log_OutputPorts(),
351 this->m_Log_OutputPort[portNum].registerSerialPort(port);
354#if FW_ENABLE_TEXT_LOGGING == 1
356 void BufferRepeaterComponentBase ::
357 set_LogText_OutputPort(
359 Fw::InputSerializePort* port
363 portNum < this->getNum_LogText_OutputPorts(),
367 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
372 void BufferRepeaterComponentBase ::
375 Fw::InputSerializePort* port
379 portNum < this->getNum_Time_OutputPorts(),
383 this->m_Time_OutputPort[portNum].registerSerialPort(port);
388#if FW_PORT_SERIALIZATION
394 void BufferRepeaterComponentBase ::
395 set_deallocate_OutputPort(
397 Fw::InputSerializePort* port
401 portNum < this->getNum_deallocate_OutputPorts(),
405 this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
408 void BufferRepeaterComponentBase ::
409 set_portOut_OutputPort(
411 Fw::InputSerializePort* port
415 portNum < this->getNum_portOut_OutputPorts(),
419 this->m_portOut_OutputPort[portNum].registerSerialPort(port);
428 BufferRepeaterComponentBase ::
429 BufferRepeaterComponentBase(
const char* compName) :
430 Fw::PassiveComponentBase(compName)
428 BufferRepeaterComponentBase :: {
…}
435 BufferRepeaterComponentBase ::
436 ~BufferRepeaterComponentBase()
435 BufferRepeaterComponentBase :: {
…}
446 getNum_portIn_InputPorts()
456 getNum_Log_OutputPorts()
461#if FW_ENABLE_TEXT_LOGGING == 1
464 getNum_LogText_OutputPorts()
472 getNum_Time_OutputPorts()
482 getNum_allocate_OutputPorts()
488 getNum_deallocate_OutputPorts()
494 getNum_portOut_OutputPorts()
503 bool BufferRepeaterComponentBase ::
507 portNum < this->getNum_Log_OutputPorts(),
511 return this->m_Log_OutputPort[portNum].isConnected();
503 bool BufferRepeaterComponentBase :: {
…}
514#if FW_ENABLE_TEXT_LOGGING == 1
516 bool BufferRepeaterComponentBase ::
520 portNum < this->getNum_LogText_OutputPorts(),
524 return this->m_LogText_OutputPort[portNum].isConnected();
529 bool BufferRepeaterComponentBase ::
533 portNum < this->getNum_Time_OutputPorts(),
537 return this->m_Time_OutputPort[portNum].isConnected();
529 bool BufferRepeaterComponentBase :: {
…}
544 bool BufferRepeaterComponentBase ::
548 portNum < this->getNum_allocate_OutputPorts(),
552 return this->m_allocate_OutputPort[portNum].isConnected();
544 bool BufferRepeaterComponentBase :: {
…}
555 bool BufferRepeaterComponentBase ::
559 portNum < this->getNum_deallocate_OutputPorts(),
563 return this->m_deallocate_OutputPort[portNum].isConnected();
555 bool BufferRepeaterComponentBase :: {
…}
566 bool BufferRepeaterComponentBase ::
570 portNum < this->getNum_portOut_OutputPorts(),
574 return this->m_portOut_OutputPort[portNum].isConnected();
566 bool BufferRepeaterComponentBase :: {
…}
583 void BufferRepeaterComponentBase ::
591 portNum < this->getNum_portIn_InputPorts(),
596 this->portIn_handler(
583 void BufferRepeaterComponentBase :: {
…}
613 portNum < this->getNum_allocate_OutputPorts(),
616 return this->m_allocate_OutputPort[portNum].invoke(
621 void BufferRepeaterComponentBase ::
628 portNum < this->getNum_deallocate_OutputPorts(),
631 this->m_deallocate_OutputPort[portNum].invoke(
621 void BufferRepeaterComponentBase :: {
…}
636 void BufferRepeaterComponentBase ::
643 portNum < this->getNum_portOut_OutputPorts(),
646 this->m_portOut_OutputPort[portNum].invoke(
636 void BufferRepeaterComponentBase :: {
…}
655 void BufferRepeaterComponentBase ::
656 log_WARNING_HI_AllocationSoftFailure(
663 if (this->m_Time_OutputPort[0].isConnected()) {
664 this->m_Time_OutputPort[0].invoke(_logTime);
669 _id = this->getIdBase() + EVENTID_ALLOCATIONSOFTFAILURE;
672 if (this->m_Log_OutputPort[0].isConnected()) {
676#if FW_AMPCS_COMPATIBLE
685#if FW_AMPCS_COMPATIBLE
688 static_cast<U8>(
sizeof(I32))
701#if FW_AMPCS_COMPATIBLE
704 static_cast<U8>(
sizeof(U32))
717 this->m_Log_OutputPort[0].invoke(
726#if FW_ENABLE_TEXT_LOGGING
727 if (this->m_LogText_OutputPort[0].isConnected()) {
728#if FW_OBJECT_NAMES == 1
729 const char* _formatString =
730 "(%s) %s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
732 const char* _formatString =
733 "%s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
745 "AllocationSoftFailure ",
753 this->m_LogText_OutputPort[0].invoke(
655 void BufferRepeaterComponentBase :: {
…}
763 void BufferRepeaterComponentBase ::
764 log_FATAL_AllocationHardFailure(
771 if (this->m_Time_OutputPort[0].isConnected()) {
772 this->m_Time_OutputPort[0].invoke(_logTime);
777 _id = this->getIdBase() + EVENTID_ALLOCATIONHARDFAILURE;
780 if (this->m_Log_OutputPort[0].isConnected()) {
784#if FW_AMPCS_COMPATIBLE
786 _status = _logBuff.
serialize(
static_cast<U8>(2 + 1));
799 _status = _logBuff.
serialize(
static_cast<U32
>(0));
806#if FW_AMPCS_COMPATIBLE
809 static_cast<U8>(
sizeof(I32))
822#if FW_AMPCS_COMPATIBLE
825 static_cast<U8>(
sizeof(U32))
838 this->m_Log_OutputPort[0].invoke(
847#if FW_ENABLE_TEXT_LOGGING
848 if (this->m_LogText_OutputPort[0].isConnected()) {
849#if FW_OBJECT_NAMES == 1
850 const char* _formatString =
851 "(%s) %s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
853 const char* _formatString =
854 "%s: Failed to allocate %" PRIi32
" byte buffer for port %" PRIu32
"";
866 "AllocationHardFailure ",
874 this->m_LogText_OutputPort[0].invoke(
763 void BufferRepeaterComponentBase :: {
…}
891 if (this->m_Time_OutputPort[0].isConnected()) {
893 this->m_Time_OutputPort[0].invoke(_time);
905 void BufferRepeaterComponentBase ::
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.
@ FATAL
A fatal non-recoverable event.
void init()
Object initializer.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Auto-generated base for BufferRepeater component.
void portIn_handlerBase(NATIVE_INT_TYPE 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.