com.digi.xbee.api.models

## Class XBee64BitAddress

- java.lang.Object
- - com.digi.xbee.api.models.XBee64BitAddress

-     public final class XBee64BitAddress
      extends Object

  This class represents a 64-bit address (also known as MAC address).

  The 64-bit address is a unique device address assigned during manufacturing. This address is unique to each physical device.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static XBee64BitAddress` | `BROADCAST_ADDRESS` 64-bit broadcast address (value: 000000000000FFFF).
    `static XBee64BitAddress` | `COORDINATOR_ADDRESS` 64-bit address reserved for the coordinator (value: 0000000000000000).
    `static XBee64BitAddress` | `UNKNOWN_ADDRESS` 64-bit unknown address (value: 000000000000FFFE).

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XBee64BitAddress(byte[] address)` Class constructor.
    `XBee64BitAddress(int b0, int b1, int b2, int b3, int b4, int b5, int b6, int b7)` Class constructor.
    `XBee64BitAddress(String address)` Class constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `String` | `generateDeviceID()` Generates the Device ID corresponding to this `XBee64BitAddress` to be used in Device Cloud.
    `byte[]` | `getValue()` Returns the XBee 64-bit address value as byte array.
    `int` | `hashCode()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### BROADCAST_ADDRESS

          public static final XBee64BitAddress BROADCAST_ADDRESS

      64-bit broadcast address (value: 000000000000FFFF).

    - #### COORDINATOR_ADDRESS

          public static final XBee64BitAddress COORDINATOR_ADDRESS

      64-bit address reserved for the coordinator (value: 0000000000000000).

    - #### UNKNOWN_ADDRESS

          public static final XBee64BitAddress UNKNOWN_ADDRESS

      64-bit unknown address (value: 000000000000FFFE).

  - ### Constructor Detail

    - #### XBee64BitAddress

          public XBee64BitAddress(byte[] address)

      Class constructor. Instantiates a new object of type `XBee64BitAddress` with the given parameters.
      Parameters:
        `address` - The XBee 64-bit address as byte array.
      Throws:
        `IllegalArgumentException` - if `address.length > 8` or if `address.length < 1`.
        `NullPointerException` - if `address == null`.

    - #### XBee64BitAddress

          public XBee64BitAddress(int b0,
                          int b1,
                          int b2,
                          int b3,
                          int b4,
                          int b5,
                          int b6,
                          int b7)

      Class constructor. Instantiates a new object of type `XBee64BitAddress` with the given bytes being `b0` the more significant byte and `b7` the less significant byte.
      Parameters:
        `b0` - XBee 64-bit address bit 0.
        `b1` - XBee 64-bit address bit 1.
        `b2` - XBee 64-bit address bit 2.
        `b3` - XBee 64-bit address bit 3.
        `b4` - XBee 64-bit address bit 4.
        `b5` - XBee 64-bit address bit 5.
        `b6` - XBee 64-bit address bit 6.
        `b7` - XBee 64-bit address bit 7.
      Throws:
        `IllegalArgumentException` - if `b0 > 255` or if `b0 < 0` or if `b1 > 255` or if `b1 < 0` or if `b2 > 255` or if `b2 < 0` or if `b3 > 255` or if `b3 < 0` or if `b4 > 255` or if `b4 < 0` or if `b5 > 255` or if `b5 < 0` or if `b6 > 255` or if `b6 < 0` or if `b7 > 255` or if `b7 < 0`.

    - #### XBee64BitAddress

          public XBee64BitAddress(String address)

      Class constructor. Instantiates a new object of type `XBee64BitAddress` with the given parameters.

      The string must be the hexadecimal representation of a 64-bit address.

      Parameters:
        `address` - The XBee 64-bit address as string.
      Throws:
        `IllegalArgumentException` - if `address.length() < 1` or if `address` contains non-hexadecimal characters and is longer than 8 bytes.
        `NullPointerException` - if `address == null`.

  - ### Method Detail

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### generateDeviceID

          public String generateDeviceID()

      Generates the Device ID corresponding to this `XBee64BitAddress` to be used in Device Cloud.
      Returns:
        Device ID corresponding to this address.

    - #### getValue

          public byte[] getValue()

      Returns the XBee 64-bit address value as byte array.
      Returns:
        XBee 64-bit address value as byte array.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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