F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
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#if FW_ASSERT_LEVEL == FW_NO_ASSERT
14
15#define FW_CASSERT(...)
16
17#else // ASSERT is defined
18
19#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
20#define FILE_NAME_ARG NATIVE_UINT_TYPE
21#define FW_CASSERT(cond) ((void)((cond) ? (0) : (CAssert0(ASSERT_FILE_ID, __LINE__))))
22#else
23#define FILE_NAME_ARG const U8*
24#define FW_CASSERT(cond) ((void)((cond) ? (0) : (CAssert0((FILE_NAME_ARG)(__FILE__), __LINE__))))
25#endif
26
27I32 CAssert0(FILE_NAME_ARG file, U32 lineNo);
28I32 CAssert1(FILE_NAME_ARG file, U32 lineNo, NATIVE_INT_TYPE arg1);
29
30#endif // ASSERT is defined
31#endif /* FWCASSERT_HPP_ */
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
C-compatible configuration header for fprime configuration.