com.rapplogic.xbee.api
Class RemoteAtRequest

java.lang.Object
  extended by com.rapplogic.xbee.api.XBeeRequest
      extended by com.rapplogic.xbee.api.AtCommand
          extended by com.rapplogic.xbee.api.RemoteAtRequest
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ZBForceSampleRequest

public class RemoteAtRequest
extends AtCommand

Supported by both series 1 (10C8 firmware and later) and series 2. Allows AT commands to be sent to a remote radio.

Warning: this command may not return a response if the remote radio is unreachable. You will need to set your own timeout when waiting for a response from this command, or you may wait forever.

API ID: 0x17

Author:
andrew
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.rapplogic.xbee.api.XBeeRequest
DEFAULT_FRAME_ID, NO_RESPONSE_FRAME_ID
 
Constructor Summary
RemoteAtRequest(int frameId, XBeeAddress64 remoteAddress64, XBeeAddress16 remoteAddress16, boolean applyChanges, java.lang.String command)
          Creates a Remote AT request for querying the current value of an AT command on a remote XBee
RemoteAtRequest(int frameId, XBeeAddress64 remoteAddress64, XBeeAddress16 remoteAddress16, boolean applyChanges, java.lang.String command, int[] value)
          Creates a Remote AT request for setting an AT command on a remote XBee

Note: When setting a value, you must set applyChanges for the setting to take effect.

RemoteAtRequest(XBeeAddress16 dest16, java.lang.String command)
          Creates a Remote AT instance for querying the value of an AT command on a remote XBee, by specifying the 16-bit address.
RemoteAtRequest(XBeeAddress16 remoteAddress16, java.lang.String command, int[] value)
          Creates a Remote AT instance for setting the value of an AT command on a remote XBee, by specifying the 16-bit address and value.
RemoteAtRequest(XBeeAddress64 dest64, java.lang.String command)
          Abbreviated Constructor for querying the value of an AT command on a remote XBee.
RemoteAtRequest(XBeeAddress64 dest64, java.lang.String command, int[] value)
          Abbreviated Constructor for setting an AT command on a remote XBee.
 
Method Summary
 ApiId getApiId()
           
 int[] getFrameData()
           
 XBeeAddress16 getRemoteAddr16()
           
 XBeeAddress64 getRemoteAddr64()
           
 boolean isApplyChanges()
           
 void setApplyChanges(boolean applyChanges)
           
 void setRemoteAddr16(XBeeAddress16 remoteAddr16)
           
 void setRemoteAddr64(XBeeAddress64 remoteAddr64)
           
 java.lang.String toString()
           
 
Methods inherited from class com.rapplogic.xbee.api.AtCommand
getCommand, getValue, setCommand, setValue
 
Methods inherited from class com.rapplogic.xbee.api.XBeeRequest
getFrameId, getXBeePacket, setApiId, setFrameId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteAtRequest

public RemoteAtRequest(int frameId,
                       XBeeAddress64 remoteAddress64,
                       XBeeAddress16 remoteAddress16,
                       boolean applyChanges,
                       java.lang.String command,
                       int[] value)
Creates a Remote AT request for setting an AT command on a remote XBee

Note: When setting a value, you must set applyChanges for the setting to take effect. When sending several requests, you can wait until the last request before setting applyChanges=true.

Parameters:
frameId -
remoteAddress64 -
remoteAddress16 -
applyChanges - set to true if setting a value or issuing a command that changes the state of the radio (e.g. FR); not applicable to query requests
command - two character AT command to set or query
value - if null then the current setting will be queried

RemoteAtRequest

public RemoteAtRequest(int frameId,
                       XBeeAddress64 remoteAddress64,
                       XBeeAddress16 remoteAddress16,
                       boolean applyChanges,
                       java.lang.String command)
Creates a Remote AT request for querying the current value of an AT command on a remote XBee

Parameters:
frameId -
remoteAddress64 -
remoteAddress16 -
applyChanges -
command -

RemoteAtRequest

public RemoteAtRequest(XBeeAddress64 dest64,
                       java.lang.String command,
                       int[] value)
Abbreviated Constructor for setting an AT command on a remote XBee. This defaults to the DEFAULT_FRAME_ID, and true for apply changes

Parameters:
dest64 -
command -
value -

RemoteAtRequest

public RemoteAtRequest(XBeeAddress64 dest64,
                       java.lang.String command)
Abbreviated Constructor for querying the value of an AT command on a remote XBee. This defaults to the DEFAULT_FRAME_ID, and true for apply changes

Parameters:
dest64 -
command -

RemoteAtRequest

public RemoteAtRequest(XBeeAddress16 dest16,
                       java.lang.String command)
Creates a Remote AT instance for querying the value of an AT command on a remote XBee, by specifying the 16-bit address. Uses the broadcast address for 64-bit address (00 00 00 00 00 00 ff ff)

Defaults are: frame id: 1, applyChanges: true

Parameters:
dest64 -
command -

RemoteAtRequest

public RemoteAtRequest(XBeeAddress16 remoteAddress16,
                       java.lang.String command,
                       int[] value)
Creates a Remote AT instance for setting the value of an AT command on a remote XBee, by specifying the 16-bit address and value. Uses the broadcast address for 64-bit address (00 00 00 00 00 00 ff ff)

Defaults are: frame id: 1, applyChanges: true

Parameters:
remoteAddress16 -
command -
Method Detail

getFrameData

public int[] getFrameData()
Overrides:
getFrameData in class AtCommand

getApiId

public ApiId getApiId()
Overrides:
getApiId in class AtCommand

getRemoteAddr64

public XBeeAddress64 getRemoteAddr64()

setRemoteAddr64

public void setRemoteAddr64(XBeeAddress64 remoteAddr64)

getRemoteAddr16

public XBeeAddress16 getRemoteAddr16()

setRemoteAddr16

public void setRemoteAddr16(XBeeAddress16 remoteAddr16)

isApplyChanges

public boolean isApplyChanges()

setApplyChanges

public void setApplyChanges(boolean applyChanges)

toString

public java.lang.String toString()
Overrides:
toString in class AtCommand