|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines a service to be used by modem plug-ins such as MC572x, MC87xx, and so on ...
Field Summary | |
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator (com.esf.device.modem.channel.service.IModemChannelService) |
Method Summary | |
void |
close(java.lang.String port)
Closes modem channel |
java.lang.Class |
getOwner(java.lang.String port)
Reports the owner of supplied serial port |
boolean |
isFunctional(int channelType,
java.lang.String port,
int baud,
int dataBits,
int stopBits,
int parity)
Reports if modem is functional that is if it replies to AT commands. |
boolean |
isFunctional(java.lang.String port)
Reports if modem is functional that is if it replies to AT commands. |
boolean |
isOpened(java.lang.String port)
Reports if modem is opened |
void |
open(java.lang.String port,
int channelType,
java.lang.Class channelOwner,
int baud,
int dataBits,
int stopBits,
int parity)
Opens modem channel |
ModemReply |
sendCommand(java.lang.String port,
java.lang.Class channelOwner,
int baud,
int dataBits,
int stopBits,
int parity,
ModemCommand command,
int tout)
This method opens specified modem channel, sends modem command, obtains reply and closes the channel. |
ModemReply |
sendCommand(java.lang.String port,
ModemCommand command,
int tout)
This method sends modem command to specified open port and obtains reply. |
Field Detail |
public static final java.lang.String SERVICE_NAME
Method Detail |
public void open(java.lang.String port, int channelType, java.lang.Class channelOwner, int baud, int dataBits, int stopBits, int parity) throws java.lang.Exception
port
- - serial portchannelType
- - channel type (e.g. AT or HIP)channelOwner
- - channel owner classbaud
- - baud ratedataBits
- - number of data bitsstopBits
- - number of stop bitsparity
- - parity (e.g. none, even, odd)
java.lang.Exception
- if there is an error openingpublic void close(java.lang.String port) throws java.lang.Exception
port
- - serial port
java.lang.Exception
- if there is an error closingpublic boolean isOpened(java.lang.String port)
port
- - serial port
public boolean isFunctional(java.lang.String port)
port
- - serial port
public boolean isFunctional(int channelType, java.lang.String port, int baud, int dataBits, int stopBits, int parity)
channelType
- - channel typeport
- - serial portbaud
- - baud ratedataBits
- - number of data bitsstopBits
- - number of stop bitsparity
- - parity
public ModemReply sendCommand(java.lang.String port, ModemCommand command, int tout) throws java.lang.Exception
port
- - serial portcommand
- - modem commandtout
- - timeout in milliseconds
java.lang.Exception
- if there is an error in sending or receivingpublic ModemReply sendCommand(java.lang.String port, java.lang.Class channelOwner, int baud, int dataBits, int stopBits, int parity, ModemCommand command, int tout) throws java.lang.Exception
port
- - serial portchannelOwner
- - class that owns the channelbaud
- - baud ratedataBits
- - number of data bitsstopBits
- - number of stop bitsparity
- - paritycommand
- - modem commandtout
- - timeout in milliseconds
java.lang.Exception
- if there is an error in sending or receivingpublic java.lang.Class getOwner(java.lang.String port)
port
- - serial port
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |