F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpWrittenPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpWrittenPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpWritten port
5 // ======================================================================
6 
7 #ifndef Svc_DpWrittenPortAc_HPP
8 #define Svc_DpWrittenPortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
16 #if !FW_DIRECT_PORT_CALLS
20 #endif
21 
22 namespace Svc {
23 
28  {
29 
30  public:
31 
32  // ----------------------------------------------------------------------
33  // Public constants for DpWrittenPortBuffer
34  // ----------------------------------------------------------------------
35 
38  static constexpr FwSizeType CAPACITY =
40  sizeof(FwDpPriorityType) +
41  sizeof(FwSizeType);
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Public member functions for DpWrittenPortBuffer
47  // ----------------------------------------------------------------------
48 
51 
52  }
53 
54  private:
55 
56  // ----------------------------------------------------------------------
57  // Private member variables
58  // ----------------------------------------------------------------------
59 
60  U8 m_buff[CAPACITY];
61 
62  };
63 
67 
68  public:
69 
70  // ----------------------------------------------------------------------
71  // Public constructors for DpWrittenPortSerializer
72  // ----------------------------------------------------------------------
73 
76 
77  public:
78 
79  // ----------------------------------------------------------------------
80  // Public member functions for DpWrittenPortSerializer
81  // ----------------------------------------------------------------------
82 
85  Fw::SerialBufferBase& _buffer
86  );
87 
88  public:
89 
90  // ----------------------------------------------------------------------
91  // Public static functions for DpWrittenPortSerializer
92  // ----------------------------------------------------------------------
93 
96  const Fw::StringBase& fileName,
97  FwDpPriorityType priority,
98  FwSizeType size,
99  Fw::SerialBufferBase& _buffer
100  );
101 
102  private:
103 
104  // ----------------------------------------------------------------------
105  // Private member variables for DpWrittenPortSerializer
106  // ----------------------------------------------------------------------
107 
108  char m___fprime_ac_fileName_buffer[Fw::StringBase::BUFFER_SIZE(240)];
109 
110  public:
111 
112  // ----------------------------------------------------------------------
113  // Public member variables for DpWrittenPortSerializer
114  // ----------------------------------------------------------------------
115 
119 
120  };
121 
122 #if !FW_DIRECT_PORT_CALLS
123 
127  public Fw::InputPortBase
128  {
129 
130  public:
131 
132  // ----------------------------------------------------------------------
133  // Public types for InputDpWrittenPort
134  // ----------------------------------------------------------------------
135 
137  typedef void (*CompFuncPtr)(
138  Fw::PassiveComponentBase* callComp,
139  FwIndexType portNum,
140  const Fw::StringBase& fileName,
141  FwDpPriorityType priority,
142  FwSizeType size
143  );
144 
145  public:
146 
147  // ----------------------------------------------------------------------
148  // Public constructors for InputDpWrittenPort
149  // ----------------------------------------------------------------------
150 
153 
154  public:
155 
156  // ----------------------------------------------------------------------
157  // Public member functions for InputDpWrittenPort
158  // ----------------------------------------------------------------------
159 
161  void init();
162 
164  void addCallComp(
165  Fw::PassiveComponentBase* callComp,
166  CompFuncPtr funcPtr
167  );
168 
170  void invoke(
171  const Fw::StringBase& fileName,
172  FwDpPriorityType priority,
173  FwSizeType size
174  );
175 
176  private:
177 
178  // ----------------------------------------------------------------------
179  // Private member functions for InputDpWrittenPort
180  // ----------------------------------------------------------------------
181 
182 #if FW_PORT_SERIALIZATION == 1
183 
186  Fw::SerializeStatus invokeSerial(
187  Fw::LinearBufferBase& _buffer
188  );
189 
190 #endif
191 
192  private:
193 
194  // ----------------------------------------------------------------------
195  // Private member variables for InputDpWrittenPort
196  // ----------------------------------------------------------------------
197 
199  CompFuncPtr m_func;
200 
201  };
202 
206  public Fw::OutputPortBase
207  {
208 
209  public:
210 
211  // ----------------------------------------------------------------------
212  // Public constructors for OutputDpWrittenPort
213  // ----------------------------------------------------------------------
214 
217 
218  public:
219 
220  // ----------------------------------------------------------------------
221  // Public member functions for OutputDpWrittenPort
222  // ----------------------------------------------------------------------
223 
225  void init();
226 
228  void addCallPort(
229  InputDpWrittenPort* callPort
230  );
231 
233  void invoke(
234  const Fw::StringBase& fileName,
235  FwDpPriorityType priority,
236  FwSizeType size
237  ) const;
238 
239  private:
240 
241  // ----------------------------------------------------------------------
242  // Private member variables for OutputDpWrittenPort
243  // ----------------------------------------------------------------------
244 
246  InputDpWrittenPort* m_port;
247 
248  };
249 
250 #endif
251 
252 }
253 
254 #endif
void invoke(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke a port connection.
PlatformSizeType FwSizeType
U32 FwDpPriorityType
The type of a data product priority.
void addCallPort(InputDpWrittenPort *callPort)
Register an input port.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
DpWrittenPortSerializer()
Constructor.
OutputDpWrittenPort()
Constructor.
SerializeStatus
forward declaration for string
static constexpr FwSizeType CAPACITY
DpWrittenPortBuffer()
Constructor.
A string backed by an external buffer.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
The port callback function type.
PlatformIndexType FwIndexType
InputDpWrittenPort()
Constructor.
RateGroupDivider component implementation.
static Fw::SerializeStatus serializePortArgs(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
void init()
Initialization function.
Implementation of malloc based allocator.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
void invoke(const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
Invoke a port interface.
void init()
Initialization function.