public interface IModemChannelService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SERVICE_NAME
service name of this interface for the bundle activator
(com.esf.device.modem.channel.service.IModemChannelService)
|
Modifier and Type | Method and Description |
---|---|
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,
IHipCallback hipCallback,
int baud,
int dataBits,
int stopBits,
int parity)
Opens modem channel
|
ModemReply |
sendCommand(java.lang.String port,
java.lang.Class channelOwner,
IHipCallback hipCallback,
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.
|
static final java.lang.String SERVICE_NAME
void open(java.lang.String port, int channelType, java.lang.Class channelOwner, IHipCallback hipCallback, 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 openingvoid close(java.lang.String port) throws java.lang.Exception
port
- - serial portjava.lang.Exception
- if there is an error closingboolean isOpened(java.lang.String port)
port
- - serial portboolean isFunctional(java.lang.String port) throws java.lang.Exception
port
- - serial portjava.lang.Exception
boolean isFunctional(int channelType, java.lang.String port, int baud, int dataBits, int stopBits, int parity) throws java.lang.Exception
channelType
- - channel typeport
- - serial portbaud
- - baud ratedataBits
- - number of data bitsstopBits
- - number of stop bitsparity
- - parityjava.lang.Exception
ModemReply sendCommand(java.lang.String port, ModemCommand command, int tout) throws java.lang.Exception
port
- - serial portcommand
- - modem commandtout
- - timeout in millisecondsjava.lang.Exception
- if there is an error in sending or receivingModemReply sendCommand(java.lang.String port, java.lang.Class channelOwner, IHipCallback hipCallback, 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 millisecondsjava.lang.Exception
- if there is an error in sending or receivingjava.lang.Class getOwner(java.lang.String port)
port
- - serial portCopyright © 2009 Eurotech Inc. All rights reserved.