F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileReadPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileReadPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FileRead port
5 // ======================================================================
6 
7 #ifndef Svc_FileReadPortAc_HPP
8 #define Svc_FileReadPortAc_HPP
9 
10 #include "Fw/Buffer/Buffer.hpp"
11 #include "Fw/FPrimeBasicTypes.hpp"
15 #if !FW_DIRECT_PORT_CALLS
19 #endif
20 
21 namespace Svc {
22 
26  {
27 
28  public:
29 
30  // ----------------------------------------------------------------------
31  // Public constants for FileReadPortBuffer
32  // ----------------------------------------------------------------------
33 
36  static constexpr FwSizeType CAPACITY =
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Public member functions for FileReadPortBuffer
44  // ----------------------------------------------------------------------
45 
48 
49  }
50 
51  private:
52 
53  // ----------------------------------------------------------------------
54  // Private member variables
55  // ----------------------------------------------------------------------
56 
57  U8 m_buff[CAPACITY];
58 
59  };
60 
63 
64  public:
65 
66  // ----------------------------------------------------------------------
67  // Public constructors for FileReadPortSerializer
68  // ----------------------------------------------------------------------
69 
72 
73  public:
74 
75  // ----------------------------------------------------------------------
76  // Public member functions for FileReadPortSerializer
77  // ----------------------------------------------------------------------
78 
81  Fw::SerialBufferBase& _buffer
82  );
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Public static functions for FileReadPortSerializer
88  // ----------------------------------------------------------------------
89 
92  const Fw::StringBase& path,
93  Fw::Buffer& buffer,
94  Fw::SerialBufferBase& _buffer
95  );
96 
97  private:
98 
99  // ----------------------------------------------------------------------
100  // Private member variables for FileReadPortSerializer
101  // ----------------------------------------------------------------------
102 
103  char m___fprime_ac_path_buffer[Fw::StringBase::BUFFER_SIZE(240)];
104 
105  public:
106 
107  // ----------------------------------------------------------------------
108  // Public member variables for FileReadPortSerializer
109  // ----------------------------------------------------------------------
110 
113 
114  };
115 
116 #if !FW_DIRECT_PORT_CALLS
117 
120  public Fw::InputPortBase
121  {
122 
123  public:
124 
125  // ----------------------------------------------------------------------
126  // Public types for InputFileReadPort
127  // ----------------------------------------------------------------------
128 
130  typedef void (*CompFuncPtr)(
131  Fw::PassiveComponentBase* callComp,
132  FwIndexType portNum,
133  const Fw::StringBase& path,
134  Fw::Buffer& buffer
135  );
136 
137  public:
138 
139  // ----------------------------------------------------------------------
140  // Public constructors for InputFileReadPort
141  // ----------------------------------------------------------------------
142 
145 
146  public:
147 
148  // ----------------------------------------------------------------------
149  // Public member functions for InputFileReadPort
150  // ----------------------------------------------------------------------
151 
153  void init();
154 
156  void addCallComp(
157  Fw::PassiveComponentBase* callComp,
158  CompFuncPtr funcPtr
159  );
160 
162  void invoke(
163  const Fw::StringBase& path,
164  Fw::Buffer& buffer
165  );
166 
167  private:
168 
169  // ----------------------------------------------------------------------
170  // Private member functions for InputFileReadPort
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 InputFileReadPort
187  // ----------------------------------------------------------------------
188 
190  CompFuncPtr m_func;
191 
192  };
193 
196  public Fw::OutputPortBase
197  {
198 
199  public:
200 
201  // ----------------------------------------------------------------------
202  // Public constructors for OutputFileReadPort
203  // ----------------------------------------------------------------------
204 
207 
208  public:
209 
210  // ----------------------------------------------------------------------
211  // Public member functions for OutputFileReadPort
212  // ----------------------------------------------------------------------
213 
215  void init();
216 
218  void addCallPort(
219  InputFileReadPort* callPort
220  );
221 
223  void invoke(
224  const Fw::StringBase& path,
225  Fw::Buffer& buffer
226  ) const;
227 
228  private:
229 
230  // ----------------------------------------------------------------------
231  // Private member variables for OutputFileReadPort
232  // ----------------------------------------------------------------------
233 
235  InputFileReadPort* m_port;
236 
237  };
238 
239 #endif
240 
241 }
242 
243 #endif
static Fw::SerializeStatus serializePortArgs(const Fw::StringBase &path, Fw::Buffer &buffer, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
PlatformSizeType FwSizeType
InputFileReadPort()
Constructor.
SerializeStatus
forward declaration for string
Input FileRead port.
void addCallPort(InputFileReadPort *callPort)
Register an input port.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
A string backed by an external buffer.
static constexpr FwSizeType CAPACITY
void invoke(const Fw::StringBase &path, Fw::Buffer &buffer)
Invoke a port interface.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
OutputFileReadPort()
Constructor.
FileReadPortSerializer()
Constructor.
FileReadPortBuffer()
Constructor.
Serializer for FileRead port.
Serialization buffer for FileRead port.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void invoke(const Fw::StringBase &path, Fw::Buffer &buffer) const
Invoke a port connection.
PlatformIndexType FwIndexType
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)
The port callback function type.
RateGroupDivider component implementation.
Output FileRead port.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
Implementation of malloc based allocator.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:70
void init()
Initialization function.
void init()
Initialization function.