public class DeviceMonitor extends AbstractDeviceMonitor
Class DeviceMonitor represents the monitor that searches the 1-Wire net for new arrivals. This monitor performs a simple search, meaning that no branches are explicitly traversed. If a branch is activated/deactivated between search cycles, this monitor will see the arrival/departure of new devices without reference to the branch which they lie on.
Constructor and Description |
---|
DeviceMonitor(DSPortAdapter adapter)
Create a simple monitor that does not search branches
|
Modifier and Type | Method and Description |
---|---|
OWPath |
getDevicePath(java.lang.Long address)
Returns the OWPath of the device with the given address.
|
boolean |
getDoAlarmSearch()
See if Gets this monitor to search for alarming parts
|
void |
search(java.util.Vector arrivals,
java.util.Vector departures)
Performs a search of the 1-Wire network without searching branches
|
void |
setAdapter(DSPortAdapter adapter)
Sets this monitor to search a new DSPortAdapter
|
void |
setDoAlarmSearch(boolean findAlarmingParts)
Sets this monitor to search for alarming parts
|
addDeviceMonitorEventListener, cleanUpStaleContainerReferences, cleanUpStalePathReferences, getAdapter, getAllAddresses, getDeviceContainer, getDeviceContainer, getDeviceContainer, getDeviceContainer, getDevicePath, getDevicePath, getDevicePath, getMaxErrorCount, getMaxStateCount, isMonitorRunning, killMonitor, pauseMonitor, putDeviceContainer, putDeviceContainer, putDeviceContainer, putDeviceContainer, resetSearch, resumeMonitor, run, setMaxErrorCount, setMaxStateCount
public DeviceMonitor(DSPortAdapter adapter)
the
- DSPortAdapter this monitor should searchpublic void setAdapter(DSPortAdapter adapter)
setAdapter
in class AbstractDeviceMonitor
the
- DSPortAdapter this monitor should searchpublic OWPath getDevicePath(java.lang.Long address)
getDevicePath
in class AbstractDeviceMonitor
address
- a Long object representing the address of the devicepublic void setDoAlarmSearch(boolean findAlarmingParts)
the
- DSPortAdapter this monitor should searchpublic boolean getDoAlarmSearch()
the
- DSPortAdapter this monitor should searchpublic 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.