Dallas Semiconductor 1-Wire API 1.00 Alpha: Class OneWireMonitorEvent

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 OneWireMonitorEvent

    java.lang.Object
      |
      +--java.util.EventObject
            |
            +--com.dalsemi.onewire.utils.OneWireMonitorEvent

All Implemented Interfaces:
  Serializable

public class OneWireMonitorEvent
extends EventObject

This class encapsulates a 1-Wire network event such as arrival or departure. This class is created by an instance of `OneWireMonitor`, and passed into a class implementing `OneWireMonitorEventListener` using the methods `oneWireArrival()` and `oneWireDeparture()`

See Also:
  `OneWireMonitor`, `OneWireMonitorEventListener`, Serialized Form

Constructor Summary
`OneWireMonitorEvent(Object source, OneWireContainer owc)` Create a new OneWireMonitorEvent that will return the specified contianer. NOTE: This constructor is meant to be used for debug purposes, specifically for the iB-IDE to report events.
`OneWireMonitorEvent(OneWireMonitor owm, DSPortAdapter adapter, long address)` Create a new OneWireMonitorEvent with specified adapter, and address
`OneWireMonitorEvent(OneWireMonitor owm, OneWireContainer owc)` Create a new OneWireMonitorEvent that will return the specified contianer. NOTE: This constructor is meant to be used for debug purposes, specifically for the iB-IDE to report events.

Method Summary
`DSPortAdapter` | `getAdapter()` Retrieves the adapter on which the event occurred.
`byte[]` | `getAddress()` Retrieves the address of the 1-Wire device causing the event.
`long` | `getAddressAsLong()` Retrieves the address of the 1-Wire device causing the event.
`String` | `getAddressAsString()` Retrieves the address of the 1-Wire device causing the event.
`OneWireContainer` | `getDeviceContainer()` Retrieves the container for the device causing the event.

Methods inherited from class java.util.EventObject
`getSource, toString`

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

Constructor Detail

### OneWireMonitorEvent

    public OneWireMonitorEvent(OneWireMonitor owm,
                               DSPortAdapter adapter,
                               long address)

  Create a new OneWireMonitorEvent with specified adapter, and address
  Parameters:
    `owm` - reference to `OneWireMonitor` generating the event
    `adapter` - 1-Wire adapter where device is located
    `address` - 1-Wire network address of device

### OneWireMonitorEvent

    public OneWireMonitorEvent(OneWireMonitor owm,
                               OneWireContainer owc)

  Create a new OneWireMonitorEvent that will return the specified contianer.
  NOTE: This constructor is meant to be used for debug purposes, specifically for the iB-IDE to report events. It is recommended that most applications use the `OneWireMonitorEvent(OneWireMonitor,DSPortAdapter,long)` constructor.
  Parameters:
    `owm` - reference to `OneWireMonitor` generating the event
    `owc` - container that will be returned by this event object
  See Also:
    `OneWireMonitorEvent(OneWireMonitor,DSPortAdapter,long)`

### OneWireMonitorEvent

    public OneWireMonitorEvent(Object source,
                               OneWireContainer owc)

  Create a new OneWireMonitorEvent that will return the specified contianer.
  NOTE: This constructor is meant to be used for debug purposes, specifically for the iB-IDE to report events. It is recommended that most applications use the `OneWireMonitorEvent(OneWireMonitor,DSPortAdapter,long)` constructor.
  Parameters:
    `owm` - reference to the source generating the event
    `owc` - container that will be returned by this event object
  See Also:
    `OneWireMonitorEvent(OneWireMonitor,DSPortAdapter,long)`

Method Detail

### getDeviceContainer

    public OneWireContainer getDeviceContainer()

  Retrieves the container for the device causing the event.
  Returns:
    `OneWireContainer` encapsulating the state of the 1-Wire device generating the event

### getAdapter

    public DSPortAdapter getAdapter()

  Retrieves the adapter on which the event occurred.
  Returns:
    `DSPortAdapter` of the adapter on which the 1-Wire event was generated

### getAddress

    public byte[] getAddress()

  Retrieves the address of the 1-Wire device causing the event.
  Returns:
    The address of the 1-Wire device
  See Also:
    `Address`

### getAddressAsLong

    public long getAddressAsLong()

  Retrieves the address of the 1-Wire device causing the event.
  Returns:
    The address of the 1-Wire device
  See Also:
    `Address`

### getAddressAsString

    public String getAddressAsString()

  Retrieves the address of the 1-Wire device causing the event.
  Returns:
    The address of the 1-Wire device
  See Also:
    `Address`

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