This decoding profile is meant as a general starting point for profiles.
It decodes the buffer according to a custom byteMask, and transforms the
data to integer values.
The byteMask defines the amount of bytes to consume for each measurement.
It is applied to the sensors in the order they are defined.
- License:
- MIT
- Source:
Methods
(inner) createBufferTransformer(box) → {Array}
returns a bufferTransfomer for transformation of a buffer to measurements.
Parameters:
Name | Type | Description |
---|---|---|
box |
Box | The box to retrieve byteMask and sensorIds from |
- Source:
- See:
Returns:
A bufferTransformer for the box
- Type
- Array
Example
ttn: {
profile: 'debug',
// use first 3 bytes for first sensor, 4th byte for second, next two bytes for third sensor
decodeOptions: [3, 1, 2]
}