F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
BufferGetPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title BufferGetPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for BufferGet port
5 // ======================================================================
6 
7 #ifndef Fw_BufferGetPortAc_HPP
8 #define Fw_BufferGetPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "FpConfig.hpp"
14 #include "Fw/Buffer/Buffer.hpp"
18 #include "Fw/Types/StringType.hpp"
19 
20 namespace Fw {
21 
26  public Fw::InputPortBase
27  {
28 
29  public:
30 
31  // ----------------------------------------------------------------------
32  // Constants
33  // ----------------------------------------------------------------------
34 
35  enum {
38  sizeof(U32)
39  };
40 
41  public:
42 
43  // ----------------------------------------------------------------------
44  // Types
45  // ----------------------------------------------------------------------
46 
48  typedef Fw::Buffer (*CompFuncPtr)(
49  Fw::PassiveComponentBase* callComp,
50  FwIndexType portNum,
51  U32 size
52  );
53 
54  public:
55 
56  // ----------------------------------------------------------------------
57  // Input Port Member functions
58  // ----------------------------------------------------------------------
59 
62 
64  void init();
65 
67  void addCallComp(
68  Fw::PassiveComponentBase* callComp,
69  CompFuncPtr funcPtr
70  );
71 
74  U32 size
75  );
76 
77  private:
78 
79 #if FW_PORT_SERIALIZATION == 1
80 
82  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
83 
84 #endif
85 
86  private:
87 
88  // ----------------------------------------------------------------------
89  // Member variables
90  // ----------------------------------------------------------------------
91 
93  CompFuncPtr m_func;
94 
95  };
96 
101  public Fw::OutputPortBase
102  {
103 
104  public:
105 
106  // ----------------------------------------------------------------------
107  // Output Port Member functions
108  // ----------------------------------------------------------------------
109 
112 
114  void init();
115 
117  void addCallPort(
118  InputBufferGetPort* callPort
119  );
120 
123  U32 size
124  );
125 
126  private:
127 
128  // ----------------------------------------------------------------------
129  // Member variables
130  // ----------------------------------------------------------------------
131 
133  InputBufferGetPort* m_port;
134 
135  };
136 
137 }
138 
139 #endif
PlatformIndexType FwIndexType
Definition: FpConfig.h:20
C++-compatible configuration header for fprime configuration.
InputBufferGetPort()
Constructor.
Fw::Buffer invoke(U32 size)
Invoke a port interface.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Fw::Buffer(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, U32 size)
The port callback function type.
void init()
Initialization function.
void init()
Initialization function.
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
Fw::Buffer invoke(U32 size)
Invoke a port interface.
OutputBufferGetPort()
Constructor.
SerializeStatus
forward declaration for string