F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Construction, initialization, and destruction
28  // ----------------------------------------------------------------------
29 
33  const char *const compName
34  );
35 
39 
41  void reportAssert(
42  FILE_NAME_ARG file,
43  NATIVE_UINT_TYPE lineNo,
44  NATIVE_UINT_TYPE numArgs,
45  FwAssertArgType arg1,
46  FwAssertArgType arg2,
47  FwAssertArgType arg3,
48  FwAssertArgType arg4,
49  FwAssertArgType arg5,
50  FwAssertArgType arg6
51  );
52 
53  private:
54 
55  class AssertFatalAdapter : public Fw::AssertHook {
56  public:
59  void regAssertReporter(AssertFatalAdapterComponentImpl* compPtr);
60  private:
61  void reportAssert(
62  FILE_NAME_ARG file,
63  NATIVE_UINT_TYPE lineNo,
64  NATIVE_UINT_TYPE numArgs,
65  FwAssertArgType arg1,
66  FwAssertArgType arg2,
67  FwAssertArgType arg3,
68  FwAssertArgType arg4,
69  FwAssertArgType arg5,
70  FwAssertArgType arg6
71  );
72 
73  // Prevent actual assert since FATAL handler will deal with it
74  void doAssert();
75 
77  };
78 
79  AssertFatalAdapter m_adapter;
80 
81  };
82 
83 } // end namespace Svc
84 
85 #endif
#define FILE_NAME_ARG
Definition: Assert.hpp:16
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:56
PlatformAssertArgType FwAssertArgType
Definition: FpConfig.h:39
Auto-generated base for AssertFatalAdapter component.
void reportAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, NATIVE_UINT_TYPE numArgs, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6)
Report the assert as a FATAL.
AssertFatalAdapterComponentImpl AssertFatalAdapter