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"
23 
24 namespace Svc {
25 
32  {
33 
34  // ----------------------------------------------------------------------
35  // Friend classes
36  // ----------------------------------------------------------------------
37 
42 
43  protected:
44 
45  // ----------------------------------------------------------------------
46  // Constants
47  // ----------------------------------------------------------------------
48 
50  enum {
54  };
55 
57  enum {
66  };
67 
68  public:
69 
70  // ----------------------------------------------------------------------
71  // Component initialization
72  // ----------------------------------------------------------------------
73 
75  void init(
76  FwEnumStoreType instance = 0
77  );
78 
79  public:
80 
81  // ----------------------------------------------------------------------
82  // Connect input ports to special output ports
83  // ----------------------------------------------------------------------
84 
86  void set_Log_OutputPort(
87  FwIndexType portNum,
88  Fw::InputLogPort* port
89  );
90 
91 #if FW_ENABLE_TEXT_LOGGING == 1
92 
94  void set_LogText_OutputPort(
95  FwIndexType portNum,
97  );
98 
99 #endif
100 
102  void set_Time_OutputPort(
103  FwIndexType portNum,
104  Fw::InputTimePort* port
105  );
106 
107 #if FW_PORT_SERIALIZATION
108 
109  public:
110 
111  // ----------------------------------------------------------------------
112  // Connect serial input ports to special output ports
113  // ----------------------------------------------------------------------
114 
116  void set_Log_OutputPort(
117  FwIndexType portNum,
118  Fw::InputSerializePort* port
119  );
120 
121 #if FW_ENABLE_TEXT_LOGGING == 1
122 
124  void set_LogText_OutputPort(
125  FwIndexType portNum,
126  Fw::InputSerializePort* port
127  );
128 
129 #endif
130 
132  void set_Time_OutputPort(
133  FwIndexType portNum,
134  Fw::InputSerializePort* port
135  );
136 
137 #endif
138 
139  protected:
140 
141  // ----------------------------------------------------------------------
142  // Component construction and destruction
143  // ----------------------------------------------------------------------
144 
147  const char* compName = ""
148  );
149 
152 
153  protected:
154 
155  // ----------------------------------------------------------------------
156  // Getters for numbers of special output ports
157  // ----------------------------------------------------------------------
158 
162  static constexpr FwIndexType getNum_Log_OutputPorts() {
163  return NUM_LOG_OUTPUT_PORTS;
164  }
165 
166 #if FW_ENABLE_TEXT_LOGGING == 1
167 
171  static constexpr FwIndexType getNum_LogText_OutputPorts() {
173  }
174 
175 #endif
176 
181  return NUM_TIME_OUTPUT_PORTS;
182  }
183 
184  protected:
185 
186  // ----------------------------------------------------------------------
187  // Connection status queries for special output ports
188  // ----------------------------------------------------------------------
189 
194  FwIndexType portNum
195  );
196 
197 #if FW_ENABLE_TEXT_LOGGING == 1
198 
202  bool isConnected_LogText_OutputPort(
203  FwIndexType portNum
204  );
205 
206 #endif
207 
212  FwIndexType portNum
213  );
214 
215  protected:
216 
217  // ----------------------------------------------------------------------
218  // Event logging functions
219  // ----------------------------------------------------------------------
220 
225  const Fw::StringBase& file,
226  U32 line
227  ) const;
228 
233  const Fw::StringBase& file,
234  U32 line,
235  U32 arg1
236  ) const;
237 
242  const Fw::StringBase& file,
243  U32 line,
244  U32 arg1,
245  U32 arg2
246  ) const;
247 
252  const Fw::StringBase& file,
253  U32 line,
254  U32 arg1,
255  U32 arg2,
256  U32 arg3
257  ) const;
258 
263  const Fw::StringBase& file,
264  U32 line,
265  U32 arg1,
266  U32 arg2,
267  U32 arg3,
268  U32 arg4
269  ) const;
270 
275  const Fw::StringBase& file,
276  U32 line,
277  U32 arg1,
278  U32 arg2,
279  U32 arg3,
280  U32 arg4,
281  U32 arg5
282  ) const;
283 
288  const Fw::StringBase& file,
289  U32 line,
290  U32 arg1,
291  U32 arg2,
292  U32 arg3,
293  U32 arg4,
294  U32 arg5,
295  U32 arg6
296  ) const;
297 
302  const Fw::StringBase& file,
303  U32 line,
304  U32 numArgs
305  ) const;
306 
307  protected:
308 
309  // ----------------------------------------------------------------------
310  // Time
311  // ----------------------------------------------------------------------
312 
316  Fw::Time getTime() const;
317 
318  private:
319 
320  // ----------------------------------------------------------------------
321  // Special output ports
322  // ----------------------------------------------------------------------
323 
325  Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS];
326 
327 #if FW_ENABLE_TEXT_LOGGING == 1
328 
330  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
331 
332 #endif
333 
335  Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS];
336 
337  };
338 
339 }
340 
341 #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