buildRequest method
Build the request bytes to send to the device.
Implementation
@override
Uint8List buildRequest() {
// Format: [CommandId, DurationLow, DurationHigh, Type, Filter, Axes, DataFormat]
final buffer = ByteData(7);
buffer.setUint8(0, commandId);
buffer.setUint16(1, config.durationSeconds, Endian.little);
buffer.setUint8(3, config.measurementType.value);
buffer.setUint8(4, config.filterType.value);
buffer.setUint8(5, config.axesType.value);
buffer.setUint8(6, config.dataFormat.value);
return buffer.buffer.asUint8List();
}