Class ATCommandResponsePacket
This class represents an AT Command Response packet. Packet is built using the parameters of the constructor or providing a valid API payload.
Inherited Members
Namespace: XBeeLibrary.Core.Packet.Common
Assembly: XBeeLibrary.Core.dll
Syntax
public class ATCommandResponsePacket : XBeeAPIPacket
Remarks
In response to an AT Command message, the module will send an AT Command Response message. Some commands will send back multiple frames (for example, the ND (Node Discover) command).
This packet is received in response of an ATCommandPacket.
Response also includes an ATCommandStatus object with the status of the AT command.
Constructors
ATCommandResponsePacket(Byte, ATCommandStatus, String, Byte[])
Class constructor. Instantiates a ATCommandResponsePacket with the given parameters.
Declaration
public ATCommandResponsePacket(byte frameID, ATCommandStatus status, string command, byte[] commandValue)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | frameID | The XBee API frame ID. |
ATCommandStatus | status | The AT command response status. |
System.String | command | The AT command. |
System.Byte[] | commandValue | The AT command response value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | If |
System.ArgumentNullException | If |
See Also
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
APIPacketSpecificData
Gets the XBee API packet specific data.
Declaration
protected override byte[] APIPacketSpecificData { get; }
Property Value
Type | Description |
---|---|
System.Byte[] |
Overrides
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
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
Status
The AT command response status.
Declaration
public ATCommandStatus Status { get; }
Property Value
Type | Description |
---|---|
ATCommandStatus |
See Also
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 ATCommandResponsePacket object from the given payload.
Declaration
public static ATCommandResponsePacket CreatePacket(byte[] payload)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | payload | The API frame payload. It must start with the frame type corresponding
to an AT Command Response packet ( |
Returns
Type | Description |
---|---|
ATCommandResponsePacket | Parsed AT Command Response packet. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | If |
System.ArgumentNullException | If |