public final class Client extends Object
Only a single thread should manipulate the instrument using this class. Only a single stream of data records should be in use at any time since advancing to the next record involves updating the record index register on the instrument before reading the record data registers. This lazy retrieval allows you to skip needless I/O if you decide you don't want all the stored records.
| Constructor and Description |
|---|
Client(Hardware hw)
Stores a reference to a Hardware object used to communicate with the instrument and
reads the device model and the register map version.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearRecords()
Delete all records currently stored in the instrument.
|
String |
getModel()
Gets the model of Lighthouse counter hardware (read by constructor).
|
java.util.stream.Stream<DataRecord> |
getRecords()
Gets all the data records currently stored in the instrument's memory.
|
int |
getRegisterMapVersion()
Gets the version of the Modbus register map used by the hardware (read by constructor).
|
void |
startRecording()
Starts automatic data collection.
|
void |
stopRecording()
Stops data collection.
|
public Client(Hardware hw) throws org.lsst.ccs.drivers.commons.DriverException
hw - The communications object.org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.public String getModel()
public int getRegisterMapVersion()
public void stopRecording()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.public void startRecording()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.public java.util.stream.Stream<DataRecord> getRecords() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise or if data collection
hasn't been stopped.public void clearRecords()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise or if data collection
hasn't been stopped.Copyright © 2016 LSST. All rights reserved.