10 #if FW_ENABLE_TEXT_LOGGING 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];
92 this->m_BufferIn_InputPort[port].
init();
97 this->m_BufferIn_InputPort[port].
setPortNum(port);
99 #if FW_OBJECT_NAMES == 1 102 "%s_BufferIn_InputPort[%" PRI_PlatformIntType
"]",
103 this->m_objName.toChar(),
106 this->m_BufferIn_InputPort[port].setObjName(portName.
toChar());
116 this->m_PingIn_InputPort[port].
init();
121 this->m_PingIn_InputPort[port].
setPortNum(port);
123 #if FW_OBJECT_NAMES == 1 126 "%s_PingIn_InputPort[%" PRI_PlatformIntType
"]",
127 this->m_objName.toChar(),
130 this->m_PingIn_InputPort[port].setObjName(portName.
toChar());
140 this->m_Sched_InputPort[port].
init();
145 this->m_Sched_InputPort[port].
setPortNum(port);
147 #if FW_OBJECT_NAMES == 1 150 "%s_Sched_InputPort[%" PRI_PlatformIntType
"]",
151 this->m_objName.toChar(),
154 this->m_Sched_InputPort[port].setObjName(portName.
toChar());
164 this->m_Time_OutputPort[port].
init();
166 #if FW_OBJECT_NAMES == 1 169 "%s_Time_OutputPort[%" PRI_PlatformIntType
"]",
170 this->m_objName.toChar(),
173 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
183 this->m_Tlm_OutputPort[port].
init();
185 #if FW_OBJECT_NAMES == 1 188 "%s_Tlm_OutputPort[%" PRI_PlatformIntType
"]",
189 this->m_objName.toChar(),
192 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
202 this->m_BufferOut_OutputPort[port].
init();
204 #if FW_OBJECT_NAMES == 1 207 "%s_BufferOut_OutputPort[%" PRI_PlatformIntType
"]",
208 this->m_objName.toChar(),
211 this->m_BufferOut_OutputPort[port].setObjName(portName.
toChar());
221 this->m_CycleOut_OutputPort[port].
init();
223 #if FW_OBJECT_NAMES == 1 226 "%s_CycleOut_OutputPort[%" PRI_PlatformIntType
"]",
227 this->m_objName.toChar(),
230 this->m_CycleOut_OutputPort[port].setObjName(portName.
toChar());
240 this->m_PingOut_OutputPort[port].
init();
242 #if FW_OBJECT_NAMES == 1 245 "%s_PingOut_OutputPort[%" PRI_PlatformIntType
"]",
246 this->m_objName.toChar(),
249 this->m_PingOut_OutputPort[port].setObjName(portName.
toChar());
256 static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
260 static_cast<FwAssertArgType>(qStat)
273 static_cast<FwAssertArgType>(portNum)
276 return &this->m_BufferIn_InputPort[portNum];
284 static_cast<FwAssertArgType>(portNum)
287 return &this->m_PingIn_InputPort[portNum];
295 static_cast<FwAssertArgType>(portNum)
298 return &this->m_Sched_InputPort[portNum];
313 static_cast<FwAssertArgType>(portNum)
316 this->m_Time_OutputPort[portNum].
addCallPort(port);
327 static_cast<FwAssertArgType>(portNum)
345 static_cast<FwAssertArgType>(portNum)
348 this->m_BufferOut_OutputPort[portNum].
addCallPort(port);
359 static_cast<FwAssertArgType>(portNum)
362 this->m_CycleOut_OutputPort[portNum].
addCallPort(port);
373 static_cast<FwAssertArgType>(portNum)
376 this->m_PingOut_OutputPort[portNum].
addCallPort(port);
379 #if FW_PORT_SERIALIZATION 388 Fw::InputSerializePort* port
393 static_cast<FwAssertArgType>(portNum)
396 this->m_Time_OutputPort[portNum].registerSerialPort(port);
402 Fw::InputSerializePort* port
407 static_cast<FwAssertArgType>(portNum)
410 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
415 #if FW_PORT_SERIALIZATION 424 Fw::InputSerializePort* port
429 static_cast<FwAssertArgType>(portNum)
432 this->m_BufferOut_OutputPort[portNum].registerSerialPort(port);
438 Fw::InputSerializePort* port
443 static_cast<FwAssertArgType>(portNum)
446 this->m_CycleOut_OutputPort[portNum].registerSerialPort(port);
452 Fw::InputSerializePort* port
457 static_cast<FwAssertArgType>(portNum)
460 this->m_PingOut_OutputPort[portNum].registerSerialPort(port);
471 Fw::ActiveComponentBase(compName)
551 static_cast<FwAssertArgType>(portNum)
554 return this->m_Time_OutputPort[portNum].
isConnected();
562 static_cast<FwAssertArgType>(portNum)
565 return this->m_Tlm_OutputPort[portNum].
isConnected();
577 static_cast<FwAssertArgType>(portNum)
580 return this->m_BufferOut_OutputPort[portNum].
isConnected();
588 static_cast<FwAssertArgType>(portNum)
591 return this->m_CycleOut_OutputPort[portNum].
isConnected();
599 static_cast<FwAssertArgType>(portNum)
602 return this->m_PingOut_OutputPort[portNum].
isConnected();
620 static_cast<FwAssertArgType>(portNum)
628 ComponentIpcSerializableBuffer msg;
632 _status = msg.serialize(
633 static_cast<FwEnumStoreType>(BUFFERIN_DATABUFFER)
637 static_cast<FwAssertArgType>(_status)
641 _status = msg.serialize(portNum);
644 static_cast<FwAssertArgType>(_status)
648 _status = msg.serialize(buff);
651 static_cast<FwAssertArgType>(_status)
660 static_cast<FwAssertArgType>(qStatus)
673 static_cast<FwAssertArgType>(portNum)
681 ComponentIpcSerializableBuffer msg;
685 _status = msg.serialize(
686 static_cast<FwEnumStoreType>(PINGIN_PING)
690 static_cast<FwAssertArgType>(_status)
694 _status = msg.serialize(portNum);
697 static_cast<FwAssertArgType>(_status)
701 _status = msg.serialize(key);
704 static_cast<FwAssertArgType>(_status)
713 static_cast<FwAssertArgType>(qStatus)
726 static_cast<FwAssertArgType>(portNum)
734 ComponentIpcSerializableBuffer msg;
738 _status = msg.serialize(
739 static_cast<FwEnumStoreType>(SCHED_SCHED)
743 static_cast<FwAssertArgType>(_status)
747 _status = msg.serialize(portNum);
750 static_cast<FwAssertArgType>(_status)
754 _status = msg.serialize(context);
757 static_cast<FwAssertArgType>(_status)
766 static_cast<FwAssertArgType>(qStatus)
817 static_cast<FwAssertArgType>(portNum)
821 this->m_BufferOut_OutputPort[portNum].isConnected(),
822 static_cast<FwAssertArgType>(portNum)
824 this->m_BufferOut_OutputPort[portNum].
invoke(
837 static_cast<FwAssertArgType>(portNum)
841 this->m_CycleOut_OutputPort[portNum].isConnected(),
842 static_cast<FwAssertArgType>(portNum)
844 this->m_CycleOut_OutputPort[portNum].
invoke(
857 static_cast<FwAssertArgType>(portNum)
861 this->m_PingOut_OutputPort[portNum].isConnected(),
862 static_cast<FwAssertArgType>(portNum)
864 this->m_PingOut_OutputPort[portNum].
invoke(
876 ComponentIpcSerializableBuffer msg;
880 _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_INTERRUPTREPORT));
883 static_cast<FwAssertArgType>(_status)
887 _status = msg.serialize(static_cast<FwIndexType>(0));
890 static_cast<FwAssertArgType>(_status)
893 _status = msg.serialize(interrupt);
896 static_cast<FwAssertArgType>(_status)
905 static_cast<FwAssertArgType>(qStatus)
919 if (this->m_Tlm_OutputPort[0].isConnected()) {
921 this->m_Time_OutputPort[0].isConnected() &&
924 this->m_Time_OutputPort[0].
invoke(_tlmTime);
931 static_cast<FwAssertArgType>(_stat)
938 this->m_Tlm_OutputPort[0].
invoke(
953 if (this->m_Time_OutputPort[0].isConnected()) {
955 this->m_Time_OutputPort[0].
invoke(_time);
970 ComponentIpcSerializableBuffer _msg;
980 static_cast<FwAssertArgType>(_msgStatus)
990 static_cast<FwAssertArgType>(_deserStatus)
993 MsgTypeEnum _msgType =
static_cast<MsgTypeEnum
>(_desMsg);
995 if (_msgType == BLOCKDRIVER_COMPONENT_EXIT) {
1000 _deserStatus = _msg.deserialize(portNum);
1003 static_cast<FwAssertArgType>(_deserStatus)
1008 case BUFFERIN_DATABUFFER: {
1011 _deserStatus = _msg.deserialize(buff);
1014 static_cast<FwAssertArgType>(_deserStatus)
1029 _deserStatus = _msg.deserialize(key);
1032 static_cast<FwAssertArgType>(_deserStatus)
1047 _deserStatus = _msg.deserialize(context);
1050 static_cast<FwAssertArgType>(_deserStatus)
1062 case INT_IF_INTERRUPTREPORT: {
1064 _deserStatus = _msg.deserialize(interrupt);
1069 static_cast<FwAssertArgType>(_deserStatus)
1075 _msg.getBuffLeft() == 0,
1098 void BlockDriverComponentBase ::
1107 compPtr->BufferIn_handlerBase(
1113 void BlockDriverComponentBase ::
1122 compPtr->PingIn_handlerBase(
1128 void BlockDriverComponentBase ::
1137 compPtr->Sched_handlerBase(
void Sched_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Sched.
Serialization/Deserialization operation was successful.
bool isConnected_BufferOut_OutputPort(FwIndexType portNum)
void addCallPort(InputTimePort *callPort)
Register an input port.
PlatformAssertArgType FwAssertArgType
Svc::InputSchedPort * get_Sched_InputPort(FwIndexType portNum)
void init()
Initialization function.
bool isConnected_Time_OutputPort(FwIndexType portNum)
bool isConnected_CycleOut_OutputPort(FwIndexType portNum)
BYTE BufferInPortSize[Drv::InputDataBufferPort::SERIALIZED_SIZE]
Status
status returned from the queue send function
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual ~BlockDriverComponentBase()
Destroy BlockDriverComponentBase object.
BYTE SchedPortSize[Svc::InputSchedPort::SERIALIZED_SIZE]
void tlmWrite_BD_Cycles(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
PlatformSizeType FwSizeType
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
void invoke(U32 key) const
Invoke a port interface.
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
void init()
Initialization function.
PlatformIndexType FwIndexType
BYTE PingInPortSize[Svc::InputPingPort::SERIALIZED_SIZE]
Os::Queue m_queue
queue object for active component
FwIndexType getNum_Sched_InputPorts() const
void PingOut_out(FwIndexType portNum, U32 key)
Invoke output port PingOut.
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
virtual void Sched_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Sched.
SerializeStatus
forward declaration for string
Message will block until space is available.
void addCallPort(InputCyclePort *callPort)
Register an input port.
void set_CycleOut_OutputPort(FwIndexType portNum, Svc::InputCyclePort *port)
Connect port to CycleOut[portNum].
void init()
Initialization function.
message to exit active component task
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
virtual void PingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port PingIn.
void init()
Initialization function.
void invoke(Fw::Time &time) const
Invoke a port interface.
const char * toChar() const
No time base has been established.
void addCallPort(InputPingPort *callPort)
Register an input port.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
void set_PingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to PingOut[portNum].
Drv::InputDataBufferPort * get_BufferIn_InputPort(FwIndexType portNum)
Errors dispatching messages.
void PingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port PingIn.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
FwIndexType getNum_BufferOut_OutputPorts() const
uint8_t U8
8-bit unsigned integer
void init()
Initialization function.
void set_BufferOut_OutputPort(FwIndexType portNum, Drv::InputDataBufferPort *port)
Connect port to BufferOut[portNum].
virtual void PingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port PingIn.
Channel ID for BD_Cycles.
void CycleOut_out(FwIndexType portNum, Os::RawTime &cycleStart)
Invoke output port CycleOut.
PlatformQueuePriorityType FwQueuePriorityType
A message was sent requesting an exit of the loop.
void addCallPort(InputDataBufferPort *callPort)
Register an input port.
FwIndexType getNum_BufferIn_InputPorts() const
FwIndexType getNum_Tlm_OutputPorts() const
void invoke(Drv::DataBuffer &buff) const
Invoke a port interface.
void BufferIn_handlerBase(FwIndexType portNum, Drv::DataBuffer &buff)
Handler base-class function for input port BufferIn.
void BufferOut_out(FwIndexType portNum, Drv::DataBuffer &buff)
Invoke output port BufferOut.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
bool isConnected_PingOut_OutputPort(FwIndexType portNum)
void InterruptReport_internalInterfaceInvoke(U32 interrupt)
Internal interface base-class function for InterruptReport.
BlockDriverComponentBase(const char *compName="")
Construct BlockDriverComponentBase object.
message sent/received okay
FwIndexType getNum_Time_OutputPorts() const
virtual void Sched_handler(FwIndexType portNum, U32 context)=0
Handler for input port Sched.
virtual void InterruptReport_internalInterfaceHandler(U32 interrupt)=0
Internal interface handler for InterruptReport.
BYTE InterruptReportIntIfSize[sizeof(U32)]
void invoke(Os::RawTime &cycleStart) const
Invoke a port interface.
Message will return with status when space is unavailable.
FwIndexType getNum_CycleOut_OutputPorts() const
FwIndexType getNum_PingOut_OutputPorts() const
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
FwIndexType getNum_PingIn_InputPorts() const
Svc::InputPingPort * get_PingIn_InputPort(FwIndexType portNum)
virtual void BufferIn_preMsgHook(FwIndexType portNum, Drv::DataBuffer &buff)
Pre-message hook for async input port BufferIn.
virtual void BufferIn_handler(FwIndexType portNum, Drv::DataBuffer &buff)=0
Handler for input port BufferIn.