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 
37  friend class FprimeFramerTesterBase;
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 
226 
231 
236 
237  PROTECTED:
238 
239  // ----------------------------------------------------------------------
240  // Getters for numbers of special output ports
241  // ----------------------------------------------------------------------
242 
247 
248  PROTECTED:
249 
250  // ----------------------------------------------------------------------
251  // Getters for numbers of typed output ports
252  // ----------------------------------------------------------------------
253 
258 
263 
268 
273 
278 
279  PROTECTED:
280 
281  // ----------------------------------------------------------------------
282  // Connection status queries for special output ports
283  // ----------------------------------------------------------------------
284 
289  FwIndexType portNum
290  );
291 
292  PROTECTED:
293 
294  // ----------------------------------------------------------------------
295  // Connection status queries for typed output ports
296  // ----------------------------------------------------------------------
297 
302  FwIndexType portNum
303  );
304 
309  FwIndexType portNum
310  );
311 
316  FwIndexType portNum
317  );
318 
323  FwIndexType portNum
324  );
325 
330  FwIndexType portNum
331  );
332 
333  PROTECTED:
334 
335  // ----------------------------------------------------------------------
336  // Handlers to implement for typed input ports
337  // ----------------------------------------------------------------------
338 
340  virtual void comStatusIn_handler(
341  FwIndexType portNum,
342  Fw::Success& condition
343  ) = 0;
344 
346  virtual void dataIn_handler(
347  FwIndexType portNum,
348  Fw::Buffer& data,
349  const ComCfg::FrameContext& context
350  ) = 0;
351 
353  virtual void dataReturnIn_handler(
354  FwIndexType portNum,
355  Fw::Buffer& data,
356  const ComCfg::FrameContext& context
357  ) = 0;
358 
359  PROTECTED:
360 
361  // ----------------------------------------------------------------------
362  // Port handler base-class functions for typed input ports
363  //
364  // Call these functions directly to bypass the corresponding ports
365  // ----------------------------------------------------------------------
366 
369  FwIndexType portNum,
370  Fw::Success& condition
371  );
372 
374  void dataIn_handlerBase(
375  FwIndexType portNum,
376  Fw::Buffer& data,
377  const ComCfg::FrameContext& context
378  );
379 
382  FwIndexType portNum,
383  Fw::Buffer& data,
384  const ComCfg::FrameContext& context
385  );
386 
387  PROTECTED:
388 
389  // ----------------------------------------------------------------------
390  // Invocation functions for typed output ports
391  // ----------------------------------------------------------------------
392 
395  FwIndexType portNum,
396  U32 size
397  );
398 
401  FwIndexType portNum,
402  Fw::Buffer& fwBuffer
403  );
404 
406  void comStatusOut_out(
407  FwIndexType portNum,
408  Fw::Success& condition
409  );
410 
412  void dataOut_out(
413  FwIndexType portNum,
414  Fw::Buffer& data,
415  const ComCfg::FrameContext& context
416  );
417 
419  void dataReturnOut_out(
420  FwIndexType portNum,
421  Fw::Buffer& data,
422  const ComCfg::FrameContext& context
423  );
424 
425  PROTECTED:
426 
427  // ----------------------------------------------------------------------
428  // Time
429  // ----------------------------------------------------------------------
430 
434  Fw::Time getTime() const;
435 
436  PRIVATE:
437 
438  // ----------------------------------------------------------------------
439  // Calls for messages received on typed input ports
440  // ----------------------------------------------------------------------
441 
443  static void m_p_comStatusIn_in(
444  Fw::PassiveComponentBase* callComp,
445  FwIndexType portNum,
446  Fw::Success& condition
447  );
448 
450  static void m_p_dataIn_in(
451  Fw::PassiveComponentBase* callComp,
452  FwIndexType portNum,
453  Fw::Buffer& data,
454  const ComCfg::FrameContext& context
455  );
456 
458  static void m_p_dataReturnIn_in(
459  Fw::PassiveComponentBase* callComp,
460  FwIndexType portNum,
461  Fw::Buffer& data,
462  const ComCfg::FrameContext& context
463  );
464 
465  PRIVATE:
466 
467  // ----------------------------------------------------------------------
468  // Typed input ports
469  // ----------------------------------------------------------------------
470 
473 
476 
479 
480  PRIVATE:
481 
482  // ----------------------------------------------------------------------
483  // Special output ports
484  // ----------------------------------------------------------------------
485 
487  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
488 
489  PRIVATE:
490 
491  // ----------------------------------------------------------------------
492  // Typed output ports
493  // ----------------------------------------------------------------------
494 
496  Fw::OutputBufferGetPort m_bufferAllocate_OutputPort[NUM_BUFFERALLOCATE_OUTPUT_PORTS];
497 
499  Fw::OutputBufferSendPort m_bufferDeallocate_OutputPort[NUM_BUFFERDEALLOCATE_OUTPUT_PORTS];
500 
503 
506 
509 
510  };
511 
512 }
513 
514 #endif
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
Definition: Time.hpp:9
FwIndexType getNum_comStatusOut_OutputPorts() const
virtual void comStatusIn_handler(FwIndexType portNum, Fw::Success &condition)=0
Handler for input port comStatusIn.
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.
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_dataReturnOut_OutputPorts() const
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:26
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].
FwIndexType getNum_dataReturnIn_InputPorts() const
virtual ~FprimeFramerComponentBase()
Destroy FprimeFramerComponentBase object.
void set_bufferAllocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to bufferAllocate[portNum].
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.
FwIndexType getNum_bufferAllocate_OutputPorts() const
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
FwIndexType getNum_bufferDeallocate_OutputPorts() const
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
friend class FprimeFramerComponentBaseFriend
Friend class for white-box testing.
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
Fw::Buffer bufferAllocate_out(FwIndexType portNum, U32 size)
Invoke output port bufferAllocate.
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.
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)