11#if FW_ENABLE_TEXT_LOGGING
34 class ComponentIpcSerializableBuffer :
49 return sizeof(m_buff);
56 const U8* getBuffAddr()
const {
62 U8 m_buff[SERIALIZATION_SIZE];
71 void TlmChanComponentBase ::
83 port < static_cast<PlatformIntType>(this->getNum_Run_InputPorts());
86 this->m_Run_InputPort[port].init();
87 this->m_Run_InputPort[port].addCallComp(
91 this->m_Run_InputPort[port].setPortNum(port);
93#if FW_OBJECT_NAMES == 1
102 this->m_Run_InputPort[port].setObjName(portName);
109 port < static_cast<PlatformIntType>(this->getNum_TlmGet_InputPorts());
112 this->m_TlmGet_InputPort[port].init();
113 this->m_TlmGet_InputPort[port].addCallComp(
117 this->m_TlmGet_InputPort[port].setPortNum(port);
119#if FW_OBJECT_NAMES == 1
128 this->m_TlmGet_InputPort[port].setObjName(portName);
135 port < static_cast<PlatformIntType>(this->getNum_TlmRecv_InputPorts());
138 this->m_TlmRecv_InputPort[port].init();
139 this->m_TlmRecv_InputPort[port].addCallComp(
143 this->m_TlmRecv_InputPort[port].setPortNum(port);
145#if FW_OBJECT_NAMES == 1
154 this->m_TlmRecv_InputPort[port].setObjName(portName);
161 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
164 this->m_pingIn_InputPort[port].init();
165 this->m_pingIn_InputPort[port].addCallComp(
169 this->m_pingIn_InputPort[port].setPortNum(port);
171#if FW_OBJECT_NAMES == 1
180 this->m_pingIn_InputPort[port].setObjName(portName);
187 port < static_cast<PlatformIntType>(this->getNum_PktSend_OutputPorts());
190 this->m_PktSend_OutputPort[port].init();
192#if FW_OBJECT_NAMES == 1
201 this->m_PktSend_OutputPort[port].setObjName(portName);
208 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
211 this->m_pingOut_OutputPort[port].init();
213#if FW_OBJECT_NAMES == 1
222 this->m_pingOut_OutputPort[port].setObjName(portName);
228 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
71 void TlmChanComponentBase :: {
…}
244 portNum < this->getNum_Run_InputPorts(),
248 return &this->m_Run_InputPort[portNum];
255 portNum < this->getNum_TlmGet_InputPorts(),
259 return &this->m_TlmGet_InputPort[portNum];
266 portNum < this->getNum_TlmRecv_InputPorts(),
270 return &this->m_TlmRecv_InputPort[portNum];
277 portNum < this->getNum_pingIn_InputPorts(),
281 return &this->m_pingIn_InputPort[portNum];
288 void TlmChanComponentBase ::
289 set_PktSend_OutputPort(
295 portNum < this->getNum_PktSend_OutputPorts(),
299 this->m_PktSend_OutputPort[portNum].addCallPort(port);
288 void TlmChanComponentBase :: {
…}
302 void TlmChanComponentBase ::
303 set_pingOut_OutputPort(
309 portNum < this->getNum_pingOut_OutputPorts(),
313 this->m_pingOut_OutputPort[portNum].addCallPort(port);
302 void TlmChanComponentBase :: {
…}
316#if FW_PORT_SERIALIZATION
322 void TlmChanComponentBase ::
323 set_PktSend_OutputPort(
325 Fw::InputSerializePort* port
329 portNum < this->getNum_PktSend_OutputPorts(),
333 this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
336 void TlmChanComponentBase ::
337 set_pingOut_OutputPort(
339 Fw::InputSerializePort* port
343 portNum < this->getNum_pingOut_OutputPorts(),
347 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
356 TlmChanComponentBase ::
357 TlmChanComponentBase(
const char* compName) :
358 Fw::ActiveComponentBase(compName)
356 TlmChanComponentBase :: {
…}
363 TlmChanComponentBase ::
364 ~TlmChanComponentBase()
363 TlmChanComponentBase :: {
…}
374 getNum_Run_InputPorts()
380 getNum_TlmGet_InputPorts()
386 getNum_TlmRecv_InputPorts()
392 getNum_pingIn_InputPorts()
402 getNum_PktSend_OutputPorts()
408 getNum_pingOut_OutputPorts()
417 bool TlmChanComponentBase ::
421 portNum < this->getNum_PktSend_OutputPorts(),
425 return this->m_PktSend_OutputPort[portNum].isConnected();
417 bool TlmChanComponentBase :: {
…}
428 bool TlmChanComponentBase ::
432 portNum < this->getNum_pingOut_OutputPorts(),
436 return this->m_pingOut_OutputPort[portNum].isConnected();
428 bool TlmChanComponentBase :: {
…}
445 void TlmChanComponentBase ::
453 portNum < this->getNum_Run_InputPorts(),
462 ComponentIpcSerializableBuffer msg;
466 _status = msg.serialize(
475 _status = msg.serialize(portNum);
482 _status = msg.serialize(context);
445 void TlmChanComponentBase :: {
…}
498 void TlmChanComponentBase ::
508 portNum < this->getNum_TlmGet_InputPorts(),
516 this->TlmGet_handler(
498 void TlmChanComponentBase :: {
…}
527 void TlmChanComponentBase ::
537 portNum < this->getNum_TlmRecv_InputPorts(),
545 this->TlmRecv_handler(
527 void TlmChanComponentBase :: {
…}
556 void TlmChanComponentBase ::
564 portNum < this->getNum_pingIn_InputPorts(),
573 ComponentIpcSerializableBuffer msg;
577 _status = msg.serialize(
586 _status = msg.serialize(portNum);
593 _status = msg.serialize(key);
556 void TlmChanComponentBase :: {
…}
617 void TlmChanComponentBase ::
617 void TlmChanComponentBase :: {
…}
626 void TlmChanComponentBase ::
626 void TlmChanComponentBase :: {
…}
639 void TlmChanComponentBase ::
647 portNum < this->getNum_PktSend_OutputPorts(),
650 this->m_PktSend_OutputPort[portNum].invoke(
639 void TlmChanComponentBase :: {
…}
656 void TlmChanComponentBase ::
663 portNum < this->getNum_pingOut_OutputPorts(),
666 this->m_pingOut_OutputPort[portNum].invoke(
656 void TlmChanComponentBase :: {
…}
678 void TlmChanComponentBase ::
681 this->m_guardedPortMutex.lock();
678 void TlmChanComponentBase :: {
…}
684 void TlmChanComponentBase ::
687 this->m_guardedPortMutex.unLock();
684 void TlmChanComponentBase :: {
…}
697 ComponentIpcSerializableBuffer msg;
720 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
722 if (msgType == TLMCHAN_COMPONENT_EXIT) {
723 return MSG_DISPATCH_EXIT;
727 deserStatus = msg.deserialize(portNum);
738 deserStatus = msg.deserialize(context);
756 deserStatus = msg.deserialize(key);
762 this->pingIn_handler(
771 return MSG_DISPATCH_ERROR;
774 return MSG_DISPATCH_OK;
781 void TlmChanComponentBase ::
789 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
790 compPtr->Run_handlerBase(
796 void TlmChanComponentBase ::
806 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
807 compPtr->TlmGet_handlerBase(
815 void TlmChanComponentBase ::
825 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
826 compPtr->TlmRecv_handlerBase(
834 void TlmChanComponentBase ::
842 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
843 compPtr->pingIn_handlerBase(
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
PlatformAssertArgType FwAssertArgType
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
void init()
Object initializer.
@ QUEUE_OK
message sent/received okay
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.