F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PassiveRateGroup.hpp
Go to the documentation of this file.
1 /*
2  * \author: Tim Canham
3  * \file:
4  * \brief
5  *
6  * This file implements the PassiveRateGroup component,
7  * which invokes a set of components the comprise the rate group.
8  *
9  * Copyright 2014-2015, by the California Institute of Technology.
10  * ALL RIGHTS RESERVED. United States Government Sponsorship
11  * acknowledged.
12  */
13 
14 #ifndef SVC_PASSIVERATEGROUP_IMPL_HPP
15 #define SVC_PASSIVERATEGROUP_IMPL_HPP
16 
18 #include <Fw/Deprecate.hpp>
20 #include <atomic>
21 
22 namespace Svc {
23 
32 
34  // Allow unit tests to access private members for testing
35  friend class PassiveRateGroupTester;
36 
37  public:
39 
42 
49  explicit PassiveRateGroup(const char* compName);
50 
62  void configure(const ContextArray& contexts, const Os::RawTimeSource rawTimeSource = Os::RAWTIME_DEFAULT);
63 
73  DEPRECATED(void configure(const U32 contexts[], const FwIndexType numContexts),
74  "Use configure(const PassiveRateGroup::ContextArray& contexts) instead");
75 
80 
81  private:
90  void CycleIn_handler(FwIndexType portNum, Os::RawTime& cycleStart) override;
91 
98  void CLEAR_STATISTICS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq) override;
99 
106  Os::RawTime createRawTime() const;
107 
108  U32 m_cycles;
109  std::atomic<U32> m_maxTime;
110  std::atomic<U32> m_portCycleTimeHWMUsec[NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS];
111  Os::RawTimeSource m_rawTimeSource;
112  FwIndexType m_numContexts;
113  U32 m_contexts[NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS];
114 };
115 
116 } // namespace Svc
117 
118 #endif
RawTimeSource
Timer source selection for RawTime.
PassiveRateGroup(const char *compName)
PassiveRateGroupImpl constructor.
Platform&#39;s default timer (maintains current behavior)
FwIdType FwOpcodeType
The type of a command opcode.
static constexpr FwIndexType CONNECTION_COUNT_MAX
Auto-generated base for PassiveRateGroup component.
void configure(const ContextArray &contexts, const Os::RawTimeSource rawTimeSource=Os::RAWTIME_DEFAULT)
PassiveRateGroupImpl initialization function.
DEPRECATED(void configure(const U32 contexts[], const FwIndexType numContexts), "Use configure(const PassiveRateGroup::ContextArray& contexts) instead")
PassiveRateGroup configuration function.
PlatformIndexType FwIndexType
friend class PassiveRateGroupTester
~PassiveRateGroup()
PassiveRateGroupImpl destructor.
RateGroupDivider component implementation.