public class ChainMonitor extends AbstractDeviceMonitor
Class ChainMonitor represents the monitor that searches the 1-Wire net for Chain Mode devices, otherwise known as "Sequence Detect". Chain Mode devices have two PIO pins (PIOA and PIOB). You can chain multiple devices together by connecting PIOA of one part to PIOB of the next device. The first device in the chain has its PIOB grounded. This monitor performs a simple search. 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 |
---|
ChainMonitor(DSPortAdapter adapter)
Create a simple monitor that does not search branches
|
Modifier and Type | Method and Description |
---|---|
boolean |
chainConditionalReadRom(byte[] chainDeviceAddress)
chainConditionalReadRom sends the chain mode "DONE" command sequence to
current chain device.
|
boolean |
chainDone()
chainDone sends the chain mode "DONE" command sequence to
current chain device.
|
boolean |
chainOff()
chainOff sends the chain mode "OFF" command sequence to
all chain devices.
|
boolean |
chainOn()
chainOn sends the chain mode "ON" command sequence to
all chain devices.
|
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 without searching branches
|
void |
setAdapter(DSPortAdapter adapter)
Sets this monitor to search a new DSPortAdapter
|
java.util.Vector |
toContainerVector(java.util.Vector arrivals)
A helper method that takes the arrivals Vector from the search method
and returns a Vector of OneWireContainers
|
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 ChainMonitor(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 boolean chainOn() throws OneWireException, OneWireIOException
none
- OneWireException
OneWireIOException
public boolean chainConditionalReadRom(byte[] chainDeviceAddress) throws OneWireException, OneWireIOException
8-byte
- array for chain 1-Wire net addressOneWireException
OneWireIOException
public boolean chainDone() throws OneWireException, OneWireIOException
none
- OneWireException
OneWireIOException
public boolean chainOff() throws OneWireException, OneWireIOException
none
- OneWireException
OneWireIOException
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
public java.util.Vector toContainerVector(java.util.Vector arrivals) throws OneWireException, OneWireIOException
arrivals
- A vector of Long objects, represent new arrival addresses.OneWireException
OneWireIOException
Copyright © 1999-2012 Maxim Integrated Products. All Rights Reserved.