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