org.minetti.astrodevice.server.usb.object
Class UsbDeviceSignature

java.lang.Object
  extended by org.minetti.astrodevice.server.plugin.device.BaseDeviceSignature
      extended by org.minetti.astrodevice.server.usb.object.UsbDeviceSignature
All Implemented Interfaces:
Serializable, org.minetti.astrodevice.common.device.DeviceSignature

public final class UsbDeviceSignature
extends org.minetti.astrodevice.server.plugin.device.BaseDeviceSignature
implements Serializable

Signature used for recognize the USB devices.

It is composed of:

Author:
Jean-Philippe MINETTI
See Also:
Serialized Form

Field Summary
static String DEVICE_CLASS_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Class code of USB device.
static String DEVICE_PROTOCOL_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Protocol code of USB device.
static String DEVICE_SUB_CLASS_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Subclass code of USB device.
static String MANUFACTURER_NAME_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Manufacturer name of USB device.
static String PRODUCT_ID_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Product ID of USB device.
static String PRODUCT_NAME_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Product name of USB device.
static String PRODUCT_VERSION_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Product version of USB device.
static String SERIAL_NUMBER_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Serial number of USB device.
static String VENDOR_ID_MAP_KEY
          DESCRIPTION MAP KEY CONSTANT: Vendor ID of USB device.
 
Constructor Summary
UsbDeviceSignature(int vendorId, int productId, String manufacturerName, String productName, int productVersion, String serialNumber, short deviceClass, short deviceSubClass, short deviceProtocol)
          Constructor.
 
Method Summary
 String getBus()
           
 String getProductDescription()
           
 String getProductId()
           
 String getProductVersion()
           
 Map<String,Object> getProperties()
           
 String getSerialNumber()
           
 
Methods inherited from class org.minetti.astrodevice.server.plugin.device.BaseDeviceSignature
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VENDOR_ID_MAP_KEY

public static final String VENDOR_ID_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Vendor ID of USB device.

This corresponds to idVendor field of USB specification (assigned by the USB-IF).

Vendor ID must be between 0 and 65535 (0xFFFF).

See Also:
Constant Field Values

PRODUCT_ID_MAP_KEY

public static final String PRODUCT_ID_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Product ID of USB device.

This corresponds to idProduct field of USB specification (assigned by the manufacturer).

Product ID must be between 0 and 65535 (0xFFFF).

See Also:
Constant Field Values

MANUFACTURER_NAME_MAP_KEY

public static final String MANUFACTURER_NAME_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Manufacturer name of USB device.

This corresponds to string indexed by the iManufacturer field of USB specification.

Manufacturer name must be less or equal than 127 characters.

See Also:
Constant Field Values

PRODUCT_NAME_MAP_KEY

public static final String PRODUCT_NAME_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Product name of USB device.

This corresponds to string indexed by the iProduct field of USB specification.

Product description must be less or equal than 127 characters.

See Also:
Constant Field Values

PRODUCT_VERSION_MAP_KEY

public static final String PRODUCT_VERSION_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Product version of USB device.

This corresponds to bcdDevice field of USB specification.

Product version must be between 0 and 65535 (0xFFFF).

See Also:
Constant Field Values

SERIAL_NUMBER_MAP_KEY

public static final String SERIAL_NUMBER_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Serial number of USB device.

This corresponds to string indexed by the iSerialNumber field of USB specification.

Product description must be less or equal than 127 characters.

See Also:
Constant Field Values

DEVICE_CLASS_MAP_KEY

public static final String DEVICE_CLASS_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Class code of USB device.

This corresponds to bDeviceClass field of USB specification (assigned by the USB-IF).

Class code must be between 0 and 255 (0xFF).

See Also:
Constant Field Values

DEVICE_SUB_CLASS_MAP_KEY

public static final String DEVICE_SUB_CLASS_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Subclass code of USB device.

This corresponds to bDeviceSubClass field of USB specification (assigned by the USB-IF).

Class code must be between 0 and 255 (0xFF).

See Also:
Constant Field Values

DEVICE_PROTOCOL_MAP_KEY

public static final String DEVICE_PROTOCOL_MAP_KEY
DESCRIPTION MAP KEY CONSTANT: Protocol code of USB device.

This corresponds to bDeviceProtocol field of USB specification (assigned by the USB-IF).

Class code must be between 0 and 255 (0xFF).

See Also:
Constant Field Values
Constructor Detail

UsbDeviceSignature

public UsbDeviceSignature(int vendorId,
                          int productId,
                          String manufacturerName,
                          String productName,
                          int productVersion,
                          String serialNumber,
                          short deviceClass,
                          short deviceSubClass,
                          short deviceProtocol)
Constructor.

Parameters:
vendorId - Vendor ID of USB device (must be between 0 and 65535). This corresponds to idVendor field of USB specification (assigned by the USB-IF).
productId - Product ID of USB device (must be between 0 and 65535). This corresponds to idProduct field of USB specification (assigned by the manufacturer).
manufacturerName - Manufacturer name of USB device (must be less or equal than 127 characters). This corresponds to string indexed by the iManufacturer field of USB specification.
productName - Product name of USB device (must be less or equal than 127 characters). This corresponds to string indexed by the iProduct field of USB specification.
productVersion - Product version of USB device (must be between 0 and 65535). This corresponds to bcdDevice field of USB specification (assigned by the manufacturer).
serialNumber - Serial number of USB device (must be less or equal than 127 characters). This corresponds to string indexed by the iSerialNumber field of USB specification.
deviceClass - Class code of USB device (must be between 0 and 255). This corresponds to bDeviceClass field of USB specification (assigned by the USB-IF).
deviceSubClass - Subclass code of USB device (must be between 0 and 255). This corresponds to bDeviceSubClass field of USB specification (assigned by the USB-IF).
deviceProtocol - Protocol code of USB device (must be between 0 and 255). This corresponds to bDeviceProtocol field of USB specification (assigned by the USB-IF).
Method Detail

getBus

public String getBus()
Specified by:
getBus in interface org.minetti.astrodevice.common.device.DeviceSignature

getProductId

public String getProductId()
Specified by:
getProductId in interface org.minetti.astrodevice.common.device.DeviceSignature

getProductDescription

public String getProductDescription()
Specified by:
getProductDescription in interface org.minetti.astrodevice.common.device.DeviceSignature

getProductVersion

public String getProductVersion()
Specified by:
getProductVersion in interface org.minetti.astrodevice.common.device.DeviceSignature

getSerialNumber

public String getSerialNumber()
Specified by:
getSerialNumber in interface org.minetti.astrodevice.common.device.DeviceSignature

getProperties

public Map<String,Object> getProperties()
Specified by:
getProperties in interface org.minetti.astrodevice.common.device.DeviceSignature


Copyright © 2012 astroDevice. All Rights Reserved.