BSGET, BSGETOCT – Binary Structure - Get a single value of given type

Block SymbolsLicensing group: ADVANCED
Qt SVG Document Exported by REXYGEN Studio uVec uOffset yVec yOffset y BSGET Qt SVG Document Exported by REXYGEN Studio uVec uOffset yVec yOffset y1 y2 y3 y4 y5 y6 y7 y8 BSGETOCT

Function Description
This group of blocks is used for obtaining values from a binary structure (byte array). The BSSET and BSSETOCT blocks can be used to write to the binary structure.
If binary structures are received using communication, it is possible to process them directly in the block mediating communication. Typically this is a REXLANG or PYTHON programmable block. Using structures, however, it is possible to transfer data within the REXYGEN application as well. The binary structure is fed in the form of an array (vector) of bytes to the uVec input. The uOffset input specifies the offset (in bytes) of the desired value from the beginning of the structure. The value type is specified by the type parameter.
The yOffset output is the start of the next element in the structure. This is advantageous for chaining: if the structure contains several elements in a row, it is possible to connect the input uOffset to the output yOffset of the previous block and it is not necessary to calculate the offset.
The only difference between the blocks is that BSGET gets a single value. The BSGETOCT block is able to receive up to 8 values (the number is determined by the m parameter).

This block does not propagate the signal quality. More information can be found in the 1.4 section.

Input

uVec

Input reference to a binary structure

Reference

uOffset

Offset to start in the input Binary Structure (in bytes)

Long (I32)

Parameter

BE

Big-Endian byte order (default is Little-Endian, e.g. Intel)

Bool

m

Number of active items   1  8 8

Long (I32)

type1..type8

Data type of item   2  10 2

Long (I32)

Output

yVec

Output reference to a binary structure

Reference

yOffset

Offset after the last processed byte of the input Binary Structure (in bytes), for easy chaining

Long (I32)

y1..y8

Scalar value output (scalar type defined by parameter)

Double (F64)

2024 © REX Controls s.r.o., www.rexygen.com