public class RemoteATCommandWifiPacket extends XBeeAPIPacket
Used to query or set module parameters on a remote device. For parameter
changes on the remote device to take effect, changes must be applied, either
by setting the apply changes options bit, or by sending an AC command
to the remote node.
Remote Command options are set as a bitfield.
If configured, command response is received as a
RemoteATCommandResponseWifi packet.
RemoteATCommandResponseWifiPacket,
XBeeAPIPacketNO_FRAME_ID| Constructor and Description |
|---|
RemoteATCommandWifiPacket(int frameID,
Inet4Address destAddress,
int transmitOptions,
String command,
byte[] parameter)
Class constructor.
|
RemoteATCommandWifiPacket(int frameID,
Inet4Address destAddress,
int transmitOptions,
String command,
String parameter)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static RemoteATCommandWifiPacket |
createPacket(byte[] payload)
Creates a new
RemoteATCommandWifiPacket 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.
|
Inet4Address |
getDestinationAddress()
Retrieves the IP destination address.
|
byte[] |
getParameter()
Returns the AT command parameter.
|
String |
getParameterAsString()
Returns the AT command parameter as String.
|
int |
getTransmitOptions()
Returns the transmit options bitfield.
|
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 |
setParameter(byte[] parameter)
Sets the AT command parameter.
|
void |
setParameter(String parameter)
Sets the AT command parameter as String.
|
checkFrameID, getAPIData, getFrameID, getFrameType, getFrameTypeValue, getPacketData, setFrameIDequals, generateByteArray, generateByteArrayEscaped, getChecksum, getPacketLength, getParameters, hashCode, parsePacket, parsePacket, toPrettyString, toStringpublic RemoteATCommandWifiPacket(int frameID, Inet4Address destAddress, int transmitOptions, String command, byte[] parameter)
RemoteATCommandWifiPacket
object with the given parameters.frameID - The Frame ID.destAddress - IP address of the destination device.transmitOptions - Bitfield of supported transmission options.command - AT command.parameter - AT command parameter as byte array.IllegalArgumentException - if frameID < 0 or
if frameID > 255 or
if transmitOptions < 0 or
if transmitOptions > 255.NullPointerException - if destAddress == null or
if command == null.RemoteATCommandWifiPacket(int, Inet4Address, int, String, String),
RemoteATCommandOptions,
Inet4Addresspublic RemoteATCommandWifiPacket(int frameID, Inet4Address destAddress, int transmitOptions, String command, String parameter)
RemoteATCommandWifiPacket
object with the given parameters.frameID - The Frame ID.destAddress - IP address of the destination device.transmitOptions - Bitfield of supported transmission options.command - AT command.parameter - AT command parameter as string.IllegalArgumentException - if frameID < 0 or
if frameID > 255 or
if transmitOptions < 0 or
if transmitOptions > 255.NullPointerException - if destAddress == null or
if command == null.RemoteATCommandWifiPacket(int, Inet4Address, int, String, byte[]),
RemoteATCommandOptions,
Inet4Addresspublic static RemoteATCommandWifiPacket createPacket(byte[] payload)
RemoteATCommandWifiPacket object from the given
payload.payload - The API frame payload. It must start with the frame type
corresponding to a Remote AT Command Requst (Wi-Fi) packet
(0x07). The byte array must be in
OperatingMode.API mode.IllegalArgumentException - if payload[0] != APIFrameType.REMOTE_AT_COMMAND_REQUEST_WIFI.getValue() or
if payload.length < .NullPointerException - if payload == null.public LinkedHashMap<String,String> getAPIPacketParameters()
XBeeAPIPacketpublic String getCommand()
public Inet4Address getDestinationAddress()
Inet4Addresspublic byte[] getParameter()
getParameterAsString(),
setParameter(byte[]),
setParameter(String)public String getParameterAsString()
null if it is not
set.getParameter(),
setParameter(byte[]),
setParameter(String)public int getTransmitOptions()
RemoteATCommandOptionspublic 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 setParameter(byte[] parameter)
parameter - The AT command parameter.getParameter(),
getParameterAsString(),
setParameter(String)public void setParameter(String parameter)
parameter - The AT command parameter as String.getParameter(),
getParameterAsString(),
setParameter(byte[])© Copyright 2014 - 2019 Digi International Inc. All rights reserved.