F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComRetryComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComRetryComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ComRetry component base class
5 // ======================================================================
6 
7 #ifndef Svc_ComRetryComponentAc_HPP
8 #define Svc_ComRetryComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
12 #if !FW_DIRECT_PORT_CALLS
14 #endif
15 #if !FW_DIRECT_PORT_CALLS
17 #endif
20 
21 namespace Svc {
22 
29  {
30 
31  // ----------------------------------------------------------------------
32  // Friend classes
33  // ----------------------------------------------------------------------
34 
36  friend class ComRetryTesterBase;
38  friend class ComRetryTester;
39 
40  protected:
41 
42  // ----------------------------------------------------------------------
43  // Constants
44  // ----------------------------------------------------------------------
45 
47  enum {
51  };
52 
54  enum {
58  };
59 
60  public:
61 
62  // ----------------------------------------------------------------------
63  // Component initialization
64  // ----------------------------------------------------------------------
65 
67  void init(
68  FwEnumStoreType instance = 0
69  );
70 
71 #if !FW_DIRECT_PORT_CALLS
72 
73  public:
74 
75  // ----------------------------------------------------------------------
76  // Getters for typed input ports
77  // ----------------------------------------------------------------------
78 
83  FwIndexType portNum
84  );
85 
90  FwIndexType portNum
91  );
92 
97  FwIndexType portNum
98  );
99 
100 #endif
101 
102 #if !FW_DIRECT_PORT_CALLS
103 
104  public:
105 
106  // ----------------------------------------------------------------------
107  // Connect typed input ports to typed output ports
108  // ----------------------------------------------------------------------
109 
112  FwIndexType portNum,
114  );
115 
118  FwIndexType portNum,
120  );
121 
124  FwIndexType portNum,
126  );
127 
128 #endif
129 
130 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
131 
132  public:
133 
134  // ----------------------------------------------------------------------
135  // Connect serial input ports to typed output ports
136  // ----------------------------------------------------------------------
137 
140  FwIndexType portNum,
141  Fw::InputSerializePort* port
142  );
143 
146  FwIndexType portNum,
147  Fw::InputSerializePort* port
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 
170  virtual ~ComRetryComponentBase();
171 
172  protected:
173 
174  // ----------------------------------------------------------------------
175  // Getters for numbers of typed input ports
176  // ----------------------------------------------------------------------
177 
183  }
184 
189  return NUM_DATAIN_INPUT_PORTS;
190  }
191 
197  }
198 
199  protected:
200 
201  // ----------------------------------------------------------------------
202  // Getters for numbers of typed output ports
203  // ----------------------------------------------------------------------
204 
210  }
211 
217  }
218 
224  }
225 
226  protected:
227 
228  // ----------------------------------------------------------------------
229  // Connection status queries for typed output ports
230  // ----------------------------------------------------------------------
231 
236  FwIndexType portNum
237  ) const;
238 
243  FwIndexType portNum
244  ) const;
245 
250  FwIndexType portNum
251  ) const;
252 
253  protected:
254 
255  // ----------------------------------------------------------------------
256  // Handlers to implement for typed input ports
257  // ----------------------------------------------------------------------
258 
260  virtual void comStatusIn_handler(
261  FwIndexType portNum,
262  Fw::Success& condition
263  ) = 0;
264 
266  virtual void dataIn_handler(
267  FwIndexType portNum,
268  Fw::Buffer& data,
269  const ComCfg::FrameContext& context
270  ) = 0;
271 
273  virtual void dataReturnIn_handler(
274  FwIndexType portNum,
275  Fw::Buffer& data,
276  const ComCfg::FrameContext& context
277  ) = 0;
278 
279 #if FW_DIRECT_PORT_CALLS
280  public:
281 #else
282  protected:
283 #endif
284 
285  // ----------------------------------------------------------------------
286  // Port handler base-class functions for typed input ports
287  //
288  // Call these functions directly to bypass the corresponding ports
289  // ----------------------------------------------------------------------
290 
293  FwIndexType portNum,
294  Fw::Success& condition
295  );
296 
298  void dataIn_handlerBase(
299  FwIndexType portNum,
300  Fw::Buffer& data,
301  const ComCfg::FrameContext& context
302  );
303 
306  FwIndexType portNum,
307  Fw::Buffer& data,
308  const ComCfg::FrameContext& context
309  );
310 
311  protected:
312 
313  // ----------------------------------------------------------------------
314  // Invocation functions for typed output ports
315  // ----------------------------------------------------------------------
316 
318  void comStatusOut_out(
319  FwIndexType portNum,
320  Fw::Success& condition
321  ) const;
322 
324  void dataOut_out(
325  FwIndexType portNum,
326  Fw::Buffer& data,
327  const ComCfg::FrameContext& context
328  ) const;
329 
331  void dataReturnOut_out(
332  FwIndexType portNum,
333  Fw::Buffer& data,
334  const ComCfg::FrameContext& context
335  ) const;
336 
337  private:
338 
339  // ----------------------------------------------------------------------
340  // Calls for messages received on typed input ports
341  // ----------------------------------------------------------------------
342 
344  static void m_p_comStatusIn_in(
345  Fw::PassiveComponentBase* callComp,
346  FwIndexType portNum,
347  Fw::Success& condition
348  );
349 
351  static void m_p_dataIn_in(
352  Fw::PassiveComponentBase* callComp,
353  FwIndexType portNum,
354  Fw::Buffer& data,
355  const ComCfg::FrameContext& context
356  );
357 
359  static void m_p_dataReturnIn_in(
360  Fw::PassiveComponentBase* callComp,
361  FwIndexType portNum,
362  Fw::Buffer& data,
363  const ComCfg::FrameContext& context
364  );
365 
366 #if !FW_DIRECT_PORT_CALLS
367 
368  private:
369 
370  // ----------------------------------------------------------------------
371  // Typed input ports
372  // ----------------------------------------------------------------------
373 
376 
379 
382 
383 #endif
384 
385 #if !FW_DIRECT_PORT_CALLS
386 
387  private:
388 
389  // ----------------------------------------------------------------------
390  // Typed output ports
391  // ----------------------------------------------------------------------
392 
395 
398 
401 
402 #endif
403 
404  };
405 
406 }
407 
408 #endif
Auto-generated base for ComRetry component.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
I32 FwEnumStoreType
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum) const
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
static constexpr FwIndexType getNum_comStatusIn_InputPorts()
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
static constexpr FwIndexType getNum_dataIn_InputPorts()
void init()
Object initializer.
Definition: ObjBase.cpp:24
static constexpr FwIndexType getNum_dataOut_OutputPorts()
friend class ComRetryTester
Friend class tester implementation to support white-box testing.
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
virtual ~ComRetryComponentBase()
Destroy ComRetryComponentBase object.
static constexpr FwIndexType getNum_comStatusOut_OutputPorts()
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
friend class ComRetryTesterBase
Friend class tester to support autocoded test harness.
Fw::InputSuccessConditionPort * get_comStatusIn_InputPort(FwIndexType portNum)
void comStatusIn_handlerBase(FwIndexType portNum, Fw::Success &condition)
Handler base-class function for input port comStatusIn.
PlatformIndexType FwIndexType
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
ComRetryComponentBase(const char *compName="")
Construct ComRetryComponentBase object.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
virtual void comStatusIn_handler(FwIndexType portNum, Fw::Success &condition)=0
Handler for input port comStatusIn.
Success/Failure.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition) const
Invoke output port comStatusOut.