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

Executes a set of components as part of a rate group. More...

#include <Svc/ActiveRateGroup/ActiveRateGroup.hpp>

Inheritance diagram for Svc::ActiveRateGroup:
Svc::ActiveRateGroupComponentBase Fw::ActiveComponentBase Fw::QueuedComponentBase Fw::PassiveComponentBase Fw::ObjBase

Public Member Functions

 ActiveRateGroup (const char *compName)
 ActiveRateGroup constructor. More...
 
void configure (NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts)
 ActiveRateGroup configuration function. More...
 
 ~ActiveRateGroup ()
 ActiveRateGroup destructor. More...
 
- Public Member Functions inherited from Svc::ActiveRateGroupComponentBase
void init (FwSizeType queueDepth, FwEnumStoreType instance=0)
 Initialize ActiveRateGroupComponentBase object. More...
 
Svc::InputCyclePortget_CycleIn_InputPort (FwIndexType portNum)
 
Svc::InputPingPortget_PingIn_InputPort (FwIndexType portNum)
 
void set_Log_OutputPort (FwIndexType portNum, Fw::InputLogPort *port)
 Connect port to Log[portNum]. More...
 
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_PingOut_OutputPort (FwIndexType portNum, Svc::InputPingPort *port)
 Connect port to PingOut[portNum]. More...
 
void set_RateGroupMemberOut_OutputPort (FwIndexType portNum, Svc::InputSchedPort *port)
 Connect port to RateGroupMemberOut[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
 

Static Public Attributes

static constexpr NATIVE_INT_TYPE CONNECTION_COUNT_MAX = NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS
 

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 Types inherited from Svc::ActiveRateGroupComponentBase
enum  { NUM_CYCLEIN_INPUT_PORTS = 1 , NUM_PINGIN_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  { NUM_LOG_OUTPUT_PORTS = 1 , NUM_LOGTEXT_OUTPUT_PORTS = 1 , NUM_TIME_OUTPUT_PORTS = 1 , NUM_TLM_OUTPUT_PORTS = 1 }
 Enumerations for numbers of special output ports. More...
 
enum  { NUM_PINGOUT_OUTPUT_PORTS = 1 , NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS = 10 }
 Enumerations for numbers of typed output ports. More...
 
enum  { EVENTID_RATEGROUPSTARTED = 0x0 , EVENTID_RATEGROUPCYCLESLIP = 0x1 }
 Event IDs. More...
 
enum  { CHANNELID_RGMAXTIME = 0x0 , CHANNELID_RGCYCLESLIPS = 0x1 }
 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 inherited from Svc::ActiveRateGroupComponentBase
 ActiveRateGroupComponentBase (const char *compName="")
 Construct ActiveRateGroupComponentBase object. More...
 
virtual ~ActiveRateGroupComponentBase ()
 Destroy ActiveRateGroupComponentBase object. More...
 
FwIndexType getNum_CycleIn_InputPorts () const
 
FwIndexType getNum_PingIn_InputPorts () const
 
FwIndexType getNum_Log_OutputPorts () const
 
FwIndexType getNum_Time_OutputPorts () const
 
FwIndexType getNum_Tlm_OutputPorts () const
 
FwIndexType getNum_PingOut_OutputPorts () const
 
FwIndexType getNum_RateGroupMemberOut_OutputPorts () const
 
bool isConnected_Log_OutputPort (FwIndexType portNum)
 
bool isConnected_Time_OutputPort (FwIndexType portNum)
 
bool isConnected_Tlm_OutputPort (FwIndexType portNum)
 
bool isConnected_PingOut_OutputPort (FwIndexType portNum)
 
bool isConnected_RateGroupMemberOut_OutputPort (FwIndexType portNum)
 
void CycleIn_handlerBase (FwIndexType portNum, Os::RawTime &cycleStart)
 Handler base-class function for input port CycleIn. More...
 
void PingIn_handlerBase (FwIndexType portNum, U32 key)
 Handler base-class function for input port PingIn. More...
 
virtual void PingIn_preMsgHook (FwIndexType portNum, U32 key)
 Pre-message hook for async input port PingIn. More...
 
void PingOut_out (FwIndexType portNum, U32 key)
 Invoke output port PingOut. More...
 
void RateGroupMemberOut_out (FwIndexType portNum, U32 context)
 Invoke output port RateGroupMemberOut. More...
 
void log_DIAGNOSTIC_RateGroupStarted ()
 
void log_WARNING_HI_RateGroupCycleSlip (U32 cycle)
 
void tlmWrite_RgMaxTime (U32 arg, Fw::Time _tlmTime=Fw::Time())
 
void tlmWrite_RgCycleSlips (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...
 
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::Status createQueue (FwSizeType depth, FwSizeType 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...
 
- 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

Executes a set of components as part of a rate group.

ActiveRateGroup takes an input cycle call to begin the rate group cycle. It calls each output port in succession and passes the value in the context array at the index corresponding to the output port number. It keeps track of the execution time of the rate group and detects overruns.

Definition at line 31 of file ActiveRateGroup.hpp.

Constructor & Destructor Documentation

◆ ActiveRateGroup()

Svc::ActiveRateGroup::ActiveRateGroup ( const char *  compName)

ActiveRateGroup constructor.

The constructor of the class clears all the flags and copies the contents of the context array to private storage.

Parameters
compNameName of the component

Definition at line 23 of file ActiveRateGroup.cpp.

◆ ~ActiveRateGroup()

Svc::ActiveRateGroup::~ActiveRateGroup ( )

ActiveRateGroup destructor.

The destructor of the class is empty

Definition at line 47 of file ActiveRateGroup.cpp.

Member Function Documentation

◆ configure()

void Svc::ActiveRateGroup::configure ( NATIVE_INT_TYPE  contexts[],
NATIVE_INT_TYPE  numContexts 
)

ActiveRateGroup configuration function.

The configuration function takes an array of context values to pass to members of the rate group.

Parameters
contextsArray of integers that contain the context values that will be sent to each member component. The index of the array corresponds to the output port number.
numContextsThe number of elements in the context array.

Definition at line 33 of file ActiveRateGroup.cpp.

Member Data Documentation

◆ CONNECTION_COUNT_MAX

constexpr NATIVE_INT_TYPE Svc::ActiveRateGroup::CONNECTION_COUNT_MAX = NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS
staticconstexpr

Definition at line 33 of file ActiveRateGroup.hpp.


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