F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpResponsePortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpResponsePortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpResponse port
5 // ======================================================================
6 
7 #ifndef Fw_DpResponsePortAc_HPP
8 #define Fw_DpResponsePortAc_HPP
9 
10 #include "Fw/Buffer/Buffer.hpp"
11 #include "Fw/FPrimeBasicTypes.hpp"
15 #if !FW_DIRECT_PORT_CALLS
19 #endif
20 
21 namespace Fw {
22 
27  {
28 
29  public:
30 
31  // ----------------------------------------------------------------------
32  // Public constants for DpResponsePortBuffer
33  // ----------------------------------------------------------------------
34 
37  static constexpr FwSizeType CAPACITY =
38  sizeof(FwDpIdType) +
41 
42  public:
43 
44  // ----------------------------------------------------------------------
45  // Public member functions for DpResponsePortBuffer
46  // ----------------------------------------------------------------------
47 
50 
51  }
52 
53  private:
54 
55  // ----------------------------------------------------------------------
56  // Private member variables
57  // ----------------------------------------------------------------------
58 
59  U8 m_buff[CAPACITY];
60 
61  };
62 
66 
67  public:
68 
69  // ----------------------------------------------------------------------
70  // Public constructors for DpResponsePortSerializer
71  // ----------------------------------------------------------------------
72 
75 
76  public:
77 
78  // ----------------------------------------------------------------------
79  // Public member functions for DpResponsePortSerializer
80  // ----------------------------------------------------------------------
81 
84  Fw::SerialBufferBase& _buffer
85  );
86 
87  public:
88 
89  // ----------------------------------------------------------------------
90  // Public static functions for DpResponsePortSerializer
91  // ----------------------------------------------------------------------
92 
95  FwDpIdType id,
96  const Fw::Buffer& buffer,
97  const Fw::Success& status,
98  Fw::SerialBufferBase& _buffer
99  );
100 
101  public:
102 
103  // ----------------------------------------------------------------------
104  // Public member variables for DpResponsePortSerializer
105  // ----------------------------------------------------------------------
106 
110 
111  };
112 
113 #if !FW_DIRECT_PORT_CALLS
114 
118  public Fw::InputPortBase
119  {
120 
121  public:
122 
123  // ----------------------------------------------------------------------
124  // Public types for InputDpResponsePort
125  // ----------------------------------------------------------------------
126 
128  typedef void (*CompFuncPtr)(
129  Fw::PassiveComponentBase* callComp,
130  FwIndexType portNum,
131  FwDpIdType id,
132  const Fw::Buffer& buffer,
133  const Fw::Success& status
134  );
135 
136  public:
137 
138  // ----------------------------------------------------------------------
139  // Public constructors for InputDpResponsePort
140  // ----------------------------------------------------------------------
141 
144 
145  public:
146 
147  // ----------------------------------------------------------------------
148  // Public member functions for InputDpResponsePort
149  // ----------------------------------------------------------------------
150 
152  void init();
153 
155  void addCallComp(
156  Fw::PassiveComponentBase* callComp,
157  CompFuncPtr funcPtr
158  );
159 
161  void invoke(
162  FwDpIdType id,
163  const Fw::Buffer& buffer,
164  const Fw::Success& status
165  );
166 
167  private:
168 
169  // ----------------------------------------------------------------------
170  // Private member functions for InputDpResponsePort
171  // ----------------------------------------------------------------------
172 
173 #if FW_PORT_SERIALIZATION == 1
174 
177  Fw::SerializeStatus invokeSerial(
178  Fw::LinearBufferBase& _buffer
179  );
180 
181 #endif
182 
183  private:
184 
185  // ----------------------------------------------------------------------
186  // Private member variables for InputDpResponsePort
187  // ----------------------------------------------------------------------
188 
190  CompFuncPtr m_func;
191 
192  };
193 
197  public Fw::OutputPortBase
198  {
199 
200  public:
201 
202  // ----------------------------------------------------------------------
203  // Public constructors for OutputDpResponsePort
204  // ----------------------------------------------------------------------
205 
208 
209  public:
210 
211  // ----------------------------------------------------------------------
212  // Public member functions for OutputDpResponsePort
213  // ----------------------------------------------------------------------
214 
216  void init();
217 
219  void addCallPort(
220  InputDpResponsePort* callPort
221  );
222 
224  void invoke(
225  FwDpIdType id,
226  const Fw::Buffer& buffer,
227  const Fw::Success& status
228  ) const;
229 
230  private:
231 
232  // ----------------------------------------------------------------------
233  // Private member variables for OutputDpResponsePort
234  // ----------------------------------------------------------------------
235 
237  InputDpResponsePort* m_port;
238 
239  };
240 
241 #endif
242 
243 }
244 
245 #endif
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status)
The port callback function type.
InputDpResponsePort()
Constructor.
PlatformSizeType FwSizeType
OutputDpResponsePort()
Constructor.
static constexpr FwSizeType CAPACITY
void addCallPort(InputDpResponsePort *callPort)
Register an input port.
static Fw::SerializeStatus serializePortArgs(FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
void invoke(FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status) const
Invoke a port connection.
SerializeStatus
forward declaration for string
void init()
Initialization function.
DpResponsePortBuffer()
Constructor.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
The size of the serial representation.
void init()
Initialization function.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void invoke(FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status)
Invoke a port interface.
FwIdType FwDpIdType
The type of a data product identifier.
PlatformIndexType FwIndexType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Implementation of malloc based allocator.
Success/Failure.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:70