com.dalsemi.onewire
Class OneWireAccessProvider

java.lang.Object
  |
  +--com.dalsemi.onewire.OneWireAccessProvider

public class OneWireAccessProvider
extends java.lang.Object

The OneWireAccessProvider class chiefly manages the Dallas Semiconductor adapter class derivatives of DSPortAdapter. An enumeration of all available adapters will be accessed through the member function EnumerateAllAdapters. By writing software which cycles through this enumeration instead of using specific adapter classes, developers can provide code which will automatically use new adapters which have not yet been invented.

Version:
0.00, 30 August 2000

Method Summary
static java.util.Enumeration enumerateAllAdapters()
          EnumerateAllAdapters returns an Enumeration of all software port adapters.
static DSPortAdapter getAdapter(java.lang.String adapterName, java.lang.String portName)
          Attempts to find, open, and verify the specified adapter on the indicated port.
static DSPortAdapter getDefaultAdapter()
          Attempts to find, open, and verify the default adapter and port.
static java.lang.String getProperty(java.lang.String propName)
          Attempts to find a onewire property.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

enumerateAllAdapters

public static java.util.Enumeration enumerateAllAdapters()
EnumerateAllAdapters returns an Enumeration of all software port adapters. Programmers who wish to look for iButtons on all available ports should cycle through all the DSPortAdapter objects returned by this method.
Returns:
Enumeration of all adapters in the system.

getAdapter

public static DSPortAdapter getAdapter(java.lang.String adapterName,
                                       java.lang.String portName)
                                throws OneWireIOException,
                                       OneWireException
Attempts to find, open, and verify the specified adapter on the indicated port.
Parameters:
adapterName, - string name of the adapter (match to result of call to getAdapterName() method in DSPortAdapter)
portName, - string name of the port used in the method selectPort() in DSPortAdapter
Returns:
DSPortAdapter if adapter present
Throws:
OneWireIOException -  
OneWireException - WHEN port or adapter not present

getDefaultAdapter

public static DSPortAdapter getDefaultAdapter()
                                       throws OneWireIOException,
                                              OneWireException
Attempts to find, open, and verify the default adapter and port. Look for the default adapter/port in the following locations:

Returns:
DSPortAdapter if default adapter present
Throws:
OneWireIOException -  
OneWireException - WHEN port or adapter not present

getProperty

public static java.lang.String getProperty(java.lang.String propName)
Attempts to find a onewire property. Look for the property in the following locations:

Parameters:
propName, - string name of the property to read
Returns:
String representing the property value or 'null' if it could not be found.