F´ Flight Software - C/C++ Documentation
NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
|
Go to the documentation of this file.
17 #if FW_ENABLE_TEXT_LOGGING
35 INT_IF_INTERRUPTREPORT
54 class ComponentIpcSerializableBuffer :
69 return sizeof(m_buff);
72 U8* getBuffAddr(
void) {
76 const U8* getBuffAddr(
void)
const {
82 U8 m_buff[SERIALIZATION_SIZE];
96 return &this->m_Sched_InputPort[
portNum];
124 this->m_CycleOut_OutputPort[
portNum].addCallPort(port);
171 #if FW_PORT_SERIALIZATION
176 Fw::InputSerializePort *port
180 return this->m_CycleOut_OutputPort[
portNum].registerSerialPort(port);
186 Fw::InputSerializePort *port
196 Fw::InputSerializePort *port
206 Fw::InputSerializePort *port
216 Fw::InputSerializePort *port
229 BlockDriverComponentBase ::
230 #if FW_OBJECT_NAMES == 1
231 BlockDriverComponentBase(
const char* compName) :
232 Fw::ActiveComponentBase(compName)
234 BlockDriverComponentBase() :
235 Fw::ActiveComponentBase()
256 port < this->getNum_Sched_InputPorts();
260 this->m_Sched_InputPort[port].init();
261 this->m_Sched_InputPort[port].addCallComp(
265 this->m_Sched_InputPort[port].setPortNum(port);
267 #if FW_OBJECT_NAMES == 1
272 "%s_Sched_InputPort[%d]",
276 this->m_Sched_InputPort[port].setObjName(portName);
295 #if FW_OBJECT_NAMES == 1
300 "%s_BufferIn_InputPort[%d]",
323 #if FW_OBJECT_NAMES == 1
328 "%s_PingIn_InputPort[%d]",
340 port < this->getNum_CycleOut_OutputPorts();
343 this->m_CycleOut_OutputPort[port].
init();
345 #if FW_OBJECT_NAMES == 1
350 "%s_CycleOut_OutputPort[%d]",
354 this->m_CycleOut_OutputPort[port].setObjName(portName);
367 #if FW_OBJECT_NAMES == 1
372 "%s_BufferOut_OutputPort[%d]",
389 #if FW_OBJECT_NAMES == 1
394 "%s_PingOut_OutputPort[%d]",
411 #if FW_OBJECT_NAMES == 1
416 "%s_Tlm_OutputPort[%d]",
433 #if FW_OBJECT_NAMES == 1
438 "%s_Time_OutputPort[%d]",
450 ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
468 void BlockDriverComponentBase ::
503 getNum_Sched_InputPorts(
void)
506 this->m_Sched_InputPort
519 getNum_CycleOut_OutputPorts(
void)
522 this->m_CycleOut_OutputPort
570 bool BlockDriverComponentBase ::
574 portNum < this->getNum_CycleOut_OutputPorts(),
577 return this->m_CycleOut_OutputPort[
portNum].isConnected();
624 void BlockDriverComponentBase ::
625 tlmWrite_BD_Cycles(U32 arg)
642 _id = this->
getIdBase() + CHANNELID_BD_CYCLES;
657 Fw::Time BlockDriverComponentBase ::
673 void BlockDriverComponentBase::
674 InterruptReport_internalInterfaceInvoke(
679 ComponentIpcSerializableBuffer msg;
683 _status = msg.serialize(
static_cast<NATIVE_INT_TYPE>(INT_IF_INTERRUPTREPORT));
696 _status = msg.serialize(interrupt);
715 void BlockDriverComponentBase ::
723 BlockDriverComponentBase* compPtr =
724 (BlockDriverComponentBase*) callComp;
758 void BlockDriverComponentBase ::
774 ComponentIpcSerializableBuffer msg;
777 _status = msg.serialize(
785 _status = msg.serialize(
portNum);
792 _status = msg.serialize(
context);
827 ComponentIpcSerializableBuffer msg;
830 _status = msg.serialize(
838 _status = msg.serialize(
portNum);
845 _status = msg.serialize(buff);
880 ComponentIpcSerializableBuffer msg;
883 _status = msg.serialize(
891 _status = msg.serialize(
portNum);
898 _status = msg.serialize(key);
921 void BlockDriverComponentBase ::
956 ComponentIpcSerializableBuffer msg;
975 MsgTypeEnum msgType =
static_cast<MsgTypeEnum
>(desMsg);
977 if (msgType == BLOCKDRIVER_COMPONENT_EXIT) {
982 deserStatus = msg.deserialize(
portNum);
995 deserStatus = msg.deserialize(
context);
1002 this->Sched_handler(
1012 case BUFFERIN_DATABUFFER: {
1016 deserStatus = msg.deserialize(buff);
1037 deserStatus = msg.deserialize(key);
1054 case INT_IF_INTERRUPTREPORT: {
1057 deserStatus = msg.deserialize(interrupt);
1068 msg.getBuffLeft() == 0,
1069 static_cast<AssertArg>(msg.getBuffLeft())
1073 this->InterruptReport_internalInterfaceHandler(interrupt);
void set_Time_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTimePort *port)
bool isConnected_Time_OutputPort(NATIVE_INT_TYPE portNum)
virtual ~BlockDriverComponentBase(void)
void PingOut_out(NATIVE_INT_TYPE portNum, U32 key)
void addCallPort(InputDataBufferPort *callPort)
U32 getIdBase(void) const
void PingIn_handlerBase(NATIVE_INT_TYPE portNum, U32 key)
NATIVE_INT_TYPE getNum_Tlm_OutputPorts(void)
static void m_p_PingIn_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 key)
virtual void BufferIn_handler(NATIVE_INT_TYPE portNum, Drv::DataBuffer &buff)=0
Handler for input port BufferIn.
BYTE port3[Svc::InputPingPort::SERIALIZED_SIZE]
virtual MsgDispatchStatus doDispatch(void)=0
method to dispatch a single message in the queue.
Drv::InputDataBufferPort * get_BufferIn_InputPort(NATIVE_INT_TYPE portNum)
Auto-generated base for BlockDriver component.
SerializeStatus
forward declaration for string
#define FwChanIdType
Type representation for a channel id.
Svc::OutputPingPort m_PingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS]
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
uint8_t U8
8-bit unsigned integer
Drv::InputDataBufferPort m_BufferIn_InputPort[NUM_BUFFERIN_INPUT_PORTS]
Os::Queue m_queue
queue object for active component
void set_BufferOut_OutputPort(NATIVE_INT_TYPE portNum, Drv::InputDataBufferPort *port)
Drv::OutputDataBufferPort m_BufferOut_OutputPort[NUM_BUFFEROUT_OUTPUT_PORTS]
virtual void BufferIn_preMsgHook(NATIVE_INT_TYPE portNum, Drv::DataBuffer &buff)
NATIVE_INT_TYPE getNum_BufferIn_InputPorts(void)
NATIVE_INT_TYPE getNum_PingOut_OutputPorts(void)
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
QueueStatus send(const Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE priority, QueueBlocking block)
send a message
void addCallPort(InputPingPort *callPort)
void set_PingOut_OutputPort(NATIVE_INT_TYPE portNum, Svc::InputPingPort *port)
Serializable class for carrying timer values.
void init(void)
Object initializer.
@ MSG_DISPATCH_OK
Dispatch was normal.
QueueStatus receive(Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE &priority, QueueBlocking block)
receive a message
PROTECTED Svc::TimerVal & cycleStart
bool isConnected_Tlm_OutputPort(NATIVE_INT_TYPE portNum)
virtual void PingIn_handler(NATIVE_INT_TYPE portNum, U32 key)=0
Handler for input port PingIn.
void addCallPort(InputTlmPort *callPort)
PROTECTED NATIVE_UINT_TYPE context
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
BYTE port2[Drv::InputDataBufferPort::SERIALIZED_SIZE]
void set_CycleOut_OutputPort(NATIVE_INT_TYPE portNum, Svc::InputCyclePort *port)
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
void invoke(Fw::Time &time)
void invoke(FwChanIdType id, Fw::Time &timeTag, TlmBuffer &val)
virtual void PingIn_preMsgHook(NATIVE_INT_TYPE portNum, U32 key)
NATIVE_INT_TYPE getNum_Time_OutputPorts(void)
static void m_p_BufferIn_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, Drv::DataBuffer &buff)
bool isConnected_BufferOut_OutputPort(NATIVE_INT_TYPE portNum)
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
@ QUEUE_OK
message sent/received okay
Svc::InputPingPort * get_PingIn_InputPort(NATIVE_INT_TYPE portNum)
NATIVE_INT_TYPE getNum_PingIn_InputPorts(void)
BYTE port1[Svc::InputSchedPort::SERIALIZED_SIZE]
Svc::InputSchedPort * get_Sched_InputPort(NATIVE_INT_TYPE portNum)
PRIVATE NATIVE_INT_TYPE portNum
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
NATIVE_INT_TYPE getNum_BufferOut_OutputPorts(void)
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
void BufferIn_handlerBase(NATIVE_INT_TYPE portNum, Drv::DataBuffer &buff)
Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS]
int NATIVE_INT_TYPE
native integer type declaration
BYTE InterruptReportIntIfSize[sizeof(U32)+0]
void set_Tlm_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTlmPort *port)
bool isConnected_PingOut_OutputPort(NATIVE_INT_TYPE portNum)
Os::Queue::QueueStatus createQueue(NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
@ TB_NONE
No time base has been established.
void invoke(Drv::DataBuffer &buff)
void addCallPort(InputTimePort *callPort)
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
Fw::OutputTlmPort m_Tlm_OutputPort[NUM_TLM_OUTPUT_PORTS]
Svc::InputPingPort m_PingIn_InputPort[NUM_PINGIN_INPUT_PORTS]
void BufferOut_out(NATIVE_INT_TYPE portNum, Drv::DataBuffer &buff)