com.esf.device.modem.service
Class CellularModem

java.lang.Object
  extended by com.esf.device.modem.service.CellularModem
All Implemented Interfaces:
IBasicCellularModemService
Direct Known Subclasses:
UsbModem

public class CellularModem
extends java.lang.Object
implements IBasicCellularModemService

Defines CellularModem class

Author:
ilya.binshtok

Field Summary
 
Fields inherited from interface com.esf.device.modem.service.IBasicCellularModemService
SERVICE_NAME
 
Constructor Summary
CellularModem()
           
 
Method Summary
 void allowConnect(boolean status)
          Allows modem to establish PPP connection if status is true.
 void disable()
          disables modem
 void enable()
          enables modem
 java.lang.String getManufacturer()
          Returns modem's manufacturer identification
 java.lang.String getModel()
          Reports modem's model
 java.lang.String[] getRevisionID()
          Reports modem's revision identification
 java.lang.String getSerialNumber()
          Answers modem's serial number
 boolean isConnectAllowed()
          Reports if connection is allowed by the application.
 boolean isEnabled()
          Answers if cellular modem is enabled by application
default value is set to true
 boolean isOn()
          Answers if modem is on
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellularModem

public CellularModem()
Method Detail

isOn

public boolean isOn()
Description copied from interface: IBasicCellularModemService
Answers if modem is on

Specified by:
isOn in interface IBasicCellularModemService
Returns:
true - modem is on
false - modem is off

enable

public void enable()
Description copied from interface: IBasicCellularModemService
enables modem

Specified by:
enable in interface IBasicCellularModemService

disable

public void disable()
Description copied from interface: IBasicCellularModemService
disables modem

Specified by:
disable in interface IBasicCellularModemService

isEnabled

public boolean isEnabled()
Description copied from interface: IBasicCellularModemService
Answers if cellular modem is enabled by application
default value is set to true

Specified by:
isEnabled in interface IBasicCellularModemService
Returns:
true - modem is enabled
false - modem is disabled

getModel

public java.lang.String getModel()
Description copied from interface: IBasicCellularModemService
Reports modem's model

Specified by:
getModel in interface IBasicCellularModemService
Returns:
model, null if not known

getManufacturer

public java.lang.String getManufacturer()
Description copied from interface: IBasicCellularModemService
Returns modem's manufacturer identification

Specified by:
getManufacturer in interface IBasicCellularModemService
Returns:
manufacturer, null if not known

getSerialNumber

public java.lang.String getSerialNumber()
Description copied from interface: IBasicCellularModemService
Answers modem's serial number

Specified by:
getSerialNumber in interface IBasicCellularModemService
Returns:
ESN, null if not known

getRevisionID

public java.lang.String[] getRevisionID()
Description copied from interface: IBasicCellularModemService
Reports modem's revision identification

Specified by:
getRevisionID in interface IBasicCellularModemService
Returns:
array of revision ID's, null if not known

allowConnect

public void allowConnect(boolean status)
Description copied from interface: IBasicCellularModemService
Allows modem to establish PPP connection if status is true. Otherwise modem is not allowed to establish connection and appropriate exception is generated.

Specified by:
allowConnect in interface IBasicCellularModemService
Parameters:
status - - enable/disable as boolean

isConnectAllowed

public boolean isConnectAllowed()
Description copied from interface: IBasicCellularModemService
Reports if connection is allowed by the application.

Specified by:
isConnectAllowed in interface IBasicCellularModemService
Returns:
boolean