Base types

Types are used throughout the communication database. They convey how the data can be serialized to binary data and how that binary can be parsed back to its original value. They also define the size of the data in the binary format.

The database allows to define complex combined and nested types, but they must all define a base typ. These are the base type and their attributes currently supported:

Name

Binary Size [Byte]

Min Value

Max Value

C Type

Python Type

Description

int8

1

-128

127

int8_t

int

This is the mapping of the C type for small numbers.

uint8

1

0

255

uint8_t

int

This is the mapping of the C type for small unsigned numbers.

bool

1

bool

bool

This is a type, that has only two values: True and False.

int16

2

-32768

32767

int16_t

int

This is the mapping of the C type for small numbers.

uint16

2

0

65535

uint16_t

int

This is the mapping of the C type for small unsigned numbers.

int32

4

-2147483648

2147483647

int32_t

int

This is the mapping of the C type for numbers.

uint32

4

0

4294967295

uint32_t

int

This is the mapping of the C type for unsigned numbers.

int64

8

-9223372036854775808

9223372036854775807

int64_t

int

This is the mapping of the C type for large numbers.

uint64

8

0

18446744073709551615

uint64_t

int

This is the mapping of the C type for large unsigned numbers.

float

4

-3.4e+38

3.4e+38

float

float

A type for small floating point values. WARNING: This type does not have a standard size in C. If the size is not 4 bytes for a platform, the generated code will not compile.

double

8

-1.7e+308

1.7e+308

double

float

A type for larger floating point values with higher precision. WARNING: This type does not have a standard size in C. If the size is not 8 bytes for a platform, the generated code will not compile.

char

1

char

bytes

This type represents a character. It is usually used as an array to represent a string.

bytes

1

uint8_t

bytes

This type is similar to the char type, but it is used to represent a byte.