com.alarexgroup.m2mplf.util
Class ATCommander

java.lang.Object
  extended by com.alarexgroup.m2mplf.util.ATCommander
public class ATCommander
extends java.lang.Object

This class serves as helper class for calling AT commands Please note that class uses only one instance of ATCommand class for all exec calls

Constructor Summary
ATCommander()
           
 
Method Summary
static void addListener(ATCommanderListener listener)
          Adds listener for AT commands events
static void close()
           
static java.lang.String exec(java.lang.String command)
          This method is intended for AT commands execution and from AT command returns whole answer in STRING..
static java.util.Vector execute(java.lang.String command)
          Method executes AT command and pass lines of answers in Vectors form.
static java.lang.String execute(java.lang.String command, int responseIndex)
          Executes AT command and returns required line from answer
static boolean removeListener(ATCommanderListener listener)
          Remove listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ATCommander

public ATCommander()
Method Detail

addListener

public static void addListener(ATCommanderListener listener)
Adds listener for AT commands events

Parameters:
listener - listener

removeListener

public static boolean removeListener(ATCommanderListener listener)
Remove listener

Parameters:
listener - listener
Returns:
status

exec

public static java.lang.String exec(java.lang.String command)
This method is intended for AT commands execution and from AT command returns whole answer in STRING..
In error case is atomaticaly executed record into log. file.

Parameters:
command - - AT command without CRLF
Returns:
response - full AT commant answer

execute

public static java.util.Vector execute(java.lang.String command)
Method executes AT command and pass lines of answers in Vectors form.

Parameters:
command - - AT command without CRLF
Returns:
response - vector includes lines of answers.

execute

public static java.lang.String execute(java.lang.String command,
                                       int responseIndex)
Executes AT command and returns required line from answer

Parameters:
command - - AT command without CRLF
responseIndex - - required line
Returns:
response - answer

close

public static void close()