5.1 Data Stream Protocol
The data stream module takes an incoming raw data stream and splits it into multiple data streams. The data stream format is specified by a configuration file provided by the user.
Configuration Format
The configuration file is a comma-delimited text file that specifies one data variable per line. Each line starts by specifying the data format of the variable by one of the tags presented in the table below. The position of the variable in the output grid is then given by two coordinates starting at index 1. The final parameter assigns a text string to the variable.
Type | Size | Tag | Example |
---|---|---|---|
Unsigned byte | 1 | B | B,1,1,Light |
Signed byte | 1 | -B | -B,1,1,Encoder |
Unsigned short | 2 | D | D,1,1,ADC |
Signed short | 2 | -D | -D,1,1,ADC |
Unsigned word | 4 | W | W,1,1,Transfer rate |
Signed word | 4 | -W | -W,1,1,Status code |
Floating point | 4 | F | F,1,1,Temperature |
Double-precision floating point | 8 | DF | DF,1,1,Measurement |
Grid of unsigned bytes | 1 * W * D | GB<WxD> | GB<10x10>,1,1,Surface |
Grid of signed bytes | 1 * W * D | -GB<WxD> | -GB<10x10>,1,1,Surface |
Grid of unsigned short | 2 * W * D | GD<WxD> | GD<10x10>,1,1,Surface |
Grid of signed short | 2 * W * D | -GD<WxD> | -GD<10x10>,1,1,Surface |
Grid of unsigned word | 4 * W * D | GW<WxD> | GW<10x10>,1,1,Surface |
Grid of signed word | 4 * W * D | -GW<WxD> | -GW<10x10>,1,1,Surface |
Grid of floating point | 8 * W * D | GF<WxD> | GF<10x10>,1,1,Surface |
Grid of double-precision floating point | 8 * W * D | GDF<WxD> | GDF<10x10>,1,1,Surface |
This is an example configuration:
D,1,1,ADC0 D,1,2,ADC1 D,1,3,ADC2 B,2,1,Prescaler
Stream Format
The data stream is processed in the same order as the configuration file specifies. All data must be given as little endian values, meaning that the lowest byte must be sent first. Additionally, a wrapper consisting of one byte before and one byte after the data stream variables must be added. This wrapper is used by the interpreter to synchronize to the data stream. The start byte can be of an arbitrary value except 0x5F, which is reserved for Auto-Configuration, but the end byte must be the inverse of the Start byte. For more information on the Auto-Configuration feature see Auto-Configuration and Auto-Configuration Example. The configuration file shall not define the start and end bytes.
Basic Usage
- Press the Open file button (3)
- Select the configuration file
- Click the Load configuration button (4)
- Connect the input sink (5)
- Connect one or more output source to a desired sink (1)