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