org.minetti.astrodevice.server.usb.jni.impl
Class UsbDeviceTreeBuilderImpl

java.lang.Object
  extended by org.minetti.astrodevice.server.usb.jni.impl.UsbDeviceTreeBuilderImpl
All Implemented Interfaces:
UsbDeviceTreeBuilder

public final class UsbDeviceTreeBuilderImpl
extends Object
implements UsbDeviceTreeBuilder

Builder of device tree.

Author:
Jean-Philippe MINETTI

Constructor Summary
UsbDeviceTreeBuilderImpl(org.minetti.astrodevice.common.device.DeviceNode rootNode)
          Constructor.
 
Method Summary
 void add(int vendorId, int productId, String manufacturerName, String productDescription, int productVersion, String serialNumber, short deviceClass, short deviceSubClass, short deviceProtocol)
          Adds a new device in the tree.
 void addHostController(String description)
          Adds a new USB host controller.
 void addHub(int vendorId, int productId, String manufacturerName, String productDescription, int productVersion, String serialNumber, short deviceClass, short deviceSubClass, short deviceProtocol)
          Adds a new hub in the tree.
 void addRootHub()
          Adds a new root hub in the tree.
 void down()
          Downs from the device tree.
 void up()
          Ups from the device tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsbDeviceTreeBuilderImpl

public UsbDeviceTreeBuilderImpl(org.minetti.astrodevice.common.device.DeviceNode rootNode)
Constructor.

Parameters:
rootNode - Root node.
Method Detail

down

public void down()
Description copied from interface: UsbDeviceTreeBuilder
Downs from the device tree.

Specified by:
down in interface UsbDeviceTreeBuilder

up

public void up()
Description copied from interface: UsbDeviceTreeBuilder
Ups from the device tree.

Specified by:
up in interface UsbDeviceTreeBuilder

addHostController

public void addHostController(String description)
Description copied from interface: UsbDeviceTreeBuilder
Adds a new USB host controller.

Specified by:
addHostController in interface UsbDeviceTreeBuilder
Parameters:
description - Description of USB host controller.

addRootHub

public void addRootHub()
Description copied from interface: UsbDeviceTreeBuilder
Adds a new root hub in the tree.

Specified by:
addRootHub in interface UsbDeviceTreeBuilder

addHub

public void addHub(int vendorId,
                   int productId,
                   String manufacturerName,
                   String productDescription,
                   int productVersion,
                   String serialNumber,
                   short deviceClass,
                   short deviceSubClass,
                   short deviceProtocol)
Description copied from interface: UsbDeviceTreeBuilder
Adds a new hub in the tree.

Specified by:
addHub in interface UsbDeviceTreeBuilder
Parameters:
vendorId - Vendor ID of USB hub (must be between 0 and 65535). This corresponds to idVendor field of USB specification (assigned by the USB-IF).
productId - Product ID of USB hub (must be between 0 and 65535). This corresponds to idProduct field of USB specification (assigned by the manufacturer).
manufacturerName - Manufacturer name of USB hub (must be less or equal than 127 characters). This corresponds to string indexed by the iManufacturer field of USB specification.
productDescription - Product description of USB hub (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 hub (must be between 0 and 65535). This corresponds to bcdDevice field of USB specification (assigned by the manufacturer).
serialNumber - Serial number of USB hub (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 hub (must be between 0 and 255). This corresponds to bDeviceClass field of USB specification (assigned by the USB-IF).
deviceSubClass - Subclass code of USB hub (must be between 0 and 255). This corresponds to bDeviceSubClass field of USB specification (assigned by the USB-IF).
deviceProtocol - Protocol code of USB hub (must be between 0 and 255). This corresponds to bDeviceProtocol field of USB specification (assigned by the USB-IF).

add

public void add(int vendorId,
                int productId,
                String manufacturerName,
                String productDescription,
                int productVersion,
                String serialNumber,
                short deviceClass,
                short deviceSubClass,
                short deviceProtocol)
Description copied from interface: UsbDeviceTreeBuilder
Adds a new device in the tree.

Specified by:
add in interface UsbDeviceTreeBuilder
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.
productDescription - Product description 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).


Copyright © 2012 astroDevice. All Rights Reserved.