F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileAnnouncePortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileAnnouncePortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FileAnnounce port
5 // ======================================================================
6 
7 #ifndef Svc_FileAnnouncePortAc_HPP
8 #define Svc_FileAnnouncePortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
14 #if !FW_DIRECT_PORT_CALLS
18 #endif
19 
20 namespace Svc {
21 
26  {
27 
28  public:
29 
30  // ----------------------------------------------------------------------
31  // Public constants for FileAnnouncePortBuffer
32  // ----------------------------------------------------------------------
33 
36  static constexpr FwSizeType CAPACITY =
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Public member functions for FileAnnouncePortBuffer
43  // ----------------------------------------------------------------------
44 
48  return CAPACITY;
49  }
50 
53  U8* getBuffAddr() override {
54  return m_buff;
55  }
56 
59  const U8* getBuffAddr() const override {
60  return m_buff;
61  }
62 
63  private:
64 
65  // ----------------------------------------------------------------------
66  // Private member variables
67  // ----------------------------------------------------------------------
68 
69  U8 m_buff[CAPACITY];
70 
71  };
72 
76 
77  public:
78 
79  // ----------------------------------------------------------------------
80  // Public constructors for FileAnnouncePortSerializer
81  // ----------------------------------------------------------------------
82 
85 
86  public:
87 
88  // ----------------------------------------------------------------------
89  // Public member functions for FileAnnouncePortSerializer
90  // ----------------------------------------------------------------------
91 
94  Fw::SerialBufferBase& _buffer
95  );
96 
97  public:
98 
99  // ----------------------------------------------------------------------
100  // Public static functions for FileAnnouncePortSerializer
101  // ----------------------------------------------------------------------
102 
105  Fw::StringBase& file_name,
106  Fw::SerialBufferBase& _buffer
107  );
108 
109  private:
110 
111  // ----------------------------------------------------------------------
112  // Private member variables for FileAnnouncePortSerializer
113  // ----------------------------------------------------------------------
114 
115  char m___fprime_ac_file_name_buffer[Fw::StringBase::BUFFER_SIZE(static_cast<FwSizeType>(FW_FIXED_LENGTH_STRING_SIZE))];
116 
117  public:
118 
119  // ----------------------------------------------------------------------
120  // Public member variables for FileAnnouncePortSerializer
121  // ----------------------------------------------------------------------
122 
124 
125  };
126 
127 #if !FW_DIRECT_PORT_CALLS
128 
132  public Fw::InputPortBase
133  {
134 
135  public:
136 
137  // ----------------------------------------------------------------------
138  // Public types for InputFileAnnouncePort
139  // ----------------------------------------------------------------------
140 
142  typedef void (*CompFuncPtr)(
143  Fw::PassiveComponentBase* callComp,
144  FwIndexType portNum,
145  Fw::StringBase& file_name
146  );
147 
148  public:
149 
150  // ----------------------------------------------------------------------
151  // Public constructors for InputFileAnnouncePort
152  // ----------------------------------------------------------------------
153 
156 
157  public:
158 
159  // ----------------------------------------------------------------------
160  // Public member functions for InputFileAnnouncePort
161  // ----------------------------------------------------------------------
162 
164  void init();
165 
167  void addCallComp(
168  Fw::PassiveComponentBase* callComp,
169  CompFuncPtr funcPtr
170  );
171 
173  void invoke(
174  Fw::StringBase& file_name
175  );
176 
177  private:
178 
179  // ----------------------------------------------------------------------
180  // Private member functions for InputFileAnnouncePort
181  // ----------------------------------------------------------------------
182 
183 #if FW_PORT_SERIALIZATION == 1
184 
187  Fw::SerializeStatus invokeSerial(
188  Fw::LinearBufferBase& _buffer
189  );
190 
191 #endif
192 
193  private:
194 
195  // ----------------------------------------------------------------------
196  // Private member variables for InputFileAnnouncePort
197  // ----------------------------------------------------------------------
198 
200  CompFuncPtr m_func;
201 
202  };
203 
207  public Fw::OutputPortBase
208  {
209 
210  public:
211 
212  // ----------------------------------------------------------------------
213  // Public constructors for OutputFileAnnouncePort
214  // ----------------------------------------------------------------------
215 
218 
219  public:
220 
221  // ----------------------------------------------------------------------
222  // Public member functions for OutputFileAnnouncePort
223  // ----------------------------------------------------------------------
224 
226  void init();
227 
229  void addCallPort(
230  InputFileAnnouncePort* callPort
231  );
232 
234  void invoke(
235  Fw::StringBase& file_name
236  ) const;
237 
238  private:
239 
240  // ----------------------------------------------------------------------
241  // Private member variables for OutputFileAnnouncePort
242  // ----------------------------------------------------------------------
243 
245  InputFileAnnouncePort* m_port;
246 
247  };
248 
249 #endif
250 
251 }
252 
253 #endif
Fw::Serializable::SizeType getCapacity() const override
static Fw::SerializeStatus serializePortArgs(Fw::StringBase &file_name, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
void invoke(Fw::StringBase &file_name)
Invoke a port interface.
PlatformSizeType FwSizeType
void init()
Initialization function.
void addCallPort(InputFileAnnouncePort *callPort)
Register an input port.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, Fw::StringBase &file_name)
The port callback function type.
SerializeStatus
forward declaration for string
static constexpr FwSizeType CAPACITY
const U8 * getBuffAddr() const override
FwSizeType SizeType
A string backed by an external buffer.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
PlatformIndexType FwIndexType
void invoke(Fw::StringBase &file_name) const
Invoke a port connection.
RateGroupDivider component implementation.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void init()
Initialization function.