F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpSendPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpSendPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpSend port
5 // ======================================================================
6 
7 #ifndef Fw_DpSendPortAc_HPP
8 #define Fw_DpSendPortAc_HPP
9 
10 #include "Fw/Buffer/Buffer.hpp"
11 #include "Fw/FPrimeBasicTypes.hpp"
14 #if !FW_DIRECT_PORT_CALLS
18 #endif
19 
20 namespace Fw {
21 
26  {
27 
28  public:
29 
30  // ----------------------------------------------------------------------
31  // Public constants for DpSendPortBuffer
32  // ----------------------------------------------------------------------
33 
36  static constexpr FwSizeType CAPACITY =
37  sizeof(FwDpIdType) +
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Public member functions for DpSendPortBuffer
44  // ----------------------------------------------------------------------
45 
48 
49  }
50 
51  private:
52 
53  // ----------------------------------------------------------------------
54  // Private member variables
55  // ----------------------------------------------------------------------
56 
57  U8 m_buff[CAPACITY];
58 
59  };
60 
64 
65  public:
66 
67  // ----------------------------------------------------------------------
68  // Public constructors for DpSendPortSerializer
69  // ----------------------------------------------------------------------
70 
73 
74  public:
75 
76  // ----------------------------------------------------------------------
77  // Public member functions for DpSendPortSerializer
78  // ----------------------------------------------------------------------
79 
82  Fw::SerialBufferBase& _buffer
83  );
84 
85  public:
86 
87  // ----------------------------------------------------------------------
88  // Public static functions for DpSendPortSerializer
89  // ----------------------------------------------------------------------
90 
93  FwDpIdType id,
94  const Fw::Buffer& buffer,
95  Fw::SerialBufferBase& _buffer
96  );
97 
98  public:
99 
100  // ----------------------------------------------------------------------
101  // Public member variables for DpSendPortSerializer
102  // ----------------------------------------------------------------------
103 
106 
107  };
108 
109 #if !FW_DIRECT_PORT_CALLS
110 
114  public Fw::InputPortBase
115  {
116 
117  public:
118 
119  // ----------------------------------------------------------------------
120  // Public types for InputDpSendPort
121  // ----------------------------------------------------------------------
122 
124  typedef void (*CompFuncPtr)(
125  Fw::PassiveComponentBase* callComp,
126  FwIndexType portNum,
127  FwDpIdType id,
128  const Fw::Buffer& buffer
129  );
130 
131  public:
132 
133  // ----------------------------------------------------------------------
134  // Public constructors for InputDpSendPort
135  // ----------------------------------------------------------------------
136 
138  InputDpSendPort();
139 
140  public:
141 
142  // ----------------------------------------------------------------------
143  // Public member functions for InputDpSendPort
144  // ----------------------------------------------------------------------
145 
147  void init();
148 
150  void addCallComp(
151  Fw::PassiveComponentBase* callComp,
152  CompFuncPtr funcPtr
153  );
154 
156  void invoke(
157  FwDpIdType id,
158  const Fw::Buffer& buffer
159  );
160 
161  private:
162 
163  // ----------------------------------------------------------------------
164  // Private member functions for InputDpSendPort
165  // ----------------------------------------------------------------------
166 
167 #if FW_PORT_SERIALIZATION == 1
168 
171  Fw::SerializeStatus invokeSerial(
172  Fw::LinearBufferBase& _buffer
173  );
174 
175 #endif
176 
177  private:
178 
179  // ----------------------------------------------------------------------
180  // Private member variables for InputDpSendPort
181  // ----------------------------------------------------------------------
182 
184  CompFuncPtr m_func;
185 
186  };
187 
191  public Fw::OutputPortBase
192  {
193 
194  public:
195 
196  // ----------------------------------------------------------------------
197  // Public constructors for OutputDpSendPort
198  // ----------------------------------------------------------------------
199 
202 
203  public:
204 
205  // ----------------------------------------------------------------------
206  // Public member functions for OutputDpSendPort
207  // ----------------------------------------------------------------------
208 
210  void init();
211 
213  void addCallPort(
214  InputDpSendPort* callPort
215  );
216 
218  void invoke(
219  FwDpIdType id,
220  const Fw::Buffer& buffer
221  ) const;
222 
223  private:
224 
225  // ----------------------------------------------------------------------
226  // Private member variables for OutputDpSendPort
227  // ----------------------------------------------------------------------
228 
230  InputDpSendPort* m_port;
231 
232  };
233 
234 #endif
235 
236 }
237 
238 #endif
void init()
Initialization function.
DpSendPortBuffer()
Constructor.
PlatformSizeType FwSizeType
void addCallPort(InputDpSendPort *callPort)
Register an input port.
void init()
Initialization function.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
static constexpr FwSizeType CAPACITY
static Fw::SerializeStatus serializePortArgs(FwDpIdType id, const Fw::Buffer &buffer, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
DpSendPortSerializer()
Constructor.
InputDpSendPort()
Constructor.
OutputDpSendPort()
Constructor.
SerializeStatus
forward declaration for string
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer)
The port callback function type.
void invoke(FwDpIdType id, const Fw::Buffer &buffer)
Invoke a port interface.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
FwIdType FwDpIdType
The type of a data product identifier.
PlatformIndexType FwIndexType
Implementation of malloc based allocator.
void invoke(FwDpIdType id, const Fw::Buffer &buffer) const
Invoke a port connection.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:70