NetworkDeviceMonitor Class Reference

Inherits com::dalsemi::onewire::application::monitor::AbstractDeviceMonitor.

List of all members.


Detailed Description

Class NetworkDeviceMonitor represents the monitor that searches the 1-Wire net, including the traversal of branches, looing for new arrivals and departures.

Author:
SH
Version:
1.00

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

Constructor & Destructor Documentation

Create a complex monitor that does search branches.

Parameters:
the DSPortAdapter this monitor should search


Member Function Documentation

void setAdapter ( DSPortAdapter  adapter  )  [virtual]

Sets this monitor to search a new DSPortAdapter.

Parameters:
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.

Parameters:
enabled if true, all branches are automatically traversed during a search operation.

boolean getBranchAutoSearching (  ) 

Indicates whether or not branches are automatically traversed.

If false, new branches must be indicated using the "addBranch" method.

Returns:
true if all branches are automatically traversed during a search operation.

void addBranch ( OWPath  path  ) 

Adds a branch for searching.

Must be used to traverse branches if auto-searching is disabled.

Parameters:
path A branch to be searched during the next search routine

OWPath getDevicePath ( Long  address  )  [virtual]

Returns the OWPath of the device with the given address.

Parameters:
address a Long object representing the address of the device
Returns:
The OWPath representing the network path to the device.

Implements AbstractDeviceMonitor.

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.

void search ( Vector  arrivals,
Vector  departures 
) throws OneWireException, OneWireIOException [virtual]

Performs a search of the 1-Wire network, with branch searching.

Parameters:
arrivals A vector of Long objects, represent new arrival addresses.
departures A vector of Long objects, represent departed addresses.

Implements AbstractDeviceMonitor.


Member Data Documentation

final Hashtable devicePathHash = new Hashtable() [protected]

hashtable for holding the OWPath objects for each device container.


The documentation for this class was generated from the following file:

Generated on Thu Aug 28 15:42:31 2008 for 1-Wire API for .NET by  doxygen 1.5.6