F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PassiveRateGroupComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PassiveRateGroupComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PassiveRateGroup component base class
5 // ======================================================================
6 
7 #ifndef Svc_PassiveRateGroupComponentAc_HPP
8 #define Svc_PassiveRateGroupComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
14 #include "Fw/Time/TimePortAc.hpp"
15 #include "Fw/Tlm/TlmPortAc.hpp"
16 #include "Fw/Tlm/TlmString.hpp"
19 
20 namespace Svc {
21 
28  {
29 
30  // ----------------------------------------------------------------------
31  // Friend classes
32  // ----------------------------------------------------------------------
33 
37  friend class PassiveRateGroupTester;
38 
39  PROTECTED:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
46  enum {
48  };
49 
51  enum {
54  };
55 
57  enum {
59  };
60 
62  enum {
66  };
67 
68  public:
69 
70  // ----------------------------------------------------------------------
71  // Component initialization
72  // ----------------------------------------------------------------------
73 
75  void init(
76  FwEnumStoreType instance = 0
77  );
78 
79  public:
80 
81  // ----------------------------------------------------------------------
82  // Getters for typed input ports
83  // ----------------------------------------------------------------------
84 
89  FwIndexType portNum
90  );
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Connect input ports to special output ports
96  // ----------------------------------------------------------------------
97 
100  FwIndexType portNum,
101  Fw::InputTimePort* port
102  );
103 
105  void set_Tlm_OutputPort(
106  FwIndexType portNum,
107  Fw::InputTlmPort* port
108  );
109 
110  public:
111 
112  // ----------------------------------------------------------------------
113  // Connect typed input ports to typed output ports
114  // ----------------------------------------------------------------------
115 
118  FwIndexType portNum,
119  Svc::InputSchedPort* port
120  );
121 
122 #if FW_PORT_SERIALIZATION
123 
124  public:
125 
126  // ----------------------------------------------------------------------
127  // Connect serial input ports to special output ports
128  // ----------------------------------------------------------------------
129 
131  void set_Time_OutputPort(
132  FwIndexType portNum,
133  Fw::InputSerializePort* port
134  );
135 
137  void set_Tlm_OutputPort(
138  FwIndexType portNum,
139  Fw::InputSerializePort* port
140  );
141 
142 #endif
143 
144 #if FW_PORT_SERIALIZATION
145 
146  public:
147 
148  // ----------------------------------------------------------------------
149  // Connect serial input ports to typed output ports
150  // ----------------------------------------------------------------------
151 
154  FwIndexType portNum,
155  Fw::InputSerializePort* port
156  );
157 
158 #endif
159 
160  PROTECTED:
161 
162  // ----------------------------------------------------------------------
163  // Component construction and destruction
164  // ----------------------------------------------------------------------
165 
168  const char* compName = ""
169  );
170 
173 
174  PROTECTED:
175 
176  // ----------------------------------------------------------------------
177  // Getters for numbers of typed input ports
178  // ----------------------------------------------------------------------
179 
184 
185  PROTECTED:
186 
187  // ----------------------------------------------------------------------
188  // Getters for numbers of special output ports
189  // ----------------------------------------------------------------------
190 
195 
200 
201  PROTECTED:
202 
203  // ----------------------------------------------------------------------
204  // Getters for numbers of typed output ports
205  // ----------------------------------------------------------------------
206 
211 
212  PROTECTED:
213 
214  // ----------------------------------------------------------------------
215  // Connection status queries for special output ports
216  // ----------------------------------------------------------------------
217 
222  FwIndexType portNum
223  );
224 
229  FwIndexType portNum
230  );
231 
232  PROTECTED:
233 
234  // ----------------------------------------------------------------------
235  // Connection status queries for typed output ports
236  // ----------------------------------------------------------------------
237 
242  FwIndexType portNum
243  );
244 
245  PROTECTED:
246 
247  // ----------------------------------------------------------------------
248  // Handlers to implement for typed input ports
249  // ----------------------------------------------------------------------
250 
252  virtual void CycleIn_handler(
253  FwIndexType portNum,
254  Os::RawTime& cycleStart
255  ) = 0;
256 
257  PROTECTED:
258 
259  // ----------------------------------------------------------------------
260  // Port handler base-class functions for typed input ports
261  //
262  // Call these functions directly to bypass the corresponding ports
263  // ----------------------------------------------------------------------
264 
266  void CycleIn_handlerBase(
267  FwIndexType portNum,
268  Os::RawTime& cycleStart
269  );
270 
271  PROTECTED:
272 
273  // ----------------------------------------------------------------------
274  // Invocation functions for typed output ports
275  // ----------------------------------------------------------------------
276 
279  FwIndexType portNum,
280  U32 context
281  );
282 
283  PROTECTED:
284 
285  // ----------------------------------------------------------------------
286  // Telemetry write functions
287  // ----------------------------------------------------------------------
288 
293  U32 arg,
294  Fw::Time _tlmTime = Fw::Time()
295  );
296 
300  void tlmWrite_CycleTime(
301  U32 arg,
302  Fw::Time _tlmTime = Fw::Time()
303  ) const;
304 
308  void tlmWrite_CycleCount(
309  U32 arg,
310  Fw::Time _tlmTime = Fw::Time()
311  ) const;
312 
313  PROTECTED:
314 
315  // ----------------------------------------------------------------------
316  // Time
317  // ----------------------------------------------------------------------
318 
322  Fw::Time getTime() const;
323 
324  PRIVATE:
325 
326  // ----------------------------------------------------------------------
327  // Calls for messages received on typed input ports
328  // ----------------------------------------------------------------------
329 
331  static void m_p_CycleIn_in(
332  Fw::PassiveComponentBase* callComp,
333  FwIndexType portNum,
334  Os::RawTime& cycleStart
335  );
336 
337  PRIVATE:
338 
339  // ----------------------------------------------------------------------
340  // Typed input ports
341  // ----------------------------------------------------------------------
342 
344  Svc::InputCyclePort m_CycleIn_InputPort[NUM_CYCLEIN_INPUT_PORTS];
345 
346  PRIVATE:
347 
348  // ----------------------------------------------------------------------
349  // Special output ports
350  // ----------------------------------------------------------------------
351 
353  Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
354 
356  Fw::OutputTlmPort m_Tlm_OutputPort[NUM_TLM_OUTPUT_PORTS];
357 
358  PRIVATE:
359 
360  // ----------------------------------------------------------------------
361  // Typed output ports
362  // ----------------------------------------------------------------------
363 
365  Svc::OutputSchedPort m_RateGroupMemberOut_OutputPort[NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS];
366 
367  PRIVATE:
368 
369  // ----------------------------------------------------------------------
370  // First update flags for telemetry channels
371  // ----------------------------------------------------------------------
372 
374  bool m_first_update_MaxCycleTime;
375 
376  PRIVATE:
377 
378  // ----------------------------------------------------------------------
379  // Last value storage for telemetry channels
380  // ----------------------------------------------------------------------
381 
383  U32 m_last_MaxCycleTime;
384 
385  };
386 
387 }
388 
389 #endif
Definition: Time.hpp:9
I32 FwEnumStoreType
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
friend class PassiveRateGroupTester
Friend class tester implementation to support white-box testing.
void init()
Object initializer.
Definition: ObjBase.cpp:26
bool isConnected_RateGroupMemberOut_OutputPort(FwIndexType portNum)
void tlmWrite_CycleTime(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
virtual ~PassiveRateGroupComponentBase()
Destroy PassiveRateGroupComponentBase object.
PassiveRateGroupComponentBase(const char *compName="")
Construct PassiveRateGroupComponentBase object.
Auto-generated base for PassiveRateGroup component.
void tlmWrite_MaxCycleTime(U32 arg, Fw::Time _tlmTime=Fw::Time())
friend class PassiveRateGroupTesterBase
Friend class tester to support autocoded test harness.
void tlmWrite_CycleCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
PlatformIndexType FwIndexType
void RateGroupMemberOut_out(FwIndexType portNum, U32 context)
Invoke output port RateGroupMemberOut.
void set_RateGroupMemberOut_OutputPort(FwIndexType portNum, Svc::InputSchedPort *port)
Connect port to RateGroupMemberOut[portNum].
virtual void CycleIn_handler(FwIndexType portNum, Os::RawTime &cycleStart)=0
Handler for input port CycleIn.
RateGroupDivider component implementation.
void CycleIn_handlerBase(FwIndexType portNum, Os::RawTime &cycleStart)
Handler base-class function for input port CycleIn.
Svc::InputCyclePort * get_CycleIn_InputPort(FwIndexType portNum)