java.lang.Object
org.yamcs.tse.InstrumentDriver
org.yamcs.tse.TcpIpDriver
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 -
Method Summary
Modifier and TypeMethodDescriptionvoid
connect()
void
Returns the driver-specific default pattern for terminating requests.void
boolean
Returns whether this driver may require reassembly of multiple received fragments in order to obtain a full response.void
readAvailable
(ResponseBuffer responseBuffer, int timeout) void
write
(byte[] cmd) Methods inherited from class org.yamcs.tse.InstrumentDriver
command, getCommandSeparation, getName, getResponseTermination, getResponseTimeout
-
Constructor Details
-
TcpIpDriver
public TcpIpDriver()
-
-
Method Details
-
init
- Overrides:
init
in classInstrumentDriver
-
connect
- Specified by:
connect
in classInstrumentDriver
- Throws:
IOException
-
disconnect
- Specified by:
disconnect
in classInstrumentDriver
- Throws:
IOException
-
getDefaultRequestTermination
Description copied from class:InstrumentDriver
Returns the driver-specific default pattern for terminating requests. This is the termination that gets used if the user does not explicitly configure anything.Return
null
to do no request termination.- Specified by:
getDefaultRequestTermination
in classInstrumentDriver
-
write
- Specified by:
write
in classInstrumentDriver
- Throws:
IOException
-
readAvailable
- Specified by:
readAvailable
in classInstrumentDriver
- Throws:
IOException
-
isFragmented
public boolean isFragmented()Description copied from class:InstrumentDriver
Returns whether this driver may require reassembly of multiple received fragments in order to obtain a full response.Setting this to false, will allow to have a quick response, even if there is no response termination characters. That is, without needing to wait on timeouts.
- Specified by:
isFragmented
in classInstrumentDriver
-