public class SerialModem extends Object implements Runnable, Modem, jssc.SerialPortEventListener, Thread.UncaughtExceptionHandler
Modem.Mode
Modifier and Type | Field and Description |
---|---|
protected jssc.SerialPort |
serialPort |
Constructor and Description |
---|
SerialModem(String portName) |
SerialModem(String portName,
int boudrate) |
SerialModem(String portName,
int boudrate,
int atResponseTO) |
SerialModem(String portName,
int boudrate,
int databit,
int stopbit,
int parity,
int atTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
int |
getAtTimeout() |
static String[] |
getAvailablePorts() |
String |
getPortName() |
int |
getSpeed() |
void |
open() |
void |
putNotification(Notification notification) |
void |
run() |
<T extends AAT> |
send(T cmd) |
void |
serialEvent(jssc.SerialPortEvent event) |
void |
setGatewayListener(Gateway gateway) |
void |
uncaughtException(Thread t,
Throwable e) |
public SerialModem(String portName, int boudrate, int databit, int stopbit, int parity, int atTimeout)
public SerialModem(String portName, int boudrate)
public SerialModem(String portName, int boudrate, int atResponseTO)
public SerialModem(String portName)
public void uncaughtException(Thread t, Throwable e)
uncaughtException
in interface Thread.UncaughtExceptionHandler
public void open() throws GatewayException
open
in interface Modem
GatewayException
public void close() throws GatewayException
close
in interface Modem
GatewayException
public <T extends AAT> T send(T cmd) throws GatewayException
send
in interface Modem
GatewayException
public void serialEvent(jssc.SerialPortEvent event)
serialEvent
in interface jssc.SerialPortEventListener
public int getAtTimeout()
getAtTimeout
in interface Modem
public String getPortName()
getPortName
in interface Modem
public void setGatewayListener(Gateway gateway)
setGatewayListener
in interface Modem
public void putNotification(Notification notification)
putNotification
in interface Modem
public static String[] getAvailablePorts()
Copyright © 2015–2016 jSMS4Pi. All rights reserved.