public class IPv6RemoteATCommandResponsePacket extends XBeeAPIPacket
If a module receives a remote command response RF data frame in response to an IPv6 Remote AT Command Request, the module will send an IPv6 Remote AT Command Response message out the UART.
Remote Command options are set as a bitfield.
This packet is received in response of the IPv6 Remote AT Command Request
packet. See IPv6RemoteATCommandRequestPacket.
Response also returns a field with its status. See
ATCommandStatus.
IPv6RemoteATCommandRequestPacket,
XBeeAPIPacketNO_FRAME_ID| Constructor and Description |
|---|
IPv6RemoteATCommandResponsePacket(int frameID,
Inet6Address sourceAddress,
String command,
ATCommandStatus status,
byte[] commandValue)
Class constructor.
|
IPv6RemoteATCommandResponsePacket(int frameID,
Inet6Address sourceAddress,
String command,
ATCommandStatus status,
String commandValue)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static IPv6RemoteATCommandResponsePacket |
createPacket(byte[] payload)
Creates a new
IPv6RemoteATCommandResponsePacket 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 as byte array.
|
String |
getCommandValueAsString()
Returns the AT command response value as String.
|
Inet6Address |
getSourceAddress()
Retrieves the source IPv6 address.
|
ATCommandStatus |
getStatus()
Returns the AT command response status.
|
boolean |
needsAPIFrameID()
Returns whether the API packet needs API Frame ID or not.
|
void |
setCommandValue(byte[] commandValue)
Sets the AT command response response value as byte array.
|
void |
setCommandValue(String commandValue)
Sets the AT command response value as String.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, isBroadcast, setFrameIDequals, generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, hashCode, parsePacket, parsePacket, toPrettyString, toStringpublic IPv6RemoteATCommandResponsePacket(int frameID, Inet6Address sourceAddress, String command, ATCommandStatus status, byte[] commandValue)
IPv6RemoteATCommandResponsePacket
object with the given parameters.frameID - The Frame ID.sourceAddress - IPv6 address of the source device.command - 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.Inet6Address,
ATCommandStatuspublic IPv6RemoteATCommandResponsePacket(int frameID, Inet6Address sourceAddress, String command, ATCommandStatus status, String commandValue)
IPv6RemoteATCommandResponsePacket
object with the given parameters.frameID - The Frame ID.sourceAddress - IPv6 address of the source device.command - AT command.status - The command status.commandValue - The AT command response value as String.IllegalArgumentException - if frameID < 0 or
if frameID > 255.NullPointerException - if sourceAddress == null or
if command == null or
if status == null.Inet6Address,
ATCommandStatuspublic static IPv6RemoteATCommandResponsePacket createPacket(byte[] payload)
IPv6RemoteATCommandResponsePacket object from the given
payload.payload - The API frame payload. It must start with the frame type
corresponding to an IPv6 Remote AT Command response packet (0x9B).
The byte array must be in OperatingMode.API mode.IllegalArgumentException - if payload[0] != APIFrameType.IPV6_REMOTE_AT_COMMAND_RESPONSE.getValue() or
if payload.length < orNullPointerException - if payload == null.public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacketpublic String getCommand()
public byte[] getCommandValue()
getCommandValueAsString(),
setCommandValue(String commandValue),
setCommandValue(byte[] commandValue)public String getCommandValueAsString()
null if no
value is set.getCommandValue(),
setCommandValue(String commandValue),
setCommandValue(byte[] commandValue)public Inet6Address getSourceAddress()
Inet6Addresspublic ATCommandStatus getStatus()
ATCommandStatuspublic 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 as byte array.getCommandValue(),
getCommandValueAsString()public void setCommandValue(String commandValue)
commandValue - The AT command response value as String.getCommandValue(),
getCommandValueAsString()© Copyright 2014 - 2019 Digi International Inc. All rights reserved.