Class SddpDevice

java.lang.Object
org.openhab.core.config.discovery.sddp.SddpDevice

@NonNullByDefault public class SddpDevice extends Object
A DTO class containing data from an SDDP device discovery result.
Author:
Andrew Fiddian-Green - Initial contribution
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    The driver id.
    final Instant
    The instant after which the device shall be considered as having left the network.
    final String
    The network address of the device.
    final String
    The host address of the device.
    final String
    The dotted IP address part of the 'from' field.
    final String
    The MAC address of the device as derived from the last 12 characters of the host field.
    final String
    The device manufacturer.
    final String
    The number of seconds after which the device shall no longer considered to be alive on the network.
    final String
    The model number of the device.
    final String
    The port part of the 'from' field.
    final String
    The id of the primary proxy that provides device services.
    final String
    A comma delimited list of proxies.
    final String
    The type of the device.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SddpDevice(Map<String,String> headers, boolean offline)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(@Nullable Object obj)
    Set uniqueness is determined by the From field only
    int
    Set uniqueness is determined by the From field only
    boolean
    Check if the creation time plus max-age instant is exceeded.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • from

      public final String from
      The network address of the device. For example: 192.168.4.237:1902
    • host

      public final String host
      The host address of the device. For example: JVC_PROJECTOR-E0DADC152802 or JVC_PROJECTOR-E0:DA:DC:15:28:02 Note: the last 12 resp. 17 characters represent the MAC address of the device.
    • maxAge

      public final String maxAge
      The number of seconds after which the device shall no longer considered to be alive on the network. For example: 1800 (a String value).
    • type

      public final String type
      The type of the device. Usually a colon delimited combination of a manufacturer id and a device type id. For example: JVCKENWOOD:Projector
    • primaryProxy

      public final String primaryProxy
      The id of the primary proxy that provides device services. For example: projector
    • proxies

      public final String proxies
      A comma delimited list of proxies. For example: projector,thingy,etc Normally the first entry is the primary proxy.
    • manufacturer

      public final String manufacturer
      The device manufacturer. For example: JVCKENWOOD
    • model

      public final String model
      The model number of the device. For example: DLA-RS3100_NZ8
    • driver

      public final String driver
      The driver id. For example: projector_JVCKENWOOD_DLA-RS3100_NZ8.c4i
    • ipAddress

      public final String ipAddress
      The dotted IP address part of the 'from' field. For example: 192.168.4.237
    • port

      public final String port
      The port part of the 'from' field. For example: 1902 (a String value)
    • macAddress

      public final String macAddress
      The MAC address of the device as derived from the last 12 characters of the host field. It is presented in lower-case, dash delimited, format. For example: e0-da-dc-15-28-02 Therefore it may be used as a (unique) sub- part of a Thing UID.
    • expireInstant

      public final Instant expireInstant
      The instant after which the device shall be considered as having left the network.
  • Constructor Details

    • SddpDevice

      public SddpDevice(Map<String,String> headers, boolean offline)
      Constructor.
      Parameters:
      headers - a map of parameter name / value pairs.
      offline - indicates if the device is being created from a NOTIFY OFFLINE announcement.
  • Method Details

    • equals

      public boolean equals(@Nullable Object obj)
      Set uniqueness is determined by the From field only
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Set uniqueness is determined by the From field only
      Overrides:
      hashCode in class Object
    • isExpired

      public boolean isExpired()
      Check if the creation time plus max-age instant is exceeded.