Dallas Semiconductor 1-Wire API 1.00 Alpha: Class NetworkMonitor

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.dalsemi.onewire.utils
Class NetworkMonitor

    java.lang.Object
      |
      +--java.lang.Thread
            |
            +--com.dalsemi.onewire.utils.NetworkMonitor

All Implemented Interfaces:
  Runnable

public class NetworkMonitor
extends Thread

1-Wire® complex Network Monitor. This monitor extends Thread and polls a complex 1-Wire Network and notifies registered listeners of changes. This version supports scanning 1-Wire networks utilizing the DS2409 1-Wire Coupler only.

### Usage

  #### Example

  Create a complex Network monitor on the adapter instance 'adapter':

         // create a network monitor
         NetworkMonitor nm = new NetworkMonitor(adapter);

         // add this to the event listers
         nm.addEventListener(this);

         // start the monitor
         nm.start();

Version:
  0.00, 18 September 2000
See Also:
  `OWPath`, `OWPathElement`, `NetworkMonitorEventListener`, `NetworkMonitorEvent`, `OneWireContainer1F`

Fields inherited from class java.lang.Thread
`MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

Constructor Summary
`NetworkMonitor(DSPortAdapter adapter)` Create a new complex Network monitor on the provided adapter.

Method Summary
`void` | `addEventListener(NetworkMonitorEventListener nmel)` Add a complex Network event listener.
`boolean` | `isMonitorRunning()` Check if this complex Network monitor is running.
`void` | `killMonitor()` Kill this complex Network monitor.
`void` | `pauseMonitor()` Pause this complex Network monitor
`void` | `removeEventListener(NetworkMonitorEventListener nmel)` Remove a complex Network event listener.
`void` | `resumeMonitor()` Resume this complex Network monitor
`void` | `run()` Network monitor run method that performs a periodic search of the entire 1-Wire network including sub-branches.

Methods inherited from class java.lang.Thread
`activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### NetworkMonitor

    public NetworkMonitor(DSPortAdapter adapter)

  Create a new complex Network monitor on the provided adapter.
  Parameters:
    `adapter` - to monitor
  See Also:
    `DSPortAdapter`

Method Detail

### addEventListener

    public void addEventListener(NetworkMonitorEventListener nmel)

  Add a complex Network event listener.
  Parameters:
    `nmel` - network event listener

### removeEventListener

    public void removeEventListener(NetworkMonitorEventListener nmel)

  Remove a complex Network event listener.
  Parameters:
    `nmel` - network event listener

### pauseMonitor

    public void pauseMonitor()

  Pause this complex Network monitor

### resumeMonitor

    public void resumeMonitor()

  Resume this complex Network monitor

### isMonitorRunning

    public boolean isMonitorRunning()

  Check if this complex Network monitor is running.
  Returns:
    `true` if monitor is running

### killMonitor

    public void killMonitor()

  Kill this complex Network monitor. Wait util this thread is no longer alive.

### run

    public void run()

  Network monitor run method that performs a periodic search of the entire 1-Wire network including sub-branches. Listeners that have registered are notified when changes in the network are detected.
  Overrides:
    `run` in class `Thread`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD