bitmaskFromTransport function

int bitmaskFromTransport(
  1. ComputerTransport transport
)

Implementation

int bitmaskFromTransport(ComputerTransport transport) {
  switch (transport) {
    case ComputerTransport.serial:
      return 1 << 0;
    case ComputerTransport.usb:
      return 1 << 1;
    case ComputerTransport.usbhid:
      return 1 << 2;
    case ComputerTransport.irda:
      return 1 << 3;
    case ComputerTransport.bluetooth:
      return 1 << 4;
    case ComputerTransport.ble:
      return 1 << 5;
    default:
      throw ArgumentError('Unknown transport: $transport');
  }
}