public class SerialPortConnection extends Connection
Connection.State| Modifier and Type | Field and Description |
|---|---|
static net.sf.atmodem4j.spsw.DataBits |
DATA_BITS |
static int |
DEFAULT_RESPONSE_TIMEOUT_OFFSET |
static Set<net.sf.atmodem4j.spsw.FlowControl> |
FLOW_CONTROL |
static net.sf.atmodem4j.spsw.Parity |
PARITY |
static net.sf.atmodem4j.spsw.StopBits |
STOP_BITS |
DEFAULT_BAUDRATE, is, os| Constructor and Description |
|---|
SerialPortConnection() |
SerialPortConnection(String portName) |
SerialPortConnection(String portName,
int bitPerSecond,
int responseTimeoutOffset) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
equals(Object obj) |
void |
fromJSON(net.sf.json.JSONObject json) |
net.sf.atmodem4j.spsw.DataBits |
getDataBits() |
Set<net.sf.atmodem4j.spsw.FlowControl> |
getFlowControl() |
String |
getJsonFieldName() |
String |
getName() |
net.sf.atmodem4j.spsw.Parity |
getParity() |
String |
getPortName() |
net.sf.atmodem4j.spsw.StopBits |
getStopBits() |
int |
hashCode() |
void |
open() |
void |
setPortName(String portName) |
net.sf.json.JSONObject |
toJSON(JsonSerializeType jsonSerializeType) |
String |
toString() |
createFromJSON, getBitPerSecond, getConnState, getInputStream, getLoggingStream, getOutputStrteam, getResponseTimeOutOffset, setBitPerSecond, setConnState, setLoggingStream, setResponseTimeOutOffsetpublic static final int DEFAULT_RESPONSE_TIMEOUT_OFFSET
public static final Set<net.sf.atmodem4j.spsw.FlowControl> FLOW_CONTROL
public static final net.sf.atmodem4j.spsw.DataBits DATA_BITS
public static final net.sf.atmodem4j.spsw.StopBits STOP_BITS
public static final net.sf.atmodem4j.spsw.Parity PARITY
public SerialPortConnection()
public SerialPortConnection(String portName)
public SerialPortConnection(String portName, int bitPerSecond, int responseTimeoutOffset)
public void open()
throws IOException
open in class ConnectionIOExceptionpublic void close()
throws IOException
IOExceptionpublic net.sf.json.JSONObject toJSON(JsonSerializeType jsonSerializeType)
toJSON in interface JSONSerializabletoJSON in class Connectionpublic void fromJSON(net.sf.json.JSONObject json)
fromJSON in interface JSONSerializablefromJSON in class Connectionpublic String getPortName()
public void setPortName(String portName)
portName - the portName to setpublic net.sf.atmodem4j.spsw.DataBits getDataBits()
public Set<net.sf.atmodem4j.spsw.FlowControl> getFlowControl()
public net.sf.atmodem4j.spsw.StopBits getStopBits()
public net.sf.atmodem4j.spsw.Parity getParity()
public String getJsonFieldName()
getJsonFieldName in class Connectionpublic String getName()
getName in class ConnectionCopyright © 2009–2016 MBus4J. All rights reserved.