XBee C# library API reference

Show / Hide Table of Contents

Class RemoteATCommandResponsePacket

This class represents a Remote AT Command Response packet. Packet is built using the parameters of the constructor or providing a valid API payload.

Inheritance
System.Object
XBeePacket
XBeeAPIPacket
RemoteATCommandResponsePacket
Inherited Members
XBeeAPIPacket.NO_FRAME_ID
XBeeAPIPacket.FrameID
XBeeAPIPacket.FrameType
XBeeAPIPacket.FrameTypeValue
XBeeAPIPacket.APIData
XBeeAPIPacket.PacketParameters
XBeeAPIPacket.CheckFrameID(Int32)
XBeeAPIPacket.GetPacketData()
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.Common
Assembly: XBeeLibrary.Core.dll
Syntax
public class RemoteATCommandResponsePacket : XBeeAPIPacket
Remarks

If a module receives a remote command response RF data frame in response to a Remote AT Command Request, the module will send a Remote AT Command Response message out the UART. Some commands may send back multiple frames--for example, Node Discover (ND) command.

This packet is received in response of a {@code RemoteATCommandPacket}.

Response also includes an ATCommandStatus object with the status of the AT command.

Constructors

RemoteATCommandResponsePacket(Byte, XBee64BitAddress, XBee16BitAddress, String, ATCommandStatus, Byte[])

Class constructor. Instantiates a new RemoteATCommandResponsePacket object with the given parameters.

Declaration
public RemoteATCommandResponsePacket(byte frameID, XBee64BitAddress sourceAddress64, XBee16BitAddress sourceAddress16, string command, ATCommandStatus status, byte[] commandValue)
Parameters
Type Name Description
System.Byte frameID

The frame ID.

XBee64BitAddress sourceAddress64

The 64-bit address of the sender device.

XBee16BitAddress sourceAddress16

The 16-bit address of the sender device.

System.String command

The AT command.

ATCommandStatus status

The AT command response status.

System.Byte[] commandValue

The AT command response value.

Exceptions
Type Condition
System.ArgumentException

If frameID < 0 or if frameID > 255.

System.ArgumentNullException

If sourceAddress64 == null or if sourceAddress16 == null or if command == null.

See Also
XBeeReceiveOptions
XBee16BitAddress
XBee64BitAddress

Properties

APIPacketParameters

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

Declaration
protected override 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.

Overrides
XBeeAPIPacket.APIPacketParameters

APIPacketSpecificData

Gets the XBee API packet specific data.

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

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

Command

The AT command.

Declaration
public string Command { get; }
Property Value
Type Description
System.String

CommandValue

The AT command response value.

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

IsBroadcast

Indicates whether the packet is a broadcast packet.

Declaration
public override bool IsBroadcast { get; }
Property Value
Type Description
System.Boolean
Overrides
XBeeAPIPacket.IsBroadcast

NeedsAPIFrameID

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

Declaration
public override bool NeedsAPIFrameID { get; }
Property Value
Type Description
System.Boolean
Overrides
XBeeAPIPacket.NeedsAPIFrameID

SourceAddress16

The 16 bit sender/source address.

Declaration
public XBee16BitAddress SourceAddress16 { get; }
Property Value
Type Description
XBee16BitAddress
See Also
XBee16BitAddress

SourceAddress64

The 64 bit sender/source address.

Declaration
public XBee64BitAddress SourceAddress64 { get; }
Property Value
Type Description
XBee64BitAddress
See Also
XBee64BitAddress

Status

The AT command response status.

Declaration
public ATCommandStatus Status { get; }
Property Value
Type Description
ATCommandStatus
See Also
ATCommandStatus

StringCommandValue

The AT command response value as String.

Declaration
public string StringCommandValue { get; set; }
Property Value
Type Description
System.String

Methods

CreatePacket(Byte[])

Creates a new RemoteATCommandResponsePacket object from the given payload.

Declaration
public static RemoteATCommandResponsePacket CreatePacket(byte[] payload)
Parameters
Type Name Description
System.Byte[] payload

The API frame payload. It must start with the frame type corresponding to a Remote AT Command Response packet (0x97). The byte array must be in API mode.

Returns
Type Description
RemoteATCommandResponsePacket

Parsed Remote AT Command Response packet.

Exceptions
Type Condition
System.ArgumentException

If payload[0] != APIFrameType.REMOTE_AT_COMMAND_RESPONSE.GetValue() or if payload.length < XBeeLibrary.Core.Packet.Common.RemoteATCommandResponsePacket.MIN_API_PAYLOAD_LENGTH.

System.ArgumentNullException

If payload == null.

See Also

RemoteATCommandPacket
ATCommandStatus
XBeeAPIPacket
Product page More documentation Official site About Digi Contact us Support
©2019 Digi International Inc. All rights reserved.
Digi International Inc.