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 
46 
47  }
48 
49  private:
50 
51  // ----------------------------------------------------------------------
52  // Private member variables
53  // ----------------------------------------------------------------------
54 
55  U8 m_buff[CAPACITY];
56 
57  };
58 
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Public constructors for FatalEventPortSerializer
67  // ----------------------------------------------------------------------
68 
71 
72  public:
73 
74  // ----------------------------------------------------------------------
75  // Public member functions for FatalEventPortSerializer
76  // ----------------------------------------------------------------------
77 
80  Fw::SerialBufferBase& _buffer
81  );
82 
83  public:
84 
85  // ----------------------------------------------------------------------
86  // Public static functions for FatalEventPortSerializer
87  // ----------------------------------------------------------------------
88 
91  FwEventIdType Id,
92  Fw::SerialBufferBase& _buffer
93  );
94 
95  public:
96 
97  // ----------------------------------------------------------------------
98  // Public member variables for FatalEventPortSerializer
99  // ----------------------------------------------------------------------
100 
102 
103  };
104 
105 #if !FW_DIRECT_PORT_CALLS
106 
110  public Fw::InputPortBase
111  {
112 
113  public:
114 
115  // ----------------------------------------------------------------------
116  // Public types for InputFatalEventPort
117  // ----------------------------------------------------------------------
118 
120  typedef void (*CompFuncPtr)(
121  Fw::PassiveComponentBase* callComp,
122  FwIndexType portNum,
123  FwEventIdType Id
124  );
125 
126  public:
127 
128  // ----------------------------------------------------------------------
129  // Public constructors for InputFatalEventPort
130  // ----------------------------------------------------------------------
131 
134 
135  public:
136 
137  // ----------------------------------------------------------------------
138  // Public member functions for InputFatalEventPort
139  // ----------------------------------------------------------------------
140 
142  void init();
143 
145  void addCallComp(
146  Fw::PassiveComponentBase* callComp,
147  CompFuncPtr funcPtr
148  );
149 
151  void invoke(
152  FwEventIdType Id
153  );
154 
155  private:
156 
157  // ----------------------------------------------------------------------
158  // Private member functions for InputFatalEventPort
159  // ----------------------------------------------------------------------
160 
161 #if FW_PORT_SERIALIZATION == 1
162 
165  Fw::SerializeStatus invokeSerial(
166  Fw::LinearBufferBase& _buffer
167  );
168 
169 #endif
170 
171  private:
172 
173  // ----------------------------------------------------------------------
174  // Private member variables for InputFatalEventPort
175  // ----------------------------------------------------------------------
176 
178  CompFuncPtr m_func;
179 
180  };
181 
185  public Fw::OutputPortBase
186  {
187 
188  public:
189 
190  // ----------------------------------------------------------------------
191  // Public constructors for OutputFatalEventPort
192  // ----------------------------------------------------------------------
193 
196 
197  public:
198 
199  // ----------------------------------------------------------------------
200  // Public member functions for OutputFatalEventPort
201  // ----------------------------------------------------------------------
202 
204  void init();
205 
207  void addCallPort(
208  InputFatalEventPort* callPort
209  );
210 
212  void invoke(
213  FwEventIdType Id
214  ) const;
215 
216  private:
217 
218  // ----------------------------------------------------------------------
219  // Private member variables for OutputFatalEventPort
220  // ----------------------------------------------------------------------
221 
223  InputFatalEventPort* m_port;
224 
225  };
226 
227 #endif
228 
229 }
230 
231 #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.
FatalEventPortBuffer()
Constructor.
SerializeStatus
forward declaration for string
FwIdType FwEventIdType
The type of an event identifier.
void addCallPort(InputFatalEventPort *callPort)
Register an input port.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
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.
Implementation of malloc based allocator.
Fw::SerializeStatus deserializePortArgs(Fw::SerialBufferBase &_buffer)
Deserialze port arguments into members.