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];
70 void TlmChanComponentBase ::
82 port < static_cast<FwIndexType>(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
96 this->m_objName.toChar(),
99 this->m_Run_InputPort[port].setObjName(portName.
toChar());
106 port < static_cast<FwIndexType>(this->getNum_TlmGet_InputPorts());
109 this->m_TlmGet_InputPort[port].init();
110 this->m_TlmGet_InputPort[port].addCallComp(
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());
130 port < static_cast<FwIndexType>(this->getNum_TlmRecv_InputPorts());
133 this->m_TlmRecv_InputPort[port].init();
134 this->m_TlmRecv_InputPort[port].addCallComp(
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());
154 port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
157 this->m_pingIn_InputPort[port].init();
158 this->m_pingIn_InputPort[port].addCallComp(
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());
178 port < static_cast<FwIndexType>(this->getNum_PktSend_OutputPorts());
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());
197 port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
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)
232 portNum < this->getNum_Run_InputPorts(),
236 return &this->m_Run_InputPort[portNum];
243 portNum < this->getNum_TlmGet_InputPorts(),
247 return &this->m_TlmGet_InputPort[portNum];
254 portNum < this->getNum_TlmRecv_InputPorts(),
258 return &this->m_TlmRecv_InputPort[portNum];
265 portNum < this->getNum_pingIn_InputPorts(),
269 return &this->m_pingIn_InputPort[portNum];
276 void TlmChanComponentBase ::
277 set_PktSend_OutputPort(
283 portNum < this->getNum_PktSend_OutputPorts(),
287 this->m_PktSend_OutputPort[portNum].addCallPort(port);
290 void TlmChanComponentBase ::
291 set_pingOut_OutputPort(
297 portNum < this->getNum_pingOut_OutputPorts(),
301 this->m_pingOut_OutputPort[portNum].addCallPort(port);
304#if FW_PORT_SERIALIZATION
310 void TlmChanComponentBase ::
311 set_PktSend_OutputPort(
313 Fw::InputSerializePort* port
317 portNum < this->getNum_PktSend_OutputPorts(),
321 this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
324 void TlmChanComponentBase ::
325 set_pingOut_OutputPort(
327 Fw::InputSerializePort* port
331 portNum < this->getNum_pingOut_OutputPorts(),
335 this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
344 TlmChanComponentBase ::
345 TlmChanComponentBase(
const char* compName) :
346 Fw::ActiveComponentBase(compName)
351 TlmChanComponentBase ::
352 ~TlmChanComponentBase()
362 getNum_Run_InputPorts()
const
368 getNum_TlmGet_InputPorts()
const
374 getNum_TlmRecv_InputPorts()
const
380 getNum_pingIn_InputPorts()
const
390 getNum_PktSend_OutputPorts()
const
396 getNum_pingOut_OutputPorts()
const
405 bool TlmChanComponentBase ::
406 isConnected_PktSend_OutputPort(
FwIndexType portNum)
409 portNum < this->getNum_PktSend_OutputPorts(),
413 return this->m_PktSend_OutputPort[portNum].isConnected();
416 bool TlmChanComponentBase ::
417 isConnected_pingOut_OutputPort(
FwIndexType portNum)
420 portNum < this->getNum_pingOut_OutputPorts(),
424 return this->m_pingOut_OutputPort[portNum].isConnected();
433 void TlmChanComponentBase ::
441 portNum < this->getNum_Run_InputPorts(),
450 ComponentIpcSerializableBuffer msg;
454 _status = msg.serialize(
463 _status = msg.serialize(portNum);
470 _status = msg.serialize(context);
486 void TlmChanComponentBase ::
496 portNum < this->getNum_TlmGet_InputPorts(),
504 this->TlmGet_handler(
515 void TlmChanComponentBase ::
525 portNum < this->getNum_TlmRecv_InputPorts(),
533 this->TlmRecv_handler(
544 void TlmChanComponentBase ::
552 portNum < this->getNum_pingIn_InputPorts(),
561 ComponentIpcSerializableBuffer msg;
565 _status = msg.serialize(
574 _status = msg.serialize(portNum);
581 _status = msg.serialize(key);
605 void TlmChanComponentBase ::
614 void TlmChanComponentBase ::
627 void TlmChanComponentBase ::
635 portNum < this->getNum_PktSend_OutputPorts(),
638 this->m_PktSend_OutputPort[portNum].invoke(
644 void TlmChanComponentBase ::
651 portNum < this->getNum_pingOut_OutputPorts(),
654 this->m_pingOut_OutputPort[portNum].invoke(
666 void TlmChanComponentBase ::
669 this->m_guardedPortMutex.lock();
672 void TlmChanComponentBase ::
675 this->m_guardedPortMutex.unLock();
685 ComponentIpcSerializableBuffer msg;
708 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
710 if (msgType == TLMCHAN_COMPONENT_EXIT) {
711 return MSG_DISPATCH_EXIT;
715 deserStatus = msg.deserialize(portNum);
726 deserStatus = msg.deserialize(context);
744 deserStatus = msg.deserialize(key);
750 this->pingIn_handler(
759 return MSG_DISPATCH_ERROR;
762 return MSG_DISPATCH_OK;
769 void TlmChanComponentBase ::
777 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
778 compPtr->Run_handlerBase(
784 void TlmChanComponentBase ::
794 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
795 compPtr->TlmGet_handlerBase(
803 void TlmChanComponentBase ::
813 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
814 compPtr->TlmRecv_handlerBase(
822 void TlmChanComponentBase ::
830 TlmChanComponentBase* compPtr =
static_cast<TlmChanComponentBase*
>(callComp);
831 compPtr->pingIn_handlerBase(
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
void init()
Object initializer.
const char * toChar() const
NATIVE_UINT_TYPE SizeType
void format(const CHAR *formatString,...)
write formatted string to buffer
@ BLOCKING
Message will block until space is available.
@ NONBLOCKING
Message will return with status when space is unavailable.
Status
status returned from the queue send function
@ OP_OK
message sent/received okay
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.