The ATCommandResponseListenerListener interface defines the capabilities for
receiving the response of sending an AT command to a module's AT interpreter.
When the user wants to use the non blocking version of the ATCommand.send
function an implementation class for the ATCommandResponseListener interface
must be created first.
The single ATResponse method of this class must contain the processing code
for the possible response to the sent AT command. please note that the call
of this function is executed in a separate thread.
After creating an instance of the ATCommandResponseListener class, this class
instance has to be passed as the second parameter to the non blocking
ATCommand.send method. After the AT command has been passed to the connected
AT interpreter the function returns immediately and the response to the given
AT command is passed to this callback class later when it is available.
Callback method for passing the response to a call of the non blocking
version of the ATCommand.send function.
The callback method, will be called by the runtime system if the response
to an AT command sent by the non blocking version of the ATCommand.send
function is available.
While implementing a class for the ATCommandResponseListener interface,
the user has to place the code for processing the response into this method.
Currently there are 1024 bytes reserved to temporary store the response
internally inside the virtual machine. Some AT commands return responses
which might be longer (e.g. reading a phone book or the provider list at
once). In this case this function is called more than once with the consecutive
parts of the response. To avoid this an application should use the possible
problematic commands in their format returning only single entries. Also if
anything went wrong a null is passed to this function.
Parameters:
Response - The response to the sent AT command. It is possible that
null is passed to this function in case of an error.