com.dalsemi.onewire.utils
Class OWPath

java.lang.Object
  |
  +--com.dalsemi.onewire.utils.OWPath

public class OWPath
extends java.lang.Object

1-Wire Network path.

Version:
0.00, 12 September 2000

Constructor Summary
OWPath(DSPortAdapter adapter)
          Create a new empty path
OWPath(DSPortAdapter adapter, OWPath currentOWPath)
          Create a new path with a starting path
 
Method Summary
 void add(OneWireContainer owc, int channel)
          Add a path element
 void close()
          Close each element in the path in reverse order
 void copy(OWPath currentOWPath)
          Copy the provided path into this path
 boolean equals(OWPath compareOWPath)
          Compare this path with another path
 java.util.Enumeration getAllOWPathElements()
          Get an enumeration of all of the path elements
 void open()
          Open the path so that a remote device can be accessed
 java.lang.String toString()
          Get a string representation of this path
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OWPath

public OWPath(DSPortAdapter adapter)
Create a new empty path
Parameters:
adapter - where the path is based

OWPath

public OWPath(DSPortAdapter adapter,
              OWPath currentOWPath)
Create a new path with a starting path
Parameters:
adapter - where the path is based
currentPath - path to start this path on
Method Detail

copy

public void copy(OWPath currentOWPath)
Copy the provided path into this path
Parameters:
currentOWPath - path to copy from

add

public void add(OneWireContainer owc,
                int channel)
Add a path element
Parameters:
owc - device that has multiple channels
channel - of device that represents this path element

equals

public boolean equals(OWPath compareOWPath)
Compare this path with another path
Parameters:
compareOWPath - path to compare to
Returns:
true if the paths are the same

getAllOWPathElements

public java.util.Enumeration getAllOWPathElements()
Get an enumeration of all of the path elements
Returns:
enumeration of all of the path elements

toString

public java.lang.String toString()
Get a string representation of this path
Overrides:
toString in class java.lang.Object
Returns:
string equivalient to the path

open

public void open()
          throws OneWireException,
                 OneWireIOException
Open the path so that a remote device can be accessed
Throws:
OneWireIOException -  
OneWireException -  

close

public void close()
           throws OneWireException,
                  OneWireIOException
Close each element in the path in reverse order
Throws:
OneWireIOException -  
OneWireException -