F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
CAssert.hpp
Go to the documentation of this file.
1
/*
2
* FwCAssert.hpp
3
*
4
* Created on: Jun 8, 2014
5
* Author: tcanham
6
*/
7
8
#ifndef FWCASSERT_HPP_
9
#define FWCASSERT_HPP_
10
11
#include <
FpConfig.hpp
>
12
#include <
Fw/Types/BasicTypes.hpp
>
13
14
#if FW_ASSERT_LEVEL == FW_NO_ASSERT
15
16
#define FW_CASSERT(...)
17
18
#else // ASSERT is defined
19
20
#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
21
#define FILE_NAME_ARG NATIVE_UINT_TYPE
22
#define FW_CASSERT(cond) \
23
((void) ((cond) ? (0) : \
24
(CAssert0(ASSERT_FILE_ID, __LINE__))))
25
#else
26
#define FILE_NAME_ARG const U8*
27
#define FW_CASSERT(cond) \
28
((void) ((cond) ? (0) : \
29
(CAssert0(reinterpret_cast<FILE_NAME_ARG>(__FILE__), __LINE__))))
30
#endif
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif // __cplusplus
35
36
I32 CAssert0(FILE_NAME_ARG file, U32 lineNo);
37
I32 CAssert1(FILE_NAME_ARG file, U32 lineNo,
NATIVE_INT_TYPE
arg1);
38
39
#ifdef __cplusplus
40
}
// extern "C"
41
#endif // __cplusplus
42
43
44
45
#endif // ASSERT is defined
46
#endif
/* FWCASSERT_HPP_ */
FpConfig.hpp
ISF configuration file.
BasicTypes.hpp
Declares ISF basic types.
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition:
BasicTypes.hpp:29
Fw
Types
CAssert.hpp
Generated by
1.8.17