public final class XBee64BitAddress extends Object
The 64-bit address is a unique device address assigned during manufacturing. This address is unique to each physical device.
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 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.
|
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() |
public static final XBee64BitAddress BROADCAST_ADDRESS
public static final XBee64BitAddress COORDINATOR_ADDRESS
public static final XBee64BitAddress UNKNOWN_ADDRESS
public XBee64BitAddress(byte[] address)
XBee64BitAddress
with the given parameters.address
- The XBee 64-bit address as byte array.IllegalArgumentException
- if address.length > 8
or
if address.length < 1
.NullPointerException
- if address == null
.public XBee64BitAddress(int b0, int b1, int b2, int b3, int b4, int b5, int b6, int b7)
XBee64BitAddress
with the given bytes being b0
the
more significant byte and b7
the less significant byte.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.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
.public XBee64BitAddress(String address)
XBee64BitAddress
with the given parameters.
The string must be the hexadecimal representation of a 64-bit address.
address
- The XBee 64-bit address as string.IllegalArgumentException
- if address.length() < 1
or
if address
contains
non-hexadecimal characters and is longer
than 8 bytes.NullPointerException
- if address == null
.public String generateDeviceID()
XBee64BitAddress
to be used in Device Cloud.public byte[] getValue()
© Copyright 2014–2014 Digi International Inc. All rights reserved.