F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AssertFatalAdapterComponentImpl.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AssertFatalAdapterImpl.hpp
3 // \author tcanham
4 // \brief hpp file for AssertFatalAdapter component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #ifndef AssertFatalAdapter_HPP
14 #define AssertFatalAdapter_HPP
15 
17 
18 namespace Svc {
19 
21  public:
22  // ----------------------------------------------------------------------
23  // Construction, initialization, and destruction
24  // ----------------------------------------------------------------------
25 
28  AssertFatalAdapterComponentImpl(const char* const compName
29  );
30 
34 
36  void reportAssert(FILE_NAME_ARG file,
37  FwSizeType lineNo,
38  FwSizeType numArgs,
39  FwAssertArgType arg1,
40  FwAssertArgType arg2,
41  FwAssertArgType arg3,
42  FwAssertArgType arg4,
43  FwAssertArgType arg5,
44  FwAssertArgType arg6);
45 
46  private:
47  class AssertFatalAdapter : public Fw::AssertHook {
48  public:
51  void regAssertReporter(AssertFatalAdapterComponentImpl* compPtr);
52 
53  private:
54  void reportAssert(FILE_NAME_ARG file,
55  FwSizeType lineNo,
56  FwSizeType numArgs,
57  FwAssertArgType arg1,
58  FwAssertArgType arg2,
59  FwAssertArgType arg3,
60  FwAssertArgType arg4,
61  FwAssertArgType arg5,
62  FwAssertArgType arg6);
63 
64  // Prevent actual assert since FATAL handler will deal with it
65  void doAssert();
66 
68  };
69 
70  AssertFatalAdapter m_adapter;
71  FwSizeType m_assertCount;
72 };
73 
74 } // end namespace Svc
75 
76 #endif
PlatformSizeType FwSizeType
#define FILE_NAME_ARG
Definition: Assert.hpp:16
void reportAssert(FILE_NAME_ARG file, FwSizeType lineNo, FwSizeType numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
Report the assert as a FATAL.
RateGroupDivider component implementation.
AssertFatalAdapterComponentImpl AssertFatalAdapter
Auto-generated base for AssertFatalAdapter component.
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.