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"
15 
16 namespace Svc {
17 
24  {
25 
26  // ----------------------------------------------------------------------
27  // Friend classes
28  // ----------------------------------------------------------------------
29 
33  friend class RateGroupDriverTester;
34 
35  protected:
36 
37  // ----------------------------------------------------------------------
38  // Constants
39  // ----------------------------------------------------------------------
40 
42  enum {
44  };
45 
47  enum {
49  };
50 
51  public:
52 
53  // ----------------------------------------------------------------------
54  // Component initialization
55  // ----------------------------------------------------------------------
56 
58  void init(
59  FwEnumStoreType instance = 0
60  );
61 
62  public:
63 
64  // ----------------------------------------------------------------------
65  // Getters for typed input ports
66  // ----------------------------------------------------------------------
67 
72  FwIndexType portNum
73  );
74 
75  public:
76 
77  // ----------------------------------------------------------------------
78  // Connect typed input ports to typed output ports
79  // ----------------------------------------------------------------------
80 
83  FwIndexType portNum,
84  Svc::InputCyclePort* port
85  );
86 
87 #if FW_PORT_SERIALIZATION
88 
89  public:
90 
91  // ----------------------------------------------------------------------
92  // Connect serial input ports to typed output ports
93  // ----------------------------------------------------------------------
94 
97  FwIndexType portNum,
98  Fw::InputSerializePort* port
99  );
100 
101 #endif
102 
103  protected:
104 
105  // ----------------------------------------------------------------------
106  // Component construction and destruction
107  // ----------------------------------------------------------------------
108 
111  const char* compName = ""
112  );
113 
116 
117  protected:
118 
119  // ----------------------------------------------------------------------
120  // Getters for numbers of typed input ports
121  // ----------------------------------------------------------------------
122 
128  }
129 
130  protected:
131 
132  // ----------------------------------------------------------------------
133  // Getters for numbers of typed output ports
134  // ----------------------------------------------------------------------
135 
141  }
142 
143  protected:
144 
145  // ----------------------------------------------------------------------
146  // Connection status queries for typed output ports
147  // ----------------------------------------------------------------------
148 
153  FwIndexType portNum
154  );
155 
156  protected:
157 
158  // ----------------------------------------------------------------------
159  // Handlers to implement for typed input ports
160  // ----------------------------------------------------------------------
161 
163  virtual void CycleIn_handler(
164  FwIndexType portNum,
165  Os::RawTime& cycleStart
166  ) = 0;
167 
168  protected:
169 
170  // ----------------------------------------------------------------------
171  // Port handler base-class functions for typed input ports
172  //
173  // Call these functions directly to bypass the corresponding ports
174  // ----------------------------------------------------------------------
175 
177  void CycleIn_handlerBase(
178  FwIndexType portNum,
179  Os::RawTime& cycleStart
180  );
181 
182  protected:
183 
184  // ----------------------------------------------------------------------
185  // Invocation functions for typed output ports
186  // ----------------------------------------------------------------------
187 
189  void CycleOut_out(
190  FwIndexType portNum,
191  Os::RawTime& cycleStart
192  );
193 
194  private:
195 
196  // ----------------------------------------------------------------------
197  // Calls for messages received on typed input ports
198  // ----------------------------------------------------------------------
199 
201  static void m_p_CycleIn_in(
202  Fw::PassiveComponentBase* callComp,
203  FwIndexType portNum,
204  Os::RawTime& cycleStart
205  );
206 
207  private:
208 
209  // ----------------------------------------------------------------------
210  // Typed input ports
211  // ----------------------------------------------------------------------
212 
214  Svc::InputCyclePort m_CycleIn_InputPort[NUM_CYCLEIN_INPUT_PORTS];
215 
216  private:
217 
218  // ----------------------------------------------------------------------
219  // Typed output ports
220  // ----------------------------------------------------------------------
221 
223  Svc::OutputCyclePort m_CycleOut_OutputPort[NUM_CYCLEOUT_OUTPUT_PORTS];
224 
225  };
226 
227 }
228 
229 #endif
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 CycleOut_out(FwIndexType portNum, Os::RawTime &cycleStart)
Invoke output port CycleOut.
void CycleIn_handlerBase(FwIndexType portNum, Os::RawTime &cycleStart)
Handler base-class function for input port CycleIn.
bool isConnected_CycleOut_OutputPort(FwIndexType portNum)
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.
static constexpr FwIndexType getNum_CycleOut_OutputPorts()
friend class RateGroupDriverTester
Friend class tester implementation to support white-box testing.