F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AssertFatalAdapterComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AssertFatalAdapterComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for AssertFatalAdapter component base class
5 // ======================================================================
6 
7 #ifndef Svc_AssertFatalAdapterComponentAc_HPP
8 #define Svc_AssertFatalAdapterComponentAc_HPP
9 
10 #include <atomic>
11 
13 #include "Fw/FPrimeBasicTypes.hpp"
14 #include "Fw/Log/LogPortAc.hpp"
15 #include "Fw/Log/LogString.hpp"
16 #if FW_ENABLE_TEXT_LOGGING == 1
17 #include "Fw/Log/LogTextPortAc.hpp"
18 #endif
21 #include "Fw/Time/TimePortAc.hpp"
22 
23 namespace Svc {
24 
31  {
32 
33  // ----------------------------------------------------------------------
34  // Friend classes
35  // ----------------------------------------------------------------------
36 
41 
42  protected:
43 
44  // ----------------------------------------------------------------------
45  // Constants
46  // ----------------------------------------------------------------------
47 
49  enum {
53  };
54 
56  enum {
65  };
66 
67  public:
68 
69  // ----------------------------------------------------------------------
70  // Component initialization
71  // ----------------------------------------------------------------------
72 
74  void init(
75  FwEnumStoreType instance = 0
76  );
77 
78  public:
79 
80  // ----------------------------------------------------------------------
81  // Connect input ports to special output ports
82  // ----------------------------------------------------------------------
83 
85  void set_Log_OutputPort(
86  FwIndexType portNum,
87  Fw::InputLogPort* port
88  );
89 
90 #if FW_ENABLE_TEXT_LOGGING == 1
91 
93  void set_LogText_OutputPort(
94  FwIndexType portNum,
96  );
97 
98 #endif
99 
101  void set_Time_OutputPort(
102  FwIndexType portNum,
103  Fw::InputTimePort* port
104  );
105 
106 #if FW_PORT_SERIALIZATION
107 
108  public:
109 
110  // ----------------------------------------------------------------------
111  // Connect serial input ports to special output ports
112  // ----------------------------------------------------------------------
113 
115  void set_Log_OutputPort(
116  FwIndexType portNum,
117  Fw::InputSerializePort* port
118  );
119 
120 #if FW_ENABLE_TEXT_LOGGING == 1
121 
123  void set_LogText_OutputPort(
124  FwIndexType portNum,
125  Fw::InputSerializePort* port
126  );
127 
128 #endif
129 
131  void set_Time_OutputPort(
132  FwIndexType portNum,
133  Fw::InputSerializePort* port
134  );
135 
136 #endif
137 
138  protected:
139 
140  // ----------------------------------------------------------------------
141  // Component construction and destruction
142  // ----------------------------------------------------------------------
143 
146  const char* compName = ""
147  );
148 
151 
152  protected:
153 
154  // ----------------------------------------------------------------------
155  // Getters for numbers of special output ports
156  // ----------------------------------------------------------------------
157 
161  static constexpr FwIndexType getNum_Log_OutputPorts() {
162  return NUM_LOG_OUTPUT_PORTS;
163  }
164 
165 #if FW_ENABLE_TEXT_LOGGING == 1
166 
170  static constexpr FwIndexType getNum_LogText_OutputPorts() {
172  }
173 
174 #endif
175 
180  return NUM_TIME_OUTPUT_PORTS;
181  }
182 
183  protected:
184 
185  // ----------------------------------------------------------------------
186  // Connection status queries for special output ports
187  // ----------------------------------------------------------------------
188 
193  FwIndexType portNum
194  );
195 
196 #if FW_ENABLE_TEXT_LOGGING == 1
197 
201  bool isConnected_LogText_OutputPort(
202  FwIndexType portNum
203  );
204 
205 #endif
206 
211  FwIndexType portNum
212  );
213 
214  protected:
215 
216  // ----------------------------------------------------------------------
217  // Event logging functions
218  // ----------------------------------------------------------------------
219 
224  const Fw::StringBase& file,
225  U32 line
226  ) const;
227 
232  const Fw::StringBase& file,
233  U32 line,
234  U32 arg1
235  ) const;
236 
241  const Fw::StringBase& file,
242  U32 line,
243  U32 arg1,
244  U32 arg2
245  ) const;
246 
251  const Fw::StringBase& file,
252  U32 line,
253  U32 arg1,
254  U32 arg2,
255  U32 arg3
256  ) const;
257 
262  const Fw::StringBase& file,
263  U32 line,
264  U32 arg1,
265  U32 arg2,
266  U32 arg3,
267  U32 arg4
268  ) const;
269 
274  const Fw::StringBase& file,
275  U32 line,
276  U32 arg1,
277  U32 arg2,
278  U32 arg3,
279  U32 arg4,
280  U32 arg5
281  ) const;
282 
287  const Fw::StringBase& file,
288  U32 line,
289  U32 arg1,
290  U32 arg2,
291  U32 arg3,
292  U32 arg4,
293  U32 arg5,
294  U32 arg6
295  ) const;
296 
301  const Fw::StringBase& file,
302  U32 line,
303  U32 numArgs
304  ) const;
305 
306  protected:
307 
308  // ----------------------------------------------------------------------
309  // Time
310  // ----------------------------------------------------------------------
311 
315  Fw::Time getTime() const;
316 
317  private:
318 
319  // ----------------------------------------------------------------------
320  // Special output ports
321  // ----------------------------------------------------------------------
322 
324  Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS];
325 
326 #if FW_ENABLE_TEXT_LOGGING == 1
327 
329  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
330 
331 #endif
332 
334  Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
335 
336  };
337 
338 }
339 
340 #endif
void log_FATAL_AF_UNEXPECTED_ASSERT(const Fw::StringBase &file, U32 line, U32 numArgs) const
void log_FATAL_AF_ASSERT_1(const Fw::StringBase &file, U32 line, U32 arg1) const
friend class AssertFatalAdapterTesterBase
Friend class tester to support autocoded test harness.
void log_FATAL_AF_ASSERT_3(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3) const
I32 FwEnumStoreType
AssertFatalAdapterComponentBase(const char *compName="")
Construct AssertFatalAdapterComponentBase object.
friend class AssertFatalAdapterTester
Friend class tester implementation to support white-box testing.
void log_FATAL_AF_ASSERT_2(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2) const
void init()
Object initializer.
Definition: ObjBase.cpp:24
void log_FATAL_AF_ASSERT_5(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3, U32 arg4, U32 arg5) const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void log_FATAL_AF_ASSERT_4(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3, U32 arg4) const
void log_FATAL_AF_ASSERT_0(const Fw::StringBase &file, U32 line) const
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
virtual ~AssertFatalAdapterComponentBase()
Destroy AssertFatalAdapterComponentBase object.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
static constexpr FwIndexType getNum_Time_OutputPorts()
static constexpr FwIndexType getNum_Log_OutputPorts()
Auto-generated base for AssertFatalAdapter component.
void log_FATAL_AF_ASSERT_6(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3, U32 arg4, U32 arg5, U32 arg6) const