22 INT_IF_INTERRUPTREPORT,
39 class ComponentIpcSerializableBuffer :
49 MAX_DATA_SIZE =
sizeof(BuffUnion),
51 SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
55 return sizeof(m_buff);
62 const U8* getBuffAddr()
const {
68 U8 m_buff[SERIALIZATION_SIZE];
77 void BlockDriverComponentBase ::
89 port < static_cast<FwIndexType>(this->getNum_BufferIn_InputPorts());
92 this->m_BufferIn_InputPort[port].init();
93 this->m_BufferIn_InputPort[port].addCallComp(
97 this->m_BufferIn_InputPort[port].setPortNum(port);
99#if FW_OBJECT_NAMES == 1
103 this->m_objName.toChar(),
106 this->m_BufferIn_InputPort[port].setObjName(portName.
toChar());
113 port < static_cast<FwIndexType>(this->getNum_PingIn_InputPorts());
116 this->m_PingIn_InputPort[port].init();
117 this->m_PingIn_InputPort[port].addCallComp(
121 this->m_PingIn_InputPort[port].setPortNum(port);
123#if FW_OBJECT_NAMES == 1
127 this->m_objName.toChar(),
130 this->m_PingIn_InputPort[port].setObjName(portName.
toChar());
137 port < static_cast<FwIndexType>(this->getNum_Sched_InputPorts());
140 this->m_Sched_InputPort[port].init();
141 this->m_Sched_InputPort[port].addCallComp(
145 this->m_Sched_InputPort[port].setPortNum(port);
147#if FW_OBJECT_NAMES == 1
151 this->m_objName.toChar(),
154 this->m_Sched_InputPort[port].setObjName(portName.
toChar());
161 port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
164 this->m_Time_OutputPort[port].init();
166#if FW_OBJECT_NAMES == 1
170 this->m_objName.toChar(),
173 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
180 port < static_cast<FwIndexType>(this->getNum_Tlm_OutputPorts());
183 this->m_Tlm_OutputPort[port].init();
185#if FW_OBJECT_NAMES == 1
189 this->m_objName.toChar(),
192 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
199 port < static_cast<FwIndexType>(this->getNum_BufferOut_OutputPorts());
202 this->m_BufferOut_OutputPort[port].init();
204#if FW_OBJECT_NAMES == 1
208 this->m_objName.toChar(),
211 this->m_BufferOut_OutputPort[port].setObjName(portName.
toChar());
218 port < static_cast<FwIndexType>(this->getNum_CycleOut_OutputPorts());
221 this->m_CycleOut_OutputPort[port].init();
223#if FW_OBJECT_NAMES == 1
227 this->m_objName.toChar(),
230 this->m_CycleOut_OutputPort[port].setObjName(portName.
toChar());
237 port < static_cast<FwIndexType>(this->getNum_PingOut_OutputPorts());
240 this->m_PingOut_OutputPort[port].init();
242#if FW_OBJECT_NAMES == 1
246 this->m_objName.toChar(),
249 this->m_PingOut_OutputPort[port].setObjName(portName.
toChar());
256 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
272 portNum < this->getNum_BufferIn_InputPorts(),
276 return &this->m_BufferIn_InputPort[portNum];
283 portNum < this->getNum_PingIn_InputPorts(),
287 return &this->m_PingIn_InputPort[portNum];
294 portNum < this->getNum_Sched_InputPorts(),
298 return &this->m_Sched_InputPort[portNum];
305 void BlockDriverComponentBase ::
312 portNum < this->getNum_Time_OutputPorts(),
316 this->m_Time_OutputPort[portNum].addCallPort(port);
319 void BlockDriverComponentBase ::
326 portNum < this->getNum_Tlm_OutputPorts(),
330 this->m_Tlm_OutputPort[portNum].addCallPort(port);
337 void BlockDriverComponentBase ::
338 set_BufferOut_OutputPort(
344 portNum < this->getNum_BufferOut_OutputPorts(),
348 this->m_BufferOut_OutputPort[portNum].addCallPort(port);
351 void BlockDriverComponentBase ::
352 set_CycleOut_OutputPort(
358 portNum < this->getNum_CycleOut_OutputPorts(),
362 this->m_CycleOut_OutputPort[portNum].addCallPort(port);
365 void BlockDriverComponentBase ::
366 set_PingOut_OutputPort(
372 portNum < this->getNum_PingOut_OutputPorts(),
376 this->m_PingOut_OutputPort[portNum].addCallPort(port);
379#if FW_PORT_SERIALIZATION
385 void BlockDriverComponentBase ::
388 Fw::InputSerializePort* port
392 portNum < this->getNum_Time_OutputPorts(),
396 this->m_Time_OutputPort[portNum].registerSerialPort(port);
399 void BlockDriverComponentBase ::
402 Fw::InputSerializePort* port
406 portNum < this->getNum_Tlm_OutputPorts(),
410 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
415#if FW_PORT_SERIALIZATION
421 void BlockDriverComponentBase ::
422 set_BufferOut_OutputPort(
424 Fw::InputSerializePort* port
428 portNum < this->getNum_BufferOut_OutputPorts(),
432 this->m_BufferOut_OutputPort[portNum].registerSerialPort(port);
435 void BlockDriverComponentBase ::
436 set_CycleOut_OutputPort(
438 Fw::InputSerializePort* port
442 portNum < this->getNum_CycleOut_OutputPorts(),
446 this->m_CycleOut_OutputPort[portNum].registerSerialPort(port);
449 void BlockDriverComponentBase ::
450 set_PingOut_OutputPort(
452 Fw::InputSerializePort* port
456 portNum < this->getNum_PingOut_OutputPorts(),
460 this->m_PingOut_OutputPort[portNum].registerSerialPort(port);
469 BlockDriverComponentBase ::
470 BlockDriverComponentBase(
const char* compName) :
471 Fw::ActiveComponentBase(compName)
476 BlockDriverComponentBase ::
477 ~BlockDriverComponentBase()
487 getNum_BufferIn_InputPorts()
const
493 getNum_PingIn_InputPorts()
const
499 getNum_Sched_InputPorts()
const
509 getNum_Time_OutputPorts()
const
515 getNum_Tlm_OutputPorts()
const
525 getNum_BufferOut_OutputPorts()
const
531 getNum_CycleOut_OutputPorts()
const
537 getNum_PingOut_OutputPorts()
const
546 bool BlockDriverComponentBase ::
550 portNum < this->getNum_Time_OutputPorts(),
554 return this->m_Time_OutputPort[portNum].isConnected();
557 bool BlockDriverComponentBase ::
561 portNum < this->getNum_Tlm_OutputPorts(),
565 return this->m_Tlm_OutputPort[portNum].isConnected();
572 bool BlockDriverComponentBase ::
573 isConnected_BufferOut_OutputPort(
FwIndexType portNum)
576 portNum < this->getNum_BufferOut_OutputPorts(),
580 return this->m_BufferOut_OutputPort[portNum].isConnected();
583 bool BlockDriverComponentBase ::
584 isConnected_CycleOut_OutputPort(
FwIndexType portNum)
587 portNum < this->getNum_CycleOut_OutputPorts(),
591 return this->m_CycleOut_OutputPort[portNum].isConnected();
594 bool BlockDriverComponentBase ::
595 isConnected_PingOut_OutputPort(
FwIndexType portNum)
598 portNum < this->getNum_PingOut_OutputPorts(),
602 return this->m_PingOut_OutputPort[portNum].isConnected();
611 void BlockDriverComponentBase ::
612 BufferIn_handlerBase(
619 portNum < this->getNum_BufferIn_InputPorts(),
628 ComponentIpcSerializableBuffer msg;
632 _status = msg.serialize(
641 _status = msg.serialize(portNum);
648 _status = msg.serialize(buff);
664 void BlockDriverComponentBase ::
672 portNum < this->getNum_PingIn_InputPorts(),
681 ComponentIpcSerializableBuffer msg;
685 _status = msg.serialize(
694 _status = msg.serialize(portNum);
701 _status = msg.serialize(key);
717 void BlockDriverComponentBase ::
725 portNum < this->getNum_Sched_InputPorts(),
734 ComponentIpcSerializableBuffer msg;
738 _status = msg.serialize(
747 _status = msg.serialize(portNum);
754 _status = msg.serialize(context);
778 void BlockDriverComponentBase ::
787 void BlockDriverComponentBase ::
796 void BlockDriverComponentBase ::
809 void BlockDriverComponentBase ::
816 portNum < this->getNum_BufferOut_OutputPorts(),
819 this->m_BufferOut_OutputPort[portNum].invoke(
824 void BlockDriverComponentBase ::
831 portNum < this->getNum_CycleOut_OutputPorts(),
834 this->m_CycleOut_OutputPort[portNum].invoke(
839 void BlockDriverComponentBase ::
846 portNum < this->getNum_PingOut_OutputPorts(),
849 this->m_PingOut_OutputPort[portNum].invoke(
858 void BlockDriverComponentBase ::
859 InterruptReport_internalInterfaceInvoke(U32 interrupt)
861 ComponentIpcSerializableBuffer msg;
865 _status = msg.serialize(
static_cast<FwEnumStoreType>(INT_IF_INTERRUPTREPORT));
872 _status = msg.serialize(
static_cast<FwIndexType>(0));
878 _status = msg.serialize(interrupt);
898 void BlockDriverComponentBase ::
904 if (this->m_Tlm_OutputPort[0].isConnected()) {
906 this->m_Time_OutputPort[0].isConnected() &&
909 this->m_Time_OutputPort[0].invoke(_tlmTime);
921 _id = this->getIdBase() + CHANNELID_BD_CYCLES;
923 this->m_Tlm_OutputPort[0].invoke(
938 if (this->m_Time_OutputPort[0].isConnected()) {
940 this->m_Time_OutputPort[0].invoke(_time);
955 ComponentIpcSerializableBuffer msg;
978 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
980 if (msgType == BLOCKDRIVER_COMPONENT_EXIT) {
981 return MSG_DISPATCH_EXIT;
985 deserStatus = msg.deserialize(portNum);
993 case BUFFERIN_DATABUFFER: {
996 deserStatus = msg.deserialize(buff);
1002 this->BufferIn_handler(
1014 deserStatus = msg.deserialize(key);
1020 this->PingIn_handler(
1032 deserStatus = msg.deserialize(context);
1038 this->Sched_handler(
1047 case INT_IF_INTERRUPTREPORT: {
1049 deserStatus = msg.deserialize(interrupt);
1060 msg.getBuffLeft() == 0,
1065 this->InterruptReport_internalInterfaceHandler(
1073 return MSG_DISPATCH_ERROR;
1076 return MSG_DISPATCH_OK;
1083 void BlockDriverComponentBase ::
1091 BlockDriverComponentBase* compPtr =
static_cast<BlockDriverComponentBase*
>(callComp);
1092 compPtr->BufferIn_handlerBase(
1098 void BlockDriverComponentBase ::
1106 BlockDriverComponentBase* compPtr =
static_cast<BlockDriverComponentBase*
>(callComp);
1107 compPtr->PingIn_handlerBase(
1113 void BlockDriverComponentBase ::
1121 BlockDriverComponentBase* compPtr =
static_cast<BlockDriverComponentBase*
>(callComp);
1122 compPtr->Sched_handlerBase(