com.esf.device.usb.manager.usb2serial.service
Interface IUsb2SerialManagerService


public interface IUsb2SerialManagerService

The USB to Serial Service provides tools for management of USB-to-Serial devices.


Field Summary
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
static java.lang.String USB2SERIAL_ATTACHED_TOPIC
           
static java.lang.String USB2SERIAL_DETACHED_TOPIC
           
static java.lang.String USB2SERIAL_PROPERTY_USB_PORT_ADDRESS
           
static java.lang.String USB2SERIAL_PROPERTY_USB_SERIAL_PORT
           
 
Method Summary
 boolean areDevicesPresent()
          This method returns whether or not there are any devices currently attached.
 java.lang.String[] getDeviceUsbPorts()
          Returns an array of Strings that represent the USB port names of the connected devices
 java.lang.String getSerialPort(java.lang.String usbPortNumber)
          This method returns the serial port that has been assigned to the USB-to-Serial device attached to a specified USB port.
 void registerListener(Usb2SerialListener listener)
          This method registers an USB-To-Serial Listener to be notified when a device has been attached or detached
 void unregisterListener(Usb2SerialListener listener)
          This method unregisters an USB-To-Serial Listener
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.


USB2SERIAL_ATTACHED_TOPIC

public static final java.lang.String USB2SERIAL_ATTACHED_TOPIC
See Also:
Constant Field Values

USB2SERIAL_DETACHED_TOPIC

public static final java.lang.String USB2SERIAL_DETACHED_TOPIC
See Also:
Constant Field Values

USB2SERIAL_PROPERTY_USB_PORT_ADDRESS

public static final java.lang.String USB2SERIAL_PROPERTY_USB_PORT_ADDRESS
See Also:
Constant Field Values

USB2SERIAL_PROPERTY_USB_SERIAL_PORT

public static final java.lang.String USB2SERIAL_PROPERTY_USB_SERIAL_PORT
See Also:
Constant Field Values
Method Detail

areDevicesPresent

public boolean areDevicesPresent()
This method returns whether or not there are any devices currently attached.

Returns:
True if there are any devices attached, false otherwise.

getDeviceUsbPorts

public java.lang.String[] getDeviceUsbPorts()
Returns an array of Strings that represent the USB port names of the connected devices

Returns:
An array of Strings that represent the USB port names of the connected devices

getSerialPort

public java.lang.String getSerialPort(java.lang.String usbPortNumber)
This method returns the serial port that has been assigned to the USB-to-Serial device attached to a specified USB port.

Parameters:
usbPortNumber - A String representing the USB port that the device is plugged into.
Returns:
A String representing the serial port that has been assigned to the device. Null if no device is connected to the specified USB port.

registerListener

public void registerListener(Usb2SerialListener listener)
This method registers an USB-To-Serial Listener to be notified when a device has been attached or detached

Parameters:
listener - A class implementing the Usb2SerialListener interface

unregisterListener

public void unregisterListener(Usb2SerialListener listener)
This method unregisters an USB-To-Serial Listener

Parameters:
listener - A class implementing the Usb2SerialListener interface


Copyright © 2009 Eurotech Inc. All rights reserved.