F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
RateGroupDriverComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title RateGroupDriverComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for RateGroupDriver component base class
5 // ======================================================================
6 
7 #ifndef Svc_RateGroupDriverComponentAc_HPP
8 #define Svc_RateGroupDriverComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
12 #if !FW_DIRECT_PORT_CALLS
14 #endif
15 #if !FW_DIRECT_PORT_CALLS
17 #endif
19 
20 namespace Svc {
21 
28  {
29 
30  // ----------------------------------------------------------------------
31  // Friend classes
32  // ----------------------------------------------------------------------
33 
37  friend class RateGroupDriverTester;
38 
39  protected:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
46  enum {
48  };
49 
51  enum {
53  };
54 
55  public:
56 
57  // ----------------------------------------------------------------------
58  // Component initialization
59  // ----------------------------------------------------------------------
60 
62  void init(
63  FwEnumStoreType instance = 0
64  );
65 
66 #if !FW_DIRECT_PORT_CALLS
67 
68  public:
69 
70  // ----------------------------------------------------------------------
71  // Getters for typed input ports
72  // ----------------------------------------------------------------------
73 
78  FwIndexType portNum
79  );
80 
81 #endif
82 
83 #if !FW_DIRECT_PORT_CALLS
84 
85  public:
86 
87  // ----------------------------------------------------------------------
88  // Connect typed input ports to typed output ports
89  // ----------------------------------------------------------------------
90 
93  FwIndexType portNum,
94  Svc::InputCyclePort* port
95  );
96 
97 #endif
98 
99 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
100 
101  public:
102 
103  // ----------------------------------------------------------------------
104  // Connect serial input ports to typed output ports
105  // ----------------------------------------------------------------------
106 
109  FwIndexType portNum,
110  Fw::InputSerializePort* port
111  );
112 
113 #endif
114 
115  protected:
116 
117  // ----------------------------------------------------------------------
118  // Component construction and destruction
119  // ----------------------------------------------------------------------
120 
123  const char* compName = ""
124  );
125 
128 
129  protected:
130 
131  // ----------------------------------------------------------------------
132  // Getters for numbers of typed input ports
133  // ----------------------------------------------------------------------
134 
140  }
141 
142  protected:
143 
144  // ----------------------------------------------------------------------
145  // Getters for numbers of typed output ports
146  // ----------------------------------------------------------------------
147 
153  }
154 
155  protected:
156 
157  // ----------------------------------------------------------------------
158  // Connection status queries for typed output ports
159  // ----------------------------------------------------------------------
160 
165  FwIndexType portNum
166  ) const;
167 
168  protected:
169 
170  // ----------------------------------------------------------------------
171  // Handlers to implement for typed input ports
172  // ----------------------------------------------------------------------
173 
175  virtual void CycleIn_handler(
176  FwIndexType portNum,
177  Os::RawTime& cycleStart
178  ) = 0;
179 
180 #if FW_DIRECT_PORT_CALLS
181  public:
182 #else
183  protected:
184 #endif
185 
186  // ----------------------------------------------------------------------
187  // Port handler base-class functions for typed input ports
188  //
189  // Call these functions directly to bypass the corresponding ports
190  // ----------------------------------------------------------------------
191 
193  void CycleIn_handlerBase(
194  FwIndexType portNum,
195  Os::RawTime& cycleStart
196  );
197 
198  protected:
199 
200  // ----------------------------------------------------------------------
201  // Invocation functions for typed output ports
202  // ----------------------------------------------------------------------
203 
205  void CycleOut_out(
206  FwIndexType portNum,
207  Os::RawTime& cycleStart
208  ) const;
209 
210  private:
211 
212  // ----------------------------------------------------------------------
213  // Calls for messages received on typed input ports
214  // ----------------------------------------------------------------------
215 
217  static void m_p_CycleIn_in(
218  Fw::PassiveComponentBase* callComp,
219  FwIndexType portNum,
220  Os::RawTime& cycleStart
221  );
222 
223 #if !FW_DIRECT_PORT_CALLS
224 
225  private:
226 
227  // ----------------------------------------------------------------------
228  // Typed input ports
229  // ----------------------------------------------------------------------
230 
232  Svc::InputCyclePort m_CycleIn_InputPort[NUM_CYCLEIN_INPUT_PORTS];
233 
234 #endif
235 
236 #if !FW_DIRECT_PORT_CALLS
237 
238  private:
239 
240  // ----------------------------------------------------------------------
241  // Typed output ports
242  // ----------------------------------------------------------------------
243 
245  Svc::OutputCyclePort m_CycleOut_OutputPort[NUM_CYCLEOUT_OUTPUT_PORTS];
246 
247 #endif
248 
249  };
250 
251 }
252 
253 #endif
bool isConnected_CycleOut_OutputPort(FwIndexType portNum) const
friend class RateGroupDriverTesterBase
Friend class tester to support autocoded test harness.
I32 FwEnumStoreType
virtual ~RateGroupDriverComponentBase()
Destroy RateGroupDriverComponentBase object.
void set_CycleOut_OutputPort(FwIndexType portNum, Svc::InputCyclePort *port)
Connect port to CycleOut[portNum].
void init()
Object initializer.
Definition: ObjBase.cpp:24
virtual void CycleIn_handler(FwIndexType portNum, Os::RawTime &cycleStart)=0
Handler for input port CycleIn.
Auto-generated base for RateGroupDriver component.
void CycleIn_handlerBase(FwIndexType portNum, Os::RawTime &cycleStart)
Handler base-class function for input port CycleIn.
Svc::InputCyclePort * get_CycleIn_InputPort(FwIndexType portNum)
RateGroupDriverComponentBase(const char *compName="")
Construct RateGroupDriverComponentBase object.
static constexpr FwIndexType getNum_CycleIn_InputPorts()
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
void CycleOut_out(FwIndexType portNum, Os::RawTime &cycleStart) const
Invoke output port CycleOut.
static constexpr FwIndexType getNum_CycleOut_OutputPorts()
friend class RateGroupDriverTester
Friend class tester implementation to support white-box testing.