public class NetworkDeviceMonitor extends AbstractDeviceMonitor
Constructor and Description |
---|
NetworkDeviceMonitor(DSPortAdapter adapter)
Create a complex monitor that does search branches
|
Modifier and Type | Method and Description |
---|---|
void |
addBranch(OWPath path)
Adds a branch for searching.
|
void |
cleanUpStalePathReferences()
The device monitor will internally cache OWPath objects for each
1-Wire device.
|
boolean |
getBranchAutoSearching()
Indicates whether or not branches are automatically traversed.
|
OWPath |
getDevicePath(java.lang.Long address)
Returns the OWPath of the device with the given address.
|
void |
search(java.util.Vector arrivals,
java.util.Vector departures)
Performs a search of the 1-Wire network, with branch searching
|
void |
setAdapter(DSPortAdapter adapter)
Sets this monitor to search a new DSPortAdapter
|
void |
setBranchAutoSearching(boolean enabled)
Indicates whether or not branches are automatically traversed.
|
addDeviceMonitorEventListener, cleanUpStaleContainerReferences, getAdapter, getAllAddresses, getDeviceContainer, getDeviceContainer, getDeviceContainer, getDeviceContainer, getDevicePath, getDevicePath, getDevicePath, getMaxErrorCount, getMaxStateCount, isMonitorRunning, killMonitor, pauseMonitor, putDeviceContainer, putDeviceContainer, putDeviceContainer, putDeviceContainer, resetSearch, resumeMonitor, run, setMaxErrorCount, setMaxStateCount
public NetworkDeviceMonitor(DSPortAdapter adapter)
the
- DSPortAdapter this monitor should searchpublic void setAdapter(DSPortAdapter adapter)
setAdapter
in class AbstractDeviceMonitor
the
- DSPortAdapter this monitor should searchpublic void setBranchAutoSearching(boolean enabled)
enabled
- if true, all branches are automatically traversed during a
search operation.public boolean getBranchAutoSearching()
public void addBranch(OWPath path)
path
- A branch to be searched during the next search routinepublic OWPath getDevicePath(java.lang.Long address)
getDevicePath
in class AbstractDeviceMonitor
address
- a Long object representing the address of the devicepublic void cleanUpStalePathReferences()
cleanUpStalePathReferences
in class AbstractDeviceMonitor
public void search(java.util.Vector arrivals, java.util.Vector departures) throws OneWireException, OneWireIOException
search
in class AbstractDeviceMonitor
arrivals
- A vector of Long objects, represent new arrival addresses.departures
- A vector of Long objects, represent departed addresses.OneWireException
OneWireIOException
Copyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.