dco_decode_device_peripheral_id method

  1. @protected
DevicePeripheralId dco_decode_device_peripheral_id(
  1. dynamic raw
)
override

Implementation

@protected
DevicePeripheralId dco_decode_device_peripheral_id(dynamic raw) {
  // Codec=Dco (DartCObject based), see doc to use other codecs
  final arr = raw as List<dynamic>;
  if (arr.length != 9)
    throw Exception('unexpected arr length: expect 9 but see ${arr.length}');
  return DevicePeripheralId(
    name: dco_decode_opt_String(arr[0]),
    isConnected: dco_decode_bool(arr[1]),
    address: dco_decode_String(arr[2]),
    txPowerLevel: dco_decode_opt_box_autoadd_i_16(arr[3]),
    rssi: dco_decode_opt_box_autoadd_i_16(arr[4]),
    manufacturerData: dco_decode_Map_u_16_list_prim_u_8_strict_None(arr[5]),
    serviceData: dco_decode_Map_Uuid_list_prim_u_8_strict_None(arr[6]),
    services: dco_decode_list_Uuid(arr[7]),
    peripheral:
        dco_decode_AutoExplicit_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerBPeripheral(
            arr[8]),
  );
}