ConfigDescriptor constructor

ConfigDescriptor({
  1. required bool active,
  2. required int configurationValue,
  3. String? description,
  4. required bool selfPowered,
  5. required bool remoteWakeup,
  6. required int maxPower,
  7. required List<InterfaceDescriptor> interfaces,
  8. required ByteBuffer extraData,
})

Implementation

ConfigDescriptor({
  /// Is this the active configuration?
  required bool active,

  /// The configuration number.
  required int configurationValue,

  /// Description of the configuration.
  String? description,

  /// The device is self-powered.
  required bool selfPowered,

  /// The device supports remote wakeup.
  required bool remoteWakeup,

  /// The maximum power needed by this device in milliamps (mA).
  required int maxPower,

  /// Available interfaces.
  required List<InterfaceDescriptor> interfaces,

  /// Extra descriptor data associated with this configuration.
  required ByteBuffer extraData,
}) : _wrapped = $js.ConfigDescriptor(
        active: active,
        configurationValue: configurationValue,
        description: description,
        selfPowered: selfPowered,
        remoteWakeup: remoteWakeup,
        maxPower: maxPower,
        interfaces: interfaces.toJSArray((e) => e.toJS),
        extra_data: extraData.toJS,
      );