FileDocCategorySizeDatePackage
AtCommandHandler.javaAPI DocAndroid 1.5 API3439Wed May 06 22:41:54 BST 2009android.bluetooth

AtCommandHandler

public abstract class AtCommandHandler extends Object
Handler Interface for {@link AtParser}.

hide

Fields Summary
Constructors Summary
Methods Summary
public android.bluetooth.AtCommandResulthandleActionCommand()
Handle Actions command "AT+FOO".

Action commands are part of the Extended command syntax, and are typically used to signal an action on "FOO".

return
The result of this command.

        return new AtCommandResult(AtCommandResult.ERROR);
    
public android.bluetooth.AtCommandResulthandleBasicCommand(java.lang.String arg)
Handle Basic commands "ATA".

These are single letter commands such as ATA and ATD. Anything following the single letter command ('A' and 'D' respectively) will be passed as 'arg'.

For example, "ATDT1234" would result in the call handleBasicCommand("T1234").

param
arg Everything following the basic command character.
return
The result of this command.

        return new AtCommandResult(AtCommandResult.ERROR);
    
public android.bluetooth.AtCommandResulthandleReadCommand()
Handle Read command "AT+FOO?".

Read commands are part of the Extended command syntax, and are typically used to read the value of "FOO".

return
The result of this command.

        return new AtCommandResult(AtCommandResult.ERROR);
    
public android.bluetooth.AtCommandResulthandleSetCommand(java.lang.Object[] args)
Handle Set command "AT+FOO=...".

Set commands are part of the Extended command syntax, and are typically used to set the value of "FOO". Multiple arguments can be sent.

AT+FOO=[[,[,...]]]

Each argument will be either numeric (Integer) or String. handleSetCommand is passed a generic Object[] array in which each element will be an Integer (if it can be parsed with parseInt()) or String.

Missing arguments ",," are set to empty Strings.

param
args Array of String and/or Integer's. There will always be at least one element in this array.
return
The result of this command.

        return new AtCommandResult(AtCommandResult.ERROR);
    
public android.bluetooth.AtCommandResulthandleTestCommand()
Handle Test command "AT+FOO=?".

Test commands are part of the Extended command syntax, and are typically used to request an indication of the range of legal values that "FOO" can take.

By defualt we return an OK result, to indicate that this command is at least recognized.

return
The result of this command.

        return new AtCommandResult(AtCommandResult.OK);