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 
45 
46  }
47 
48  private:
49 
50  // ----------------------------------------------------------------------
51  // Private member variables
52  // ----------------------------------------------------------------------
53 
54  U8 m_buff[CAPACITY];
55 
56  };
57 
61 
62  public:
63 
64  // ----------------------------------------------------------------------
65  // Public constructors for PingPortSerializer
66  // ----------------------------------------------------------------------
67 
70 
71  public:
72 
73  // ----------------------------------------------------------------------
74  // Public member functions for PingPortSerializer
75  // ----------------------------------------------------------------------
76 
79  Fw::SerialBufferBase& _buffer
80  );
81 
82  public:
83 
84  // ----------------------------------------------------------------------
85  // Public static functions for PingPortSerializer
86  // ----------------------------------------------------------------------
87 
90  U32 key,
91  Fw::SerialBufferBase& _buffer
92  );
93 
94  public:
95 
96  // ----------------------------------------------------------------------
97  // Public member variables for PingPortSerializer
98  // ----------------------------------------------------------------------
99 
100  U32 m_key;
101 
102  };
103 
104 #if !FW_DIRECT_PORT_CALLS
105 
109  public Fw::InputPortBase
110  {
111 
112  public:
113 
114  // ----------------------------------------------------------------------
115  // Public types for InputPingPort
116  // ----------------------------------------------------------------------
117 
119  typedef void (*CompFuncPtr)(
120  Fw::PassiveComponentBase* callComp,
121  FwIndexType portNum,
122  U32 key
123  );
124 
125  public:
126 
127  // ----------------------------------------------------------------------
128  // Public constructors for InputPingPort
129  // ----------------------------------------------------------------------
130 
132  InputPingPort();
133 
134  public:
135 
136  // ----------------------------------------------------------------------
137  // Public member functions for InputPingPort
138  // ----------------------------------------------------------------------
139 
141  void init();
142 
144  void addCallComp(
145  Fw::PassiveComponentBase* callComp,
146  CompFuncPtr funcPtr
147  );
148 
150  void invoke(
151  U32 key
152  );
153 
154  private:
155 
156  // ----------------------------------------------------------------------
157  // Private member functions for InputPingPort
158  // ----------------------------------------------------------------------
159 
160 #if FW_PORT_SERIALIZATION == 1
161 
164  Fw::SerializeStatus invokeSerial(
165  Fw::LinearBufferBase& _buffer
166  );
167 
168 #endif
169 
170  private:
171 
172  // ----------------------------------------------------------------------
173  // Private member variables for InputPingPort
174  // ----------------------------------------------------------------------
175 
177  CompFuncPtr m_func;
178 
179  };
180 
184  public Fw::OutputPortBase
185  {
186 
187  public:
188 
189  // ----------------------------------------------------------------------
190  // Public constructors for OutputPingPort
191  // ----------------------------------------------------------------------
192 
194  OutputPingPort();
195 
196  public:
197 
198  // ----------------------------------------------------------------------
199  // Public member functions for OutputPingPort
200  // ----------------------------------------------------------------------
201 
203  void init();
204 
206  void addCallPort(
207  InputPingPort* callPort
208  );
209 
211  void invoke(
212  U32 key
213  ) const;
214 
215  private:
216 
217  // ----------------------------------------------------------------------
218  // Private member variables for OutputPingPort
219  // ----------------------------------------------------------------------
220 
222  InputPingPort* m_port;
223 
224  };
225 
226 #endif
227 
228 }
229 
230 #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
PingPortBuffer()
Constructor.
Definition: PingPortAc.hpp:44
void invoke(U32 key) const
Invoke a port connection.
Definition: PingPortAc.cpp:170
OutputPingPort()
Constructor.
Definition: PingPortAc.cpp:139
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
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:157
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:54
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:119
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:79
Implementation of malloc based allocator.