F´ Flight Software - C/C++ Documentation
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 <atomic>
19 
21 #include <Fw/Deprecate.hpp>
23 
24 namespace Svc {
25 
34 
36  friend class ActiveRateGroupTester;
37 
38  public:
40 
43 
50  ActiveRateGroup(const char* compName);
51 
59 
60  void configure(const ContextArray& contexts);
61 
71 
72  DEPRECATED(void configure(const U32 contexts[], const FwIndexType numContexts),
73  "Use configure(const ActiveRateGroup::ContextArray& contexts) instead");
74 
78 
80 
81  private:
90 
91  void CycleIn_handler(FwIndexType portNum, Os::RawTime& cycleStart);
92 
100 
101  void CycleIn_preMsgHook(FwIndexType portNum, Os::RawTime& cycleStart);
102 
109 
110  void PingIn_handler(FwIndexType portNum, U32 key);
111 
117 
118  void preamble();
119 
120  U32 m_cycles;
121  U32 m_maxTime;
122  std::atomic<bool>
123  m_cycleStarted;
124  U32 m_contexts[CONNECTION_COUNT_MAX];
125  FwIndexType m_numContexts;
126  FwIndexType m_overrunThrottle;
127  U32 m_cycleSlips;
128 };
129 
130 } // namespace Svc
131 
132 #endif
void configure(const ContextArray &contexts)
ActiveRateGroup configuration function.
ActiveRateGroup(const char *compName)
ActiveRateGroup constructor.
DEPRECATED(void configure(const U32 contexts[], const FwIndexType numContexts), "Use configure(const ActiveRateGroup::ContextArray& contexts) instead")
ActiveRateGroup configuration function.
Executes a set of components as part of a rate group.
~ActiveRateGroup()
ActiveRateGroup destructor.
static constexpr FwIndexType CONNECTION_COUNT_MAX
Auto-generated base for ActiveRateGroup component.
friend class ActiveRateGroupTester
PlatformIndexType FwIndexType
RateGroupDivider component implementation.