F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
DefaultTypes.hpp
Go to the documentation of this file.
1 
8 #include <limits>
12 #ifndef PLATFORM_INT_TYPE_DEFINED
13 typedef int PlatformIntType;
16 #define PLATFORM_INT_TYPE_DEFINED
17 #define PRI_PlatformIntType "d"
18 #endif
19 
23 #ifndef PLATFORM_UINT_TYPE_DEFINED
24 typedef unsigned int PlatformUIntType;
27 #define PLATFORM_UINT_TYPE_DEFINED
28 #define PRI_PlatformUIntType "ud"
29 #endif
30 
34 #ifndef PLATFORM_INDEX_TYPE_DEFINED
38 #define PLATFORM_INDEX_TYPE_DEFINED
39 #define PRI_PlatformIndexType PRI_PlatformIntType
40 #endif
41 
45 #ifndef PLATFORM_SIZE_TYPE_DEFINED
49 #define PLATFORM_SIZE_TYPE_DEFINED
50 #define PRI_PlatformSizeType PRI_PlatformUIntType
51 #endif
52 
56 #ifndef PLATFORM_ASSERT_ARG_TYPE_DEFINED
60 #define PLATFORM_ASSERT_ARG_TYPE_DEFINED
61 #define PRI_PlatformAssertArgType PRI_PlatformIntType
62 #endif
63 
67 #ifndef PLATFORM_POINTER_CAST_TYPE_DEFINED
68 // Check for __SIZEOF_POINTER__ or cause error
69 #ifndef __SIZEOF_POINTER__
70 #error "Compiler does not support __SIZEOF_POINTER__, cannot use default for PlatformPointerCastType"
71 #endif
72 
73 // Pointer sizes are determined by size of compiler
74 #if __SIZEOF_POINTER__ == 8
75 typedef uint64_t PlatformPointerCastType;
78 #define PRI_PlatformPointerCastType PRIx64
79 #elif __SIZEOF_POINTER__ == 4
80 typedef uint32_t PlatformPointerCastType;
83 #define PRI_PlatformPointerCastType PRIx32
84 #elif __SIZEOF_POINTER__ == 2
85 typedef uint16_t PlatformPointerCastType;
88 #define PRI_PlatformPointerCastType PRIx16
89 #else
90 typedef uint8_t PlatformPointerCastType;
93 #define PRI_PlatformPointerCastType PRIx8
94 #endif
95 #define PLATFORM_POINTER_CAST_TYPE_DEFINED
96 #endif
const PlatformUIntType PlatformUIntType_MAX
uint8_t PlatformPointerCastType
const PlatformIndexType PlatformIndexType_MIN
const PlatformPointerCastType PlatformPointerCastType_MAX
PlatformIntType PlatformIndexType
const PlatformIntType PlatformIntType_MIN
unsigned int PlatformUIntType
const PlatformIntType PlatformIntType_MAX
const PlatformAssertArgType PlatformAssertArgType_MAX
const PlatformIndexType PlatformIndexType_MAX
const PlatformAssertArgType PlatformAssertArgType_MIN
int PlatformIntType
DefaultTypes.hpp provides fallback defaults for the platform types.
const PlatformSizeType PlatformSizeType_MAX
const PlatformUIntType PlatformUIntType_MIN
const PlatformPointerCastType PlatformPointerCastType_MIN
const PlatformSizeType PlatformSizeType_MIN
PlatformIntType PlatformAssertArgType
PlatformUIntType PlatformSizeType