com.digi.xbee.api.models

## Enum DiscoveryOptions

- java.lang.Object
- - java.lang.Enum<DiscoveryOptions>
  - - com.digi.xbee.api.models.DiscoveryOptions

- All Implemented Interfaces:
    Serializable, Comparable<DiscoveryOptions>

      public enum DiscoveryOptions
      extends Enum<DiscoveryOptions>

  Enumerates the different options used in the discovery process.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `APPEND_DD` Append device type identifier (DD) to the discovery response.
    `APPEND_RSSI` Append RSSI of the last hop to the discovery response.
    `DISCOVER_MYSELF` Local device sends response frame when discovery is issued.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `calculateDiscoveryValue(XBeeProtocol protocol, Set<DiscoveryOptions> options)` Calculates the total value of a combination of several options for the given protocol.
    `String` | `getDescription()` Returns the description of the discovery option.
    `int` | `getValue()` Returns the value of the discovery option.
    `String` | `toString()`
    `static DiscoveryOptions` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static DiscoveryOptions[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### APPEND_DD

          public static final DiscoveryOptions APPEND_DD

      Append device type identifier (DD) to the discovery response.

      Valid for the following protocols:

      - DigiMesh
      - Point-to-multipoint (Digi Point)
      - ZigBee

    - #### APPEND_RSSI

          public static final DiscoveryOptions APPEND_RSSI

      Append RSSI of the last hop to the discovery response.

      Valid for the following protocols:

      - DigiMesh
      - Point-to-multipoint (Digi Point)

    - #### DISCOVER_MYSELF

          public static final DiscoveryOptions DISCOVER_MYSELF

      Local device sends response frame when discovery is issued.

      Valid for the following protocols:

      - DigiMesh
      - Point-to-multipoint (Digi Point)
      - ZigBee
      - 802.15.4

  - ### Method Detail

    - #### calculateDiscoveryValue

          public static int calculateDiscoveryValue(XBeeProtocol protocol,
                                    Set<DiscoveryOptions> options)

      Calculates the total value of a combination of several options for the given protocol.
      Parameters:
        `protocol` - The `XBeeProtocol` to calculate the value of all the given discovery options.
        `options` - Collection of options to get the final value.
      Returns:
        The value to be configured in the module depending on the given collection of options and the protocol.
      See Also:
        `XBeeProtocol`

    - #### getDescription

          public String getDescription()

      Returns the description of the discovery option.
      Returns:
        The discovery option description.

    - #### getValue

          public int getValue()

      Returns the value of the discovery option.
      Returns:
        The discovery option value.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<DiscoveryOptions>`

    - #### valueOf

          public static DiscoveryOptions valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### values

          public static DiscoveryOptions[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (DiscoveryOptions c : DiscoveryOptions.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

© Copyright 2014–2014 Digi International Inc. All rights reserved.