send method

  1. @override
void send({
  1. String? deviceId,
  2. int? timestamp,
})
override

Send the message bytes to all connected devices

Implementation

@override
void send({String? deviceId, int? timestamp}) {
  data = Uint8List(1);
  switch (type) {
    case ClockType.beat:
      data[0] = 0xF8;
      break;
    case ClockType.start:
      data[0] = 0xFA;
      break;
    case ClockType.cont:
      data[0] = 0xFB;
      break;
    case ClockType.stop:
      data[0] = 0xFC;
      break;
  }
  super.send(deviceId: deviceId, timestamp: timestamp);
}