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

#include <Svc/ActivePhaser/ActivePhaser.hpp>

Inheritance diagram for Svc::ActivePhaser:
Svc::ActivePhaserComponentBase Fw::ActiveComponentBase Fw::QueuedComponentBase Fw::PassiveComponentBase Fw::ObjBase

Classes

struct  PhaserStateEntry
 configuration for phasing More...
 
struct  PhaserStateTable
 

Public Types

enum  PhaserContextType { SEQUENTIAL, COUNT }
 
enum  FinishStatus { UNKNOWN, ON_TIME, LATE }
 Finish status. More...
 
- 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 }
 

Public Member Functions

 ActivePhaser (const char *const compName)
 Construct ActivePhaser object. More...
 
void init (const FwSizeType queueDepth, const FwIndexType instance=0)
 
void configure (U32 cycle_ticks)
 
void register_phased (FwIndexType port, U32 length, U32 start=DONT_CARE, U32 context=DONT_CARE)
 
 ~ActivePhaser ()
 Destroy ActivePhaser object. More...
 
- Public Member Functions inherited from Svc::ActivePhaserComponentBase
void init (FwSizeType queueDepth, FwEnumStoreType instance=0)
 Initialize ActivePhaserComponentBase object. More...
 
Svc::InputCyclePortget_CycleIn_InputPort (FwIndexType portNum)
 
void set_logOut_OutputPort (FwIndexType portNum, Fw::InputLogPort *port)
 Connect port to logOut[portNum]. More...
 
void set_timeCaller_OutputPort (FwIndexType portNum, Fw::InputTimePort *port)
 Connect port to timeCaller[portNum]. More...
 
void set_tlmOut_OutputPort (FwIndexType portNum, Fw::InputTlmPort *port)
 Connect port to tlmOut[portNum]. More...
 
void set_PhaserMemberOut_OutputPort (FwIndexType portNum, Svc::InputSchedPort *port)
 Connect port to PhaserMemberOut[portNum]. More...
 
- Public Member Functions inherited from Fw::ActiveComponentBase
void start (FwTaskPriorityType priority=Os::Task::TASK_PRIORITY_DEFAULT, FwSizeType stackSize=Os::Task::TASK_DEFAULT, FwSizeType cpuAffinity=Os::Task::TASK_DEFAULT, FwTaskIdType identifier=static_cast< FwTaskIdType >(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::QueuedComponentBase
void deinit () override
 Allows de-initialization on teardown. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const FwIdType)
 Set the ID base. More...
 
FwIdType getIdBase () const
 

Static Public Attributes

static const U32 MAX_CHILDREN = 100
 
static const U32 DONT_CARE = 0xFFFFFFFFlu
 
static constexpr FwIndexType CONNECTION_COUNT_MAX = NUM_PHASERMEMBEROUT_OUTPUT_PORTS
 

Friends

class ActivePhaserTester
 

Additional Inherited Members

- Protected Types inherited from Svc::ActivePhaserComponentBase
enum  { NUM_CYCLEIN_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  { NUM_LOGOUT_OUTPUT_PORTS = 1, NUM_LOGTEXTOUT_OUTPUT_PORTS = 1, NUM_TIMECALLER_OUTPUT_PORTS = 1, NUM_TLMOUT_OUTPUT_PORTS = 1 }
 Enumerations for numbers of special output ports. More...
 
enum  { NUM_PHASERMEMBEROUT_OUTPUT_PORTS = 10 }
 Enumerations for numbers of typed output ports. More...
 
enum  { EVENTID_MISSEDDEADLINE = 0x0 }
 Event IDs. More...
 
enum  { EVENTID_MISSEDDEADLINE_THROTTLE = 5 }
 Event throttle values: sets initial value of countdown variables. 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::ActivePhaserComponentBase
 ActivePhaserComponentBase (const char *compName="")
 Construct ActivePhaserComponentBase object. More...
 
virtual ~ActivePhaserComponentBase ()
 Destroy ActivePhaserComponentBase object. More...
 
bool isConnected_logOut_OutputPort (FwIndexType portNum)
 
bool isConnected_timeCaller_OutputPort (FwIndexType portNum)
 
bool isConnected_tlmOut_OutputPort (FwIndexType portNum)
 
bool isConnected_PhaserMemberOut_OutputPort (FwIndexType portNum)
 
void CycleIn_handlerBase (FwIndexType portNum, Os::RawTime &cycleStart)
 Handler base-class function for input port CycleIn. More...
 
virtual void CycleIn_preMsgHook (FwIndexType portNum, Os::RawTime &cycleStart)
 Pre-message hook for async input port CycleIn. More...
 
void PhaserMemberOut_out (FwIndexType portNum, U32 context)
 Invoke output port PhaserMemberOut. More...
 
void Tick_internalInterfaceInvoke ()
 Internal interface base-class function for Tick. More...
 
void log_WARNING_HI_MissedDeadline (FwIndexType p, U32 start, U32 length, U32 ticks)
 
void log_WARNING_HI_MissedDeadline_ThrottleClear ()
 Reset throttle value for MissedDeadline. More...
 
Fw::Time getTime () const
 
- Protected Member Functions inherited from Fw::ActiveComponentBase
 ActiveComponentBase (const char *name)
 Constructor. More...
 
virtual ~ActiveComponentBase ()
 Destructor. More...
 
void init (FwEnumStoreType 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 (FwEnumStoreType instance)
 initialization function More...
 
Os::Queue::Status createQueue (FwSizeType depth, FwSizeType msgSize)
 
MsgDispatchStatus dispatchAvailableMessages ()
 dispatches all messages currently in the queue, returning status of the dispatch More...
 
FwSizeType 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 (FwEnumStoreType instance)
 Initialization function. More...
 
FwEnumStoreType 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...
 
- Static Protected Member Functions inherited from Svc::ActivePhaserComponentBase
static constexpr FwIndexType getNum_CycleIn_InputPorts ()
 
static constexpr FwIndexType getNum_logOut_OutputPorts ()
 
static constexpr FwIndexType getNum_timeCaller_OutputPorts ()
 
static constexpr FwIndexType getNum_tlmOut_OutputPorts ()
 
static constexpr FwIndexType getNum_PhaserMemberOut_OutputPorts ()
 
- 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

Definition at line 20 of file ActivePhaser.hpp.

Member Enumeration Documentation

◆ FinishStatus

Finish status.

Enumerator
UNKNOWN 

Improper finish call: child not running, no child, etc.

ON_TIME 

Child finished on time.

LATE 

Child finished late.

Definition at line 34 of file ActivePhaser.hpp.

◆ PhaserContextType

Enumerator
SEQUENTIAL 
COUNT 

Definition at line 28 of file ActivePhaser.hpp.

Constructor & Destructor Documentation

◆ ActivePhaser()

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

Construct ActivePhaser object.

Parameters
compNameThe component name

Definition at line 22 of file ActivePhaser.cpp.

◆ ~ActivePhaser()

Svc::ActivePhaser::~ActivePhaser ( )

Destroy ActivePhaser object.

Definition at line 95 of file ActivePhaser.cpp.

Member Function Documentation

◆ configure()

void Svc::ActivePhaser::configure ( U32  cycle_ticks)

Configure ActivePhaser object

Definition at line 39 of file ActivePhaser.cpp.

◆ init()

void Svc::ActivePhaser::init ( const FwSizeType  queueDepth,
const FwIndexType  instance = 0 
)

Initialize ActivePhaser object

Parameters
queueDepthThe queue depth
instanceThe instance number

Definition at line 33 of file ActivePhaser.cpp.

◆ register_phased()

void Svc::ActivePhaser::register_phased ( FwIndexType  port,
U32  length,
U32  start = DONT_CARE,
U32  context = DONT_CARE 
)

Register a phased port call

Definition at line 44 of file ActivePhaser.cpp.

Friends And Related Function Documentation

◆ ActivePhaserTester

friend class ActivePhaserTester
friend

Definition at line 21 of file ActivePhaser.hpp.

Member Data Documentation

◆ CONNECTION_COUNT_MAX

constexpr FwIndexType Svc::ActivePhaser::CONNECTION_COUNT_MAX = NUM_PHASERMEMBEROUT_OUTPUT_PORTS
static

Definition at line 26 of file ActivePhaser.hpp.

◆ DONT_CARE

const U32 Svc::ActivePhaser::DONT_CARE = 0xFFFFFFFFlu
static

Definition at line 25 of file ActivePhaser.hpp.

◆ MAX_CHILDREN

const U32 Svc::ActivePhaser::MAX_CHILDREN = 100
static

Definition at line 24 of file ActivePhaser.hpp.


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