Class XBee16BitAddress
This class represents a 16-bit network address.
Inheritance
Implements
Inherited Members
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 |
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 |
System.ArgumentOutOfRangeException | If Length of |
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 |
System.ArgumentOutOfRangeException | If Length of |
System.FormatException | If |
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 |
|
Overrides
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 |
|
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. |