Expand description
§serial-sensors-proto
A simple wire format for transmitting MEMS sensor data and friends.
The approach is threefold:
- The protocol is a little bit extensible in sensor and data types and supports 1-, 3- and 4-dimensional readings.
- Data packets are serialized using bincode first, then byte-stuffed using corncobs (i.e. using Consistent Overhead Byte Stuffing, COBS).
§Crate features
unsafe
- Enables representation of fundamental data types as slices.micromath
- Enables conversion to and frommicromath
vector types.quaternion
- Forwarded tomicromath
to enable quaternion support.defmt
- Enables deferred formatting support viadefmt
.
Modules§
Structs§
- Identifier
- Identification data as UTF-8 bytes.
- Linear
Ranges - Value interpretation information for linear value readings with uniform behavior across all axes.
- Scalar
Data - Scalar data.
- Sensor
Id - Identifies a sensor. See also
SensorIds
. - Sensor
Ids - Provides generic
SensorId
implementations. - Vector2
Data - A two-dimensional vector.
- Vector3
Data - A three-dimensional vector.
- Vector4
Data - A four-dimensional vector, Quaternion, etc.
- Versioned
Data Frame - A versioned data frame.
Enums§
- Component
Lookup Error - A component lookup error.
- Deserialization
Error - A deserialization error.
- Identifier
Code - Identifies the type of identifier.
- Sensor
Data - Data formats.
- Serialization
Error - A serialization error.
- Value
Type - Sensor type tags.
Traits§
- Compile
Time Type Information - Sensor type information.
- Data
Frame - Marker type for data frames.
- Protocol
Version - A protocol version.
- Runtime
Type Information - Sensor type information.
Functions§
- deserialize
- Deserializes data after applying byte un-stuffing.
- serialize
- Serializes data and applies byte stuffing.