Class DeviceMonitorEvent

  • All Implemented Interfaces:
    java.io.Serializable

    public class DeviceMonitorEvent
    extends java.util.EventObject
    Represents a group of 1-Wire addresses that have either arrived to or departed from the 1-Wire network.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected DSPortAdapter adapter
      The DSPortAdapter the monitor was using at the time of event
      static int ARRIVAL
      enum for arrival/departure event types
      static int DEPARTURE
      enum for arrival/departure event types
      protected int eventType
      The type of event (ARRIVAL|DEPARTURE)
      protected AbstractDeviceMonitor monitor
      The monitor which generated the event
      protected java.util.Vector<java.lang.Long> vDeviceAddress
      Vector of addresses for devices
      • Fields inherited from class java.util.EventObject

        source
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DSPortAdapter getAdapter()
      Returns DSPortAdapter the monitor was using when the event was generated
      long getAddressAsLongAt​(int index)
      Returns the device address at the specified index as a primitive long.
      java.lang.String 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.
      OneWireContainer getContainerAt​(int index)
      Returns the OneWireContainer for the address at the specified index
      int getDeviceCount()
      Returns the number of devices associated with this event
      int getEventType()
      Returns the event type (ARRIVAL | DEPARTURE)
      AbstractDeviceMonitor getMonitor()
      Returns the monitor which generated this event
      OWPath getPathForContainerAt​(int index)
      Returns the Path object for the device at the specified index
      • Methods inherited from class java.util.EventObject

        getSource, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ARRIVAL

        public static final int ARRIVAL
        enum for arrival/departure event types
        See Also:
        Constant Field Values
      • DEPARTURE

        public static final int DEPARTURE
        enum for arrival/departure event types
        See Also:
        Constant Field Values
      • eventType

        protected int eventType
        The type of event (ARRIVAL|DEPARTURE)
      • adapter

        protected DSPortAdapter adapter
        The DSPortAdapter the monitor was using at the time of event
      • vDeviceAddress

        protected java.util.Vector<java.lang.Long> vDeviceAddress
        Vector of addresses for devices
    • Method Detail

      • getEventType

        public int getEventType()
        Returns the event type (ARRIVAL | DEPARTURE)
        Returns:
        the event type (ARRIVAL | DEPARTURE)
      • getMonitor

        public AbstractDeviceMonitor getMonitor()
        Returns the monitor which generated this event
        Returns:
        the monitor which generated this event
      • getAdapter

        public DSPortAdapter 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

        public OneWireContainer getContainerAt​(int index)
        Returns the OneWireContainer for the address at the specified index
        Returns:
        the OneWireContainer for the address at the specified index
      • getPathForContainerAt

        public OWPath getPathForContainerAt​(int index)
        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

        public java.lang.String getAddressAsStringAt​(int index)
        Returns the device address at the specified index as a String.
        Returns:
        the device address at the specified index