public interface Hardware
close(),
each of these operations involves just a few register read and/or write commands.| Modifier and Type | Method and Description |
|---|---|
boolean |
alarmIsEnabled(DataChannel chan)
Gets the alarm enable status for a particle channel.
|
boolean |
channelIsEnabled(DataChannel chan)
Checks whether the given data channel is enabled.
|
void |
close()
Closes the underlying connection to the device.
|
long |
getAlarmThreshold(DataChannel chan)
Gets the current alarm threshold for a particle channel.
|
long |
getClock()
Gets the device's time-of-day clock.
|
String |
getDeviceLocationName()
Gets the label for the current location set for the device.
|
ChannelType |
readChannelType(DataChannel chan)
Reads the data type registers for a data channel of the current record.
|
ChannelUnits |
readChannelUnits(DataChannel chan)
Reads the units registers for a data channel of the current record.
|
double |
readChannelValue(DataChannel chan)
Reads the value registers for a data channel of the current record.
|
Set<DeviceFlag> |
readDeviceFlags()
Reads the device status register.
|
int |
readDeviceMapVersion()
Reads the Modbus map version register.
|
String |
readDeviceModel()
Reads the model designation registers.
|
DataRecord |
readRecord()
Reads the current data record from the device faster than one could by combining
the other methods exported by this interface.
|
int |
readRecordCount()
Reads the record count register.
|
java.time.Duration |
readRecordDuration()
Reads the record sample time register.
|
Set<RecordFlag> |
readRecordFlags()
Reads the device status registers of the current record.
|
String |
readRecordLocation()
Reads the registers for location number and location name.
|
java.time.Instant |
readRecordStartTime()
Reads the record timestamp register.
|
void |
setAlarmEnable(DataChannel chan,
boolean on)
Enables or disables the alarm for a particle channel.
|
void |
setAlarmThreshold(DataChannel chan,
long threshold)
Sets the particle count alarm threshold for a particle channel but doesn't
change the alarm enable status.
|
void |
setClock(long epochSecond)
Sets the device's time-of-day clock.
|
void |
setDeviceLocationIndex(int index)
Sets the current-location register for the device.
|
void |
writeDeviceCommand(DeviceCommand cmd)
Writes to the device command register.
|
void |
writeRecordIndex(int index)
Writes to the record index register, making the data registers show the contents
of a particular record in its memory.
|
void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for I/O errors.String readDeviceModel() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.int readDeviceMapVersion()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.Set<DeviceFlag> readDeviceFlags() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.void writeDeviceCommand(DeviceCommand cmd) throws org.lsst.ccs.drivers.commons.DriverException
cmd - A valid device command.org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.int readRecordCount()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.void writeRecordIndex(int index)
throws org.lsst.ccs.drivers.commons.DriverException
index - The zero-based record index. 0 .. N - 1, or -1 for the latest record.org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.java.time.Instant readRecordStartTime()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.java.time.Duration readRecordDuration()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.String readRecordLocation() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.Set<RecordFlag> readRecordFlags() throws org.lsst.ccs.drivers.commons.DriverException
RecordFlag.flagsFromMask(int).org.lsst.ccs.drivers.commons.DriverException - if communication problems arise.ChannelType readChannelType(DataChannel chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel.org.lsst.ccs.drivers.commons.DriverException - if communication problems arise or
if the channel type label read from the device isn't what's specified by chan.ChannelUnits readChannelUnits(DataChannel chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel.org.lsst.ccs.drivers.commons.DriverException - if communication problems arise or
if the units label read from the device isn't what's specified by chan.double readChannelValue(DataChannel chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel.org.lsst.ccs.drivers.commons.DriverException - if communication problems arise or
if the channel isn't enabled on the device.boolean channelIsEnabled(DataChannel chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel to check.org.lsst.ccs.drivers.commons.DriverException - upon I/O error.DataRecord readRecord() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for I/O errors.void setAlarmThreshold(DataChannel chan, long threshold) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel to be affected.threshold - The limiting particle count.org.lsst.ccs.drivers.commons.DriverException - for I/O errors.IllegalArgumentException - if the channel is analog or if the threshold
is not in the interval [0, 2^32-1].long getAlarmThreshold(DataChannel chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel to query.org.lsst.ccs.drivers.commons.DriverException - for I/O errors.IllegalArgumentException - if the channel is analog.void setAlarmEnable(DataChannel chan, boolean on) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel to affect.on - true to enable alarms, false to disable.org.lsst.ccs.drivers.commons.DriverException - for I/O errors.IllegalArgumentException - if the channel is analog.boolean alarmIsEnabled(DataChannel chan) throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel to query.org.lsst.ccs.drivers.commons.DriverException - for I/O errors.IllegalArgumentException - if the channel is analog.void setClock(long epochSecond)
throws org.lsst.ccs.drivers.commons.DriverException
epochSecond - Elapsed seconds since the Unix epoch.org.lsst.ccs.drivers.commons.DriverException - for I/O errors.long getClock()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for I/O errors.void setDeviceLocationIndex(int index)
throws org.lsst.ccs.drivers.commons.DriverException
index - The index (lowest = 1).org.lsst.ccs.drivers.commons.DriverException - for I/O errors.String getDeviceLocationName() throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for I/O errors.Copyright © 2016 LSST. All rights reserved.