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 
47 
48  }
49 
50  private:
51 
52  // ----------------------------------------------------------------------
53  // Private member variables
54  // ----------------------------------------------------------------------
55 
56  U8 m_buff[CAPACITY];
57 
58  };
59 
63 
64  public:
65 
66  // ----------------------------------------------------------------------
67  // Public constructors for FileAnnouncePortSerializer
68  // ----------------------------------------------------------------------
69 
72 
73  public:
74 
75  // ----------------------------------------------------------------------
76  // Public member functions for FileAnnouncePortSerializer
77  // ----------------------------------------------------------------------
78 
81  Fw::SerialBufferBase& _buffer
82  );
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Public static functions for FileAnnouncePortSerializer
88  // ----------------------------------------------------------------------
89 
92  Fw::StringBase& file_name,
93  Fw::SerialBufferBase& _buffer
94  );
95 
96  private:
97 
98  // ----------------------------------------------------------------------
99  // Private member variables for FileAnnouncePortSerializer
100  // ----------------------------------------------------------------------
101 
102  char m___fprime_ac_file_name_buffer[Fw::StringBase::BUFFER_SIZE(240)];
103 
104  public:
105 
106  // ----------------------------------------------------------------------
107  // Public member variables for FileAnnouncePortSerializer
108  // ----------------------------------------------------------------------
109 
111 
112  };
113 
114 #if !FW_DIRECT_PORT_CALLS
115 
119  public Fw::InputPortBase
120  {
121 
122  public:
123 
124  // ----------------------------------------------------------------------
125  // Public types for InputFileAnnouncePort
126  // ----------------------------------------------------------------------
127 
129  typedef void (*CompFuncPtr)(
130  Fw::PassiveComponentBase* callComp,
131  FwIndexType portNum,
132  Fw::StringBase& file_name
133  );
134 
135  public:
136 
137  // ----------------------------------------------------------------------
138  // Public constructors for InputFileAnnouncePort
139  // ----------------------------------------------------------------------
140 
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Public member functions for InputFileAnnouncePort
148  // ----------------------------------------------------------------------
149 
151  void init();
152 
154  void addCallComp(
155  Fw::PassiveComponentBase* callComp,
156  CompFuncPtr funcPtr
157  );
158 
160  void invoke(
161  Fw::StringBase& file_name
162  );
163 
164  private:
165 
166  // ----------------------------------------------------------------------
167  // Private member functions for InputFileAnnouncePort
168  // ----------------------------------------------------------------------
169 
170 #if FW_PORT_SERIALIZATION == 1
171 
174  Fw::SerializeStatus invokeSerial(
175  Fw::LinearBufferBase& _buffer
176  );
177 
178 #endif
179 
180  private:
181 
182  // ----------------------------------------------------------------------
183  // Private member variables for InputFileAnnouncePort
184  // ----------------------------------------------------------------------
185 
187  CompFuncPtr m_func;
188 
189  };
190 
194  public Fw::OutputPortBase
195  {
196 
197  public:
198 
199  // ----------------------------------------------------------------------
200  // Public constructors for OutputFileAnnouncePort
201  // ----------------------------------------------------------------------
202 
205 
206  public:
207 
208  // ----------------------------------------------------------------------
209  // Public member functions for OutputFileAnnouncePort
210  // ----------------------------------------------------------------------
211 
213  void init();
214 
216  void addCallPort(
217  InputFileAnnouncePort* callPort
218  );
219 
221  void invoke(
222  Fw::StringBase& file_name
223  ) const;
224 
225  private:
226 
227  // ----------------------------------------------------------------------
228  // Private member variables for OutputFileAnnouncePort
229  // ----------------------------------------------------------------------
230 
232  InputFileAnnouncePort* m_port;
233 
234  };
235 
236 #endif
237 
238 }
239 
240 #endif
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
A string backed by an external buffer.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
PlatformIndexType FwIndexType
void invoke(Fw::StringBase &file_name) const
Invoke a port connection.
RateGroupDivider component implementation.
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.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void init()
Initialization function.