F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PolyPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PolyPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Poly port
5 // ======================================================================
6 
7 #ifndef Svc_PolyPortAc_HPP
8 #define Svc_PolyPortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
11 #include "Fw/Time/Time.hpp"
12 #include "Fw/Types/PolyType.hpp"
16 #if !FW_DIRECT_PORT_CALLS
20 #endif
21 
22 namespace Svc {
23 
28  {
29 
30  public:
31 
32  // ----------------------------------------------------------------------
33  // Public constants for PolyPortBuffer
34  // ----------------------------------------------------------------------
35 
38  static constexpr FwSizeType CAPACITY =
43 
44  public:
45 
46  // ----------------------------------------------------------------------
47  // Public member functions for PolyPortBuffer
48  // ----------------------------------------------------------------------
49 
52 
53  }
54 
55  private:
56 
57  // ----------------------------------------------------------------------
58  // Private member variables
59  // ----------------------------------------------------------------------
60 
61  U8 m_buff[CAPACITY];
62 
63  };
64 
68 
69  public:
70 
71  // ----------------------------------------------------------------------
72  // Public constructors for PolyPortSerializer
73  // ----------------------------------------------------------------------
74 
77 
78  public:
79 
80  // ----------------------------------------------------------------------
81  // Public member functions for PolyPortSerializer
82  // ----------------------------------------------------------------------
83 
86  Fw::SerialBufferBase& _buffer
87  );
88 
89  public:
90 
91  // ----------------------------------------------------------------------
92  // Public static functions for PolyPortSerializer
93  // ----------------------------------------------------------------------
94 
97  const Svc::PolyDbCfg::PolyDbEntry& entry,
98  Svc::MeasurementStatus& status,
99  Fw::Time& time,
100  Fw::PolyType& val,
101  Fw::SerialBufferBase& _buffer
102  );
103 
104  public:
105 
106  // ----------------------------------------------------------------------
107  // Public member variables for PolyPortSerializer
108  // ----------------------------------------------------------------------
109 
114 
115  };
116 
117 #if !FW_DIRECT_PORT_CALLS
118 
122  public Fw::InputPortBase
123  {
124 
125  public:
126 
127  // ----------------------------------------------------------------------
128  // Public types for InputPolyPort
129  // ----------------------------------------------------------------------
130 
132  typedef void (*CompFuncPtr)(
133  Fw::PassiveComponentBase* callComp,
134  FwIndexType portNum,
135  const Svc::PolyDbCfg::PolyDbEntry& entry,
136  Svc::MeasurementStatus& status,
137  Fw::Time& time,
138  Fw::PolyType& val
139  );
140 
141  public:
142 
143  // ----------------------------------------------------------------------
144  // Public constructors for InputPolyPort
145  // ----------------------------------------------------------------------
146 
148  InputPolyPort();
149 
150  public:
151 
152  // ----------------------------------------------------------------------
153  // Public member functions for InputPolyPort
154  // ----------------------------------------------------------------------
155 
157  void init();
158 
160  void addCallComp(
161  Fw::PassiveComponentBase* callComp,
162  CompFuncPtr funcPtr
163  );
164 
166  void invoke(
167  const Svc::PolyDbCfg::PolyDbEntry& entry,
168  Svc::MeasurementStatus& status,
169  Fw::Time& time,
170  Fw::PolyType& val
171  );
172 
173  private:
174 
175  // ----------------------------------------------------------------------
176  // Private member functions for InputPolyPort
177  // ----------------------------------------------------------------------
178 
179 #if FW_PORT_SERIALIZATION == 1
180 
183  Fw::SerializeStatus invokeSerial(
184  Fw::LinearBufferBase& _buffer
185  );
186 
187 #endif
188 
189  private:
190 
191  // ----------------------------------------------------------------------
192  // Private member variables for InputPolyPort
193  // ----------------------------------------------------------------------
194 
196  CompFuncPtr m_func;
197 
198  };
199 
203  public Fw::OutputPortBase
204  {
205 
206  public:
207 
208  // ----------------------------------------------------------------------
209  // Public constructors for OutputPolyPort
210  // ----------------------------------------------------------------------
211 
213  OutputPolyPort();
214 
215  public:
216 
217  // ----------------------------------------------------------------------
218  // Public member functions for OutputPolyPort
219  // ----------------------------------------------------------------------
220 
222  void init();
223 
225  void addCallPort(
226  InputPolyPort* callPort
227  );
228 
230  void invoke(
231  const Svc::PolyDbCfg::PolyDbEntry& entry,
232  Svc::MeasurementStatus& status,
233  Fw::Time& time,
234  Fw::PolyType& val
235  ) const;
236 
237  private:
238 
239  // ----------------------------------------------------------------------
240  // Private member variables for OutputPolyPort
241  // ----------------------------------------------------------------------
242 
244  InputPolyPort* m_port;
245 
246  };
247 
248 #endif
249 
250 }
251 
252 #endif
PolyPortSerializer()
Constructor.
Definition: PolyPortAc.cpp:17
PlatformSizeType FwSizeType
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
The port callback function type.
Definition: PolyPortAc.hpp:132
InputPolyPort()
Constructor.
Definition: PolyPortAc.cpp:85
void addCallPort(InputPolyPort *callPort)
Register an input port.
Definition: PolyPortAc.cpp:186
void invoke(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val) const
Invoke a port connection.
Definition: PolyPortAc.cpp:199
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
Definition: PolyPortAc.cpp:31
The size of the serial representation.
SerializeStatus
forward declaration for string
void invoke(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Invoke a port interface.
Definition: PolyPortAc.cpp:117
static constexpr FwSizeType CAPACITY
Definition: PolyPortAc.hpp:38
An enumeration for measurement status.
OutputPolyPort()
Constructor.
Definition: PolyPortAc.cpp:168
static Fw::SerializeStatus serializePortArgs(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
Definition: PolyPortAc.cpp:54
PolyPortBuffer()
Constructor.
Definition: PolyPortAc.hpp:51
Svc::PolyDbCfg::PolyDbEntry m_entry
Definition: PolyPortAc.hpp:110
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void init()
Initialization function.
Definition: PolyPortAc.cpp:97
PlatformIndexType FwIndexType
stored serialized size
Definition: PolyType.hpp:158
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PolyPortAc.cpp:103
void init()
Initialization function.
Definition: PolyPortAc.cpp:180
RateGroupDivider component implementation.
The size of the serial representation.
Implementation of malloc based allocator.
Svc::MeasurementStatus m_status
Definition: PolyPortAc.hpp:111