com.scottpreston.javarobot.chapter2
Class WebSerialClient
java.lang.Object
com.scottpreston.javarobot.chapter2.WebSerialClient
- All Implemented Interfaces:
- JSerialPort
public class WebSerialClient
- extends java.lang.Object
- implements JSerialPort
Constructor Summary |
WebSerialClient(java.lang.String server,
java.lang.String tcpPort,
java.lang.String portId)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_DELAY
public static final int MAX_DELAY
- See Also:
- Constant Field Values
WebSerialClient
public WebSerialClient(java.lang.String server,
java.lang.String tcpPort,
java.lang.String portId)
read
public byte[] read()
- Specified by:
read
in interface JSerialPort
readString
public java.lang.String readString()
- Specified by:
readString
in interface JSerialPort
write
public void write(byte[] b)
throws java.lang.Exception
- Specified by:
write
in interface JSerialPort
- Throws:
java.lang.Exception
read
public byte[] read(byte[] b)
- Specified by:
read
in interface JSerialPort
readString
public java.lang.String readString(byte[] b)
- Specified by:
readString
in interface JSerialPort
close
public void close()
- Specified by:
close
in interface JSerialPort
setDTR
public void setDTR(boolean dtr)
- Specified by:
setDTR
in interface JSerialPort
getTimeout
public int getTimeout()
setTimeout
public void setTimeout(int timeout)
- Specified by:
setTimeout
in interface JSerialPort
main
public static void main(java.lang.String[] args)