public class TestIV251 extends Object
| Constructor and Description |
|---|
TestIV251()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
acivateNewSettings()
Activate new settings
|
void |
close()
Closes connection
|
String |
listSerialFormats()
List available serial formats
|
void |
open(String ident)
Opens serial connection to MotronaIV251 device with default baud
rate and data characteristics.
|
void |
open(String ident,
int baudRate,
org.lsst.ccs.drivers.motrona.MotronaIV251.SerialFormat format)
Opens serial connection to MotronaIV251 device with specified baud
rate and data characteristics.
|
String |
readAll()
Read all settings and data from Motrona IV251
Loops over all read commands and returns them in a table format.
|
int |
readEncoderError()
Read encoder error bit
|
int |
readPosition()
Read encoder position.
|
String |
readSerialSettings()
Read and decode serial settings of device
|
void |
repeatSetParameter(MotronaIV251.CmndParam param,
int value,
int reps)
Set a parameter multiple times in close succession
(PUrpose: to help diagnose intermittent timeouts)
|
void |
saveSettings()
Save settings for next power-up
|
void |
setAndActivateParameter(MotronaIV251.CmndParam param,
int value)
Set and activate parameter value
|
void |
setDataRate(int value)
Set serial baud rate (pending activate command)
|
void |
setDebug(boolean mode)
Set debug mode on or off
|
void |
setDelay(long delay)
Set delay after completing a command to hardware
|
void |
setParameter(MotronaIV251.CmndParam param,
int value)
Set parameter value (pending activate command)
|
void |
setSerialFormat(org.lsst.ccs.drivers.motrona.MotronaIV251.SerialFormat format)
Set serial format (pending activate command)
|
String |
timestamp()
Determines current time
|
@Command(name="timestamp",
description="Prints current time")
public String timestamp()
@Command(name="open",
description="Open default connection to device")
public void open(@Argument(name="ident",description="Identification")
String ident)
throws org.lsst.ccs.drivers.commons.DriverException
ident - The identification (serial port name)org.lsst.ccs.drivers.commons.DriverException@Command(name="open",
description="Open connection to device")
public void open(@Argument(name="ident",description="Identification")
String ident,
@Argument(name="baud",description="baud rate in Hz")
int baudRate,
@Argument(name="format",description="enumerated data characteristics")
org.lsst.ccs.drivers.motrona.MotronaIV251.SerialFormat format)
throws org.lsst.ccs.drivers.commons.DriverException
ident - The identification (serial port name)baud - rate (Hz)data - characteristics (enumerated format)org.lsst.ccs.drivers.commons.DriverException@Command(name="close",
description="Closes connection to device")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="readAll",
description="Read all IV251 settings and data")
public String readAll()
@Command(name="readSerialSettings",
description="Read and decode settings")
public String readSerialSettings()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="readPosition",
description="Read encoder position")
public int readPosition()
throws org.lsst.ccs.drivers.commons.DriverException
Driver - Exceptionorg.lsst.ccs.drivers.commons.DriverException@Command(name="readEncoderError",
description="<1|0> if <encoder error|no encoder error>")
public int readEncoderError()
throws org.lsst.ccs.drivers.commons.DriverException
Driver - Exceptionorg.lsst.ccs.drivers.commons.DriverException@Command(name="setParameter",
description="Set parameter value (pending activate command)")
public void setParameter(@Argument(name=" enumerated CmndParam")
MotronaIV251.CmndParam param,
@Argument(name="int value")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
Enumerated - parameter nameValue - to setorg.lsst.ccs.drivers.commons.DriverException@Command(name="repeatSetParameter",
description="Set parameter value multiple times in succession")
public void repeatSetParameter(@Argument(name=" enumerated CmndParam")
MotronaIV251.CmndParam param,
@Argument(name="int value")
int value,
@Argument(name="repetitions")
int reps)
throws org.lsst.ccs.drivers.commons.DriverException
Enumerated - parameter nameValue - to setorg.lsst.ccs.drivers.commons.DriverException@Command(name="activateNewSettings",
description="copy settings to registers")
public void acivateNewSettings()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setAndActivateParameter",
description="Set and activate parameter value")
public void setAndActivateParameter(@Argument(name=" enumerated CmndParam")
MotronaIV251.CmndParam param,
@Argument(name="int value")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
Enumerated - parameter nameValue - to setorg.lsst.ccs.drivers.commons.DriverException@Command(name="setDataRate",
description="Set baud rate. Danger: last-resort reset only!")
public void setDataRate(@Argument(name=" 600 to 38400",description="Motrona IV251 baud rate setting")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
Serial - baud rate of device only (600 to 38400, default 9600)org.lsst.ccs.drivers.commons.DriverException@Command(name="setSerialFormat",
description="Set setiral format. Danger: last-resort reset only!")
public void setSerialFormat(@Argument(name=" <enumerated format>",description="Motrona IV251 serial format setting")
org.lsst.ccs.drivers.motrona.MotronaIV251.SerialFormat format)
throws org.lsst.ccs.drivers.commons.DriverException
IV251 - serial format (enum); use listSerialFormats to see enum'sorg.lsst.ccs.drivers.commons.DriverException@Command(name="listSerialFormats",
description="list of enum names")
public String listSerialFormats()
@Command(name="saveSettings",
description="Save settings to EEProm for next power-up")
public void saveSettings()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setDebug",
description="set debug mode <true|false>")
public void setDebug(@Argument(name="<true|false>",description="debug mode")
boolean mode)
@Command(name="setDelay",
description="set delay after hardware command")
public void setDelay(@Argument(name="delay",description="in ms")
long delay)
long - delay in msCopyright © 2019 LSST. All rights reserved.