java.lang.Object
org.yamcs.tse.InstrumentDriver
org.yamcs.tse.SerialPortDriver
Connect and command a device over a serial port.
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 TypeMethodDescriptionvoidconnect()voidintintReturns the driver-specific default pattern for terminating requests.getPath()voidinit(String name, YConfiguration config) voidreadAvailable(ResponseBuffer responseBuffer, int timeout) voidwrite(byte[] bytes) Methods inherited from class org.yamcs.tse.InstrumentDriver
command, getCommandSeparation, getName, getResponseTermination, getResponseTimeout
-
Constructor Details
-
SerialPortDriver
public SerialPortDriver()
-
-
Method Details
-
init
- Overrides:
initin classInstrumentDriver
-
getBaudrate
public int getBaudrate() -
getDataBits
public int getDataBits() -
getParity
-
getPath
-
connect
public void connect()- Specified by:
connectin classInstrumentDriver
-
write
public void write(byte[] bytes) - Specified by:
writein classInstrumentDriver
-
readAvailable
- Specified by:
readAvailablein classInstrumentDriver- Throws:
IOException
-
disconnect
public void disconnect()- Specified by:
disconnectin classInstrumentDriver
-
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
-