F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
EnableSectionPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title EnableSectionPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for EnableSection port
5 // ======================================================================
6 
7 #ifndef Svc_EnableSectionPortAc_HPP
8 #define Svc_EnableSectionPortAc_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 EnableSectionPortBuffer
32  // ----------------------------------------------------------------------
33 
36  static constexpr FwSizeType CAPACITY =
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Public member functions for EnableSectionPortBuffer
44  // ----------------------------------------------------------------------
45 
49  return CAPACITY;
50  }
51 
54  U8* getBuffAddr() override {
55  return m_buff;
56  }
57 
60  const U8* getBuffAddr() const override {
61  return m_buff;
62  }
63 
64  private:
65 
66  // ----------------------------------------------------------------------
67  // Private member variables
68  // ----------------------------------------------------------------------
69 
70  U8 m_buff[CAPACITY];
71 
72  };
73 
77 
78  public:
79 
80  // ----------------------------------------------------------------------
81  // Public constructors for EnableSectionPortSerializer
82  // ----------------------------------------------------------------------
83 
86 
87  public:
88 
89  // ----------------------------------------------------------------------
90  // Public member functions for EnableSectionPortSerializer
91  // ----------------------------------------------------------------------
92 
95  Fw::SerialBufferBase& _buffer
96  );
97 
98  public:
99 
100  // ----------------------------------------------------------------------
101  // Public static functions for EnableSectionPortSerializer
102  // ----------------------------------------------------------------------
103 
106  const Svc::TelemetrySection& section,
107  const Fw::Enabled& enabled,
108  Fw::SerialBufferBase& _buffer
109  );
110 
111  public:
112 
113  // ----------------------------------------------------------------------
114  // Public member variables for EnableSectionPortSerializer
115  // ----------------------------------------------------------------------
116 
119 
120  };
121 
122 #if !FW_DIRECT_PORT_CALLS
123 
127  public Fw::InputPortBase
128  {
129 
130  public:
131 
132  // ----------------------------------------------------------------------
133  // Public types for InputEnableSectionPort
134  // ----------------------------------------------------------------------
135 
137  typedef void (*CompFuncPtr)(
138  Fw::PassiveComponentBase* callComp,
139  FwIndexType portNum,
140  const Svc::TelemetrySection& section,
141  const Fw::Enabled& enabled
142  );
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Public constructors for InputEnableSectionPort
148  // ----------------------------------------------------------------------
149 
152 
153  public:
154 
155  // ----------------------------------------------------------------------
156  // Public member functions for InputEnableSectionPort
157  // ----------------------------------------------------------------------
158 
160  void init();
161 
163  void addCallComp(
164  Fw::PassiveComponentBase* callComp,
165  CompFuncPtr funcPtr
166  );
167 
169  void invoke(
170  const Svc::TelemetrySection& section,
171  const Fw::Enabled& enabled
172  );
173 
174  private:
175 
176  // ----------------------------------------------------------------------
177  // Private member functions for InputEnableSectionPort
178  // ----------------------------------------------------------------------
179 
180 #if FW_PORT_SERIALIZATION == 1
181 
184  Fw::SerializeStatus invokeSerial(
185  Fw::LinearBufferBase& _buffer
186  );
187 
188 #endif
189 
190  private:
191 
192  // ----------------------------------------------------------------------
193  // Private member variables for InputEnableSectionPort
194  // ----------------------------------------------------------------------
195 
197  CompFuncPtr m_func;
198 
199  };
200 
204  public Fw::OutputPortBase
205  {
206 
207  public:
208 
209  // ----------------------------------------------------------------------
210  // Public constructors for OutputEnableSectionPort
211  // ----------------------------------------------------------------------
212 
215 
216  public:
217 
218  // ----------------------------------------------------------------------
219  // Public member functions for OutputEnableSectionPort
220  // ----------------------------------------------------------------------
221 
223  void init();
224 
226  void addCallPort(
227  InputEnableSectionPort* callPort
228  );
229 
231  void invoke(
232  const Svc::TelemetrySection& section,
233  const Fw::Enabled& enabled
234  ) const;
235 
236  private:
237 
238  // ----------------------------------------------------------------------
239  // Private member variables for OutputEnableSectionPort
240  // ----------------------------------------------------------------------
241 
243  InputEnableSectionPort* m_port;
244 
245  };
246 
247 #endif
248 
249 }
250 
251 #endif
static constexpr FwSizeType CAPACITY
PlatformSizeType FwSizeType
Fw::Serializable::SizeType getCapacity() const override
The size of the serial representation.
const U8 * getBuffAddr() const override
static Fw::SerializeStatus serializePortArgs(const Svc::TelemetrySection &section, const Fw::Enabled &enabled, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
SerializeStatus
forward declaration for string
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Svc::TelemetrySection &section, const Fw::Enabled &enabled)
The port callback function type.
FwSizeType SizeType
void init()
Initialization function.
Enabled and disabled states.
void init()
Initialization function.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void addCallPort(InputEnableSectionPort *callPort)
Register an input port.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
PlatformIndexType FwIndexType
The size of the serial representation.
void invoke(const Svc::TelemetrySection &section, const Fw::Enabled &enabled) const
Invoke a port connection.
RateGroupDivider component implementation.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void invoke(const Svc::TelemetrySection &section, const Fw::Enabled &enabled)
Invoke a port interface.