10 #if FW_ENABLE_TEXT_LOGGING
22 INT_IF_INTERRUPTREPORT,
39 class ComponentIpcSerializableBuffer :
54 return sizeof(m_buff);
61 const U8* getBuffAddr()
const {
67 U8 m_buff[SERIALIZATION_SIZE];
91 this->m_BufferIn_InputPort[port].
init();
96 this->m_BufferIn_InputPort[port].
setPortNum(port);
98 #if FW_OBJECT_NAMES == 1
102 this->m_objName.toChar(),
105 this->m_BufferIn_InputPort[port].setObjName(portName.
toChar());
115 this->m_PingIn_InputPort[port].
init();
120 this->m_PingIn_InputPort[port].
setPortNum(port);
122 #if FW_OBJECT_NAMES == 1
126 this->m_objName.toChar(),
129 this->m_PingIn_InputPort[port].setObjName(portName.
toChar());
139 this->m_Sched_InputPort[port].
init();
144 this->m_Sched_InputPort[port].
setPortNum(port);
146 #if FW_OBJECT_NAMES == 1
150 this->m_objName.toChar(),
153 this->m_Sched_InputPort[port].setObjName(portName.
toChar());
163 this->m_Time_OutputPort[port].
init();
165 #if FW_OBJECT_NAMES == 1
169 this->m_objName.toChar(),
172 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
182 this->m_Tlm_OutputPort[port].
init();
184 #if FW_OBJECT_NAMES == 1
188 this->m_objName.toChar(),
191 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
201 this->m_BufferOut_OutputPort[port].
init();
203 #if FW_OBJECT_NAMES == 1
207 this->m_objName.toChar(),
210 this->m_BufferOut_OutputPort[port].setObjName(portName.
toChar());
220 this->m_CycleOut_OutputPort[port].
init();
222 #if FW_OBJECT_NAMES == 1
226 this->m_objName.toChar(),
229 this->m_CycleOut_OutputPort[port].setObjName(portName.
toChar());
239 this->m_PingOut_OutputPort[port].
init();
241 #if FW_OBJECT_NAMES == 1
245 this->m_objName.toChar(),
248 this->m_PingOut_OutputPort[port].setObjName(portName.
toChar());
254 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
274 return &this->m_BufferIn_InputPort[portNum];
285 return &this->m_PingIn_InputPort[portNum];
296 return &this->m_Sched_InputPort[portNum];
314 this->m_Time_OutputPort[portNum].
addCallPort(port);
346 this->m_BufferOut_OutputPort[portNum].
addCallPort(port);
360 this->m_CycleOut_OutputPort[portNum].
addCallPort(port);
374 this->m_PingOut_OutputPort[portNum].
addCallPort(port);
377 #if FW_PORT_SERIALIZATION
386 Fw::InputSerializePort* port
394 this->m_Time_OutputPort[portNum].registerSerialPort(port);
400 Fw::InputSerializePort* port
408 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
413 #if FW_PORT_SERIALIZATION
422 Fw::InputSerializePort* port
430 this->m_BufferOut_OutputPort[portNum].registerSerialPort(port);
436 Fw::InputSerializePort* port
444 this->m_CycleOut_OutputPort[portNum].registerSerialPort(port);
450 Fw::InputSerializePort* port
458 this->m_PingOut_OutputPort[portNum].registerSerialPort(port);
469 Fw::ActiveComponentBase(compName)
552 return this->m_Time_OutputPort[portNum].
isConnected();
563 return this->m_Tlm_OutputPort[portNum].
isConnected();
578 return this->m_BufferOut_OutputPort[portNum].
isConnected();
589 return this->m_CycleOut_OutputPort[portNum].
isConnected();
600 return this->m_PingOut_OutputPort[portNum].
isConnected();
626 ComponentIpcSerializableBuffer msg;
630 _status = msg.serialize(
639 _status = msg.serialize(portNum);
646 _status = msg.serialize(buff);
679 ComponentIpcSerializableBuffer msg;
683 _status = msg.serialize(
692 _status = msg.serialize(portNum);
699 _status = msg.serialize(key);
732 ComponentIpcSerializableBuffer msg;
736 _status = msg.serialize(
745 _status = msg.serialize(portNum);
752 _status = msg.serialize(context);
817 this->m_BufferOut_OutputPort[portNum].
invoke(
832 this->m_CycleOut_OutputPort[portNum].
invoke(
847 this->m_PingOut_OutputPort[portNum].
invoke(
859 ComponentIpcSerializableBuffer msg;
863 _status = msg.serialize(
static_cast<FwEnumStoreType>(INT_IF_INTERRUPTREPORT));
870 _status = msg.serialize(
static_cast<FwIndexType>(0));
876 _status = msg.serialize(interrupt);
902 if (this->m_Tlm_OutputPort[0].isConnected()) {
904 this->m_Time_OutputPort[0].isConnected() &&
907 this->m_Time_OutputPort[0].
invoke(_tlmTime);
921 this->m_Tlm_OutputPort[0].
invoke(
936 if (this->m_Time_OutputPort[0].isConnected()) {
938 this->m_Time_OutputPort[0].
invoke(_time);
953 ComponentIpcSerializableBuffer msg;
976 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
978 if (msgType == BLOCKDRIVER_COMPONENT_EXIT) {
983 deserStatus = msg.deserialize(portNum);
991 case BUFFERIN_DATABUFFER: {
1012 deserStatus = msg.deserialize(key);
1030 deserStatus = msg.deserialize(context);
1045 case INT_IF_INTERRUPTREPORT: {
1047 deserStatus = msg.deserialize(interrupt);
1058 msg.getBuffLeft() == 0,
1081 void BlockDriverComponentBase ::
1090 compPtr->BufferIn_handlerBase(
1096 void BlockDriverComponentBase ::
1105 compPtr->PingIn_handlerBase(
1111 void BlockDriverComponentBase ::
1120 compPtr->Sched_handlerBase(
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
BYTE PingInPortSize[Svc::InputPingPort::SERIALIZED_SIZE]
BYTE InterruptReportIntIfSize[sizeof(U32)]
BYTE BufferInPortSize[Drv::InputDataBufferPort::SERIALIZED_SIZE]
BYTE SchedPortSize[Svc::InputSchedPort::SERIALIZED_SIZE]
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
PlatformSizeType FwSizeType
PlatformQueuePriorityType FwQueuePriorityType
PlatformIndexType FwIndexType
virtual void BufferIn_handler(FwIndexType portNum, Drv::DataBuffer &buff)=0
Handler for input port BufferIn.
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
virtual void Sched_handler(FwIndexType portNum, U32 context)=0
Handler for input port Sched.
void set_PingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to PingOut[portNum].
FwIndexType getNum_CycleOut_OutputPorts() const
FwIndexType getNum_Sched_InputPorts() const
void BufferIn_handlerBase(FwIndexType portNum, Drv::DataBuffer &buff)
Handler base-class function for input port BufferIn.
virtual void PingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port PingIn.
void BufferOut_out(FwIndexType portNum, Drv::DataBuffer &buff)
Invoke output port BufferOut.
void tlmWrite_BD_Cycles(U32 arg, Fw::Time _tlmTime=Fw::Time())
void PingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port PingIn.
FwIndexType getNum_Tlm_OutputPorts() const
Drv::InputDataBufferPort * get_BufferIn_InputPort(FwIndexType portNum)
void InterruptReport_internalInterfaceInvoke(U32 interrupt)
Internal interface base-class function for InterruptReport.
void CycleOut_out(FwIndexType portNum, Os::RawTime &cycleStart)
Invoke output port CycleOut.
Svc::InputPingPort * get_PingIn_InputPort(FwIndexType portNum)
BlockDriverComponentBase(const char *compName="")
Construct BlockDriverComponentBase object.
bool isConnected_BufferOut_OutputPort(FwIndexType portNum)
void set_BufferOut_OutputPort(FwIndexType portNum, Drv::InputDataBufferPort *port)
Connect port to BufferOut[portNum].
@ CHANNELID_BD_CYCLES
Channel ID for BD_Cycles.
virtual void InterruptReport_internalInterfaceHandler(U32 interrupt)=0
Internal interface handler for InterruptReport.
FwIndexType getNum_BufferIn_InputPorts() const
FwIndexType getNum_Time_OutputPorts() const
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
virtual ~BlockDriverComponentBase()
Destroy BlockDriverComponentBase object.
FwIndexType getNum_PingOut_OutputPorts() const
bool isConnected_Time_OutputPort(FwIndexType portNum)
void PingOut_out(FwIndexType portNum, U32 key)
Invoke output port PingOut.
bool isConnected_CycleOut_OutputPort(FwIndexType portNum)
Svc::InputSchedPort * get_Sched_InputPort(FwIndexType portNum)
FwIndexType getNum_BufferOut_OutputPorts() const
FwIndexType getNum_PingIn_InputPorts() const
void set_CycleOut_OutputPort(FwIndexType portNum, Svc::InputCyclePort *port)
Connect port to CycleOut[portNum].
virtual void PingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port PingIn.
virtual void BufferIn_preMsgHook(FwIndexType portNum, Drv::DataBuffer &buff)
Pre-message hook for async input port BufferIn.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void Sched_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Sched.
bool isConnected_PingOut_OutputPort(FwIndexType portNum)
virtual void Sched_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Sched.
void addCallPort(InputDataBufferPort *callPort)
Register an input port.
void invoke(Drv::DataBuffer &buff)
Invoke a port interface.
void init()
Initialization function.
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
void init()
Object initializer.
const char * toChar() const
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke a port interface.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Os::Queue m_queue
queue object for active component
@ MSG_DISPATCH_OK
Dispatch was normal.
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
NATIVE_UINT_TYPE SizeType
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void format(const CHAR *formatString,...)
write formatted string to buffer
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
@ 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
void init()
Initialization function.
void invoke(Os::RawTime &cycleStart)
Invoke a port interface.
void addCallPort(InputCyclePort *callPort)
Register an input port.
void invoke(U32 key)
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputPingPort *callPort)
Register an input port.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
@ OP_OK
Operation succeeded.