9 #if FW_ENABLE_TEXT_LOGGING 32 class ComponentIpcSerializableBuffer :
42 MAX_DATA_SIZE =
sizeof(BuffUnion),
44 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
48 return sizeof(m_buff);
55 const U8* getBuffAddr()
const {
61 U8 m_buff[SERIALIZATION_SIZE];
85 this->m_Run_InputPort[port].
init();
92 #if FW_OBJECT_NAMES == 1 96 this->m_objName.toChar(),
99 this->m_Run_InputPort[port].setObjName(portName.
toChar());
109 this->m_TlmGet_InputPort[port].
init();
114 this->m_TlmGet_InputPort[port].
setPortNum(port);
116 #if FW_OBJECT_NAMES == 1 120 this->m_objName.toChar(),
123 this->m_TlmGet_InputPort[port].setObjName(portName.
toChar());
133 this->m_TlmRecv_InputPort[port].
init();
138 this->m_TlmRecv_InputPort[port].
setPortNum(port);
140 #if FW_OBJECT_NAMES == 1 144 this->m_objName.toChar(),
147 this->m_TlmRecv_InputPort[port].setObjName(portName.
toChar());
157 this->m_pingIn_InputPort[port].
init();
162 this->m_pingIn_InputPort[port].
setPortNum(port);
164 #if FW_OBJECT_NAMES == 1 168 this->m_objName.toChar(),
171 this->m_pingIn_InputPort[port].setObjName(portName.
toChar());
181 this->m_PktSend_OutputPort[port].
init();
183 #if FW_OBJECT_NAMES == 1 187 this->m_objName.toChar(),
190 this->m_PktSend_OutputPort[port].setObjName(portName.
toChar());
200 this->m_pingOut_OutputPort[port].
init();
202 #if FW_OBJECT_NAMES == 1 206 this->m_objName.toChar(),
209 this->m_pingOut_OutputPort[port].setObjName(portName.
toChar());
216 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
220 static_cast<FwAssertArgType>(qStat)
233 static_cast<FwAssertArgType>(portNum)
236 return &this->m_Run_InputPort[portNum];
244 static_cast<FwAssertArgType>(portNum)
247 return &this->m_TlmGet_InputPort[portNum];
255 static_cast<FwAssertArgType>(portNum)
258 return &this->m_TlmRecv_InputPort[portNum];
266 static_cast<FwAssertArgType>(portNum)
269 return &this->m_pingIn_InputPort[portNum];
284 static_cast<FwAssertArgType>(portNum)
287 this->m_PktSend_OutputPort[portNum].
addCallPort(port);
298 static_cast<FwAssertArgType>(portNum)
301 this->m_pingOut_OutputPort[portNum].
addCallPort(port);
304 #if FW_PORT_SERIALIZATION 313 Fw::InputSerializePort* port
318 static_cast<FwAssertArgType>(portNum)
321 this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
327 Fw::InputSerializePort* port
332 static_cast<FwAssertArgType>(portNum)
335 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
346 Fw::ActiveComponentBase(compName)
366 static_cast<FwAssertArgType>(portNum)
369 return this->m_PktSend_OutputPort[portNum].
isConnected();
377 static_cast<FwAssertArgType>(portNum)
380 return this->m_pingOut_OutputPort[portNum].
isConnected();
398 static_cast<FwAssertArgType>(portNum)
406 ComponentIpcSerializableBuffer msg;
410 _status = msg.serializeFrom(
411 static_cast<FwEnumStoreType>(RUN_SCHED)
415 static_cast<FwAssertArgType>(_status)
419 _status = msg.serializeFrom(portNum);
422 static_cast<FwAssertArgType>(_status)
426 _status = msg.serializeFrom(context);
429 static_cast<FwAssertArgType>(_status)
438 static_cast<FwAssertArgType>(qStatus)
453 static_cast<FwAssertArgType>(portNum)
486 static_cast<FwAssertArgType>(portNum)
513 static_cast<FwAssertArgType>(portNum)
521 ComponentIpcSerializableBuffer msg;
525 _status = msg.serializeFrom(
526 static_cast<FwEnumStoreType>(PINGIN_PING)
530 static_cast<FwAssertArgType>(_status)
534 _status = msg.serializeFrom(portNum);
537 static_cast<FwAssertArgType>(_status)
541 _status = msg.serializeFrom(key);
544 static_cast<FwAssertArgType>(_status)
553 static_cast<FwAssertArgType>(qStatus)
596 static_cast<FwAssertArgType>(portNum)
600 this->m_PktSend_OutputPort[portNum].isConnected(),
601 static_cast<FwAssertArgType>(portNum)
603 this->m_PktSend_OutputPort[portNum].
invoke(
617 static_cast<FwAssertArgType>(portNum)
621 this->m_pingOut_OutputPort[portNum].isConnected(),
622 static_cast<FwAssertArgType>(portNum)
624 this->m_pingOut_OutputPort[portNum].
invoke(
639 this->m_guardedPortMutex.
lock();
645 this->m_guardedPortMutex.
unLock();
655 ComponentIpcSerializableBuffer _msg;
665 static_cast<FwAssertArgType>(_msgStatus)
675 static_cast<FwAssertArgType>(_deserStatus)
678 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
680 if (_msgType == TLMCHAN_COMPONENT_EXIT) {
685 _deserStatus = _msg.deserializeTo(portNum);
688 static_cast<FwAssertArgType>(_deserStatus)
696 _deserStatus = _msg.deserializeTo(context);
699 static_cast<FwAssertArgType>(_deserStatus)
714 _deserStatus = _msg.deserializeTo(key);
717 static_cast<FwAssertArgType>(_deserStatus)
739 void TlmChanComponentBase ::
748 compPtr->Run_handlerBase(
765 return compPtr->TlmGet_handlerBase(
773 void TlmChanComponentBase ::
784 compPtr->TlmRecv_handlerBase(
792 void TlmChanComponentBase ::
801 compPtr->pingIn_handlerBase(
Serialization/Deserialization operation was successful.
virtual void TlmRecv_handler(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port TlmRecv.
void invoke(Fw::ComBuffer &data, U32 context) const
Invoke a port interface.
void init()
Initialization function.
virtual Fw::TlmValid TlmGet_handler(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port TlmGet.
PlatformSizeType FwSizeType
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Fw::InputTlmPort * get_TlmRecv_InputPort(FwIndexType portNum)
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
Status
status returned from the queue send function
Fw::TlmValid TlmGet_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port TlmGet.
void unLock()
unlock the mutex and assert success
void invoke(U32 key) const
Invoke a port interface.
void PktSend_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port PktSend.
virtual ~TlmChanComponentBase()
Destroy TlmChanComponentBase object.
static constexpr FwIndexType getNum_Run_InputPorts()
Os::Queue m_queue
queue object for active component
void init()
Object initializer.
SerializeStatus
forward declaration for string
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Message will block until space is available.
virtual void lock()
Lock the guarded mutex.
Svc::InputSchedPort * get_Run_InputPort(FwIndexType portNum)
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
bool isConnected_PktSend_OutputPort(FwIndexType portNum)
void init()
Initialization function.
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
static constexpr FwIndexType getNum_pingIn_InputPorts()
const char * toChar() const
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void addCallPort(InputPingPort *callPort)
Register an input port.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
static constexpr FwIndexType getNum_TlmRecv_InputPorts()
Errors dispatching messages.
void set_PktSend_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to PktSend[portNum].
static constexpr FwIndexType getNum_PktSend_OutputPorts()
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
uint8_t U8
8-bit unsigned integer
virtual void Run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Run.
virtual void Run_handler(FwIndexType portNum, U32 context)=0
Handler for input port Run.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
A message was sent requesting an exit of the loop.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
message to exit active component task
void TlmRecv_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port TlmRecv.
PlatformIndexType FwIndexType
virtual void unLock()
Unlock the guarded mutex.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
RateGroupDivider component implementation.
message sent/received okay
Fw::InputTlmGetPort * get_TlmGet_InputPort(FwIndexType portNum)
void addCallPort(InputComPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_TlmGet_InputPorts()
Message will return with status when space is unavailable.
Implementation of malloc based allocator.
TlmChanComponentBase(const char *compName="")
Construct TlmChanComponentBase object.
void Run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Run.
void lock()
lock the mutex and assert success