pub struct TypeInfo {
pub kind: TypeInfoKind,
pub coding: StringCoding,
pub has_variable_info: bool,
pub has_trace_info: bool,
}
Expand description
The Type Info contains meta data about the data payload.
TypeInfo
is a 32 bit field. It is encoded the following way:
* Bit 0-3 Type Length (TYLE)
* Bit 4 Type Bool (BOOL)
* Bit 5 Type Signed (SINT)
* Bit 6 Type Unsigned (UINT)
* Bit 7 Type Float (FLOA)
* Bit 8 Type Array (ARAY)
* Bit 9 Type String (STRG)
* Bit 10 Type Raw (RAWD)
* Bit 11 Variable Info (VARI)
* Bit 12 Fixed Point (FIXP)
* Bit 13 Trace Info (TRAI)
* Bit 14 Type Struct (STRU)
* Bit 15–17 String Coding (SCOD)
* Bit 18–31 reserved for future use
Bit Variable Info (VARI)
If Variable Info (VARI) is set, the name and the unit of a variable can be added. Both always contain a length information field and a field with the text (of name or unit). The length field contains the number of characters of the associated name or unit filed. The unit information is to add only in some data types.
Fields§
§kind: TypeInfoKind
§coding: StringCoding
§has_variable_info: bool
§has_trace_info: bool
Implementations§
Trait Implementations§
source§impl PartialEq<TypeInfo> for TypeInfo
impl PartialEq<TypeInfo> for TypeInfo
source§impl TryFrom<u32> for TypeInfo
impl TryFrom<u32> for TypeInfo
Bit Representation 0b0011_1111_1111_1111_1111 string coding …………………..^^_^||| |||| |||| |||| type struct ………………………..^|| |||| |||| |||| trace info ………………………….^| |||| |||| |||| fixed point ………………………….^ |||| |||| |||| variable info…………………………..^||| |||| |||| type raw ……………………………….^|| |||| |||| type string ……………………………..^| |||| |||| type array ……………………………….^ |||| |||| type float …………………………………^||| |||| type unsigned ……………………………….^|| |||| type signed ………………………………….^| |||| type bool …………………………………….^ |||| type length …………………………………….^^^^