Class XBee64BitAddress
This class represents a 64-bit address (also known as MAC address).
Inheritance
Implements
Inherited Members
Namespace: XBeeLibrary.Core.Models
Assembly: XBeeLibrary.Core.dll
Syntax
public sealed class XBee64BitAddress : IEquatable<XBee64BitAddress>
Remarks
The 64-bit address is a unique device address assigned during manufacturing. This address is unique to each physical device.
Constructors
XBee64BitAddress(Byte[])
Initializes a new instance of class XBee64BitAddress.
Declaration
public XBee64BitAddress(byte[] address)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | address | The 64-bit address as byte array. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
System.ArgumentOutOfRangeException | If the Length of |
XBee64BitAddress(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Initializes a new instance of class XBee64BitAddress with the given bytes being
b0
the more significant byte and b7
the less significant byte.
Declaration
public XBee64BitAddress(int b0, int b1, int b2, int b3, int b4, int b5, int b6, int b7)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | b0 | XBee 64-bit address bit 0. |
System.Int32 | b1 | XBee 64-bit address bit 1. |
System.Int32 | b2 | XBee 64-bit address bit 2. |
System.Int32 | b3 | XBee 64-bit address bit 3. |
System.Int32 | b4 | XBee 64-bit address bit 4. |
System.Int32 | b5 | XBee 64-bit address bit 5. |
System.Int32 | b6 | XBee 64-bit address bit 6. |
System.Int32 | b7 | XBee 64-bit address bit 7. |
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | If |
XBee64BitAddress(String)
Initializes a new instance of class XBee64BitAddress.
Declaration
public XBee64BitAddress(string address)
Parameters
Type | Name | Description |
---|---|---|
System.String | address | A string containing the 64-bit address. |
Remarks
The string must be the hexadecimal representation of a 64-bit address.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
System.ArgumentOutOfRangeException | If Length of |
System.FormatException | If |
Fields
BROADCAST_ADDRESS
64-bit broadcast address (value: 000000000000FFFF).
Declaration
public static readonly XBee64BitAddress BROADCAST_ADDRESS
Field Value
Type | Description |
---|---|
XBee64BitAddress |
COORDINATOR_ADDRESS
64-bit address reserved for the coordinator (value: 0000000000000000).
Declaration
public static readonly XBee64BitAddress COORDINATOR_ADDRESS
Field Value
Type | Description |
---|---|
XBee64BitAddress |
UNKNOWN_ADDRESS
64-bit unknown address (value: 000000000000FFFE).
Declaration
public static readonly XBee64BitAddress UNKNOWN_ADDRESS
Field Value
Type | Description |
---|---|
XBee64BitAddress |
XBEE_64_BIT_ADDRESS_PATTERN
Pattern for the 64-bit address string.
Declaration
public static readonly Regex XBEE_64_BIT_ADDRESS_PATTERN
Field Value
Type | Description |
---|---|
System.Text.RegularExpressions.Regex |
Properties
Value
The XBee 64-bit address value as byte array.
Declaration
public byte[] Value { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Methods
Equals(Object)
Returns whether this object is equal to the given one.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare if it is equal to this one. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
Equals(XBee64BitAddress)
Returns whether this XBee64BitAddress is equal to the given one.
Declaration
public bool Equals(XBee64BitAddress other)
Parameters
Type | Name | Description |
---|---|---|
XBee64BitAddress | other | The XBee64BitAddress to compare if it is equal to this one. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GenerateDeviceID()
Generates the Device ID corresponding to this XBee64BitAddress to be used in Device Cloud.
Declaration
public string GenerateDeviceID()
Returns
Type | Description |
---|---|
System.String | Device ID corresponding to this address. |
GetHashCode()
Returns the Hash code of this object.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | The Hash code of this object. |
Overrides
ToString()
Returns a string representation of this object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string representation of this object. |