10 #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)
410 static_cast<FwAssertArgType>(portNum)
413 return this->m_PktSend_OutputPort[portNum].
isConnected();
421 static_cast<FwAssertArgType>(portNum)
424 return this->m_pingOut_OutputPort[portNum].
isConnected();
442 static_cast<FwAssertArgType>(portNum)
450 ComponentIpcSerializableBuffer msg;
454 _status = msg.serialize(
455 static_cast<FwEnumStoreType>(RUN_SCHED)
459 static_cast<FwAssertArgType>(_status)
463 _status = msg.serialize(portNum);
466 static_cast<FwAssertArgType>(_status)
470 _status = msg.serialize(context);
473 static_cast<FwAssertArgType>(_status)
482 static_cast<FwAssertArgType>(qStatus)
497 static_cast<FwAssertArgType>(portNum)
526 static_cast<FwAssertArgType>(portNum)
553 static_cast<FwAssertArgType>(portNum)
561 ComponentIpcSerializableBuffer msg;
565 _status = msg.serialize(
566 static_cast<FwEnumStoreType>(PINGIN_PING)
570 static_cast<FwAssertArgType>(_status)
574 _status = msg.serialize(portNum);
577 static_cast<FwAssertArgType>(_status)
581 _status = msg.serialize(key);
584 static_cast<FwAssertArgType>(_status)
593 static_cast<FwAssertArgType>(qStatus)
636 static_cast<FwAssertArgType>(portNum)
638 this->m_PktSend_OutputPort[portNum].
invoke(
652 static_cast<FwAssertArgType>(portNum)
654 this->m_pingOut_OutputPort[portNum].
invoke(
669 this->m_guardedPortMutex.
lock();
675 this->m_guardedPortMutex.
unLock();
685 ComponentIpcSerializableBuffer msg;
695 static_cast<FwAssertArgType>(msgStatus)
705 static_cast<FwAssertArgType>(deserStatus)
708 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
710 if (msgType == TLMCHAN_COMPONENT_EXIT) {
715 deserStatus = msg.deserialize(portNum);
718 static_cast<FwAssertArgType>(deserStatus)
726 deserStatus = msg.deserialize(context);
729 static_cast<FwAssertArgType>(deserStatus)
744 deserStatus = msg.deserialize(key);
747 static_cast<FwAssertArgType>(deserStatus)
769 void TlmChanComponentBase ::
778 compPtr->Run_handlerBase(
784 void TlmChanComponentBase ::
795 compPtr->TlmGet_handlerBase(
803 void TlmChanComponentBase ::
814 compPtr->TlmRecv_handlerBase(
822 void TlmChanComponentBase ::
831 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.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Fw::InputTlmPort * get_TlmRecv_InputPort(FwIndexType portNum)
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
NATIVE_UINT_TYPE SizeType
Status
status returned from the queue send function
void unLock()
unlock the mutex and assert success
PlatformSizeType FwSizeType
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.
FwIndexType getNum_TlmRecv_InputPorts() const
FwIndexType getNum_TlmGet_InputPorts() const
FwIndexType getNum_Run_InputPorts() const
PlatformIndexType FwIndexType
Os::Queue m_queue
queue object for active component
void init()
Object initializer.
FwIndexType getNum_PktSend_OutputPorts() const
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.
const char * toChar() const
void addCallPort(InputPingPort *callPort)
Register an input port.
virtual void TlmGet_handler(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port TlmGet.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Errors dispatching messages.
FwIndexType getNum_pingIn_InputPorts() const
FwIndexType getNum_pingOut_OutputPorts() const
void set_PktSend_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to PktSend[portNum].
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
uint8_t U8
8-bit unsigned integer
#define PRI_PlatformIntType
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
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
message to exit active component task
A message was sent requesting an exit of the loop.
void TlmGet_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port TlmGet.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
void TlmRecv_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port TlmRecv.
virtual void unLock()
Unlock the guarded mutex.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
message sent/received okay
Fw::InputTlmGetPort * get_TlmGet_InputPort(FwIndexType portNum)
void addCallPort(InputComPort *callPort)
Register an input port.
Message will return with status when space is unavailable.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
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