public class LighthouseDriver extends Object
| Constructor and Description |
|---|
LighthouseDriver()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearRecords()
Clears all records from the device's internal data set.
|
void |
close()
Closes the device.
|
void |
ftdiOpen(String ftdiID,
boolean debug)
Opens the device on an FTDI USB-serial cable.
|
void |
getRecords()
Prints to stdout the device's internal data set using the default encoding.
|
void |
getRecords(String filename)
Saves the device's internal data set as ASCII text.
|
void |
netOpen(String hostname,
int portNo,
boolean debug)
Opens the device on a network socket.
|
void |
serialOpen(String portName,
boolean debug)
Opens the device on a serial port.
|
void |
startRecording()
Starts the device, appending all future records to its internal data set.
|
void |
stopRecording()
Stops the device so that it no longer updates its internal data set.
|
public LighthouseDriver()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(description="Opens the device on a serial port.")
public void serialOpen(@Argument(description="The serial port name, for example /dev/ttyUSB0.")
String portName,
@Argument(description="When true, activates debug logging.",defaultValue="false")
boolean debug)
throws org.lsst.ccs.drivers.commons.DriverException
portName - The serial port name, for example /dev/ttyUSB0.debug - If true enables debug-level logging of device command traffic.org.lsst.ccs.drivers.commons.DriverException - for all errors.@Command(description="Opens the device on an FTDI USB-serial cable.")
public void ftdiOpen(@Argument(description="The serial no. of the cable, preceded by a hostname and a colon if it\'s a remote cable.")
String ftdiID,
@Argument(description="When true, activates debug logging.",defaultValue="false")
boolean debug)
throws org.lsst.ccs.drivers.commons.DriverException
ftdiID - The serial no. of the FTDI device to use, preceded by a hostname
and a colon if remote. Examples: XXXXX or foo:XXXXX.debug - If true enables debug-level logging of device command traffic.org.lsst.ccs.drivers.commons.DriverException - for all errors.@Command(description="Opens the device on a network socket.")
public void netOpen(@Argument(description="The remote host\'s name or IP address.")
String hostname,
@Argument(description="The number of the port to connect to.")
int portNo,
@Argument(description="When true, activates debug logging.",defaultValue="false")
boolean debug)
throws org.lsst.ccs.drivers.commons.DriverException
hostname - The remote host's name or IP address.portNo - The number of the port to connect to.debug - If true enables debug-level logging of device command traffic.org.lsst.ccs.drivers.commons.DriverException - for all errors.@Command(name="close",
description="Closes link used to communicate with the counter.")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for all errors.@Command(name="stopRecording",
description="Stops the counter so that it no longer updates its internal data set.")
public void stopRecording()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for all errors.@Command(name="startRecording",
description="Starts the counter, appending all future records to its internal data set.")
public void startRecording()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="clearRecords",
description="Clears all readings from the counter\'s internal data set.")
public void clearRecords()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="getRecords",
description="Saves the counter\'s buffered data set as ASCII text.")
public void getRecords(@Argument(description="The name of the file in which to save")
String filename)
throws org.lsst.ccs.drivers.commons.DriverException
filename - The name of a file to receive the data.org.lsst.ccs.drivers.commons.DriverException - for all checked exceptions.
begin record
start yyyy-mm-ddThh24:mm:ssZ
duration xxxxx seconds
location B84_123
status laser! sampler!
channel 10.0 counter 12230 particles
channel 2.5 counter 14 particles
channel temp temperature 39.1 Celsius
channel hum relhumidity 1.0 percent
end record
@Command(name="getRecords",
description="Prints to stdout the counter\'s buffered data set using the default encoding.")
public void getRecords()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException - for all checked exceptions.getRecords(java.lang.String)Copyright © 2016 LSST. All rights reserved.