public class TestAcrComm extends Object
org.lsst.ccs.shell.JLineShell. See the file RunTestAcrComm.properties
in the main resources directory of this package.
Commands that display controller parameters and flags give the name and the AcroBasic reference as well as the value. References to parameters in AcroBasic have the form "P" followed by the parameter's index number, as in "P12345". Bit-flag references are like "BIT12345". Program local variables have a type letter followed by a form letter followed by an index number. "L" denotes long (32-bit signed integer), "S" is for single (32-bit floating point), "D" is for double (64-bit float) and "$" is for string. The form letters are "V" for scalars and "A" for arrays. Examples: LV0, DA10, $V3.
Values and bit-flags are divided into a number of categories depending on the controller object, if any, to which they belong.
Note the controller converts all internal floating-point values to and from IEEE single-precision format, even the double floats. The internal format varies between the various controller models.
| Constructor and Description |
|---|
TestAcrComm() |
| Modifier and Type | Method and Description |
|---|---|
void |
close_command()
Closes the current connection, if any, to a controller.
|
void |
open_command(ControllerType ctrlType,
String controllerHost)
Opens a network connection to the controller of the given type and IP address.
|
void |
send_command(String... word)
Sends AcroBasic commands to the controller and displays the replies.
|
void |
setAxis_command(int axisNum,
String paramName,
String newValue)
Sets a particular axis parameter/flag.
|
void |
setMaster_command(int masterNum,
String paramName,
String newValue)
Sets a particular master parameter/flag.
|
void |
setProgram_command(int programNum,
String varName,
String... newValue)
Sets a local variable in a controller program, or part of the variable if
it's an array.
|
void |
setSystem_command(String paramName,
String newValue)
Sets a particular system parameter or flag.
|
void |
setUser_command(int userNum,
String newValue)
Sets a particular user parameter.
|
void |
showAxis_command(int axisNum)
Displays the supported parameters and flags for a given axis.
|
void |
showConnection_command(int connectionNum)
Displays the supported parameters and flags for a given connection.
|
void |
showEncoder_command(int encoderNum)
Displays the supported parameters and flags for a given encoder.
|
void |
showGlobals_command()
Displays all the global parameters and flags known to
AcrComm. |
void |
showMaster_command(int masterNum)
Displays the supported parameters and flags for a given master.
|
void |
showProgram_command(int programNum,
String varName)
Displays the value of a variable local to the given program.
|
void |
showSystem_command()
Displays all supported system-level parameters and flags.
|
void |
showUser_command()
Displays the values of the supported user parameters.
|
@Command(name="open",
description="Open connections to the controller.")
public void open_command(@Argument(name="controllerType",description="The type of ACR controller.")
ControllerType ctrlType,
@Argument(name="controllerHostname",description="The hostname or dotted IP address of the controller.")
String controllerHost)
throws Exception
ctrlType - the type of controller, for example ACR9000.controllerHost - the host name or dotted IPv4 address of the controller.Exception - if the connection can't be established.@Command(name="close",
description="Close the current connection, if any, to the controller.")
public void close_command()
@Command(name="showGlobals",
description="Show all the global parameters and flags supported by the Parker driver.")
public void showGlobals_command()
AcrComm.@Command(name="showSystem",
description="Show all system-level parameters supported by the Parker driver.")
public void showSystem_command()
@Command(name="showMaster",
description="Show the master-level parameters for a given master.")
public void showMaster_command(@Argument(name="masterNumber",description="The master\'s index number.")
int masterNum)
masterNum - the master number.@Command(name="showEncoder",
description="Show the encoder-level parameters for a given encoder.")
public void showEncoder_command(@Argument(name="encoderNumber",description="The encoder\'s index number.")
int encoderNum)
encoderNum - the encoder number.@Command(name="showAxis",
description="Show the axis-level parameters for a given axis.")
public void showAxis_command(@Argument(name="axisNumber",description="The axis\' index number.")
int axisNum)
axisNum - the axis number.@Command(name="showConnection",
description="Show the connection-level parameters for a given connection.")
public void showConnection_command(@Argument(name="connectionNumber",description="The connection\'s index number.")
int connectionNum)
connectionNum - the connection number.@Command(name="showUser",
description="Show all user parameters.")
public void showUser_command()
@Command(name="showProgram",
description="Show a local variable of a program.")
public void showProgram_command(@Argument(name="programNumber",description="The program\'s index number.")
int programNum,
@Argument(name="varName",description="The name of the variable, for example LV0, SA1, etc.")
String varName)
programNum - the program number.varName - the variable name; see the class description the form of the names.@Command(name="setSystem",
description="Set a system parameter/flag.")
public void setSystem_command(@Argument(name="paramName",description="The name of the system parameter/flag to set.")
String paramName,
@Argument(name="newValue",description="The new value for the parameter/flag.")
String newValue)
paramName - the name of the parameter/flag.newValue - the new value of the right type.@Command(name="setMaster",
description="Set a master parameter/flag.")
public void setMaster_command(@Argument(name="masterNumber",description="The index number of the target master.")
int masterNum,
@Argument(name="paramName",description="The name of the master parameter/flag to set.")
String paramName,
@Argument(name="newValue",description="The new value for the parameter/flag.")
String newValue)
masterNum - the master number.paramName - the parameter/flag name.newValue - the new value of the right type.@Command(name="setAxis",
description="Set an axis parameter/flag.")
public void setAxis_command(@Argument(name="axisNumber",description="The index number of the target axis.")
int axisNum,
@Argument(name="paramName",description="The name of the axis parameter/flag to set.")
String paramName,
@Argument(name="newValue",description="The new value for the parameter/flag.")
String newValue)
axisNum - the axis number.paramName - the name of the parameter/flag.newValue - the new value of the right type.@Command(name="setUser",
description="Set a user parameter.")
public void setUser_command(@Argument(name="userNumber",description="The index of the user parameter to set.")
int userNum,
@Argument(name="newValue",description="The new value of the parameter.")
String newValue)
userNum - the parameter number.newValue - the new value (floating point).@Command(name="setProgram",
description="Set a local variable in a program.")
public void setProgram_command(@Argument(name="programNumber",description="The index number of the target program.")
int programNum,
@Argument(name="varName",description="The name of the local variable to set.")
String varName,
@Argument(name="newValues",description="At least one new value, up to as many as the variable can hold.")
String... newValue)
programNum - the program number.varName - the variable name.newValue - at least one new value, up to as many as the variable can hold.@Command(name="send",
description="Send AcroBasic commands to the controller and display the reply.")
public void send_command(@Argument(name="words",description="Words to send to the controller separated by blanks.")
String... word)
word - the words to join and send.Copyright © 2017 LSST. All rights reserved.