open_earable_protocols 0.0.2 copy "open_earable_protocols: ^0.0.2" to clipboard
open_earable_protocols: ^0.0.2 copied to clipboard

Generated binary protocol bindings for OpenEarable devices.

OpenEarable Protocols #

Generated Dart and Flutter-compatible binary protocol bindings for OpenEarable devices.

Usage #

Import the package library:

import 'package:open_earable_protocols/open_earable_protocols.dart';

Protocol classes encode values with toBytes() and decode complete binary messages with their fromBytes() factory. Decoding malformed data throws ProtocolFormatException.

final chunk = AudioResponseTransferChunk(
  transfer_id: 1,
  sample_offset: 0,
  sample_count: 4,
  samples: [0, 1000, 0, -1000],
);
final encoded = chunk.toBytes();
final decoded = AudioResponseTransferChunk.fromBytes(encoded);

The bindings are generated from the schemas in the OpenEarable protocol repository. Do not edit files below lib by hand.

0
likes
150
points
57
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Generated binary protocol bindings for OpenEarable devices.

Repository (GitHub)
View/report issues

Topics

#bluetooth #binary-protocol #openearable

License

MIT (license)

More

Packages that depend on open_earable_protocols