public class TestMaq20
extends org.lsst.ccs.drivers.modbus.TestModbus
| Modifier and Type | Class and Description |
|---|---|
static class |
TestMaq20.DiscFunc
Private data
|
static class |
TestMaq20.Timebase |
| Constructor and Description |
|---|
TestMaq20()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
armFunction(int modId,
int chan)
Arms a discrete function.
|
void |
disarmFunction(int modId,
int chan)
Disarms a discrete function.
|
void |
enableOut2(int modId,
int chan,
boolean enable)
Enables/disables a discrete PWM output 2.
|
String |
is2Enabled(int modId,
int chan)
Shows whether a discrete PWM output 2 is enabled.
|
void |
open(org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
String ident)
Opens connection to a device.
|
void |
open(org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
String ident,
int param)
Opens connection to a device.
|
void |
open(org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
String ident,
int baud,
org.lsst.ccs.drivers.ascii.Ascii.DataBits dbits,
org.lsst.ccs.drivers.ascii.Ascii.StopBits sbits,
org.lsst.ccs.drivers.ascii.Ascii.Parity parity,
org.lsst.ccs.drivers.ascii.Ascii.FlowCtrl flow)
Opens connection to a serially-connected device.
|
String |
readDiscIn(int modId)
Shows all discrete input channels' data values.
|
String |
readDiscIn(int modId,
int chan)
Shows one discrete input channel's data value.
|
String |
readDiscIn(int modId,
int chan,
int count)
Shows selected discrete input channels' data values.
|
String |
readDiscOut(int modId)
Shows all discrete output channels' data values.
|
String |
readDiscOut(int modId,
int chan)
Shows one discrete output channel's data value.
|
String |
readDiscOut(int modId,
int chan,
int count)
Shows selected discrete output channels' data values.
|
String |
readFrequency(int modId,
int chan)
Shows a discrete pulse frequency value.
|
String |
readPulseCount(int modId,
int chan)
Shows a discrete pulse count.
|
String |
readRPM(int modId,
int chan)
Shows a discrete pulse RPM.
|
String |
readValue(int modId)
Shows all analog channels' data values.
|
String |
readValue(int modId,
int chan)
Shows one analog channel's data value.
|
String |
readValue(int modId,
int chan,
int count)
Shows selected analog channels' data values.
|
void |
register(String... serial)
Registers a set of modules.
|
void |
setEnabled(int modId,
int chan,
org.lsst.ccs.drivers.modbus.TestModbus.OnOff state)
Sets a channel's enabled state.
|
void |
setFunction(int modId,
int chan,
TestMaq20.DiscFunc func)
Sets a discrete function.
|
void |
setIPAddress(String ipAddr)
Sets the IP address.
|
void |
setLowTime1(int modId,
int chan,
int time)
Sets a discrete PWM output 1 low time.
|
void |
setLowTime2(int modId,
int chan,
int time)
Sets a discrete PWM output 2 low time.
|
void |
setPeriod(int modId,
int chan,
int period)
Sets a discrete PWM period.
|
void |
setPulsesPerRevn(int modId,
int chan,
int ppr)
Sets a discrete pulse counter pulses per revolution.
|
void |
setRange(int modId,
int chan,
int range)
Sets a channel's range number.
|
void |
setSubnetMask(String mask)
Sets the subnet mask.
|
void |
setTimebase(int modId,
int chan,
TestMaq20.Timebase timebase)
Sets a discrete PWM timebase.
|
String |
showDate(int modId)
Shows a module's date code.
|
String |
showEnabled(int modId,
int chan)
Shows a channel's enabled state.
|
String |
showFunction(int modId,
int chan)
Shows a discrete function.
|
String |
showFwRevision(int modId)
Shows a module's firmware revision number.
|
String |
showId(String serial)
Shows a module's ID given it's serial number.
|
String |
showIds()
Shows all valid module IDs.
|
String |
showIPAddress()
Shows the IP address.
|
String |
showLowTime1(int modId,
int chan)
Shows a discrete PWM output 1 low time.
|
String |
showLowTime2(int modId,
int chan)
Shows a discrete PWM output 2 low time.
|
String |
showName(int modId)
Shows a module's name.
|
String |
showNumInput(int modId)
Shows a module's input channel count.
|
String |
showNumOutput(int modId)
Shows a module's output channel count.
|
String |
showNumRange(int modId)
Shows a module's range count.
|
String |
showPeriod(int modId,
int chan)
Shows a discrete PWM period.
|
String |
showPulsesPerRevn(int modId,
int chan)
Shows a discrete pulse counter pulses per revolution.
|
String |
showRange(int modId,
int chan)
Shows a channel's range number.
|
String |
showSerial(int modId)
Shows a module's serial number.
|
String |
showSubnetMask()
Shows the subnet mask.
|
String |
showTemperature()
Shows the temperature.
|
String |
showTimebase(int modId,
int chan)
Shows a discrete PWM timebase setting.
|
String |
showType(int modId)
Shows a module's type.
|
@Command(name="open",
description="Open connection to general device")
public void open(@Argument(name="type",description="Connection type")
org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
@Argument(name="ident",description="Device identifier")
String ident)
throws org.lsst.ccs.drivers.commons.DriverException
open in class org.lsst.ccs.drivers.modbus.TestModbustype - The connection typeident - The device identificationorg.lsst.ccs.drivers.commons.DriverException@Command(name="open",
description="Open connection to general device")
public void open(@Argument(name="type",description="Connection type")
org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
@Argument(name="ident",description="Device identifier")
String ident,
@Argument(name="param",description="Device parameter")
int param)
throws org.lsst.ccs.drivers.commons.DriverException
open in class org.lsst.ccs.drivers.modbus.TestModbustype - The connection typeident - The device identificationparam - The device parameterorg.lsst.ccs.drivers.commons.DriverException@Command(name="open",
description="Open connection to serial device")
public void open(@Argument(name="type",description="Connection type: net, serial or ftdi")
org.lsst.ccs.drivers.modbus.Modbus.ConnType type,
@Argument(name="ident",description="Device identifier")
String ident,
@Argument(name="baud",description="Baud rate")
int baud,
@Argument(name="dbits",description="The number of data bits")
org.lsst.ccs.drivers.ascii.Ascii.DataBits dbits,
@Argument(name="sbits",description="The number of stop bits")
org.lsst.ccs.drivers.ascii.Ascii.StopBits sbits,
@Argument(name="parity",description="The parity")
org.lsst.ccs.drivers.ascii.Ascii.Parity parity,
@Argument(name="flow",description="The flow control")
org.lsst.ccs.drivers.ascii.Ascii.FlowCtrl flow)
throws org.lsst.ccs.drivers.commons.DriverException
open in class org.lsst.ccs.drivers.modbus.TestModbustype - The connection typeident - The device identificationbaud - The baud ratedbits - The number of data bits (eight or seven)sbits - The number of stop bits (one or two)parity - The parity (none, odd, even, mark or space)flow - The flow control (none, xon, rts or dtr)org.lsst.ccs.drivers.commons.DriverException@Command(name="register",
description="Register modules")
public void register(@Argument(name="serial",description="Serial numbers")
String... serial)
throws org.lsst.ccs.drivers.commons.DriverException
serial - The serial numbers of the modules to be registeredorg.lsst.ccs.drivers.commons.DriverException@Command(name="showipaddress",
description="Show the IP address")
public String showIPAddress()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setipaddress",
description="Set the IP address")
public void setIPAddress(@Argument(name="ipaddr",description="IP address")
String ipAddr)
throws org.lsst.ccs.drivers.commons.DriverException
ipAddr - The IP address stringorg.lsst.ccs.drivers.commons.DriverException@Command(name="showsubnet",
description="Show the subnet mask")
public String showSubnetMask()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="setsubnet",
description="Set the subnet mask")
public void setSubnetMask(@Argument(name="mask",description="subnet mask")
String mask)
throws org.lsst.ccs.drivers.commons.DriverException
mask - The subnet maskorg.lsst.ccs.drivers.commons.DriverException@Command(name="showtemperature",
description="Show the temperature")
public String showTemperature()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showids",
description="Show all module IDs")
public String showIds()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showid",
description="Show module\'s ID")
public String showId(@Argument(name="serial",description="Serial number")
String serial)
throws org.lsst.ccs.drivers.commons.DriverException
serial - The module's serial numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="showname",
description="Show module\'s name")
public String showName(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="showtype",
description="Show module\'s type")
public String showType(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="showserial",
description="Show module\'s serial number")
public String showSerial(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="showrevision",
description="Show module\'s FW revision")
public String showFwRevision(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="showdate",
description="Show module\'s date code")
public String showDate(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="showninput",
description="Show module\'s input channel count")
public String showNumInput(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="shownoutput",
description="Show module\'s output channel count")
public String showNumOutput(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="shownrange",
description="Show module\'s range count")
public String showNumRange(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="showrange",
description="Show channel\'s range")
public String showRange(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="setrange",
description="Set channel\'s range")
public void setRange(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan,
@Argument(name="range",description="Range number")
int range)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberrange - The range numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="showenabled",
description="Show channel\'s enabled state")
public String showEnabled(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="setenabled",
description="Set channel\'s enabled state")
public void setEnabled(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan,
@Argument(name="state",description="Enabled state")
org.lsst.ccs.drivers.modbus.TestModbus.OnOff state)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberstate - The enabled stateorg.lsst.ccs.drivers.commons.DriverException@Command(name="readvalue",
description="Show channels\' data values")
public String readValue(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan,
@Argument(name="count",description="Number of channels")
int count)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The first channel numbercount - The number of channelsorg.lsst.ccs.drivers.commons.DriverException@Command(name="readvalue",
description="Show channel\'s data value")
public String readValue(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="readvalue",
description="Show all channels\' data values")
public String readValue(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="readdiscin",
description="Show discrete input channels\' values")
public String readDiscIn(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan,
@Argument(name="count",description="Number of channels")
int count)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The first channel numbercount - The number of channelsorg.lsst.ccs.drivers.commons.DriverException@Command(name="readdiscin",
description="Show discrete input channel\'s value")
public String readDiscIn(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="readdiscin",
description="Show all discrete input channels\' values")
public String readDiscIn(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="readdiscout",
description="Show discrete output channels\' values")
public String readDiscOut(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan,
@Argument(name="count",description="Number of channels")
int count)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The first channel numbercount - The number of channelsorg.lsst.ccs.drivers.commons.DriverException@Command(name="readdiscout",
description="Show discrete output channel\'s value")
public String readDiscOut(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The channel numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="readdiscout",
description="Show all discrete output channels\' values")
public String readDiscOut(@Argument(name="modid",description="Module ID")
int modId)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDorg.lsst.ccs.drivers.commons.DriverException@Command(name="setfunction",
description="Set discrete function code")
public void setFunction(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="func",description="Function name")
TestMaq20.DiscFunc func)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)func - The function nameorg.lsst.ccs.drivers.commons.DriverException@Command(name="showfunction",
description="Show discrete function code")
public String showFunction(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="armfunction",
description="Arm discrete function")
public void armFunction(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="disarmfunction",
description="Disarm discrete function")
public void disarmFunction(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="readpulse",
description="Show pulse count")
public String readPulseCount(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="readfreq",
description="Show frequency")
public String readFrequency(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="readrpm",
description="Show RPM")
public String readRPM(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="setpulserev",
description="Set pulses per revolution")
public void setPulsesPerRevn(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="ppr",description="Pulses/revolution")
int ppr)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)ppr - The number of pulses per revolutionorg.lsst.ccs.drivers.commons.DriverException@Command(name="showpulserev",
description="Set pulses per revolution")
public String showPulsesPerRevn(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="settimebase",
description="Set PWM timebase")
public void setTimebase(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="time",description="Timebase")
TestMaq20.Timebase timebase)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)timebase - The timebase nameorg.lsst.ccs.drivers.commons.DriverException@Command(name="showtimebase",
description="Show PWM timebase")
public String showTimebase(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="setperiod",
description="Set PWM period")
public void setPeriod(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="period",description="PWM period")
int period)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)period - The period, in timebase unitsorg.lsst.ccs.drivers.commons.DriverException@Command(name="showperiod",
description="Show PWM period")
public String showPeriod(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="setlowtime1",
description="Set output 1 low time")
public void setLowTime1(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="time",description="Time")
int time)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)time - The time valueorg.lsst.ccs.drivers.commons.DriverException@Command(name="showlowtime1",
description="Show PWM output 1 low time")
public String showLowTime1(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="setlowtime2",
description="Set output 2 low time")
public void setLowTime2(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="time",description="Time")
int time)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)time - The time valueorg.lsst.ccs.drivers.commons.DriverException@Command(name="showlowtime2",
description="Show PWM output 2 low time")
public String showLowTime2(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverException@Command(name="enableout2",
description="Enable/disable output 2")
public void enableOut2(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan,
@Argument(name="time",description="Time")
boolean enable)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)enable - The time valueorg.lsst.ccs.drivers.commons.DriverException@Command(name="is2enabled",
description="Show whether PWM output 2 is enabled")
public String is2Enabled(@Argument(name="modid",description="Module ID")
int modId,
@Argument(name="chan",description="Function channel number")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
modId - The module IDchan - The function channel (0 or 1)org.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2018 LSST. All rights reserved.