F´ Flight Software - C/C++ Documentation  devel
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 
10 #include "FpConfig.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 
36 
37  PROTECTED:
38 
39  // ----------------------------------------------------------------------
40  // Constants
41  // ----------------------------------------------------------------------
42 
44  enum {
46  };
47 
49  enum {
52  };
53 
55  enum {
57  };
58 
60  enum {
64  };
65 
66  public:
67 
68  // ----------------------------------------------------------------------
69  // Component initialization
70  // ----------------------------------------------------------------------
71 
73  void init(
74  FwEnumStoreType instance = 0
75  );
76 
77  public:
78 
79  // ----------------------------------------------------------------------
80  // Getters for typed input ports
81  // ----------------------------------------------------------------------
82 
87  FwIndexType portNum
88  );
89 
90  public:
91 
92  // ----------------------------------------------------------------------
93  // Connect input ports to special output ports
94  // ----------------------------------------------------------------------
95 
98  FwIndexType portNum,
99  Fw::InputTimePort* port
100  );
101 
103  void set_Tlm_OutputPort(
104  FwIndexType portNum,
105  Fw::InputTlmPort* port
106  );
107 
108  public:
109 
110  // ----------------------------------------------------------------------
111  // Connect typed input ports to typed output ports
112  // ----------------------------------------------------------------------
113 
116  FwIndexType portNum,
117  Svc::InputSchedPort* port
118  );
119 
120 #if FW_PORT_SERIALIZATION
121 
122  public:
123 
124  // ----------------------------------------------------------------------
125  // Connect serial input ports to special output ports
126  // ----------------------------------------------------------------------
127 
129  void set_Time_OutputPort(
130  FwIndexType portNum,
131  Fw::InputSerializePort* port
132  );
133 
135  void set_Tlm_OutputPort(
136  FwIndexType portNum,
137  Fw::InputSerializePort* port
138  );
139 
140 #endif
141 
142 #if FW_PORT_SERIALIZATION
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Connect serial input ports to typed output ports
148  // ----------------------------------------------------------------------
149 
152  FwIndexType portNum,
153  Fw::InputSerializePort* port
154  );
155 
156 #endif
157 
158  PROTECTED:
159 
160  // ----------------------------------------------------------------------
161  // Component construction and destruction
162  // ----------------------------------------------------------------------
163 
166  const char* compName = ""
167  );
168 
171 
172  PROTECTED:
173 
174  // ----------------------------------------------------------------------
175  // Getters for numbers of typed input ports
176  // ----------------------------------------------------------------------
177 
182 
183  PROTECTED:
184 
185  // ----------------------------------------------------------------------
186  // Getters for numbers of special output ports
187  // ----------------------------------------------------------------------
188 
193 
198 
199  PROTECTED:
200 
201  // ----------------------------------------------------------------------
202  // Getters for numbers of typed output ports
203  // ----------------------------------------------------------------------
204 
209 
210  PROTECTED:
211 
212  // ----------------------------------------------------------------------
213  // Connection status queries for special output ports
214  // ----------------------------------------------------------------------
215 
220  FwIndexType portNum
221  );
222 
227  FwIndexType portNum
228  );
229 
230  PROTECTED:
231 
232  // ----------------------------------------------------------------------
233  // Connection status queries for typed output ports
234  // ----------------------------------------------------------------------
235 
240  FwIndexType portNum
241  );
242 
243  PROTECTED:
244 
245  // ----------------------------------------------------------------------
246  // Handlers to implement for typed input ports
247  // ----------------------------------------------------------------------
248 
250  virtual void CycleIn_handler(
251  FwIndexType portNum,
252  Os::RawTime& cycleStart
253  ) = 0;
254 
255  PROTECTED:
256 
257  // ----------------------------------------------------------------------
258  // Port handler base-class functions for typed input ports
259  //
260  // Call these functions directly to bypass the corresponding ports
261  // ----------------------------------------------------------------------
262 
264  void CycleIn_handlerBase(
265  FwIndexType portNum,
266  Os::RawTime& cycleStart
267  );
268 
269  PROTECTED:
270 
271  // ----------------------------------------------------------------------
272  // Invocation functions for typed output ports
273  // ----------------------------------------------------------------------
274 
277  FwIndexType portNum,
278  U32 context
279  );
280 
281  PROTECTED:
282 
283  // ----------------------------------------------------------------------
284  // Telemetry write functions
285  // ----------------------------------------------------------------------
286 
291  U32 arg,
292  Fw::Time _tlmTime = Fw::Time()
293  );
294 
298  void tlmWrite_CycleTime(
299  U32 arg,
300  Fw::Time _tlmTime = Fw::Time()
301  );
302 
306  void tlmWrite_CycleCount(
307  U32 arg,
308  Fw::Time _tlmTime = Fw::Time()
309  );
310 
311  PROTECTED:
312 
313  // ----------------------------------------------------------------------
314  // Time
315  // ----------------------------------------------------------------------
316 
320  Fw::Time getTime();
321 
322  PRIVATE:
323 
324  // ----------------------------------------------------------------------
325  // Calls for messages received on typed input ports
326  // ----------------------------------------------------------------------
327 
329  static void m_p_CycleIn_in(
330  Fw::PassiveComponentBase* callComp,
331  FwIndexType portNum,
332  Os::RawTime& cycleStart
333  );
334 
335  PRIVATE:
336 
337  // ----------------------------------------------------------------------
338  // Typed input ports
339  // ----------------------------------------------------------------------
340 
342  Svc::InputCyclePort m_CycleIn_InputPort[NUM_CYCLEIN_INPUT_PORTS];
343 
344  PRIVATE:
345 
346  // ----------------------------------------------------------------------
347  // Special output ports
348  // ----------------------------------------------------------------------
349 
351  Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
352 
354  Fw::OutputTlmPort m_Tlm_OutputPort[NUM_TLM_OUTPUT_PORTS];
355 
356  PRIVATE:
357 
358  // ----------------------------------------------------------------------
359  // Typed output ports
360  // ----------------------------------------------------------------------
361 
363  Svc::OutputSchedPort m_RateGroupMemberOut_OutputPort[NUM_RATEGROUPMEMBEROUT_OUTPUT_PORTS];
364 
365  PRIVATE:
366 
367  // ----------------------------------------------------------------------
368  // First update flags for telemetry channels
369  // ----------------------------------------------------------------------
370 
372  bool m_first_update_MaxCycleTime;
373 
374  PRIVATE:
375 
376  // ----------------------------------------------------------------------
377  // Last value storage for telemetry channels
378  // ----------------------------------------------------------------------
379 
381  U32 m_last_MaxCycleTime;
382 
383  };
384 
385 }
386 
387 #endif
I32 FwEnumStoreType
Definition: FpConfig.h:64
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
C++-compatible configuration header for fprime configuration.
void init()
Object initializer.
Definition: ObjBase.cpp:27
Definition: Time.hpp:9
Auto-generated base for PassiveRateGroup component.
PassiveRateGroupComponentBase(const char *compName="")
Construct PassiveRateGroupComponentBase object.
void tlmWrite_CycleTime(U32 arg, Fw::Time _tlmTime=Fw::Time())
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
bool isConnected_RateGroupMemberOut_OutputPort(FwIndexType portNum)
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
virtual ~PassiveRateGroupComponentBase()
Destroy PassiveRateGroupComponentBase object.
void set_RateGroupMemberOut_OutputPort(FwIndexType portNum, Svc::InputSchedPort *port)
Connect port to RateGroupMemberOut[portNum].
void tlmWrite_CycleCount(U32 arg, Fw::Time _tlmTime=Fw::Time())
void RateGroupMemberOut_out(FwIndexType portNum, U32 context)
Invoke output port RateGroupMemberOut.
virtual void CycleIn_handler(FwIndexType portNum, Os::RawTime &cycleStart)=0
Handler for input port CycleIn.
friend class PassiveRateGroupComponentBaseFriend
Friend class for white-box testing.
void tlmWrite_MaxCycleTime(U32 arg, Fw::Time _tlmTime=Fw::Time())
Svc::InputCyclePort * get_CycleIn_InputPort(FwIndexType portNum)
@ CHANNELID_MAXCYCLETIME
Channel ID for MaxCycleTime.
@ CHANNELID_CYCLECOUNT
Channel ID for CycleCount.
void CycleIn_handlerBase(FwIndexType portNum, Os::RawTime &cycleStart)
Handler base-class function for input port CycleIn.