F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FprimeFramerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FprimeFramerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FprimeFramer component base class
5 // ======================================================================
6 
7 #ifndef Svc_FprimeFramerComponentAc_HPP
8 #define Svc_FprimeFramerComponentAc_HPP
9 
13 #include "Fw/FPrimeBasicTypes.hpp"
17 #include "Fw/Time/TimePortAc.hpp"
19 
20 namespace Svc {
21 
28  {
29 
30  // ----------------------------------------------------------------------
31  // Friend classes
32  // ----------------------------------------------------------------------
33 
35  friend class FprimeFramerTesterBase;
37  friend class FprimeFramerTester;
38 
39  protected:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
46  enum {
50  };
51 
53  enum {
55  };
56 
58  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 
94  FwIndexType portNum
95  );
96 
101  FwIndexType portNum
102  );
103 
104  public:
105 
106  // ----------------------------------------------------------------------
107  // Connect input ports to special output ports
108  // ----------------------------------------------------------------------
109 
112  FwIndexType portNum,
113  Fw::InputTimePort* port
114  );
115 
116  public:
117 
118  // ----------------------------------------------------------------------
119  // Connect typed input ports to typed output ports
120  // ----------------------------------------------------------------------
121 
124  FwIndexType portNum,
126  );
127 
130  FwIndexType portNum,
132  );
133 
136  FwIndexType portNum,
138  );
139 
142  FwIndexType portNum,
144  );
145 
148  FwIndexType portNum,
150  );
151 
152 #if FW_PORT_SERIALIZATION
153 
154  public:
155 
156  // ----------------------------------------------------------------------
157  // Connect serial input ports to special output ports
158  // ----------------------------------------------------------------------
159 
162  FwIndexType portNum,
163  Fw::InputSerializePort* port
164  );
165 
166 #endif
167 
168 #if FW_PORT_SERIALIZATION
169 
170  public:
171 
172  // ----------------------------------------------------------------------
173  // Connect serial input ports to typed output ports
174  // ----------------------------------------------------------------------
175 
178  FwIndexType portNum,
179  Fw::InputSerializePort* port
180  );
181 
184  FwIndexType portNum,
185  Fw::InputSerializePort* port
186  );
187 
190  FwIndexType portNum,
191  Fw::InputSerializePort* port
192  );
193 
196  FwIndexType portNum,
197  Fw::InputSerializePort* port
198  );
199 
200 #endif
201 
202  protected:
203 
204  // ----------------------------------------------------------------------
205  // Component construction and destruction
206  // ----------------------------------------------------------------------
207 
210  const char* compName = ""
211  );
212 
214  virtual ~FprimeFramerComponentBase();
215 
216  protected:
217 
218  // ----------------------------------------------------------------------
219  // Getters for numbers of typed input ports
220  // ----------------------------------------------------------------------
221 
227  }
228 
233  return NUM_DATAIN_INPUT_PORTS;
234  }
235 
241  }
242 
243  protected:
244 
245  // ----------------------------------------------------------------------
246  // Getters for numbers of special output ports
247  // ----------------------------------------------------------------------
248 
254  }
255 
256  protected:
257 
258  // ----------------------------------------------------------------------
259  // Getters for numbers of typed output ports
260  // ----------------------------------------------------------------------
261 
267  }
268 
274  }
275 
281  }
282 
288  }
289 
295  }
296 
297  protected:
298 
299  // ----------------------------------------------------------------------
300  // Connection status queries for special output ports
301  // ----------------------------------------------------------------------
302 
307  FwIndexType portNum
308  );
309 
310  protected:
311 
312  // ----------------------------------------------------------------------
313  // Connection status queries for typed output ports
314  // ----------------------------------------------------------------------
315 
320  FwIndexType portNum
321  );
322 
327  FwIndexType portNum
328  );
329 
334  FwIndexType portNum
335  );
336 
341  FwIndexType portNum
342  );
343 
348  FwIndexType portNum
349  );
350 
351  protected:
352 
353  // ----------------------------------------------------------------------
354  // Handlers to implement for typed input ports
355  // ----------------------------------------------------------------------
356 
358  virtual void comStatusIn_handler(
359  FwIndexType portNum,
360  Fw::Success& condition
361  ) = 0;
362 
364  virtual void dataIn_handler(
365  FwIndexType portNum,
366  Fw::Buffer& data,
367  const ComCfg::FrameContext& context
368  ) = 0;
369 
371  virtual void dataReturnIn_handler(
372  FwIndexType portNum,
373  Fw::Buffer& data,
374  const ComCfg::FrameContext& context
375  ) = 0;
376 
377  protected:
378 
379  // ----------------------------------------------------------------------
380  // Port handler base-class functions for typed input ports
381  //
382  // Call these functions directly to bypass the corresponding ports
383  // ----------------------------------------------------------------------
384 
387  FwIndexType portNum,
388  Fw::Success& condition
389  );
390 
392  void dataIn_handlerBase(
393  FwIndexType portNum,
394  Fw::Buffer& data,
395  const ComCfg::FrameContext& context
396  );
397 
400  FwIndexType portNum,
401  Fw::Buffer& data,
402  const ComCfg::FrameContext& context
403  );
404 
405  protected:
406 
407  // ----------------------------------------------------------------------
408  // Invocation functions for typed output ports
409  // ----------------------------------------------------------------------
410 
413  FwIndexType portNum,
414  FwSizeType size
415  );
416 
419  FwIndexType portNum,
420  Fw::Buffer& fwBuffer
421  );
422 
424  void comStatusOut_out(
425  FwIndexType portNum,
426  Fw::Success& condition
427  );
428 
430  void dataOut_out(
431  FwIndexType portNum,
432  Fw::Buffer& data,
433  const ComCfg::FrameContext& context
434  );
435 
437  void dataReturnOut_out(
438  FwIndexType portNum,
439  Fw::Buffer& data,
440  const ComCfg::FrameContext& context
441  );
442 
443  protected:
444 
445  // ----------------------------------------------------------------------
446  // Time
447  // ----------------------------------------------------------------------
448 
452  Fw::Time getTime() const;
453 
454  private:
455 
456  // ----------------------------------------------------------------------
457  // Calls for messages received on typed input ports
458  // ----------------------------------------------------------------------
459 
461  static void m_p_comStatusIn_in(
462  Fw::PassiveComponentBase* callComp,
463  FwIndexType portNum,
464  Fw::Success& condition
465  );
466 
468  static void m_p_dataIn_in(
469  Fw::PassiveComponentBase* callComp,
470  FwIndexType portNum,
471  Fw::Buffer& data,
472  const ComCfg::FrameContext& context
473  );
474 
476  static void m_p_dataReturnIn_in(
477  Fw::PassiveComponentBase* callComp,
478  FwIndexType portNum,
479  Fw::Buffer& data,
480  const ComCfg::FrameContext& context
481  );
482 
483  private:
484 
485  // ----------------------------------------------------------------------
486  // Typed input ports
487  // ----------------------------------------------------------------------
488 
491 
494 
497 
498  private:
499 
500  // ----------------------------------------------------------------------
501  // Special output ports
502  // ----------------------------------------------------------------------
503 
505  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
506 
507  private:
508 
509  // ----------------------------------------------------------------------
510  // Typed output ports
511  // ----------------------------------------------------------------------
512 
514  Fw::OutputBufferGetPort m_bufferAllocate_OutputPort[NUM_BUFFERALLOCATE_OUTPUT_PORTS];
515 
517  Fw::OutputBufferSendPort m_bufferDeallocate_OutputPort[NUM_BUFFERDEALLOCATE_OUTPUT_PORTS];
518 
521 
524 
527 
528  };
529 
530 }
531 
532 #endif
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
virtual void comStatusIn_handler(FwIndexType portNum, Fw::Success &condition)=0
Handler for input port comStatusIn.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
Auto-generated base for FprimeFramer component.
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
void comStatusIn_handlerBase(FwIndexType portNum, Fw::Success &condition)
Handler base-class function for input port comStatusIn.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
static constexpr FwIndexType getNum_comStatusIn_InputPorts()
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
friend class FprimeFramerTester
Friend class tester implementation to support white-box testing.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
Fw::InputSuccessConditionPort * get_comStatusIn_InputPort(FwIndexType portNum)
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void init()
Object initializer.
Definition: ObjBase.cpp:24
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
void set_bufferDeallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferDeallocate[portNum].
virtual ~FprimeFramerComponentBase()
Destroy FprimeFramerComponentBase object.
void set_bufferAllocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to bufferAllocate[portNum].
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
bool isConnected_bufferDeallocate_OutputPort(FwIndexType portNum)
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum)
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
static constexpr FwIndexType getNum_comStatusOut_OutputPorts()
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
static constexpr FwIndexType getNum_bufferAllocate_OutputPorts()
Fw::Buffer bufferAllocate_out(FwIndexType portNum, FwSizeType size)
Invoke output port bufferAllocate.
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
friend class FprimeFramerTesterBase
Friend class tester to support autocoded test harness.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
FprimeFramerComponentBase(const char *compName="")
Construct FprimeFramerComponentBase object.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_dataOut_OutputPorts()
static constexpr FwIndexType getNum_bufferDeallocate_OutputPorts()
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void bufferDeallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferDeallocate.
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition)
Invoke output port comStatusOut.
Success/Failure.
bool isConnected_bufferAllocate_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_dataIn_InputPorts()