F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SignalDonePortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SignalDonePortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SignalDone port
5 // ======================================================================
6 
7 #ifndef Svc_SignalDonePortAc_HPP
8 #define Svc_SignalDonePortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #if !FW_DIRECT_PORT_CALLS
17 #endif
18 
19 namespace Svc {
20 
24  {
25 
26  public:
27 
28  // ----------------------------------------------------------------------
29  // Public constants for SignalDonePortBuffer
30  // ----------------------------------------------------------------------
31 
34  static constexpr FwSizeType CAPACITY =
35  sizeof(U32) +
36  sizeof(FwSizeType);
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Public member functions for SignalDonePortBuffer
42  // ----------------------------------------------------------------------
43 
47  return CAPACITY;
48  }
49 
52  U8* getBuffAddr() override {
53  return m_buff;
54  }
55 
58  const U8* getBuffAddr() const override {
59  return m_buff;
60  }
61 
62  private:
63 
64  // ----------------------------------------------------------------------
65  // Private member variables
66  // ----------------------------------------------------------------------
67 
68  U8 m_buff[CAPACITY];
69 
70  };
71 
74 
75  public:
76 
77  // ----------------------------------------------------------------------
78  // Public constructors for SignalDonePortSerializer
79  // ----------------------------------------------------------------------
80 
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Public member functions for SignalDonePortSerializer
88  // ----------------------------------------------------------------------
89 
92  Fw::SerialBufferBase& _buffer
93  );
94 
95  public:
96 
97  // ----------------------------------------------------------------------
98  // Public static functions for SignalDonePortSerializer
99  // ----------------------------------------------------------------------
100 
103  U32 status,
104  FwSizeType sizeBytes,
105  Fw::SerialBufferBase& _buffer
106  );
107 
108  public:
109 
110  // ----------------------------------------------------------------------
111  // Public member variables for SignalDonePortSerializer
112  // ----------------------------------------------------------------------
113 
114  U32 m_status;
116 
117  };
118 
119 #if !FW_DIRECT_PORT_CALLS
120 
123  public Fw::InputPortBase
124  {
125 
126  public:
127 
128  // ----------------------------------------------------------------------
129  // Public types for InputSignalDonePort
130  // ----------------------------------------------------------------------
131 
133  typedef void (*CompFuncPtr)(
134  Fw::PassiveComponentBase* callComp,
135  FwIndexType portNum,
136  U32 status,
137  FwSizeType sizeBytes
138  );
139 
140  public:
141 
142  // ----------------------------------------------------------------------
143  // Public constructors for InputSignalDonePort
144  // ----------------------------------------------------------------------
145 
148 
149  public:
150 
151  // ----------------------------------------------------------------------
152  // Public member functions for InputSignalDonePort
153  // ----------------------------------------------------------------------
154 
156  void init();
157 
159  void addCallComp(
160  Fw::PassiveComponentBase* callComp,
161  CompFuncPtr funcPtr
162  );
163 
165  void invoke(
166  U32 status,
167  FwSizeType sizeBytes
168  );
169 
170  private:
171 
172  // ----------------------------------------------------------------------
173  // Private member functions for InputSignalDonePort
174  // ----------------------------------------------------------------------
175 
176 #if FW_PORT_SERIALIZATION == 1
177 
180  Fw::SerializeStatus invokeSerial(
181  Fw::LinearBufferBase& _buffer
182  );
183 
184 #endif
185 
186  private:
187 
188  // ----------------------------------------------------------------------
189  // Private member variables for InputSignalDonePort
190  // ----------------------------------------------------------------------
191 
193  CompFuncPtr m_func;
194 
195  };
196 
199  public Fw::OutputPortBase
200  {
201 
202  public:
203 
204  // ----------------------------------------------------------------------
205  // Public constructors for OutputSignalDonePort
206  // ----------------------------------------------------------------------
207 
210 
211  public:
212 
213  // ----------------------------------------------------------------------
214  // Public member functions for OutputSignalDonePort
215  // ----------------------------------------------------------------------
216 
218  void init();
219 
221  void addCallPort(
222  InputSignalDonePort* callPort
223  );
224 
226  void invoke(
227  U32 status,
228  FwSizeType sizeBytes
229  ) const;
230 
231  private:
232 
233  // ----------------------------------------------------------------------
234  // Private member variables for OutputSignalDonePort
235  // ----------------------------------------------------------------------
236 
238  InputSignalDonePort* m_port;
239 
240  };
241 
242 #endif
243 
244 }
245 
246 #endif
void init()
Initialization function.
PlatformSizeType FwSizeType
Input SignalDone port.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, U32 status, FwSizeType sizeBytes)
The port callback function type.
const U8 * getBuffAddr() const override
InputSignalDonePort()
Constructor.
static Fw::SerializeStatus serializePortArgs(U32 status, FwSizeType sizeBytes, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
Output SignalDone port.
SerializeStatus
forward declaration for string
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(U32 status, FwSizeType sizeBytes)
Invoke a port interface.
Serialization buffer for SignalDone port.
Fw::Serializable::SizeType getCapacity() const override
FwSizeType SizeType
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void addCallPort(InputSignalDonePort *callPort)
Register an input port.
void init()
Initialization function.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
void invoke(U32 status, FwSizeType sizeBytes) const
Invoke a port connection.
static constexpr FwSizeType CAPACITY
Serializer for SignalDone port.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.