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.
Public Member Functions | |
ChainMonitor (DSPortAdapter adapter) | |
Create a simple monitor that does not search branches. | |
void | setAdapter (DSPortAdapter adapter) |
Sets this monitor to search a new DSPortAdapter. | |
OWPath | getDevicePath (Long address) |
Returns the OWPath of the device with the given address. | |
boolean | chainOn () throws OneWireException, OneWireIOException |
chainOn sends the chain mode "ON" command sequence to all chain devices. | |
boolean | chainConditionalReadRom (byte[] chainDeviceAddress) throws OneWireException, OneWireIOException |
chainConditionalReadRom sends the chain mode "DONE" command sequence to current chain device. | |
boolean | chainDone () throws OneWireException, OneWireIOException |
chainDone sends the chain mode "DONE" command sequence to current chain device. | |
boolean | chainOff () throws OneWireException, OneWireIOException |
chainOff sends the chain mode "OFF" command sequence to all chain devices. | |
void | search (Vector arrivals, Vector departures) throws OneWireException, OneWireIOException |
Performs a search of the 1-Wire network without searching branches. | |
Vector | toContainerVector (Vector arrivals) throws OneWireException, OneWireIOException |
A helper method that takes the arrivals Vector from the search method and returns a Vector of OneWireContainers. |
ChainMonitor | ( | DSPortAdapter | adapter | ) |
Create a simple monitor that does not search branches.
the | DSPortAdapter this monitor should search |
void setAdapter | ( | DSPortAdapter | adapter | ) | [virtual] |
Sets this monitor to search a new DSPortAdapter.
the | DSPortAdapter this monitor should search |
Implements AbstractDeviceMonitor.
OWPath getDevicePath | ( | Long | address | ) | [virtual] |
Returns the OWPath of the device with the given address.
address | a Long object representing the address of the device |
Implements AbstractDeviceMonitor.
boolean chainOn | ( | ) | throws OneWireException, OneWireIOException |
chainOn sends the chain mode "ON" command sequence to all chain devices.
none |
boolean chainConditionalReadRom | ( | byte[] | chainDeviceAddress | ) | throws OneWireException, OneWireIOException |
chainConditionalReadRom sends the chain mode "DONE" command sequence to current chain device.
8-byte | array for chain 1-Wire net address |
boolean chainDone | ( | ) | throws OneWireException, OneWireIOException |
chainDone sends the chain mode "DONE" command sequence to current chain device.
none |
boolean chainOff | ( | ) | throws OneWireException, OneWireIOException |
chainOff sends the chain mode "OFF" command sequence to all chain devices.
none |
void search | ( | Vector | arrivals, | |
Vector | departures | |||
) | throws OneWireException, OneWireIOException [virtual] |
Performs a search of the 1-Wire network without searching branches.
arrivals | A vector of Long objects, represent new arrival addresses. | |
departures | A vector of Long objects, represent departed addresses. |
Implements AbstractDeviceMonitor.
Vector toContainerVector | ( | Vector | arrivals | ) | throws OneWireException, OneWireIOException |
A helper method that takes the arrivals Vector from the search method and returns a Vector of OneWireContainers.
arrivals | A vector of Long objects, represent new arrival addresses. |