
public class LighthouseModbus extends Object implements Instrument
| Constructor and Description |
|---|
LighthouseModbus(InstrumentConfig config)
Constructs a new instance from configuration data.
|
| Modifier and Type | Method and Description |
|---|---|
Instrument |
disable()
Produces a new instance that has readout disabled.
|
Instrument |
enable(LocationConfig loc)
Produces a new instance that has been enabled for readout and is serving
a new location.
|
int |
getIndex()
Gets the position of this instrument in the list of instruments.
|
Optional<org.lsst.ccs.HardwareException> |
getLastException()
Gets the exception thrown (if any) the last time we tried to operate on this instrument.
|
InstrumentStatus |
getStatus()
Gets the current status of the instrument.
|
Stream<TrendableRecord> |
getTrendables()
Gets all the trendable data resulting from the last reading of the instrument.
|
Instrument |
read()
Produces a new instance that contains a fresh set of data read from
the instrument.
|
public LighthouseModbus(InstrumentConfig config)
config - The subsystem's configuration information for the instrument.public Optional<org.lsst.ccs.HardwareException> getLastException()
getLastException in interface InstrumentOptional if there have been no operations or if the last operation
was successful. Otherwise an Optional containing the exception that terminated
the operation. Getters are not considered operations.public int getIndex()
getIndex in interface InstrumentConfigurationService#getInstrumentConfigs()public InstrumentStatus getStatus()
getStatus in interface Instrumentpublic Stream<TrendableRecord> getTrendables()
getTrendables in interface InstrumentTrendableRecord instances, empty if no data
is available, for example if the instrument has never been read or if the last read
found no new data or failed. The master key of each record is the location for
which the data were taken. The master timestamp is the time at which the record was
made. Each key/value pair consists of a channel name and value.Instrument.read()public Instrument disable()
disable in interface Instrumentpublic Instrument enable(LocationConfig loc)
enable in interface Instrumentloc - The configuration of the new location.public Instrument read()
Instrument.getTrendables() method relies on this
data to produce its result.read in interface InstrumentCopyright © 2018 LSST. All rights reserved.