XBee C# library API reference

Show / Hide Table of Contents

Class XBee64BitAddress

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

Inheritance
System.Object
XBee64BitAddress
Implements
System.IEquatable<XBee64BitAddress>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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 address == null.

System.ArgumentOutOfRangeException

If the Length of address is not 8.

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 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(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 address == null.

System.ArgumentOutOfRangeException

If Length of address is lower than 1.

System.FormatException

If address contains non-hexadecimal characters or if it is longer than 8 bytes.

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

true if this object is equal to the given one, false otherwise.

Overrides
System.Object.Equals(System.Object)

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

true if this XBee64BitAddress is equal to the given one, false otherwise.

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
System.Object.GetHashCode()

ToString()

Returns a string representation of this object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string representation of this object.

Overrides
System.Object.ToString()

Implements

System.IEquatable<T>
Product page More documentation Official site About Digi Contact us Support
©2019 Digi International Inc. All rights reserved.
Digi International Inc.