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"
17 
18 namespace Svc {
19 
22 
23  // ----------------------------------------------------------------------
24  // Friend classes
25  // ----------------------------------------------------------------------
26 
29 
30  public:
31 
32  // ----------------------------------------------------------------------
33  // Types
34  // ----------------------------------------------------------------------
35 
38 
40  enum class Signal : FwEnumStoreType {
44  fill,
46  status,
48  timeout,
49  };
50 
51  protected:
52 
53  // ----------------------------------------------------------------------
54  // Constructors and Destructors
55  // ----------------------------------------------------------------------
56 
59 
62 
63  protected:
64 
65  // ----------------------------------------------------------------------
66  // Initialization
67  // ----------------------------------------------------------------------
68 
70  void initBase(
71  const FwEnumStoreType id
72  );
73 
74  public:
75 
76  // ----------------------------------------------------------------------
77  // Getter functions
78  // ----------------------------------------------------------------------
79 
82 
83  public:
84 
85  // ----------------------------------------------------------------------
86  // Send signal functions
87  // ----------------------------------------------------------------------
88 
90  void sendSignal_timeout();
91 
93  void sendSignal_fill(
94  const Svc::ComDataContextPair& value
95  );
96 
98  void sendSignal_status(
99  const Fw::Success& value
100  );
101 
102  protected:
103 
104  // ----------------------------------------------------------------------
105  // Actions
106  // ----------------------------------------------------------------------
107 
109  virtual void action_doClear(
110  Signal signal
111  ) = 0;
112 
114  virtual void action_doFill(
115  Signal signal,
116  const Svc::ComDataContextPair& value
117  ) = 0;
118 
120  virtual void action_doSend(
121  Signal signal
122  ) = 0;
123 
125  virtual void action_doHold(
126  Signal signal,
127  const Svc::ComDataContextPair& value
128  ) = 0;
129 
131  virtual void action_assertNoStatus(
132  Signal signal
133  ) = 0;
134 
135  protected:
136 
137  // ----------------------------------------------------------------------
138  // Guards
139  // ----------------------------------------------------------------------
140 
142  virtual bool guard_isFull(
143  Signal signal,
144  const Svc::ComDataContextPair& value
145  ) const = 0;
146 
148  virtual bool guard_willFill(
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_WILL_FILL_THEN_SEND(
188  Signal signal,
189  const Svc::ComDataContextPair& value
190  );
191 
193  void enter_IS_FULL_THEN_SEND(
194  Signal signal,
195  const Svc::ComDataContextPair& value
196  );
197 
198  protected:
199 
200  // ----------------------------------------------------------------------
201  // Member variables
202  // ----------------------------------------------------------------------
203 
206 
209 
210  };
211 
212 }
213 
214 #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 the aggregation buffer is full, i.e. cannot accept the incoming buffer.
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.
virtual bool guard_willFill(Signal signal, const Svc::ComDataContextPair &value) const =0
Check if the aggregation will fill, i.e. the incoming buffer will exactly fit.
Success/Failure.