Package org.yamcs.tse
Class TcpIpDriver
- java.lang.Object
-
- org.yamcs.tse.InstrumentDriver
-
- org.yamcs.tse.TcpIpDriver
-
public class TcpIpDriver extends InstrumentDriver
Connect and command a device over TCP/IP. Typical use case is an instrument with LXI support. Not thread safe.
-
-
Field Summary
-
Fields inherited from class org.yamcs.tse.InstrumentDriver
commandSeparation, encoding, instrument, interceptors, responseTermination, responseTimeout
-
-
Constructor Summary
Constructors Constructor Description TcpIpDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()voiddisconnect()StringgetDefaultRequestTermination()Returns the driver-specific default pattern for terminating requests.voidinit(String name, YConfiguration config)voidreadAvailable(ResponseBuffer responseBuffer, int timeout)voidwrite(byte[] cmd)-
Methods inherited from class org.yamcs.tse.InstrumentDriver
command, getCommandSeparation, getName, getResponseTermination, getResponseTimeout
-
-
-
-
Method Detail
-
init
public void init(String name, YConfiguration config)
- Overrides:
initin classInstrumentDriver
-
connect
public void connect() throws IOException- Specified by:
connectin classInstrumentDriver- Throws:
IOException
-
disconnect
public void disconnect() throws IOException- Specified by:
disconnectin classInstrumentDriver- Throws:
IOException
-
getDefaultRequestTermination
public String getDefaultRequestTermination()
Description copied from class:InstrumentDriverReturns the driver-specific default pattern for terminating requests. This is the termination that gets used if the user does not explicitly configure anything.Return
nullto do no request termination.- Specified by:
getDefaultRequestTerminationin classInstrumentDriver
-
write
public void write(byte[] cmd) throws IOException- Specified by:
writein classInstrumentDriver- Throws:
IOException
-
readAvailable
public void readAvailable(ResponseBuffer responseBuffer, int timeout) throws IOException
- Specified by:
readAvailablein classInstrumentDriver- Throws:
IOException
-
-