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
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 eventadapter
- 1-Wire adapter where device is locatedaddress
- 1-Wire network address of device
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