public class SerialPortCommunications extends ReferenceDriverCommunications
Modifier and Type | Class and Description |
---|---|
static class |
SerialPortCommunications.DataBits |
static class |
SerialPortCommunications.FlowControl |
static class |
SerialPortCommunications.Parity |
static class |
SerialPortCommunications.StopBits |
ReferenceDriverCommunications.LineEndingType
Modifier and Type | Field and Description |
---|---|
protected int |
baud |
protected SerialPortCommunications.DataBits |
dataBits |
protected SerialPortCommunications.FlowControl |
flowControl |
protected java.lang.String |
name |
protected SerialPortCommunications.Parity |
parity |
protected java.lang.String |
portName |
protected boolean |
setDtr |
protected boolean |
setRts |
protected SerialPortCommunications.StopBits |
stopBits |
lineEndingType
Constructor and Description |
---|
SerialPortCommunications() |
Modifier and Type | Method and Description |
---|---|
void |
connect() |
void |
disconnect() |
int |
getBaud() |
java.lang.String |
getConnectionName() |
SerialPortCommunications.DataBits |
getDataBits() |
SerialPortCommunications.FlowControl |
getFlowControl() |
SerialPortCommunications.Parity |
getParity() |
java.lang.String |
getPortName() |
static java.lang.String[] |
getPortNames()
Returns an array of Strings containing the names of serial ports
present on the system
|
SerialPortCommunications.StopBits |
getStopBits() |
boolean |
isSetDtr() |
boolean |
isSetRts() |
int |
read() |
void |
setBaud(int baud) |
void |
setDataBits(SerialPortCommunications.DataBits dataBits) |
void |
setFlowControl(SerialPortCommunications.FlowControl flowControl) |
void |
setParity(SerialPortCommunications.Parity parity) |
void |
setPortName(java.lang.String portName) |
void |
setSetDtr(boolean setDtr) |
void |
setSetRts(boolean setRts) |
void |
setStopBits(SerialPortCommunications.StopBits stopBits) |
void |
writeBytes(byte[] data) |
getGcodeServer, getLineEndingType, readLine, readUntil, setLineEndingType, write, writeLine
protected java.lang.String portName
protected int baud
protected SerialPortCommunications.FlowControl flowControl
protected SerialPortCommunications.DataBits dataBits
protected SerialPortCommunications.StopBits stopBits
protected SerialPortCommunications.Parity parity
protected boolean setDtr
protected boolean setRts
protected java.lang.String name
public void connect() throws java.lang.Exception
connect
in class ReferenceDriverCommunications
java.lang.Exception
public void disconnect() throws java.lang.Exception
disconnect
in class ReferenceDriverCommunications
java.lang.Exception
public static java.lang.String[] getPortNames()
public int read() throws java.util.concurrent.TimeoutException, java.io.IOException
read
in class ReferenceDriverCommunications
java.util.concurrent.TimeoutException
java.io.IOException
public void writeBytes(byte[] data) throws java.io.IOException
writeBytes
in class ReferenceDriverCommunications
java.io.IOException
public java.lang.String getConnectionName()
getConnectionName
in class ReferenceDriverCommunications
public java.lang.String getPortName()
public void setPortName(java.lang.String portName)
public int getBaud()
public void setBaud(int baud)
public SerialPortCommunications.FlowControl getFlowControl()
public void setFlowControl(SerialPortCommunications.FlowControl flowControl)
public SerialPortCommunications.DataBits getDataBits()
public void setDataBits(SerialPortCommunications.DataBits dataBits)
public SerialPortCommunications.StopBits getStopBits()
public void setStopBits(SerialPortCommunications.StopBits stopBits)
public SerialPortCommunications.Parity getParity()
public void setParity(SerialPortCommunications.Parity parity)
public boolean isSetDtr()
public void setSetDtr(boolean setDtr)
public boolean isSetRts()
public void setSetRts(boolean setRts)