跳转到主内容
Soon, @electron packages on npm will require Node.js 22 LTS. Read more on our blog.

USBDevice 对象

  • configuration Object (optional) - A USBConfiguration object containing information about the currently selected configuration of a USB device.
    • configurationValue Integer - the configuration value of this configuration.
    • configurationName string - the name provided by the device to describe this configuration.
    • interfaces Object[] - An array of USBInterface objects containing information about an interface provided by the USB device.
      • interfaceNumber Integer - the interface number of this interface.
      • alternate Object - the currently selected alternative configuration of this interface.
        • alternateSetting Integer - the alternate setting number of this interface.
        • interfaceClass Integer - the class of this interface. See USB.org for class code descriptions.
        • interfaceSubclass Integer - the subclass of this interface.
        • interfaceProtocol Integer - the protocol supported by this interface.
        • interfaceName string (optional) - the name of the interface, if one is provided by the device.
        • endpoints Object[] - an array containing instances of the USBEndpoint interface describing each of the endpoints that are part of this interface.
          • endpointNumber Integer - this endpoint's "endpoint number" which is a value from 1 to 15.
          • direction string - the direction in which this endpoint transfers data - can be either 'in' or 'out'.
          • type string - the type of this endpoint - can be either 'bulk', 'interrupt', or 'isochronous'.
          • packetSize Integer - the size of the packets that data sent through this endpoint will be divided into.
      • alternates Object[] - an array containing instances of the USBAlternateInterface interface describing each of the alternative configurations possible for this interface.
  • configurations Object[] - An array of USBConfiguration interfaces for controlling a paired USB device.
  • deviceClass Integer - 设备支持的通信接口的设备类.
  • deviceId string - 设备唯一标识符
  • deviceProtocol 整数 - 设备支持的通信接口的设备协议.
  • deviceSubclass Integer - 设备支持的通信接口的设备子类.
  • deviceVersionMajor Integer - 设备制造商定义的设备主版本
  • deviceVersionMinor Integer - 设备制造商定义的次要版本
  • deviceVersionSubminor Integer - 设备制造商定义的设备 subminor 版本
  • manufacturerName string(可选) - 设备的制造商名称。
  • productId Integer - USB 产品 ID
  • productName string(可选)- 设备名称。
  • serialNumber string (可选) - USB 设备序列号
  • usbVersionMajor Integer - The USB protocol major version supported by the device.
  • usbVersionMinor Integer - 设备支持的 USB 协议次要版本.
  • usbVersionSubminor Integer - The USB protocol subminor version supported by the device.
  • vendorId Integer - USB 供应商 ID

AltStyle によって変換されたページ (->オリジナル) /