public class TcpCommunications extends ReferenceDriverCommunications
ReferenceDriverCommunications.LineEndingType
Modifier and Type | Field and Description |
---|---|
protected java.net.Socket |
clientSocket |
protected AbstractReferenceDriver |
driver |
protected GcodeServer |
gcodeServer |
protected java.io.BufferedReader |
input |
protected java.lang.String |
ipAddress |
protected java.lang.String |
name |
protected java.io.DataOutputStream |
output |
protected int |
port |
lineEndingType
Constructor and Description |
---|
TcpCommunications() |
Modifier and Type | Method and Description |
---|---|
void |
connect() |
void |
disconnect() |
java.lang.String |
getConnectionName() |
GcodeServer |
getGcodeServer() |
java.lang.String |
getIpAddress() |
int |
getPort() |
int |
read() |
void |
setDriver(AbstractReferenceDriver driver) |
void |
setIpAddress(java.lang.String ip) |
void |
setPort(int port) |
void |
write(int d) |
void |
writeBytes(byte[] data) |
getLineEndingType, readLine, readUntil, setLineEndingType, writeLine
protected java.lang.String ipAddress
protected int port
protected java.lang.String name
protected java.net.Socket clientSocket
protected java.io.BufferedReader input
protected java.io.DataOutputStream output
protected GcodeServer gcodeServer
protected AbstractReferenceDriver driver
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 java.lang.String getConnectionName()
getConnectionName
in class ReferenceDriverCommunications
public int read() throws java.util.concurrent.TimeoutException, java.io.IOException
read
in class ReferenceDriverCommunications
java.util.concurrent.TimeoutException
java.io.IOException
public void write(int d) throws java.io.IOException
write
in class ReferenceDriverCommunications
java.io.IOException
public void writeBytes(byte[] data) throws java.io.IOException
writeBytes
in class ReferenceDriverCommunications
java.io.IOException
public java.lang.String getIpAddress()
public void setIpAddress(java.lang.String ip)
public int getPort()
public void setPort(int port)
public void setDriver(AbstractReferenceDriver driver)
public GcodeServer getGcodeServer()
getGcodeServer
in class ReferenceDriverCommunications