public class DemoDriver extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEVID0
The First of our devices
|
| Constructor and Description |
|---|
DemoDriver()
Constructor
Generally not needed unless some initialization required at creation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the device
|
int |
getDevId()
Gets the device ID
|
void |
open(int did)
Open the device
|
void |
print(String userWord)
Added by Farrukh Azfar - under close scrutiny from Massimiliano Turri
Open the device
|
String |
read(int count)
Read the device
|
void |
write(String input)
Write to the device (would add address, etc.
|
public static final int DEVID0
public DemoDriver()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverExceptionpublic int getDevId()
@Command(name="open",
description="Open a device for use")
public void open(@Argument(name="devId",description="The device ID of the device to open")
int did)
throws org.lsst.ccs.drivers.commons.DriverException
did - The device identifier is index from our list of devsorg.lsst.ccs.drivers.commons.DriverException@Command(name="close",
description="Close the device")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
did - The device identifier is index from our list of devsorg.lsst.ccs.drivers.commons.DriverException@Command(name="read",
description="Read <count> bytes from device and print in hex format\n\tread <N> ")
public String read(@Argument(name="count",description="The number of bytes to read")
int count)
throws Exception
count - The number of bytes to read.data - An array of sufficient size to contain the data.org.lsst.ccs.drivers.commons.DriverExceptionException@Command(name="write",
description="write the input string to the device\n\twrite <input-string>")
public void write(@Argument(name="input-string",description="The input string")
String input)
throws org.lsst.ccs.drivers.commons.DriverException
count - The number of bytes to write.buf - An array of bytes with the data to writeorg.lsst.ccs.drivers.commons.DriverException@Command(name="print",
description="print to screen at GUI or remote")
public void print(@Argument(name="printedWord",description="User input text string")
String userWord)
did - The device identifier is index from our list of devsCopyright © 2017 LSST. All rights reserved.