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"
16 
17 namespace Svc {
18 
25  {
26 
27  // ----------------------------------------------------------------------
28  // Friend classes
29  // ----------------------------------------------------------------------
30 
32  friend class ComRetryTesterBase;
34  friend class ComRetryTester;
35 
36  protected:
37 
38  // ----------------------------------------------------------------------
39  // Constants
40  // ----------------------------------------------------------------------
41 
43  enum {
47  };
48 
50  enum {
54  };
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Component initialization
60  // ----------------------------------------------------------------------
61 
63  void init(
64  FwEnumStoreType instance = 0
65  );
66 
67  public:
68 
69  // ----------------------------------------------------------------------
70  // Getters for typed input ports
71  // ----------------------------------------------------------------------
72 
77  FwIndexType portNum
78  );
79 
84  FwIndexType portNum
85  );
86 
91  FwIndexType portNum
92  );
93 
94  public:
95 
96  // ----------------------------------------------------------------------
97  // Connect typed input ports to typed output ports
98  // ----------------------------------------------------------------------
99 
102  FwIndexType portNum,
104  );
105 
108  FwIndexType portNum,
110  );
111 
114  FwIndexType portNum,
116  );
117 
118 #if FW_PORT_SERIALIZATION
119 
120  public:
121 
122  // ----------------------------------------------------------------------
123  // Connect serial input ports to typed output ports
124  // ----------------------------------------------------------------------
125 
128  FwIndexType portNum,
129  Fw::InputSerializePort* port
130  );
131 
134  FwIndexType portNum,
135  Fw::InputSerializePort* port
136  );
137 
140  FwIndexType portNum,
141  Fw::InputSerializePort* port
142  );
143 
144 #endif
145 
146  protected:
147 
148  // ----------------------------------------------------------------------
149  // Component construction and destruction
150  // ----------------------------------------------------------------------
151 
154  const char* compName = ""
155  );
156 
158  virtual ~ComRetryComponentBase();
159 
160  protected:
161 
162  // ----------------------------------------------------------------------
163  // Getters for numbers of typed input ports
164  // ----------------------------------------------------------------------
165 
171  }
172 
177  return NUM_DATAIN_INPUT_PORTS;
178  }
179 
185  }
186 
187  protected:
188 
189  // ----------------------------------------------------------------------
190  // Getters for numbers of typed output ports
191  // ----------------------------------------------------------------------
192 
198  }
199 
205  }
206 
212  }
213 
214  protected:
215 
216  // ----------------------------------------------------------------------
217  // Connection status queries for typed output ports
218  // ----------------------------------------------------------------------
219 
224  FwIndexType portNum
225  );
226 
231  FwIndexType portNum
232  );
233 
238  FwIndexType portNum
239  );
240 
241  protected:
242 
243  // ----------------------------------------------------------------------
244  // Handlers to implement for typed input ports
245  // ----------------------------------------------------------------------
246 
248  virtual void comStatusIn_handler(
249  FwIndexType portNum,
250  Fw::Success& condition
251  ) = 0;
252 
254  virtual void dataIn_handler(
255  FwIndexType portNum,
256  Fw::Buffer& data,
257  const ComCfg::FrameContext& context
258  ) = 0;
259 
261  virtual void dataReturnIn_handler(
262  FwIndexType portNum,
263  Fw::Buffer& data,
264  const ComCfg::FrameContext& context
265  ) = 0;
266 
267  protected:
268 
269  // ----------------------------------------------------------------------
270  // Port handler base-class functions for typed input ports
271  //
272  // Call these functions directly to bypass the corresponding ports
273  // ----------------------------------------------------------------------
274 
277  FwIndexType portNum,
278  Fw::Success& condition
279  );
280 
282  void dataIn_handlerBase(
283  FwIndexType portNum,
284  Fw::Buffer& data,
285  const ComCfg::FrameContext& context
286  );
287 
290  FwIndexType portNum,
291  Fw::Buffer& data,
292  const ComCfg::FrameContext& context
293  );
294 
295  protected:
296 
297  // ----------------------------------------------------------------------
298  // Invocation functions for typed output ports
299  // ----------------------------------------------------------------------
300 
302  void comStatusOut_out(
303  FwIndexType portNum,
304  Fw::Success& condition
305  );
306 
308  void dataOut_out(
309  FwIndexType portNum,
310  Fw::Buffer& data,
311  const ComCfg::FrameContext& context
312  );
313 
315  void dataReturnOut_out(
316  FwIndexType portNum,
317  Fw::Buffer& data,
318  const ComCfg::FrameContext& context
319  );
320 
321  private:
322 
323  // ----------------------------------------------------------------------
324  // Calls for messages received on typed input ports
325  // ----------------------------------------------------------------------
326 
328  static void m_p_comStatusIn_in(
329  Fw::PassiveComponentBase* callComp,
330  FwIndexType portNum,
331  Fw::Success& condition
332  );
333 
335  static void m_p_dataIn_in(
336  Fw::PassiveComponentBase* callComp,
337  FwIndexType portNum,
338  Fw::Buffer& data,
339  const ComCfg::FrameContext& context
340  );
341 
343  static void m_p_dataReturnIn_in(
344  Fw::PassiveComponentBase* callComp,
345  FwIndexType portNum,
346  Fw::Buffer& data,
347  const ComCfg::FrameContext& context
348  );
349 
350  private:
351 
352  // ----------------------------------------------------------------------
353  // Typed input ports
354  // ----------------------------------------------------------------------
355 
358 
361 
364 
365  private:
366 
367  // ----------------------------------------------------------------------
368  // Typed output ports
369  // ----------------------------------------------------------------------
370 
373 
376 
379 
380  };
381 
382 }
383 
384 #endif
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum)
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_dataReturnOut_OutputPort(FwIndexType portNum)
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
static constexpr FwIndexType getNum_comStatusIn_InputPorts()
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.
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
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
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)
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition)
Invoke output port comStatusOut.
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.