XBee C# library API reference

Show / Hide Table of Contents

Class XBee16BitAddress

This class represents a 16-bit network address.

Inheritance
System.Object
XBee16BitAddress
Implements
System.IEquatable<XBee16BitAddress>
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 XBee16BitAddress : IEquatable<XBee16BitAddress>
Remarks

This address is only applicable for:

  • 802.15.4
  • ZigBee
  • ZNet 2.5
  • XTend (Legacy)

Each device has its own 16-bit address which is unique in the network. It is automatically assigned when the radio joins the network for ZigBee and ZNet 2.5, and manually configured in 802.15.4 radios. DigiMesh and Point-to-Multipoint protocols don't support 16-bit addressing.

Constructors

XBee16BitAddress(Byte, Byte)

Initializes a new instance of class XBee16BitAddress.

Declaration
public XBee16BitAddress(byte hsb, byte lsb)
Parameters
Type Name Description
System.Byte hsb

High significant byte of the address.

System.Byte lsb

Low significant byte of the address.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

If hsb > 255 or if hsb < 0 or if lsb > 255 or if lsb < 0.

XBee16BitAddress(Byte[])

Initializes a new instance of class XBee16BitAddress.

Declaration
public XBee16BitAddress(byte[] address)
Parameters
Type Name Description
System.Byte[] address

The 16-bit address as byte array.

Exceptions
Type Condition
System.ArgumentNullException

If address == null.

System.ArgumentOutOfRangeException

If Length of address != 2.

XBee16BitAddress(String)

Initializes a new instance of class XBee16BitAddress.

Declaration
public XBee16BitAddress(string address)
Parameters
Type Name Description
System.String address

A string containing the 16-bit address.

Remarks

The string must be the hexadecimal representation of a 16-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 2 bytes.

Fields

BROADCAST_ADDRESS

16-bit broadcast address (value: FFFF).

Declaration
public static readonly XBee16BitAddress BROADCAST_ADDRESS
Field Value
Type Description
XBee16BitAddress

COORDINATOR_ADDRESS

16-bit address reserved for the coordinator (value: 0000).

Declaration
public static readonly XBee16BitAddress COORDINATOR_ADDRESS
Field Value
Type Description
XBee16BitAddress

UNKNOWN_ADDRESS

16-bit unknown address (value: FFFE).

Declaration
public static readonly XBee16BitAddress UNKNOWN_ADDRESS
Field Value
Type Description
XBee16BitAddress

XBEE_16_BIT_ADDRESS_PATTERN

Pattern for the 16-bit address string.

Declaration
public static readonly Regex XBEE_16_BIT_ADDRESS_PATTERN
Field Value
Type Description
System.Text.RegularExpressions.Regex

Properties

Hsb

Gets the address high significant byte.

Declaration
public int Hsb { get; }
Property Value
Type Description
System.Int32

Lsb

Gets the address low significant byte.

Declaration
public int Lsb { get; }
Property Value
Type Description
System.Int32

Value

Gets the 16-bit address value in byte array format.

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(XBee16BitAddress)

Returns whether this XBee16BitAddress is equal to the given one.

Declaration
public bool Equals(XBee16BitAddress other)
Parameters
Type Name Description
XBee16BitAddress other

The XBee16BitAddress to compare if it is equal to this one.

Returns
Type Description
System.Boolean

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

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.