XBee C# library API reference

Show / Hide Table of Contents

Class XBeeAPIPacket

This abstract class provides the basic structure of a ZigBee API frame.

Inheritance
System.Object
XBeePacket
XBeeAPIPacket
BluetoothUnlockPacket
BluetoothUnlockResponsePacket
RXSMSPacket
TXSMSPacket
ATCommandPacket
ATCommandQueuePacket
ATCommandResponsePacket
ExplicitAddressingPacket
ExplicitRxIndicatorPacket
IODataSampleRxIndicatorPacket
ModemStatusPacket
ReceivePacket
RemoteATCommandPacket
RemoteATCommandResponsePacket
TransmitPacket
TransmitStatusPacket
RXIPv4Packet
TXIPv4Packet
TXTLSProfilePacket
RX16IOPacket
RX16Packet
RX64IOPacket
RX64Packet
TX16Packet
TX64Packet
TXStatusPacket
UserDataRelayOutputPacket
UserDataRelayPacket
UnknownXBeePacket
Inherited Members
XBeePacket.PacketLength
XBeePacket.Checksum
XBeePacket.Parameters
XBeePacket.GenerateByteArray()
XBeePacket.GenerateByteArrayEscaped()
XBeePacket.ToString()
XBeePacket.ToPrettyString()
XBeePacket.ParsePacket(String, OperatingMode)
XBeePacket.ParsePacket(Byte[], OperatingMode)
XBeePacket.Equals(Object)
XBeePacket.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: XBeeLibrary.Core.Packet
Assembly: XBeeLibrary.Core.dll
Syntax
public abstract class XBeeAPIPacket : XBeePacket
Remarks

Derived classes should implement their own methods to generate the API data and frame ID in case they support it.

Basic operations such as frame type retrieval are performed in this class.

Constructors

XBeeAPIPacket(Byte)

Initializes a new instance of class XBeeAPIPacket with the specified frameTypeValue.

Declaration
protected XBeeAPIPacket(byte frameTypeValue)
Parameters
Type Name Description
System.Byte frameTypeValue

XBee packet frame type integer value.

XBeeAPIPacket(APIFrameType)

Initializes a new instance of class XBeeAPIPacket with the specified frameType.

Declaration
protected XBeeAPIPacket(APIFrameType frameType)
Parameters
Type Name Description
APIFrameType frameType

XBee packet frame type.

Fields

NO_FRAME_ID

Declaration
public const int NO_FRAME_ID = 9999
Field Value
Type Description
System.Int32

Properties

APIData

The XBee API packet data.

Declaration
public byte[] APIData { get; }
Property Value
Type Description
System.Byte[]
Remarks

This does not include the frame ID if it is needed.

APIPacketParameters

Gets a map with the XBee packet parameters and their values.

Declaration
protected abstract LinkedDictionary<string, string> APIPacketParameters { get; }
Property Value
Type Description
LinkedDictionary<System.String, System.String>

A sorted map containing the XBee packet parameters with their values.

APIPacketSpecificData

Gets the XBee API packet specific data.

Declaration
protected abstract byte[] APIPacketSpecificData { get; }
Property Value
Type Description
System.Byte[]
Remarks

This does not include the frame ID if it is needed.

FrameID

The Frame ID of the API packet.

Declaration
public ushort FrameID { get; set; }
Property Value
Type Description
System.UInt16
Remarks

If the frame ID is not configured or if the API packet does not need a Frame ID (if (!NeedsAPIFrameID)), this property returns NO_FRAME_ID.

Exceptions
Type Condition
System.ArgumentException

If value < 0 or if value > 255.

FrameType

The XBee packet frame type.

Declaration
public APIFrameType FrameType { get; }
Property Value
Type Description
APIFrameType
See Also
APIFrameType

FrameTypeValue

The XBee packet frame type byte value.

Declaration
public byte FrameTypeValue { get; }
Property Value
Type Description
System.Byte

IsBroadcast

Indicates whether the packet is a broadcast packet.

Declaration
public abstract bool IsBroadcast { get; }
Property Value
Type Description
System.Boolean

NeedsAPIFrameID

Indicates whether the API packet needs API Frame ID or not.

Declaration
public abstract bool NeedsAPIFrameID { get; }
Property Value
Type Description
System.Boolean

PacketParameters

A sorted dictionary with the packet parameters and their values.

Declaration
protected override LinkedDictionary<string, string> PacketParameters { get; }
Property Value
Type Description
LinkedDictionary<System.String, System.String>
Overrides
XBeePacket.PacketParameters

Methods

CheckFrameID(Int32)

Indicates whether the given ID is the current frame ID.

Declaration
public bool CheckFrameID(int id)
Parameters
Type Name Description
System.Int32 id

The frame id to check.

Returns
Type Description
System.Boolean

true if frame ID is equal to the id provided, false otherwise or if the frame does not need an ID.

See Also
NeedsAPIFrameID

GetPacketData()

Returns the packet data.

Declaration
public override byte[] GetPacketData()
Returns
Type Description
System.Byte[]

The packet data.

Overrides
XBeePacket.GetPacketData()
Product page More documentation Official site About Digi Contact us Support
©2019 Digi International Inc. All rights reserved.
Digi International Inc.