J1939 Documentation
Version 4.16.00
|
Due to different implementations of data types in the world of C compilers, the following data types are used:
bool_t
: Boolean value, True or False uint8_t
: 1 Byte value, value range 0 .. 28 - 1 (0 .. 255) int8_t
: 1 Byte value, value range -27 .. 27 - 1 (-128 .. 127) uint16_t
: 2 Byte value, value range 0 .. 216 - 1 (0 .. 65535) int16_t
: 2 Byte value, value range -215 .. 215 - 1 uint32_t
: 4 Byte value, value range 0 .. 232 - 1 int32_t
: 4 Byte value, value range -231 .. 231 - 1 uint64_t
: 8 Byte value, value range 0 .. 264 - 1 int64_t
: 8 Byte value, value range -263 .. 263 - 1The compiler type/version is evaluated via its internal predefined symbols. If your compiler is not (yet) supported, you will get the following error message upon compilation:
Data types are not defined! Please check compiler definition.
For GNU C compiler the predefined symbols can be obtained by the following command:
The following C compilers are supported by this file:
Data Structures | |
union | Float_u |
Macros | |
#define | CPP_CONST const |
#define | CPP_DATA_SIZE 64 |
#define | CPP_INLINE __inline |
#define | CPP_PACK __attribute__((packed)) |
#define | CPP_PARM_UNUSED(x) UNUSED_ ## x __attribute__((unused)) |
#define | CPP_SECTION |
Typedefs | |
typedef int32_t | Status_tv |
#define CPP_CONST const |
The symbol CPP_CONST
defines the expression for keeping data in the flash area.
#define CPP_DATA_SIZE 64 |
The symbol CPP_DATA_SIZE
defines the largest supported data size (in bits) of the compiler. Typical values are 32 or 64. The data types uint64_t
and int64_t
are not supported if CPP_DATA_SIZE
is 32.
#define CPP_INLINE __inline |
The symbol CPP_INLINE
is used to declare a function as inline
.
#define CPP_PACK __attribute__((packed)) |
The symbol CPP_PACK
is used to pack data structures.
#define CPP_PARM_UNUSED | ( | x | ) | UNUSED_ ## x __attribute__((unused)) |
The macro CPP_PARM_UNUSED
is used to specify function parameters which are currently not used.
#define CPP_SECTION |
The macro CPP_SECTION
is used to specify the memory section for the linker.
typedef int32_t Status_tv |
Data type for status value.
The Status_tv typedef defines the data type for status values, typically used as return values. In order to keep the overhead small for different target platforms the data type can be adjusted.
Setting the symbol MC_COMPILER_EXT_H_ allows to include an external header file named "mc_compiler_ext.h".