F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Drv::BlockDriverComponentBase Class Referenceabstract

Auto-generated base for BlockDriver component. More...

#include <Drv/BlockDriver/BlockDriverComponentAc.hpp>

Inheritance diagram for Drv::BlockDriverComponentBase:
Fw::ActiveComponentBase Fw::QueuedComponentBase Fw::PassiveComponentBase Fw::ObjBase Drv::BlockDriverImpl

Public Member Functions

void init (FwQueueSizeType queueDepth, FwEnumStoreType instance=0)
 Initialize BlockDriverComponentBase object. More...
 
Drv::InputDataBufferPortget_BufferIn_InputPort (FwIndexType portNum)
 
Svc::InputPingPortget_PingIn_InputPort (FwIndexType portNum)
 
Svc::InputSchedPortget_Sched_InputPort (FwIndexType portNum)
 
void set_Time_OutputPort (FwIndexType portNum, Fw::InputTimePort *port)
 Connect port to Time[portNum]. More...
 
void set_Tlm_OutputPort (FwIndexType portNum, Fw::InputTlmPort *port)
 Connect port to Tlm[portNum]. More...
 
void set_BufferOut_OutputPort (FwIndexType portNum, Drv::InputDataBufferPort *port)
 Connect port to BufferOut[portNum]. More...
 
void set_CycleOut_OutputPort (FwIndexType portNum, Svc::InputCyclePort *port)
 Connect port to CycleOut[portNum]. More...
 
void set_PingOut_OutputPort (FwIndexType portNum, Svc::InputPingPort *port)
 Connect port to PingOut[portNum]. More...
 
- Public Member Functions inherited from Fw::ActiveComponentBase
void start (Os::Task::ParamType priority=Os::Task::TASK_DEFAULT, Os::Task::ParamType stackSize=Os::Task::TASK_DEFAULT, Os::Task::ParamType cpuAffinity=Os::Task::TASK_DEFAULT, Os::Task::ParamType identifier=Os::Task::TASK_DEFAULT)
 called by instantiator when task is to be started More...
 
void exit ()
 exit task in active component More...
 
Os::Task::Status join ()
 Join the thread. More...
 
 DEPRECATED (Os::Task::Status join(void **value_ptr), "Switch to .join()")
 Join to thread with discarded value_ptr. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const U32)
 Set the ID base. More...
 
U32 getIdBase () const
 

Protected Types

enum  { NUM_BUFFERIN_INPUT_PORTS = 1 , NUM_PINGIN_INPUT_PORTS = 1 , NUM_SCHED_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  { NUM_TIME_OUTPUT_PORTS = 1 , NUM_TLM_OUTPUT_PORTS = 1 }
 Enumerations for numbers of special output ports. More...
 
enum  { NUM_BUFFEROUT_OUTPUT_PORTS = 1 , NUM_CYCLEOUT_OUTPUT_PORTS = 1 , NUM_PINGOUT_OUTPUT_PORTS = 1 }
 Enumerations for numbers of typed output ports. More...
 
enum  { CHANNELID_BD_CYCLES = 0x0 }
 Channel IDs. More...
 
- Protected Types inherited from Fw::ActiveComponentBase
enum  Lifecycle { CREATED , DISPATCHING , FINALIZING , DONE }
 Tracks the lifecycle of the component. More...
 

Protected Member Functions

 BlockDriverComponentBase (const char *compName="")
 Construct BlockDriverComponentBase object. More...
 
virtual ~BlockDriverComponentBase ()
 Destroy BlockDriverComponentBase object. More...
 
FwIndexType getNum_BufferIn_InputPorts () const
 
FwIndexType getNum_PingIn_InputPorts () const
 
FwIndexType getNum_Sched_InputPorts () const
 
FwIndexType getNum_Time_OutputPorts () const
 
FwIndexType getNum_Tlm_OutputPorts () const
 
FwIndexType getNum_BufferOut_OutputPorts () const
 
FwIndexType getNum_CycleOut_OutputPorts () const
 
FwIndexType getNum_PingOut_OutputPorts () const
 
bool isConnected_Time_OutputPort (FwIndexType portNum)
 
bool isConnected_Tlm_OutputPort (FwIndexType portNum)
 
bool isConnected_BufferOut_OutputPort (FwIndexType portNum)
 
bool isConnected_CycleOut_OutputPort (FwIndexType portNum)
 
bool isConnected_PingOut_OutputPort (FwIndexType portNum)
 
virtual void BufferIn_handler (FwIndexType portNum, Drv::DataBuffer &buff)=0
 Handler for input port BufferIn. More...
 
virtual void PingIn_handler (FwIndexType portNum, U32 key)=0
 Handler for input port PingIn. More...
 
virtual void Sched_handler (FwIndexType portNum, U32 context)=0
 Handler for input port Sched. More...
 
void BufferIn_handlerBase (FwIndexType portNum, Drv::DataBuffer &buff)
 Handler base-class function for input port BufferIn. More...
 
void PingIn_handlerBase (FwIndexType portNum, U32 key)
 Handler base-class function for input port PingIn. More...
 
void Sched_handlerBase (FwIndexType portNum, U32 context)
 Handler base-class function for input port Sched. More...
 
virtual void BufferIn_preMsgHook (FwIndexType portNum, Drv::DataBuffer &buff)
 Pre-message hook for async input port BufferIn. More...
 
virtual void PingIn_preMsgHook (FwIndexType portNum, U32 key)
 Pre-message hook for async input port PingIn. More...
 
virtual void Sched_preMsgHook (FwIndexType portNum, U32 context)
 Pre-message hook for async input port Sched. More...
 
void BufferOut_out (FwIndexType portNum, Drv::DataBuffer &buff)
 Invoke output port BufferOut. More...
 
void CycleOut_out (FwIndexType portNum, Svc::TimerVal &cycleStart)
 Invoke output port CycleOut. More...
 
void PingOut_out (FwIndexType portNum, U32 key)
 Invoke output port PingOut. More...
 
virtual void InterruptReport_internalInterfaceHandler (U32 interrupt)=0
 Internal interface handler for InterruptReport. More...
 
void InterruptReport_internalInterfaceInvoke (U32 interrupt)
 Internal interface base-class function for InterruptReport. More...
 
void tlmWrite_BD_Cycles (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
Fw::Time getTime ()
 
- Protected Member Functions inherited from Fw::ActiveComponentBase
 ActiveComponentBase (const char *name)
 Constructor. More...
 
virtual ~ActiveComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 initialization code More...
 
virtual void preamble ()
 A function that will be called before the event loop is entered. More...
 
MsgDispatchStatus dispatch ()
 The function that will dispatching messages. More...
 
virtual void finalizer ()
 A function that will be called after exiting the loop. More...
 
- Protected Member Functions inherited from Fw::QueuedComponentBase
 QueuedComponentBase (const char *name)
 Constructor. More...
 
virtual ~QueuedComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 initialization function More...
 
Os::Queue::QueueStatus createQueue (NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
 
NATIVE_INT_TYPE getNumMsgsDropped ()
 return number of messages dropped More...
 
void incNumMsgDropped ()
 increment the number of messages dropped More...
 
- Protected Member Functions inherited from Fw::PassiveComponentBase
 PassiveComponentBase (const char *name)
 Named constructor. More...
 
virtual ~PassiveComponentBase ()
 Destructor. More...
 
void init (NATIVE_INT_TYPE instance)
 Initialization function. More...
 
NATIVE_INT_TYPE getInstance () const
 
- Protected Member Functions inherited from Fw::ObjBase
 ObjBase (const char *name)
 ObjBase constructor. More...
 
virtual ~ObjBase ()
 Destructor. More...
 
void init ()
 Object initializer. More...
 

Friends

class BlockDriverComponentBaseFriend
 Friend class for white-box testing. More...
 

Additional Inherited Members

- Public Types inherited from Fw::ActiveComponentBase
enum  { ACTIVE_COMPONENT_EXIT }
 
- Public Types inherited from Fw::QueuedComponentBase
enum  MsgDispatchStatus { MSG_DISPATCH_OK , MSG_DISPATCH_EMPTY , MSG_DISPATCH_ERROR , MSG_DISPATCH_EXIT }
 
- Protected Attributes inherited from Fw::ActiveComponentBase
Os::Task m_task
 task object for active component More...
 
- Protected Attributes inherited from Fw::QueuedComponentBase
Os::Queue m_queue
 queue object for active component More...
 

Detailed Description

Auto-generated base for BlockDriver component.

An example block driver component with data buffers and interrupts

Definition at line 29 of file BlockDriverComponentAc.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Enumerations for numbers of typed input ports.

Enumerator
NUM_BUFFERIN_INPUT_PORTS 
NUM_PINGIN_INPUT_PORTS 
NUM_SCHED_INPUT_PORTS 

Definition at line 47 of file BlockDriverComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Enumerations for numbers of special output ports.

Enumerator
NUM_TIME_OUTPUT_PORTS 
NUM_TLM_OUTPUT_PORTS 

Definition at line 54 of file BlockDriverComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Enumerations for numbers of typed output ports.

Enumerator
NUM_BUFFEROUT_OUTPUT_PORTS 
NUM_CYCLEOUT_OUTPUT_PORTS 
NUM_PINGOUT_OUTPUT_PORTS 

Definition at line 60 of file BlockDriverComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Channel IDs.

Enumerator
CHANNELID_BD_CYCLES 

Channel ID for BD_Cycles.

Definition at line 67 of file BlockDriverComponentAc.hpp.

Constructor & Destructor Documentation

◆ BlockDriverComponentBase()

Drv::BlockDriverComponentBase::BlockDriverComponentBase ( const char *  compName = "")
protected

Construct BlockDriverComponentBase object.

Parameters
compNameThe component name

Definition at line 467 of file BlockDriverComponentAc.cpp.

◆ ~BlockDriverComponentBase()

Drv::BlockDriverComponentBase::~BlockDriverComponentBase ( )
protectedvirtual

Destroy BlockDriverComponentBase object.

Definition at line 474 of file BlockDriverComponentAc.cpp.

Member Function Documentation

◆ BufferIn_handler()

virtual void Drv::BlockDriverComponentBase::BufferIn_handler ( FwIndexType  portNum,
Drv::DataBuffer buff 
)
protectedpure virtual

Handler for input port BufferIn.

Parameters
portNumThe port number
buffA data buffer

◆ BufferIn_handlerBase()

void Drv::BlockDriverComponentBase::BufferIn_handlerBase ( FwIndexType  portNum,
Drv::DataBuffer buff 
)
protected

Handler base-class function for input port BufferIn.

Parameters
portNumThe port number
buffA data buffer

Definition at line 609 of file BlockDriverComponentAc.cpp.

◆ BufferIn_preMsgHook()

void Drv::BlockDriverComponentBase::BufferIn_preMsgHook ( FwIndexType  portNum,
Drv::DataBuffer buff 
)
protectedvirtual

Pre-message hook for async input port BufferIn.

Parameters
portNumThe port number
buffA data buffer

Definition at line 776 of file BlockDriverComponentAc.cpp.

◆ BufferOut_out()

void Drv::BlockDriverComponentBase::BufferOut_out ( FwIndexType  portNum,
Drv::DataBuffer buff 
)
protected

Invoke output port BufferOut.

Parameters
portNumThe port number
buffA data buffer

Definition at line 807 of file BlockDriverComponentAc.cpp.

◆ CycleOut_out()

void Drv::BlockDriverComponentBase::CycleOut_out ( FwIndexType  portNum,
Svc::TimerVal cycleStart 
)
protected

Invoke output port CycleOut.

Parameters
portNumThe port number
cycleStartCycle start timer value

Definition at line 822 of file BlockDriverComponentAc.cpp.

◆ get_BufferIn_InputPort()

Drv::InputDataBufferPort * Drv::BlockDriverComponentBase::get_BufferIn_InputPort ( FwIndexType  portNum)

Get typed input port at index

Returns
BufferIn[portNum]
Parameters
portNumThe port number

Definition at line 266 of file BlockDriverComponentAc.cpp.

◆ get_PingIn_InputPort()

Svc::InputPingPort * Drv::BlockDriverComponentBase::get_PingIn_InputPort ( FwIndexType  portNum)

Get typed input port at index

Returns
PingIn[portNum]
Parameters
portNumThe port number

Definition at line 277 of file BlockDriverComponentAc.cpp.

◆ get_Sched_InputPort()

Svc::InputSchedPort * Drv::BlockDriverComponentBase::get_Sched_InputPort ( FwIndexType  portNum)

Get typed input port at index

Returns
Sched[portNum]
Parameters
portNumThe port number

Definition at line 288 of file BlockDriverComponentAc.cpp.

◆ getNum_BufferIn_InputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_BufferIn_InputPorts ( ) const
protected

Get the number of BufferIn input ports

Returns
The number of BufferIn input ports

Definition at line 484 of file BlockDriverComponentAc.cpp.

◆ getNum_BufferOut_OutputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_BufferOut_OutputPorts ( ) const
protected

Get the number of BufferOut output ports

Returns
The number of BufferOut output ports

Definition at line 522 of file BlockDriverComponentAc.cpp.

◆ getNum_CycleOut_OutputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_CycleOut_OutputPorts ( ) const
protected

Get the number of CycleOut output ports

Returns
The number of CycleOut output ports

Definition at line 528 of file BlockDriverComponentAc.cpp.

◆ getNum_PingIn_InputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_PingIn_InputPorts ( ) const
protected

Get the number of PingIn input ports

Returns
The number of PingIn input ports

Definition at line 490 of file BlockDriverComponentAc.cpp.

◆ getNum_PingOut_OutputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_PingOut_OutputPorts ( ) const
protected

Get the number of PingOut output ports

Returns
The number of PingOut output ports

Definition at line 534 of file BlockDriverComponentAc.cpp.

◆ getNum_Sched_InputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_Sched_InputPorts ( ) const
protected

Get the number of Sched input ports

Returns
The number of Sched input ports

Definition at line 496 of file BlockDriverComponentAc.cpp.

◆ getNum_Time_OutputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_Time_OutputPorts ( ) const
protected

Get the number of Time output ports

Returns
The number of Time output ports

Definition at line 506 of file BlockDriverComponentAc.cpp.

◆ getNum_Tlm_OutputPorts()

FwIndexType Drv::BlockDriverComponentBase::getNum_Tlm_OutputPorts ( ) const
protected

Get the number of Tlm output ports

Returns
The number of Tlm output ports

Definition at line 512 of file BlockDriverComponentAc.cpp.

◆ getTime()

Fw::Time Drv::BlockDriverComponentBase::getTime ( )
protected

Get the time

\return The current time

Definition at line 933 of file BlockDriverComponentAc.cpp.

◆ init()

void Drv::BlockDriverComponentBase::init ( FwQueueSizeType  queueDepth,
FwEnumStoreType  instance = 0 
)

Initialize BlockDriverComponentBase object.

Parameters
queueDepthThe queue depth
instanceThe instance number

Definition at line 76 of file BlockDriverComponentAc.cpp.

◆ InterruptReport_internalInterfaceHandler()

virtual void Drv::BlockDriverComponentBase::InterruptReport_internalInterfaceHandler ( U32  interrupt)
protectedpure virtual

Internal interface handler for InterruptReport.

Parameters
interruptThe interrupt register value

◆ InterruptReport_internalInterfaceInvoke()

void Drv::BlockDriverComponentBase::InterruptReport_internalInterfaceInvoke ( U32  interrupt)
protected

Internal interface base-class function for InterruptReport.

Parameters
interruptThe interrupt register value

Definition at line 856 of file BlockDriverComponentAc.cpp.

◆ isConnected_BufferOut_OutputPort()

bool Drv::BlockDriverComponentBase::isConnected_BufferOut_OutputPort ( FwIndexType  portNum)
protected

Check whether port BufferOut is connected

Returns
Whether port BufferOut is connected
Parameters
portNumThe port number

Definition at line 570 of file BlockDriverComponentAc.cpp.

◆ isConnected_CycleOut_OutputPort()

bool Drv::BlockDriverComponentBase::isConnected_CycleOut_OutputPort ( FwIndexType  portNum)
protected

Check whether port CycleOut is connected

Returns
Whether port CycleOut is connected
Parameters
portNumThe port number

Definition at line 581 of file BlockDriverComponentAc.cpp.

◆ isConnected_PingOut_OutputPort()

bool Drv::BlockDriverComponentBase::isConnected_PingOut_OutputPort ( FwIndexType  portNum)
protected

Check whether port PingOut is connected

Returns
Whether port PingOut is connected
Parameters
portNumThe port number

Definition at line 592 of file BlockDriverComponentAc.cpp.

◆ isConnected_Time_OutputPort()

bool Drv::BlockDriverComponentBase::isConnected_Time_OutputPort ( FwIndexType  portNum)
protected

Check whether port Time is connected

Returns
Whether port Time is connected
Parameters
portNumThe port number

Definition at line 544 of file BlockDriverComponentAc.cpp.

◆ isConnected_Tlm_OutputPort()

bool Drv::BlockDriverComponentBase::isConnected_Tlm_OutputPort ( FwIndexType  portNum)
protected

Check whether port Tlm is connected

Returns
Whether port Tlm is connected
Parameters
portNumThe port number

Definition at line 555 of file BlockDriverComponentAc.cpp.

◆ PingIn_handler()

virtual void Drv::BlockDriverComponentBase::PingIn_handler ( FwIndexType  portNum,
U32  key 
)
protectedpure virtual

Handler for input port PingIn.

Parameters
portNumThe port number
keyValue to return to pinger

◆ PingIn_handlerBase()

void Drv::BlockDriverComponentBase::PingIn_handlerBase ( FwIndexType  portNum,
U32  key 
)
protected

Handler base-class function for input port PingIn.

Parameters
portNumThe port number
keyValue to return to pinger

Definition at line 662 of file BlockDriverComponentAc.cpp.

◆ PingIn_preMsgHook()

void Drv::BlockDriverComponentBase::PingIn_preMsgHook ( FwIndexType  portNum,
U32  key 
)
protectedvirtual

Pre-message hook for async input port PingIn.

Parameters
portNumThe port number
keyValue to return to pinger

Definition at line 785 of file BlockDriverComponentAc.cpp.

◆ PingOut_out()

void Drv::BlockDriverComponentBase::PingOut_out ( FwIndexType  portNum,
U32  key 
)
protected

Invoke output port PingOut.

Parameters
portNumThe port number
keyValue to return to pinger

Definition at line 837 of file BlockDriverComponentAc.cpp.

◆ Sched_handler()

virtual void Drv::BlockDriverComponentBase::Sched_handler ( FwIndexType  portNum,
U32  context 
)
protectedpure virtual

Handler for input port Sched.

Parameters
portNumThe port number
contextThe call order

◆ Sched_handlerBase()

void Drv::BlockDriverComponentBase::Sched_handlerBase ( FwIndexType  portNum,
U32  context 
)
protected

Handler base-class function for input port Sched.

Parameters
portNumThe port number
contextThe call order

Definition at line 715 of file BlockDriverComponentAc.cpp.

◆ Sched_preMsgHook()

void Drv::BlockDriverComponentBase::Sched_preMsgHook ( FwIndexType  portNum,
U32  context 
)
protectedvirtual

Pre-message hook for async input port Sched.

Parameters
portNumThe port number
contextThe call order

Definition at line 794 of file BlockDriverComponentAc.cpp.

◆ set_BufferOut_OutputPort()

void Drv::BlockDriverComponentBase::set_BufferOut_OutputPort ( FwIndexType  portNum,
Drv::InputDataBufferPort port 
)

Connect port to BufferOut[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 335 of file BlockDriverComponentAc.cpp.

◆ set_CycleOut_OutputPort()

void Drv::BlockDriverComponentBase::set_CycleOut_OutputPort ( FwIndexType  portNum,
Svc::InputCyclePort port 
)

Connect port to CycleOut[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 349 of file BlockDriverComponentAc.cpp.

◆ set_PingOut_OutputPort()

void Drv::BlockDriverComponentBase::set_PingOut_OutputPort ( FwIndexType  portNum,
Svc::InputPingPort port 
)

Connect port to PingOut[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 363 of file BlockDriverComponentAc.cpp.

◆ set_Time_OutputPort()

void Drv::BlockDriverComponentBase::set_Time_OutputPort ( FwIndexType  portNum,
Fw::InputTimePort port 
)

Connect port to Time[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 303 of file BlockDriverComponentAc.cpp.

◆ set_Tlm_OutputPort()

void Drv::BlockDriverComponentBase::set_Tlm_OutputPort ( FwIndexType  portNum,
Fw::InputTlmPort port 
)

Connect port to Tlm[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 317 of file BlockDriverComponentAc.cpp.

◆ tlmWrite_BD_Cycles()

void Drv::BlockDriverComponentBase::tlmWrite_BD_Cycles ( U32  arg,
Fw::Time  _tlmTime = Fw::Time() 
)
protected

Write telemetry channel BD_Cycles

Driver cycle count

Parameters
argThe telemetry value
_tlmTimeTimestamp. Default: unspecified, request from getTime port

Definition at line 896 of file BlockDriverComponentAc.cpp.

Friends And Related Function Documentation

◆ BlockDriverComponentBaseFriend

friend class BlockDriverComponentBaseFriend
friend

Friend class for white-box testing.

Definition at line 38 of file BlockDriverComponentAc.hpp.


The documentation for this class was generated from the following files: