public class OWPathElement
extends java.lang.Object
OWPathElement path_element;
// enumerature through the path elements
for (Enumeration path_enum = path.getAllOWPathElements();
path_enum.hasMoreElements(); )
{
// cast the enum as a OWPathElement
path_element = (OWPathElement)path_enum.nextElement();
// print info
System.out.println("Address: " + path_element.getContainer().getAddressAsString());
System.out.println("Channel number: " + path_element.getChannel());
}
OWPath
,
OneWireContainer
Constructor and Description |
---|
OWPathElement(OneWireContainer owcInstance,
int channelNumber)
Create a new 1-Wire path element.
|
Modifier and Type | Method and Description |
---|---|
int |
getChannel()
Get the channel number of this 1-Wire path element.
|
OneWireContainer |
getContainer()
Get the 1-Wire container for this 1-Wire path element.
|
public OWPathElement(OneWireContainer owcInstance, int channelNumber)
owcInstance
- device that is the path element. Must implement
SwitchContainer.channelNumber
- channel number of the 1-Wire pathpublic OneWireContainer getContainer()
OneWireContainer
public int getChannel()
Copyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.