public class RemoteATCommandResponseWifiPacket extends XBeeAPIPacket
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 RemoteATCommandPacket.
Response also includes an ATCommandStatus object with the status
of the AT command.
RemoteATCommandWifiPacket,
ATCommandStatus,
XBeeAPIPacketNO_FRAME_ID| Constructor and Description |
|---|
RemoteATCommandResponseWifiPacket(int frameID,
Inet4Address sourceAddress,
String command,
ATCommandStatus status,
byte[] commandValue)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static RemoteATCommandResponseWifiPacket |
createPacket(byte[] payload)
Creates an new
RemoteATCommandResponseWifiPacket object from the
given payload. |
LinkedHashMap<String,String> |
getAPIPacketParameters()
Returns a map with the XBee packet parameters and their values.
|
String |
getCommand()
Returns the AT command.
|
byte[] |
getCommandValue()
Retrieves the AT command response value.
|
String |
getCommandValueAsString()
Returns the AT command response value as String.
|
Inet4Address |
getSourceAddress()
Returns the IP source address.
|
ATCommandStatus |
getStatus()
Returns the AT command response status.
|
boolean |
isBroadcast()
Returns whether or not the packet is a broadcast packet.
|
boolean |
needsAPIFrameID()
Returns whether the API packet needs API Frame ID or not.
|
void |
setCommandValue(byte[] commandValue)
Sets the AT response response value.
|
void |
setCommandValue(String commandValue)
Sets the AT command response value as String.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameIDequals, generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, hashCode, parsePacket, parsePacket, toPrettyString, toStringpublic RemoteATCommandResponseWifiPacket(int frameID, Inet4Address sourceAddress, String command, ATCommandStatus status, byte[] commandValue)
RemoteATCommandResponseWifiPacket object with the given parameters.frameID - frame ID.sourceAddress - IP address of the remote radio returning
response.command - The AT command.status - The command status.commandValue - The AT command response value.IllegalArgumentException - if frameID < 0 or
if frameID > 255.NullPointerException - if sourceAddress == null or
if command == null or
if status == null.ATCommandStatus,
XBee16BitAddress,
XBee64BitAddress,
Inet4Addresspublic static RemoteATCommandResponseWifiPacket createPacket(byte[] payload)
RemoteATCommandResponseWifiPacket object from the
given payload.payload - The API frame payload. It must start with the frame type
corresponding to a Remote AT Command Response (Wi-Fi)
packet (0x87). The byte array must be in
OperatingMode.API mode.IllegalArgumentException - if payload[0] != APIFrameType.REMOTE_AT_COMMAND_RESPONSE_WIFI.getValue() or
if payload.length < .NullPointerException - if payload == null.public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacketpublic String getCommand()
public byte[] getCommandValue()
getCommandValueAsString(),
setCommandValue(byte[]),
setCommandValue(String)public String getCommandValueAsString()
null if no
value is set.getCommandValue(),
setCommandValue(byte[]),
setCommandValue(String)public Inet4Address getSourceAddress()
Inet4Addresspublic ATCommandStatus getStatus()
ATCommandStatuspublic boolean isBroadcast()
XBeeAPIPacketisBroadcast in class XBeeAPIPackettrue if the packet is a broadcast packet, false
otherwise.public boolean needsAPIFrameID()
XBeeAPIPacketneedsAPIFrameID in class XBeeAPIPackettrue if the packet needs API Frame ID, false
otherwise.public void setCommandValue(byte[] commandValue)
commandValue - The AT command response value.getCommandValue(),
getCommandValueAsString(),
setCommandValue(String)public void setCommandValue(String commandValue)
commandValue - The AT command response value as String.getCommandValue(),
getCommandValueAsString(),
setCommandValue(byte[])© Copyright 2014 - 2019 Digi International Inc. All rights reserved.