9 #if FW_ENABLE_TEXT_LOGGING 26 #if !FW_DIRECT_PORT_CALLS 33 this->m_dataIn_InputPort[port].
init();
38 this->m_dataIn_InputPort[port].
setPortNum(port);
40 #if FW_OBJECT_NAMES == 1 44 this->m_objName.toChar(),
47 this->m_dataIn_InputPort[port].setObjName(portName.
toChar());
52 #if !FW_DIRECT_PORT_CALLS 59 this->m_dataReturnIn_InputPort[port].
init();
64 this->m_dataReturnIn_InputPort[port].
setPortNum(port);
66 #if FW_OBJECT_NAMES == 1 70 this->m_objName.toChar(),
73 this->m_dataReturnIn_InputPort[port].setObjName(portName.
toChar());
78 #if !FW_DIRECT_PORT_CALLS 85 this->m_logOut_OutputPort[port].
init();
87 #if FW_OBJECT_NAMES == 1 91 this->m_objName.toChar(),
94 this->m_logOut_OutputPort[port].setObjName(portName.
toChar());
99 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING 103 port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
106 this->m_logTextOut_OutputPort[port].
init();
108 #if FW_OBJECT_NAMES == 1 112 this->m_objName.toChar(),
115 this->m_logTextOut_OutputPort[port].setObjName(portName.
toChar());
120 #if !FW_DIRECT_PORT_CALLS 127 this->m_timeCaller_OutputPort[port].
init();
129 #if FW_OBJECT_NAMES == 1 133 this->m_objName.toChar(),
136 this->m_timeCaller_OutputPort[port].setObjName(portName.
toChar());
141 #if !FW_DIRECT_PORT_CALLS 148 this->m_bufferAllocate_OutputPort[port].
init();
150 #if FW_OBJECT_NAMES == 1 154 this->m_objName.toChar(),
157 this->m_bufferAllocate_OutputPort[port].setObjName(portName.
toChar());
162 #if !FW_DIRECT_PORT_CALLS 169 this->m_bufferDeallocate_OutputPort[port].
init();
171 #if FW_OBJECT_NAMES == 1 175 this->m_objName.toChar(),
178 this->m_bufferDeallocate_OutputPort[port].setObjName(portName.
toChar());
183 #if !FW_DIRECT_PORT_CALLS 190 this->m_dataOut_OutputPort[port].
init();
192 #if FW_OBJECT_NAMES == 1 196 this->m_objName.toChar(),
199 this->m_dataOut_OutputPort[port].setObjName(portName.
toChar());
204 #if !FW_DIRECT_PORT_CALLS 211 this->m_dataReturnOut_OutputPort[port].
init();
213 #if FW_OBJECT_NAMES == 1 217 this->m_objName.toChar(),
220 this->m_dataReturnOut_OutputPort[port].setObjName(portName.
toChar());
226 #if !FW_DIRECT_PORT_CALLS 237 static_cast<FwAssertArgType>(portNum)
240 return &this->m_dataIn_InputPort[portNum];
248 static_cast<FwAssertArgType>(portNum)
251 return &this->m_dataReturnIn_InputPort[portNum];
256 #if !FW_DIRECT_PORT_CALLS 270 static_cast<FwAssertArgType>(portNum)
273 this->m_logOut_OutputPort[portNum].
addCallPort(port);
276 #if FW_ENABLE_TEXT_LOGGING == 1 278 void FrameAccumulatorComponentBase ::
279 set_logTextOut_OutputPort(
285 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
286 static_cast<FwAssertArgType>(portNum)
289 this->m_logTextOut_OutputPort[portNum].addCallPort(port);
302 static_cast<FwAssertArgType>(portNum)
305 this->m_timeCaller_OutputPort[portNum].
addCallPort(port);
310 #if !FW_DIRECT_PORT_CALLS 324 static_cast<FwAssertArgType>(portNum)
327 this->m_bufferAllocate_OutputPort[portNum].
addCallPort(port);
338 static_cast<FwAssertArgType>(portNum)
341 this->m_bufferDeallocate_OutputPort[portNum].
addCallPort(port);
352 static_cast<FwAssertArgType>(portNum)
355 this->m_dataOut_OutputPort[portNum].
addCallPort(port);
366 static_cast<FwAssertArgType>(portNum)
369 this->m_dataReturnOut_OutputPort[portNum].
addCallPort(port);
374 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 383 Fw::InputSerializePort* port
388 static_cast<FwAssertArgType>(portNum)
391 this->m_logOut_OutputPort[portNum].registerSerialPort(port);
394 #if FW_ENABLE_TEXT_LOGGING == 1 396 void FrameAccumulatorComponentBase ::
397 set_logTextOut_OutputPort(
399 Fw::InputSerializePort* port
403 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
404 static_cast<FwAssertArgType>(portNum)
407 this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
415 Fw::InputSerializePort* port
420 static_cast<FwAssertArgType>(portNum)
423 this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
428 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 437 Fw::InputSerializePort* port
442 static_cast<FwAssertArgType>(portNum)
445 this->m_bufferDeallocate_OutputPort[portNum].registerSerialPort(port);
451 Fw::InputSerializePort* port
456 static_cast<FwAssertArgType>(portNum)
459 this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
465 Fw::InputSerializePort* port
470 static_cast<FwAssertArgType>(portNum)
473 this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
484 Fw::PassiveComponentBase(compName)
495 #if !FW_DIRECT_PORT_CALLS 506 static_cast<FwAssertArgType>(portNum)
509 return this->m_logOut_OutputPort[portNum].
isConnected();
512 #if FW_ENABLE_TEXT_LOGGING == 1 514 bool FrameAccumulatorComponentBase ::
515 isConnected_logTextOut_OutputPort(
FwIndexType portNum)
const 518 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
519 static_cast<FwAssertArgType>(portNum)
522 return this->m_logTextOut_OutputPort[portNum].isConnected();
532 static_cast<FwAssertArgType>(portNum)
535 return this->m_timeCaller_OutputPort[portNum].
isConnected();
540 #if !FW_DIRECT_PORT_CALLS 551 static_cast<FwAssertArgType>(portNum)
554 return this->m_bufferAllocate_OutputPort[portNum].
isConnected();
562 static_cast<FwAssertArgType>(portNum)
565 return this->m_bufferDeallocate_OutputPort[portNum].
isConnected();
573 static_cast<FwAssertArgType>(portNum)
576 return this->m_dataOut_OutputPort[portNum].
isConnected();
584 static_cast<FwAssertArgType>(portNum)
587 return this->m_dataReturnOut_OutputPort[portNum].
isConnected();
608 static_cast<FwAssertArgType>(portNum)
635 static_cast<FwAssertArgType>(portNum)
646 #if !FW_DIRECT_PORT_CALLS 660 static_cast<FwAssertArgType>(portNum)
664 this->m_bufferAllocate_OutputPort[portNum].isConnected(),
665 static_cast<FwAssertArgType>(portNum)
667 return this->m_bufferAllocate_OutputPort[portNum].
invoke(
680 static_cast<FwAssertArgType>(portNum)
684 this->m_bufferDeallocate_OutputPort[portNum].isConnected(),
685 static_cast<FwAssertArgType>(portNum)
687 this->m_bufferDeallocate_OutputPort[portNum].
invoke(
701 static_cast<FwAssertArgType>(portNum)
705 this->m_dataOut_OutputPort[portNum].isConnected(),
706 static_cast<FwAssertArgType>(portNum)
708 this->m_dataOut_OutputPort[portNum].
invoke(
723 static_cast<FwAssertArgType>(portNum)
727 this->m_dataReturnOut_OutputPort[portNum].isConnected(),
728 static_cast<FwAssertArgType>(portNum)
730 this->m_dataReturnOut_OutputPort[portNum].
invoke(
748 this->timeCaller_out(0, _logTime);
757 #if FW_AMPCS_COMPATIBLE 763 static_cast<FwAssertArgType>(_status)
777 #if FW_ENABLE_TEXT_LOGGING 778 if (this->isConnected_logTextOut_OutputPort(0)) {
779 #if FW_OBJECT_NAMES == 1 780 const char* _formatString =
781 "(%s) %s: Could not allocate a valid buffer to fit the detected frame";
783 const char* _formatString =
784 "%s: Could not allocate a valid buffer to fit the detected frame";
791 this->m_objName.toChar(),
796 this->logTextOut_out(
813 this->timeCaller_out(0, _logTime);
823 #if FW_AMPCS_COMPATIBLE 828 static_cast<FwAssertArgType>(_status)
832 #if FW_AMPCS_COMPATIBLE 839 static_cast<FwAssertArgType>(_status)
845 static_cast<FwAssertArgType>(_status)
858 #if FW_ENABLE_TEXT_LOGGING 859 if (this->isConnected_logTextOut_OutputPort(0)) {
860 #if FW_OBJECT_NAMES == 1 861 const char* _formatString =
862 "(%s) %s: Reported size_out=%" PRIu64
" exceeds accumulation buffer capacity";
864 const char* _formatString =
865 "%s: Reported size_out=%" PRIu64
" exceeds accumulation buffer capacity";
872 this->m_objName.toChar(),
874 "FrameDetectionSizeError ",
878 this->logTextOut_out(
895 this->timeCaller_out(0, _logTime);
904 #if FW_AMPCS_COMPATIBLE 910 static_cast<FwAssertArgType>(_status)
924 #if FW_ENABLE_TEXT_LOGGING 925 if (this->isConnected_logTextOut_OutputPort(0)) {
926 #if FW_OBJECT_NAMES == 1 927 const char* _formatString =
928 "(%s) %s: A valid frame was detected but dropped";
930 const char* _formatString =
931 "%s: A valid frame was detected but dropped";
938 this->m_objName.toChar(),
940 "FrameDetectionValidFrameDropped " 943 this->logTextOut_out(
963 this->timeCaller_out(0, _time);
981 this->m_guardedPortMutex.
lock();
987 this->m_guardedPortMutex.
unLock();
994 void FrameAccumulatorComponentBase ::
1011 void FrameAccumulatorComponentBase ::
1012 m_p_dataReturnIn_in(
1021 compPtr->dataReturnIn_handlerBase(
1028 #if !FW_DIRECT_PORT_CALLS 1034 void FrameAccumulatorComponentBase ::
1045 static_cast<FwAssertArgType>(portNum)
1049 this->m_logOut_OutputPort[portNum].isConnected(),
1050 static_cast<FwAssertArgType>(portNum)
1052 this->m_logOut_OutputPort[portNum].
invoke(
1060 #if FW_ENABLE_TEXT_LOGGING 1062 void FrameAccumulatorComponentBase ::
1072 (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1073 static_cast<FwAssertArgType>(portNum)
1077 this->m_logTextOut_OutputPort[portNum].isConnected(),
1078 static_cast<FwAssertArgType>(portNum)
1080 this->m_logTextOut_OutputPort[portNum].invoke(
1090 void FrameAccumulatorComponentBase ::
1098 static_cast<FwAssertArgType>(portNum)
1102 this->m_timeCaller_OutputPort[portNum].isConnected(),
1103 static_cast<FwAssertArgType>(portNum)
1105 this->m_timeCaller_OutputPort[portNum].
invoke(
bool isConnected_bufferAllocate_OutputPort(FwIndexType portNum) const
Serialization/Deserialization operation was successful.
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputTimePort *callPort)
Register an input port.
virtual void unLock()
Unlock the guarded mutex.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
FwIdType getIdBase() const
PlatformSizeType FwSizeType
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
void unLock()
unlock the mutex and assert success
void set_bufferAllocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to bufferAllocate[portNum].
static constexpr FwIndexType getNum_dataIn_InputPorts()
No time base has been established (Required)
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
bool isConnected_bufferDeallocate_OutputPort(FwIndexType portNum) const
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void init()
Object initializer.
static constexpr FwIndexType getNum_bufferDeallocate_OutputPorts()
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
FwIdType FwEventIdType
The type of an event identifier.
static constexpr FwIndexType getNum_bufferAllocate_OutputPorts()
void log_WARNING_HI_NoBufferAvailable() const
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
void init()
Initialization function.
An error occurred while deserializing a packet.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port connection.
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
const char * toChar() const
Convert to a C-style char*.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port connection.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
static constexpr FwIndexType getNum_dataOut_OutputPorts()
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
A serious but recoverable event.
void init()
Initialization function.
Enum representing event severity.
void bufferDeallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferDeallocate.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void log_WARNING_HI_FrameDetectionValidFrameDropped() const
virtual void lock()
Lock the guarded mutex.
Fw::Buffer invoke(FwSizeType size) const
void init()
Initialization function.
void init()
Initialization function.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void log_WARNING_HI_FrameDetectionSizeError(FwSizeType size_out) const
PlatformIndexType FwIndexType
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
void addCallPort(InputLogPort *callPort)
Register an input port.
Fw::Buffer bufferAllocate_out(FwIndexType portNum, FwSizeType size) const
Invoke output port bufferAllocate.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Type used to pass context info between components during framing/deframing.
Auto-generated base for FrameAccumulator component.
void init()
Initialization function.
RateGroupDivider component implementation.
void set_bufferDeallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferDeallocate[portNum].
FrameAccumulatorComponentBase(const char *compName="")
Construct FrameAccumulatorComponentBase object.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
Implementation of malloc based allocator.
virtual ~FrameAccumulatorComponentBase()
Destroy FrameAccumulatorComponentBase object.
A frame was detected but dropped because there was no buffer to hold it.
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
void lock()
lock the mutex and assert success