F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AggregationMachineStateMachineAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AggregationMachineStateMachineAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for AggregationMachine state machine
5 // ======================================================================
6 
7 #ifndef Svc_AggregationMachineStateMachineAc_HPP
8 #define Svc_AggregationMachineStateMachineAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
16 
17 namespace Svc {
18 
21 
22  // ----------------------------------------------------------------------
23  // Friend classes
24  // ----------------------------------------------------------------------
25 
28 
29  public:
30 
31  // ----------------------------------------------------------------------
32  // Types
33  // ----------------------------------------------------------------------
34 
36  enum class State : FwEnumStoreType {
40  FILL,
43  };
44 
46  enum class Signal : FwEnumStoreType {
50  fill,
52  status,
54  timeout,
55  };
56 
57  protected:
58 
59  // ----------------------------------------------------------------------
60  // Constructors and Destructors
61  // ----------------------------------------------------------------------
62 
65 
68 
69  protected:
70 
71  // ----------------------------------------------------------------------
72  // Initialization
73  // ----------------------------------------------------------------------
74 
76  void initBase(
77  const FwEnumStoreType id
78  );
79 
80  public:
81 
82  // ----------------------------------------------------------------------
83  // Getter functions
84  // ----------------------------------------------------------------------
85 
88 
89  public:
90 
91  // ----------------------------------------------------------------------
92  // Send signal functions
93  // ----------------------------------------------------------------------
94 
96  void sendSignal_timeout();
97 
99  void sendSignal_fill(
100  const Svc::ComDataContextPair& value
101  );
102 
104  void sendSignal_status(
105  const Fw::Success& value
106  );
107 
108  protected:
109 
110  // ----------------------------------------------------------------------
111  // Actions
112  // ----------------------------------------------------------------------
113 
115  virtual void action_doClear(
116  Signal signal
117  ) = 0;
118 
120  virtual void action_doFill(
121  Signal signal,
122  const Svc::ComDataContextPair& value
123  ) = 0;
124 
126  virtual void action_doSend(
127  Signal signal
128  ) = 0;
129 
131  virtual void action_doHold(
132  Signal signal,
133  const Svc::ComDataContextPair& value
134  ) = 0;
135 
137  virtual void action_assertNoStatus(
138  Signal signal
139  ) = 0;
140 
141  protected:
142 
143  // ----------------------------------------------------------------------
144  // Guards
145  // ----------------------------------------------------------------------
146 
148  virtual bool guard_isFull(
149  Signal signal,
150  const Svc::ComDataContextPair& value
151  ) const = 0;
152 
154  virtual bool guard_isNotEmpty(
155  Signal signal
156  ) const = 0;
157 
159  virtual bool guard_isGood(
160  Signal signal,
161  const Fw::Success& value
162  ) const = 0;
163 
164  private:
165 
166  // ----------------------------------------------------------------------
167  // State and choice entry
168  // ----------------------------------------------------------------------
169 
171  void enter_FILL(
172  Signal signal
173  );
174 
176  void enter_WAIT_STATUS(
177  Signal signal
178  );
179 
181  void enter_IS_GOOD_STATUS(
182  Signal signal,
183  const Fw::Success& value
184  );
185 
187  void enter_IS_FULL_THEN_SEND(
188  Signal signal,
189  const Svc::ComDataContextPair& value
190  );
191 
192  protected:
193 
194  // ----------------------------------------------------------------------
195  // Member variables
196  // ----------------------------------------------------------------------
197 
200 
203 
204  };
205 
206 }
207 
208 #endif
virtual void action_doHold(Signal signal, const Svc::ComDataContextPair &value)=0
Hold a buffer.
virtual void action_doClear(Signal signal)=0
Clear the buffer fill state, last status.
void sendSignal_status(const Fw::Success &value)
Status return.
void sendSignal_timeout()
Rate-group driven timeout signal.
I32 FwEnumStoreType
AggregationMachineStateMachineBase::State getState() const
Get the state.
void initBase(const FwEnumStoreType id)
Initialize the state machine.
friend class AggregationMachineTester
Tester class for the state machine.
virtual bool guard_isNotEmpty(Signal signal) const =0
Check if not empty.
virtual void action_doFill(Signal signal, const Svc::ComDataContextPair &value)=0
Fill the buffer with data.
virtual bool guard_isFull(Signal signal, const Svc::ComDataContextPair &value) const =0
Check if full.
void sendSignal_fill(const Svc::ComDataContextPair &value)
Fill buffer signal.
virtual void action_assertNoStatus(Signal signal)=0
Assert no status when in fill state.
virtual bool guard_isGood(Signal signal, const Fw::Success &value) const =0
Check if last status is good.
RateGroupDivider component implementation.
virtual void action_doSend(Signal signal)=0
Send the buffer data.
Success/Failure.