|
1-Wire API for .NET Version 4.00
|
Class NetworkDeviceMonitor represents the monitor that searches the 1-Wire net, including the traversal of branches, looing for new arrivals and departures. More...
Inherits com::dalsemi::onewire::application::monitor::AbstractDeviceMonitor.
Public Member Functions | |
| NetworkDeviceMonitor (DSPortAdapter adapter) | |
| Create a complex monitor that does search branches. | |
| void | setAdapter (DSPortAdapter adapter) |
| Sets this monitor to search a new DSPortAdapter. | |
| void | setBranchAutoSearching (boolean enabled) |
| Indicates whether or not branches are automatically traversed. | |
| boolean | getBranchAutoSearching () |
| Indicates whether or not branches are automatically traversed. | |
| void | addBranch (OWPath path) |
| Adds a branch for searching. | |
| OWPath | getDevicePath (Long address) |
| Returns the OWPath of the device with the given address. | |
| void | cleanUpStalePathReferences () |
| The device monitor will internally cache OWPath objects for each 1-Wire device. | |
| void | search (Vector arrivals, Vector departures) throws OneWireException, OneWireIOException |
| Performs a search of the 1-Wire network, with branch searching. | |
Protected Attributes | |
| final Hashtable | devicePathHash = new Hashtable() |
| hashtable for holding the OWPath objects for each device container. | |
| Vector | paths = null |
| A vector of paths, or branches, to search. | |
| boolean | branchAutoSearching = true |
| indicates whether or not branches are automatically traversed | |
Class NetworkDeviceMonitor represents the monitor that searches the 1-Wire net, including the traversal of branches, looing for new arrivals and departures.
| NetworkDeviceMonitor | ( | DSPortAdapter | adapter | ) |
Create a complex monitor that does search branches.
| the | DSPortAdapter this monitor should search |
| void addBranch | ( | OWPath | path | ) |
Adds a branch for searching.
Must be used to traverse branches if auto-searching is disabled.
| path | A branch to be searched during the next search routine |
| void cleanUpStalePathReferences | ( | ) |
The device monitor will internally cache OWPath objects for each 1-Wire device.
Use this method to clean up all stale OWPath objects. A stale path object is a OWPath which references a branching path to a 1-Wire device address which has not been seen by a recent search. This will be essential in a touch-contact environment which could run for some time and needs to conserve memory.
Reimplemented from AbstractDeviceMonitor.
| boolean getBranchAutoSearching | ( | ) |
Indicates whether or not branches are automatically traversed.
If false, new branches must be indicated using the "addBranch" method.
| 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.
| void search | ( | Vector | arrivals, |
| Vector | departures | ||
| ) | throws OneWireException, OneWireIOException [virtual] |
Performs a search of the 1-Wire network, with branch searching.
| arrivals | A vector of Long objects, represent new arrival addresses. |
| departures | A vector of Long objects, represent departed addresses. |
Implements AbstractDeviceMonitor.
| void setAdapter | ( | DSPortAdapter | adapter | ) | [virtual] |
Sets this monitor to search a new DSPortAdapter.
| the | DSPortAdapter this monitor should search |
Implements AbstractDeviceMonitor.
| void setBranchAutoSearching | ( | boolean | enabled | ) |
Indicates whether or not branches are automatically traversed.
If false, new branches must be indicated using the "addBranch" method.
| enabled | if true, all branches are automatically traversed during a search operation. |
final Hashtable devicePathHash = new Hashtable() [protected] |
hashtable for holding the OWPath objects for each device container.
1.7.3