F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
CAssert.h
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.h
>
12
13
#ifdef __cplusplus
14
extern
"C"
{
15
#endif
16
17
#if FW_ASSERT_LEVEL == FW_NO_ASSERT
18
19
#define FW_CASSERT(...)
20
21
#else
// ASSERT is defined
22
23
#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
24
#define FILE_NAME_ARG NATIVE_UINT_TYPE
25
#define FW_CASSERT(cond) ((void)((cond) ? (0) : (CAssert0(ASSERT_FILE_ID, __LINE__))))
26
#else
27
#define FILE_NAME_ARG const CHAR*
28
#define FW_CASSERT(cond) ((void)((cond) ? (0) : (CAssert0((FILE_NAME_ARG)(__FILE__), __LINE__))))
29
#endif
30
31
I32
CAssert0
(
FILE_NAME_ARG
file, U32 lineNo);
32
I32 CAssert1(
FILE_NAME_ARG
file, U32 lineNo,
NATIVE_INT_TYPE
arg1);
33
34
#endif
// ASSERT is defined
35
36
#ifdef __cplusplus
37
}
38
#endif
39
40
#endif
/* FWCASSERT_HPP_ */
CAssert0
NATIVE_INT_TYPE CAssert0(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo)
Definition:
Assert.cpp:183
FILE_NAME_ARG
#define FILE_NAME_ARG
Definition:
Assert.hpp:16
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition:
BasicTypes.h:55
FpConfig.h
C-compatible configuration header for fprime configuration.
Fw
Types
CAssert.h
Generated by
1.9.1