F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
WatchDogPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title WatchDogPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for WatchDog port
5 // ======================================================================
6 
7 #ifndef Svc_WatchDogPortAc_HPP
8 #define Svc_WatchDogPortAc_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 WatchDogPortBuffer
30  // ----------------------------------------------------------------------
31 
34  static constexpr FwSizeType CAPACITY =
35  sizeof(U32);
36 
37  public:
38 
39  // ----------------------------------------------------------------------
40  // Public member functions for WatchDogPortBuffer
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 WatchDogPortSerializer
79  // ----------------------------------------------------------------------
80 
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Public member functions for WatchDogPortSerializer
88  // ----------------------------------------------------------------------
89 
92  Fw::SerialBufferBase& _buffer
93  );
94 
95  public:
96 
97  // ----------------------------------------------------------------------
98  // Public static functions for WatchDogPortSerializer
99  // ----------------------------------------------------------------------
100 
103  U32 code,
104  Fw::SerialBufferBase& _buffer
105  );
106 
107  public:
108 
109  // ----------------------------------------------------------------------
110  // Public member variables for WatchDogPortSerializer
111  // ----------------------------------------------------------------------
112 
113  U32 m_code;
114 
115  };
116 
117 #if !FW_DIRECT_PORT_CALLS
118 
122  public Fw::InputPortBase
123  {
124 
125  public:
126 
127  // ----------------------------------------------------------------------
128  // Public types for InputWatchDogPort
129  // ----------------------------------------------------------------------
130 
132  typedef void (*CompFuncPtr)(
133  Fw::PassiveComponentBase* callComp,
134  FwIndexType portNum,
135  U32 code
136  );
137 
138  public:
139 
140  // ----------------------------------------------------------------------
141  // Public constructors for InputWatchDogPort
142  // ----------------------------------------------------------------------
143 
146 
147  public:
148 
149  // ----------------------------------------------------------------------
150  // Public member functions for InputWatchDogPort
151  // ----------------------------------------------------------------------
152 
154  void init();
155 
157  void addCallComp(
158  Fw::PassiveComponentBase* callComp,
159  CompFuncPtr funcPtr
160  );
161 
163  void invoke(
164  U32 code
165  );
166 
167  private:
168 
169  // ----------------------------------------------------------------------
170  // Private member functions for InputWatchDogPort
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 InputWatchDogPort
187  // ----------------------------------------------------------------------
188 
190  CompFuncPtr m_func;
191 
192  };
193 
197  public Fw::OutputPortBase
198  {
199 
200  public:
201 
202  // ----------------------------------------------------------------------
203  // Public constructors for OutputWatchDogPort
204  // ----------------------------------------------------------------------
205 
208 
209  public:
210 
211  // ----------------------------------------------------------------------
212  // Public member functions for OutputWatchDogPort
213  // ----------------------------------------------------------------------
214 
216  void init();
217 
219  void addCallPort(
220  InputWatchDogPort* callPort
221  );
222 
224  void invoke(
225  U32 code
226  ) const;
227 
228  private:
229 
230  // ----------------------------------------------------------------------
231  // Private member variables for OutputWatchDogPort
232  // ----------------------------------------------------------------------
233 
235  InputWatchDogPort* m_port;
236 
237  };
238 
239 #endif
240 
241 }
242 
243 #endif
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.
void init()
Initialization function.
PlatformSizeType FwSizeType
OutputWatchDogPort()
Constructor.
static Fw::SerializeStatus serializePortArgs(U32 code, Fw::SerialBufferBase &_buffer)
Serialize port arguments into a buffer.
void addCallPort(InputWatchDogPort *callPort)
Register an input port.
SerializeStatus
forward declaration for string
static constexpr FwSizeType CAPACITY
void invoke(U32 code)
Invoke a port interface.
FwSizeType SizeType
WatchDogPortSerializer()
Constructor.
U8 * getBuffAddr() override
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
const U8 * getBuffAddr() const override
InputWatchDogPort()
Constructor.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(U32 code) const
Invoke a port connection.
void init()
Initialization function.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, U32 code)
The port callback function type.
Fw::Serializable::SizeType getCapacity() const override