F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpRequestPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpRequestPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpRequest port
5 // ======================================================================
6 
7 #ifndef Fw_DpRequestPortAc_HPP
8 #define Fw_DpRequestPortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
14 #if !FW_DIRECT_PORT_CALLS
18 #endif
19 
20 namespace Fw {
21 
29  {
30 
31  public:
32 
33  // ----------------------------------------------------------------------
34  // Public constants for DpRequestPortBuffer
35  // ----------------------------------------------------------------------
36 
39  static constexpr FwSizeType CAPACITY =
40  sizeof(FwDpIdType) +
41  sizeof(FwSizeType);
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Public member functions for DpRequestPortBuffer
47  // ----------------------------------------------------------------------
48 
51 
52  }
53 
54  private:
55 
56  // ----------------------------------------------------------------------
57  // Private member variables
58  // ----------------------------------------------------------------------
59 
60  U8 m_buff[CAPACITY];
61 
62  };
63 
70 
71  public:
72 
73  // ----------------------------------------------------------------------
74  // Public constructors for DpRequestPortSerializer
75  // ----------------------------------------------------------------------
76 
79 
80  public:
81 
82  // ----------------------------------------------------------------------
83  // Public member functions for DpRequestPortSerializer
84  // ----------------------------------------------------------------------
85 
88  Fw::SerialBufferBase& _buffer
89  );
90 
91  public:
92 
93  // ----------------------------------------------------------------------
94  // Public static functions for DpRequestPortSerializer
95  // ----------------------------------------------------------------------
96 
99  FwDpIdType id,
100  FwSizeType dataSize,
101  Fw::SerialBufferBase& _buffer
102  );
103 
104  public:
105 
106  // ----------------------------------------------------------------------
107  // Public member variables for DpRequestPortSerializer
108  // ----------------------------------------------------------------------
109 
112 
113  };
114 
115 #if !FW_DIRECT_PORT_CALLS
116 
123  public Fw::InputPortBase
124  {
125 
126  public:
127 
128  // ----------------------------------------------------------------------
129  // Public types for InputDpRequestPort
130  // ----------------------------------------------------------------------
131 
133  typedef void (*CompFuncPtr)(
134  Fw::PassiveComponentBase* callComp,
135  FwIndexType portNum,
136  FwDpIdType id,
137  FwSizeType dataSize
138  );
139 
140  public:
141 
142  // ----------------------------------------------------------------------
143  // Public constructors for InputDpRequestPort
144  // ----------------------------------------------------------------------
145 
148 
149  public:
150 
151  // ----------------------------------------------------------------------
152  // Public member functions for InputDpRequestPort
153  // ----------------------------------------------------------------------
154 
156  void init();
157 
159  void addCallComp(
160  Fw::PassiveComponentBase* callComp,
161  CompFuncPtr funcPtr
162  );
163 
165  void invoke(
166  FwDpIdType id,
167  FwSizeType dataSize
168  );
169 
170  private:
171 
172  // ----------------------------------------------------------------------
173  // Private member functions for InputDpRequestPort
174  // ----------------------------------------------------------------------
175 
176 #if FW_PORT_SERIALIZATION == 1
177 
180  Fw::SerializeStatus invokeSerial(
181  Fw::LinearBufferBase& _buffer
182  );
183 
184 #endif
185 
186  private:
187 
188  // ----------------------------------------------------------------------
189  // Private member variables for InputDpRequestPort
190  // ----------------------------------------------------------------------
191 
193  CompFuncPtr m_func;
194 
195  };
196 
203  public Fw::OutputPortBase
204  {
205 
206  public:
207 
208  // ----------------------------------------------------------------------
209  // Public constructors for OutputDpRequestPort
210  // ----------------------------------------------------------------------
211 
214 
215  public:
216 
217  // ----------------------------------------------------------------------
218  // Public member functions for OutputDpRequestPort
219  // ----------------------------------------------------------------------
220 
222  void init();
223 
225  void addCallPort(
226  InputDpRequestPort* callPort
227  );
228 
230  void invoke(
231  FwDpIdType id,
232  FwSizeType dataSize
233  ) const;
234 
235  private:
236 
237  // ----------------------------------------------------------------------
238  // Private member variables for OutputDpRequestPort
239  // ----------------------------------------------------------------------
240 
242  InputDpRequestPort* m_port;
243 
244  };
245 
246 #endif
247 
248 }
249 
250 #endif
void invoke(FwDpIdType id, FwSizeType dataSize)
Invoke a port interface.
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void init()
Initialization function.
void addCallPort(InputDpRequestPort *callPort)
Register an input port.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
SerializeStatus
forward declaration for string
OutputDpRequestPort()
Constructor.
static Fw::SerializeStatus serializePortArgs(FwDpIdType id, FwSizeType dataSize, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
InputDpRequestPort()
Constructor.
void invoke(FwDpIdType id, FwSizeType dataSize) const
Invoke a port connection.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void init()
Initialization function.
FwIdType FwDpIdType
The type of a data product identifier.
DpRequestPortSerializer()
Constructor.
PlatformIndexType FwIndexType
DpRequestPortBuffer()
Constructor.
Implementation of malloc based allocator.
static constexpr FwSizeType CAPACITY
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, FwSizeType dataSize)
The port callback function type.