F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
BasicTypes.h File Reference
#include <config/FPrimeNumericalConfig.h>
#include <inttypes.h>

Go to the source code of this file.

Macros

#define PRI_I8   PRIi8
 
#define PRI_U8   PRIu8
 
#define PRI_BYTE   PRIu8
 
#define PRI_CHAR   "c"
 
#define PRI_F64   "lf"
 
#define FW_NUM_ARRAY_ELEMENTS(a)   (sizeof(a) / sizeof((a)[0]))
 number of elements in an array More...
 
#define FW_MAX(a, b)   (((a) > (b)) ? (a) : (b))
 MAX macro (deprecated in C++, use std::max) More...
 
#define FW_MIN(a, b)   (((a) < (b)) ? (a) : (b))
 MIN macro (deprecated in C++, use std::min) More...
 
#define FW_NO_ASSERT   (1)
 Asserts turned off. More...
 
#define FW_FILEID_ASSERT   (2)
 File ID used - requires -DASSERT_FILE_ID=somevalue to be set on the compile command line. More...
 
#define FW_FILENAME_ASSERT   (3)
 Uses the file path in the assert - image stores filenames. More...
 
#define FW_RELATIVE_PATH_ASSERT   (4)
 Requires -DASSERT_RELATIVE_PATH=path to be set on the compile command line. More...
 

Typedefs

typedef int8_t I8
 8-bit signed integer More...
 
typedef uint8_t U8
 8-bit unsigned integer More...
 
typedef U8 BYTE
 byte type More...
 
typedef char CHAR
 
typedef float F32
 32-bit floating point More...
 
typedef double F64
 64-bit floating point (double). Required for compiler-supplied double promotion. More...
 

Macro Definition Documentation

◆ FW_FILEID_ASSERT

#define FW_FILEID_ASSERT   (2)

File ID used - requires -DASSERT_FILE_ID=somevalue to be set on the compile command line.

Definition at line 97 of file BasicTypes.h.

◆ FW_FILENAME_ASSERT

#define FW_FILENAME_ASSERT   (3)

Uses the file path in the assert - image stores filenames.

Definition at line 99 of file BasicTypes.h.

◆ FW_MAX

#define FW_MAX (   a,
 
)    (((a) > (b)) ? (a) : (b))

MAX macro (deprecated in C++, use std::max)

Definition at line 93 of file BasicTypes.h.

◆ FW_MIN

#define FW_MIN (   a,
 
)    (((a) < (b)) ? (a) : (b))

MIN macro (deprecated in C++, use std::min)

Definition at line 94 of file BasicTypes.h.

◆ FW_NO_ASSERT

#define FW_NO_ASSERT   (1)

Asserts turned off.

Definition at line 96 of file BasicTypes.h.

◆ FW_NUM_ARRAY_ELEMENTS

#define FW_NUM_ARRAY_ELEMENTS (   a)    (sizeof(a) / sizeof((a)[0]))

number of elements in an array

Definition at line 90 of file BasicTypes.h.

◆ FW_RELATIVE_PATH_ASSERT

#define FW_RELATIVE_PATH_ASSERT   (4)

Requires -DASSERT_RELATIVE_PATH=path to be set on the compile command line.

Uses a relative file path (within fprime/fprime library) for assert.

Definition at line 100 of file BasicTypes.h.

◆ PRI_BYTE

#define PRI_BYTE   PRIu8

Definition at line 57 of file BasicTypes.h.

◆ PRI_CHAR

#define PRI_CHAR   "c"

Definition at line 60 of file BasicTypes.h.

◆ PRI_F64

#define PRI_F64   "lf"

Definition at line 84 of file BasicTypes.h.

◆ PRI_I8

#define PRI_I8   PRIi8

Definition at line 51 of file BasicTypes.h.

◆ PRI_U8

#define PRI_U8   PRIu8

Definition at line 54 of file BasicTypes.h.

Typedef Documentation

◆ BYTE

typedef U8 BYTE

byte type

Definition at line 56 of file BasicTypes.h.

◆ CHAR

typedef char CHAR

Definition at line 59 of file BasicTypes.h.

◆ F32

typedef float F32

32-bit floating point

Definition at line 83 of file BasicTypes.h.

◆ F64

typedef double F64

64-bit floating point (double). Required for compiler-supplied double promotion.

Definition at line 85 of file BasicTypes.h.

◆ I8

typedef int8_t I8

8-bit signed integer

Definition at line 50 of file BasicTypes.h.

◆ U8

typedef uint8_t U8

8-bit unsigned integer

Definition at line 53 of file BasicTypes.h.