F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
ActiveRateGroup.hpp
Go to the documentation of this file.
1 /*
2 * \author: Tim Canham
3 * \file:
4 * \brief
5 *
6 * This file implements the ActiveRateGroup component,
7 * which invokes a set of components the comprise the rate group.
8 *
9 * Copyright 2014-2022, by the California Institute of Technology.
10 * ALL RIGHTS RESERVED. United States Government Sponsorship
11 * acknowledged.
12 *
13 */
14 
15 #ifndef SVC_ACTIVERATEGROUP_HPP
16 #define SVC_ACTIVERATEGROUP_HPP
17 
18 #include <Svc/ActiveRateGroup/ActiveRateGroupComponentAc.hpp>
19 
20 namespace Svc {
21 
30 
31  class ActiveRateGroup : public ActiveRateGroupComponentBase {
32  public:
33 
40  ActiveRateGroup(const char* compName);
41 
49 
50  void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance);
51 
61 
62  void configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts);
63 
67 
69 
70  PRIVATE:
71 
80 
81  void CycleIn_handler(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart);
82 
90 
91  void CycleIn_preMsgHook(NATIVE_INT_TYPE portNum, Svc::TimerVal& cycleStart);
92 
99 
100  void PingIn_handler(NATIVE_INT_TYPE portNum, U32 key);
101 
107 
108  void preamble();
109 
110  U32 m_cycles;
111  U32 m_maxTime;
112  volatile bool m_cycleStarted;
113  NATIVE_INT_TYPE m_contexts[NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS];
114  NATIVE_INT_TYPE m_numContexts;
115  NATIVE_INT_TYPE m_overrunThrottle;
116  U32 m_cycleSlips;
117  };
118 
119 }
120 
121 #endif
Svc::TimerVal
Serializable class for carrying timer values.
Definition: TimerVal.hpp:22
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:27
Svc::ActiveRateGroup::ActiveRateGroup
ActiveRateGroup(const char *compName)
ActiveRateGroup constructor.
Definition: ActiveRateGroup.cpp:23
Svc
Definition: ActiveRateGroupCfg.hpp:18
Svc::ActiveRateGroup
Executes a set of components as part of a rate group.
Definition: ActiveRateGroup.hpp:31
Svc::ActiveRateGroup::~ActiveRateGroup
~ActiveRateGroup()
ActiveRateGroup destructor.
Definition: ActiveRateGroup.cpp:51
Svc::ActiveRateGroup::configure
void configure(NATIVE_INT_TYPE contexts[], NATIVE_INT_TYPE numContexts)
ActiveRateGroup configuration function.
Definition: ActiveRateGroup.cpp:33
Svc::ActiveRateGroup::init
void init(NATIVE_INT_TYPE queueDepth, NATIVE_INT_TYPE instance)
ActiveRateGroup initialization function.
Definition: ActiveRateGroup.cpp:47