11#if FW_ENABLE_TEXT_LOGGING
33 class ComponentIpcSerializableBuffer :
48 return sizeof(m_buff);
55 const U8* getBuffAddr()
const {
61 U8 m_buff[SERIALIZATION_SIZE];
70 void TlmChanComponentBase ::
82 port < static_cast<PlatformIntType>(this->getNum_Run_InputPorts());
85 this->m_Run_InputPort[port].init();
86 this->m_Run_InputPort[port].addCallComp(
90 this->m_Run_InputPort[port].setPortNum(port);
92#if FW_OBJECT_NAMES == 1
101 this->m_Run_InputPort[port].setObjName(portName);
108 port < static_cast<PlatformIntType>(this->getNum_TlmGet_InputPorts());
111 this->m_TlmGet_InputPort[port].init();
112 this->m_TlmGet_InputPort[port].addCallComp(
116 this->m_TlmGet_InputPort[port].setPortNum(port);
118#if FW_OBJECT_NAMES == 1
127 this->m_TlmGet_InputPort[port].setObjName(portName);
134 port < static_cast<PlatformIntType>(this->getNum_TlmRecv_InputPorts());
137 this->m_TlmRecv_InputPort[port].init();
138 this->m_TlmRecv_InputPort[port].addCallComp(
142 this->m_TlmRecv_InputPort[port].setPortNum(port);
144#if FW_OBJECT_NAMES == 1
153 this->m_TlmRecv_InputPort[port].setObjName(portName);
160 port < static_cast<PlatformIntType>(this->getNum_pingIn_InputPorts());
163 this->m_pingIn_InputPort[port].init();
164 this->m_pingIn_InputPort[port].addCallComp(
168 this->m_pingIn_InputPort[port].setPortNum(port);
170#if FW_OBJECT_NAMES == 1
179 this->m_pingIn_InputPort[port].setObjName(portName);
186 port < static_cast<PlatformIntType>(this->getNum_PktSend_OutputPorts());
189 this->m_PktSend_OutputPort[port].init();
191#if FW_OBJECT_NAMES == 1
200 this->m_PktSend_OutputPort[port].setObjName(portName);
207 port < static_cast<PlatformIntType>(this->getNum_pingOut_OutputPorts());
210 this->m_pingOut_OutputPort[port].init();
212#if FW_OBJECT_NAMES == 1
221 this->m_pingOut_OutputPort[port].setObjName(portName);
227 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
70 void TlmChanComponentBase :: {
…}
243 portNum < this->getNum_Run_InputPorts(),
247 return &this->m_Run_InputPort[portNum];
254 portNum < this->getNum_TlmGet_InputPorts(),
258 return &this->m_TlmGet_InputPort[portNum];
265 portNum < this->getNum_TlmRecv_InputPorts(),
269 return &this->m_TlmRecv_InputPort[portNum];
276 portNum < this->getNum_pingIn_InputPorts(),
280 return &this->m_pingIn_InputPort[portNum];
287 void TlmChanComponentBase ::
288 set_PktSend_OutputPort(
294 portNum < this->getNum_PktSend_OutputPorts(),
298 this->m_PktSend_OutputPort[portNum].addCallPort(port);
287 void TlmChanComponentBase :: {
…}
301 void TlmChanComponentBase ::
302 set_pingOut_OutputPort(
308 portNum < this->getNum_pingOut_OutputPorts(),
312 this->m_pingOut_OutputPort[portNum].addCallPort(port);
301 void TlmChanComponentBase :: {
…}
315#if FW_PORT_SERIALIZATION
321 void TlmChanComponentBase ::
322 set_PktSend_OutputPort(
324 Fw::InputSerializePort* port
328 portNum < this->getNum_PktSend_OutputPorts(),
332 this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
335 void TlmChanComponentBase ::
336 set_pingOut_OutputPort(
338 Fw::InputSerializePort* port
342 portNum < this->getNum_pingOut_OutputPorts(),
346 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
355 TlmChanComponentBase ::
356 TlmChanComponentBase(
const char* compName) :
357 Fw::ActiveComponentBase(compName)
355 TlmChanComponentBase :: {
…}
362 TlmChanComponentBase ::
363 ~TlmChanComponentBase()
362 TlmChanComponentBase :: {
…}
373 getNum_Run_InputPorts()
const
379 getNum_TlmGet_InputPorts()
const
385 getNum_TlmRecv_InputPorts()
const
391 getNum_pingIn_InputPorts()
const
401 getNum_PktSend_OutputPorts()
const
407 getNum_pingOut_OutputPorts()
const
416 bool TlmChanComponentBase ::
420 portNum < this->getNum_PktSend_OutputPorts(),
424 return this->m_PktSend_OutputPort[portNum].isConnected();
416 bool TlmChanComponentBase :: {
…}
427 bool TlmChanComponentBase ::
431 portNum < this->getNum_pingOut_OutputPorts(),
435 return this->m_pingOut_OutputPort[portNum].isConnected();
427 bool TlmChanComponentBase :: {
…}
444 void TlmChanComponentBase ::
452 portNum < this->getNum_Run_InputPorts(),
461 ComponentIpcSerializableBuffer msg;
465 _status = msg.serialize(
474 _status = msg.serialize(portNum);
481 _status = msg.serialize(context);
444 void TlmChanComponentBase :: {
…}
497 void TlmChanComponentBase ::
507 portNum < this->getNum_TlmGet_InputPorts(),
515 this->TlmGet_handler(
497 void TlmChanComponentBase :: {
…}
526 void TlmChanComponentBase ::
536 portNum < this->getNum_TlmRecv_InputPorts(),
544 this->TlmRecv_handler(
526 void TlmChanComponentBase :: {
…}
555 void TlmChanComponentBase ::
563 portNum < this->getNum_pingIn_InputPorts(),
572 ComponentIpcSerializableBuffer msg;
576 _status = msg.serialize(
585 _status = msg.serialize(portNum);
592 _status = msg.serialize(key);
555 void TlmChanComponentBase :: {
…}
616 void TlmChanComponentBase ::
616 void TlmChanComponentBase :: {
…}
625 void TlmChanComponentBase ::
625 void TlmChanComponentBase :: {
…}
638 void TlmChanComponentBase ::
646 portNum < this->getNum_PktSend_OutputPorts(),
649 this->m_PktSend_OutputPort[portNum].invoke(
638 void TlmChanComponentBase :: {
…}
655 void TlmChanComponentBase ::
662 portNum < this->getNum_pingOut_OutputPorts(),
665 this->m_pingOut_OutputPort[portNum].invoke(
655 void TlmChanComponentBase :: {
…}
677 void TlmChanComponentBase ::
680 this->m_guardedPortMutex.lock();
677 void TlmChanComponentBase :: {
…}
683 void TlmChanComponentBase ::
686 this->m_guardedPortMutex.unLock();
683 void TlmChanComponentBase :: {
…}
696 ComponentIpcSerializableBuffer msg;
719 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
721 if (msgType == TLMCHAN_COMPONENT_EXIT) {
722 return MSG_DISPATCH_EXIT;
726 deserStatus = msg.deserialize(portNum);
737 deserStatus = msg.deserialize(context);
755 deserStatus = msg.deserialize(key);
761 this->pingIn_handler(
770 return MSG_DISPATCH_ERROR;
773 return MSG_DISPATCH_OK;
780 void TlmChanComponentBase ::
788 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
789 compPtr->Run_handlerBase(
795 void TlmChanComponentBase ::
805 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
806 compPtr->TlmGet_handlerBase(
814 void TlmChanComponentBase ::
824 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
825 compPtr->TlmRecv_handlerBase(
833 void TlmChanComponentBase ::
841 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
842 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.