java.lang.Object
|
+--com.dalsemi.onewire.application.monitor.AbstractDeviceMonitor
|
+--com.dalsemi.onewire.application.monitor.DeviceMonitor
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 Summary | |
DeviceMonitor(DSPortAdapter adapter)
Create a simple monitor that does not search branches |
|
| Method Summary | |
OWPath |
getDevicePath(Long address)
Returns the OWPath of the device with the given address. |
void |
search(Vector arrivals,
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 |
| Methods inherited from class com.dalsemi.onewire.application.monitor.AbstractDeviceMonitor |
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 |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DeviceMonitor(DSPortAdapter adapter)
the - DSPortAdapter this monitor should search| Method Detail |
public void setAdapter(DSPortAdapter adapter)
setAdapter in class AbstractDeviceMonitorthe - DSPortAdapter this monitor should searchpublic OWPath getDevicePath(Long address)
getDevicePath in class AbstractDeviceMonitoraddress - a Long object representing the address of the device
public void search(Vector arrivals,
Vector departures)
throws OneWireException,
OneWireIOException
search in class AbstractDeviceMonitorarrivals - A vector of Long objects, represent new arrival addresses.departures - A vector of Long objects, represent departed addresses.