Class DeviceMonitorEvent
java.lang.Object
java.util.EventObject
com.dalsemi.onewire.application.monitor.DeviceMonitorEvent
- All Implemented Interfaces:
Serializable
Represents a group of 1-Wire addresses that have either arrived to or
departed from the 1-Wire network.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected DSPortAdapter
The DSPortAdapter the monitor was using at the time of eventstatic final int
enum for arrival/departure event typesstatic final int
enum for arrival/departure event typesprotected int
The type of event (ARRIVAL|DEPARTURE)protected AbstractDeviceMonitor
The monitor which generated the eventVector of addresses for devicesFields inherited from class java.util.EventObject
source
-
Method Summary
Modifier and TypeMethodDescriptionReturns DSPortAdapter the monitor was using when the event was generatedlong
getAddressAsLongAt
(int index) Returns the device address at the specified index as a primitive long.getAddressAsStringAt
(int index) Returns the device address at the specified index as a String.byte[]
getAddressAt
(int index) Returns the device address at the specified index as a byte array.getContainerAt
(int index) Returns the OneWireContainer for the address at the specified indexint
Returns the number of devices associated with this eventint
Returns the event type (ARRIVAL | DEPARTURE)Returns the monitor which generated this eventgetPathForContainerAt
(int index) Returns the Path object for the device at the specified indexMethods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
ARRIVAL
public static final int ARRIVALenum for arrival/departure event types- See Also:
-
DEPARTURE
public static final int DEPARTUREenum for arrival/departure event types- See Also:
-
eventType
protected int eventTypeThe type of event (ARRIVAL|DEPARTURE) -
monitor
The monitor which generated the event -
adapter
The DSPortAdapter the monitor was using at the time of event -
vDeviceAddress
Vector of addresses for devices
-
-
Method Details
-
getEventType
public int getEventType()Returns the event type (ARRIVAL | DEPARTURE)- Returns:
- the event type (ARRIVAL | DEPARTURE)
-
getMonitor
Returns the monitor which generated this event- Returns:
- the monitor which generated this event
-
getAdapter
Returns DSPortAdapter the monitor was using when the event was generated- Returns:
- DSPortAdapter the monitor was using
-
getDeviceCount
public int getDeviceCount()Returns the number of devices associated with this event- Returns:
- the number of devices associated with this event
-
getContainerAt
Returns the OneWireContainer for the address at the specified index- Returns:
- the OneWireContainer for the address at the specified index
-
getPathForContainerAt
Returns the Path object for the device at the specified index- Returns:
- the Path object for the device at the specified index
-
getAddressAsLongAt
public long getAddressAsLongAt(int index) Returns the device address at the specified index as a primitive long.- Returns:
- the device address at the specified index
-
getAddressAt
public byte[] getAddressAt(int index) Returns the device address at the specified index as a byte array.- Returns:
- the device address at the specified index
-
getAddressAsStringAt
Returns the device address at the specified index as a String.- Returns:
- the device address at the specified index
-