org.smslib.modem.athandler
Class ATHandler
java.lang.Object
org.smslib.modem.athandler.AATHandler
org.smslib.modem.athandler.ATHandler
- Direct Known Subclasses:
- ATHandler_Huawei, ATHandler_MultiTech, ATHandler_Siemens_HC25, ATHandler_Siemens_MC35i, ATHandler_SonyEricsson, ATHandler_Telit, ATHandler_Teltonika, ATHandler_Ubinetics_GDC201, ATHandler_Wavecom, ATHandler_Wavecom_FXT009, ATHandler_ZTE_MF622
public class ATHandler
- extends AATHandler
Generic modem AT handler.
Methods inherited from class org.smslib.modem.athandler.AATHandler |
addStorageLocation, findMatchingTerminator, getDescription, getGateway, getStorageLocations, getTerminators, getUnsolicitedResponse, getUnsolicitedResponses, isUnsolicitedResponse, isUnsolicitedResponse, load, matchesTerminator, setStorageLocations |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATHandler
public ATHandler(ModemGateway myGateway)
getModemDriver
public AModemDriver getModemDriver()
sync
public void sync()
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
sync
in class AATHandler
- Throws:
java.io.IOException
java.lang.InterruptedException
reset
public void reset()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
reset
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
echoOff
public void echoOff()
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
echoOff
in class AATHandler
- Throws:
java.io.IOException
java.lang.InterruptedException
init
public void init()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
init
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
done
public void done()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
done
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
isAlive
public boolean isAlive()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
isAlive
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getSimStatus
public java.lang.String getSimStatus()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getSimStatus
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
enterPin
public boolean enterPin(java.lang.String pin)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
enterPin
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
setVerboseErrors
public boolean setVerboseErrors()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
setVerboseErrors
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
setPduProtocol
public boolean setPduProtocol()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
setPduProtocol
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
setTextProtocol
public boolean setTextProtocol()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
setTextProtocol
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
setIndications
public boolean setIndications()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
setIndications
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getIndications
public CNMIDetector getIndications()
- Specified by:
getIndications
in class AATHandler
getManufacturer
public java.lang.String getManufacturer()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getManufacturer
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getModel
public java.lang.String getModel()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getModel
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getSerialNo
public java.lang.String getSerialNo()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getSerialNo
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getImsi
public java.lang.String getImsi()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getImsi
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getSwVersion
public java.lang.String getSwVersion()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getSwVersion
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getBatteryLevel
public java.lang.String getBatteryLevel()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getBatteryLevel
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getSignalLevel
public java.lang.String getSignalLevel()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getSignalLevel
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getNetworkOperator
public java.lang.String getNetworkOperator()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getNetworkOperator
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
switchStorageLocation
public boolean switchStorageLocation(java.lang.String mem)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
switchStorageLocation
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
switchToCmdMode
public void switchToCmdMode()
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
switchToCmdMode
in class AATHandler
- Throws:
java.io.IOException
java.lang.InterruptedException
keepLinkOpen
public void keepLinkOpen()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
keepLinkOpen
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
sendMessage
public int sendMessage(int size,
java.lang.String pdu,
java.lang.String phone,
java.lang.String text)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
sendMessage
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
listMessages
public java.lang.String listMessages(InboundMessage.MessageClasses messageClass)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
listMessages
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getMessageByIndex
public java.lang.String getMessageByIndex(int msgIndex)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getMessageByIndex
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
deleteMessage
public boolean deleteMessage(int memIndex,
java.lang.String memLocation)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
deleteMessage
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getGprsStatus
public java.lang.String getGprsStatus()
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getGprsStatus
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
send
public java.lang.String send(java.lang.String s)
throws TimeoutException,
GatewayException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
send
in class AATHandler
- Throws:
TimeoutException
GatewayException
java.io.IOException
java.lang.InterruptedException
getNetworkRegistration
public java.lang.String getNetworkRegistration()
throws GatewayException,
TimeoutException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
getNetworkRegistration
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
java.lang.InterruptedException
readStorageLocations
public void readStorageLocations()
throws java.lang.Exception
- Specified by:
readStorageLocations
in class AATHandler
- Throws:
java.lang.Exception
readPhonebookLocations
public java.lang.String readPhonebookLocations()
throws GatewayException,
TimeoutException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
readPhonebookLocations
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
java.lang.InterruptedException
readPhonebook
public java.lang.String readPhonebook(java.lang.String loc)
throws GatewayException,
TimeoutException,
java.io.IOException
- Specified by:
readPhonebook
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
sendCustomATCommand
public java.lang.String sendCustomATCommand(java.lang.String atCommand)
throws GatewayException,
TimeoutException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
sendCustomATCommand
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
java.lang.InterruptedException
sendUSSDCommand
public java.lang.String sendUSSDCommand(java.lang.String ussdCommand)
throws GatewayException,
TimeoutException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
sendUSSDCommand
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
java.lang.InterruptedException
sendUSSDCommand
public java.lang.String sendUSSDCommand(java.lang.String ussdCommand,
boolean interactive)
throws GatewayException,
TimeoutException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
sendUSSDCommand
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
java.lang.InterruptedException
sendUSSDRequest
public boolean sendUSSDRequest(java.lang.String presentation,
java.lang.String content,
java.lang.String dcs)
throws GatewayException,
TimeoutException,
java.io.IOException,
java.lang.InterruptedException
- Specified by:
sendUSSDRequest
in class AATHandler
- Throws:
GatewayException
TimeoutException
java.io.IOException
java.lang.InterruptedException
formatUSSDResponse
public java.lang.String formatUSSDResponse(java.lang.String ussdResponse)
- Specified by:
formatUSSDResponse
in class AATHandler
processUnsolicitedEvents
public AGateway.AsyncEvents processUnsolicitedEvents(java.lang.String response)
throws java.io.IOException
- Specified by:
processUnsolicitedEvents
in class AATHandler
- Throws:
java.io.IOException
(c) 2002-2011, http://smslib.org