Supported Data Types (DATAFLOW Designer)
This Reference Article has been written for Version 2.1 of the DATAFLOW Software. For Previous Releases use the version selection in the navigation bar at the top of this page.
DATAFLOW Designer Data Types
The DATAFLOW Designer offers the following Data Types:
Venn-Diagram - DATAFLOW Designer Data Types
Built in / Native Data Types
The DATAFLOW Software provides built in or native data types. This data types can be applied as base types and field types in user data types.
Built in or native types will be mapped to the types provided by the target language (e.g. C++). These types include signed and unsigned integers (1, 2, 3, 4 and 8 bytes) as well as floating point numbers (4 and 8 byte). In addition, a boolean and character (1 byte) data type is also included.
Arrays
All data types can also be used as arrays. Arrays can have any number of dimensions and each dimension can be configured individually. This allows to define vectors (1D), matrices (2D) and any other array type of any size.
Custom Data Types
Custom Data Types are defined by the user. They include:
- Enumerations
- Custom Types
- Structs
- Signals
- Protocols
- Buffers
Enumerations
An Enumeration can be used to define a numeric value that can only have a defined set of distinct values. These values are called enumerators. The Enumeration is represented as an integer number in the program code. The number of bytes can be selected by the user but must be large enough to represent all defined enumerator values. Values can also be negative if a signed base type is selected.
Note: Enumerations can have any integer (signed and unsigned) as base type. Floats, bools and chars are not allowed.
Custom Types
A custom type is a base type with a defined measurement unit and range. This allows the user to define strong types for temperature, pressure, etc. A custom type can also be used to define a fixed point decimal value.
Note: Custom Types can have any integer (signed and unsigned) and floating point type as base type. Bools and chars are not allowed.
Structs
Structs are composed types. A struct consists of one or more fields. A field can have any data type, even another struct. This allows to build nested data types to hold the data of your applications. Structs can be used directly in code (for example for Custom Data Types persistence inside an Active Part) or as fields in protocols.
Note:
Structs can not have fields of any protocol type (see below).
A struct can use the following data types as fields:
- Build in Types
- Enumerations
- Custom Types
- Structs
- Arrays (any type above)
Signal
A signal is a special data type that contains no data. Instead, it only defines an identifier that is sent from one active part to another. This can be used to signal events that do not require additional data.
Note:
When a field is added to a signal, it is automatically converted to a protocol (see below).
Note:
Signals can not be used as field type because they contain no data.
Such a field will result in a validation error when the model is generated.
Protocols
A protocol is a composed data type similar to the struct defined above. In addition, a protocol contains an unique protocol identifier. This is used to send a message from one active part to another using the dataflow runtime. If the data type is not meant to be sent as message, consider using a struct instead.
Note: When all fields are removed from a protocol, it is automatically converted to a signal.
Note: A protocol can use the following data types as fields:
- Build in Types
- Enumerations
- Custom Types
- Structs
- Protocols
- Arrays (any type above)
Buffers
Buffers are user defined data types that define an array of any other data type (native, enumeration, struct, protocol, custom type). The size and buffer type (LIFO/FIFO) can be configured. Buffers are used for direct transfer of data between active parts without using the DATAFLOW event system.
Required Module: DATAFLOW Designer
This Article has been written based on V2.1.1 of the DATAFLOW software.
Latest update 2023-06-01 by WUM.
Comments
0 comments
Please sign in to leave a comment.