public class TestMccUsb extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
TestMccUsb.AdUnits |
protected static class |
TestMccUsb.CalPath |
protected static class |
TestMccUsb.CalPol |
protected static class |
TestMccUsb.CalType |
protected static class |
TestMccUsb.DevName |
protected static class |
TestMccUsb.DispType |
protected static class |
TestMccUsb.ItemName |
protected static class |
TestMccUsb.SubiName |
| Constructor and Description |
|---|
TestMccUsb() |
| Modifier and Type | Method and Description |
|---|---|
void |
adIn(int chan)
Reads an ADC channel.
|
void |
adIn(int chan,
TestMccUsb.AdUnits units)
Reads an ADC channel.
|
void |
adScan(int fChan,
int lChan)
Scans ADC channels.
|
void |
adScan(int fChan,
int lChan,
TestMccUsb.AdUnits units)
Scans ADC channels.
|
void |
alarmSet(int alarm,
int iOptns,
int oOptns,
double value1,
double value2)
Sets an alarm configuration.
|
void |
alarmShow(int alarm)
Shows an alarm configuration.
|
void |
blink()
Blinks the LED.
|
void |
calCfg(int gain,
TestMccUsb.CalPol polar,
TestMccUsb.CalPath path)
Configures a calibration.
|
void |
calibrate(TestMccUsb.CalType type)
Performs a calibration.
|
void |
close()
Closes a connection.
|
void |
cntrinit()
Initializes the counter.
|
void |
cntrread()
Reads the counter.
|
void |
dioCfg(int value)
Configures the DIO port.
|
void |
dioCfgBit(int bitnum,
int value)
Configures one line of the DIO port.
|
void |
dioIn()
Reads the DIO port.
|
void |
dioInBit(int bitnum)
Reads a DIO line
|
void |
dioOut(int value)
Writes to the DIO port.
|
void |
dioOutBit(int bitnum,
int value)
Writes a DIO line.
|
void |
itemSet(TestMccUsb.ItemName itemE,
TestMccUsb.SubiName subitemE)
Shows help for setting a configuration item.
|
void |
itemSet(TestMccUsb.ItemName itemE,
TestMccUsb.SubiName subitemE,
String sValue)
Sets a configuration item.
|
void |
itemShow(TestMccUsb.ItemName itemE,
TestMccUsb.SubiName subitemE)
Shows a configuration item.
|
void |
open(TestMccUsb.DevName name)
Opens a connection to a device, forcing the interface claim.
|
void |
open(TestMccUsb.DevName name,
String serial)
Opens a connection to a device, forcing the interface claim.
|
void |
open(TestMccUsb.DevName name,
String serial,
boolean force)
Opens a connection to a device.
|
void |
reset()
Resets the device.
|
void |
showBurn(int mask)
Shows and resets the burnout status.
|
void |
showCal()
Shows the number of calibration steps.
|
void |
showChan()
Shows brief configuration of all channels.
|
void |
showChan(int chan,
TestMccUsb.DispType type)
Shows channel configuration.
|
void |
showChan(TestMccUsb.DispType type)
Shows configuration of all channels.
|
void |
showDev()
Shows the name of the open device.
|
void |
status()
Shows the calibration status.
|
@Command(name="open",
description="Open a connection")
public void open(@Argument(name="name",description="The MCC device name")
TestMccUsb.DevName name,
@Argument(name="serial",description="The USB serial number")
String serial,
@Argument(name="force",description="Force the interface claim")
boolean force)
throws org.lsst.ccs.drivers.commons.DriverException
name - The MCC device name enumerationserial - The USB serial numberforce - Whether to force the interface claimorg.lsst.ccs.drivers.commons.DriverException@Command(name="open",
description="Open a connection & force the claim")
public void open(@Argument(name="name",description="The MCC device name")
TestMccUsb.DevName name,
@Argument(name="serial",description="The USB serial number")
String serial)
throws org.lsst.ccs.drivers.commons.DriverException
name - The MCC device name enumerationserial - The USB serial numberorg.lsst.ccs.drivers.commons.DriverException@Command(name="open",
description="Open a connection & force the claim")
public void open(@Argument(name="name",description="The MCC device name")
TestMccUsb.DevName name)
throws org.lsst.ccs.drivers.commons.DriverException
name - The MCC device name enumerationorg.lsst.ccs.drivers.commons.DriverException@Command(name="close",
description="Close a connection")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="diocfg",
description="Configure the DIO port")
public void dioCfg(@Argument(name="value",description="The value: 0 = out; ~0 = in")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
value - The direction for all lines: 0 = out; ~0 = inorg.lsst.ccs.drivers.commons.DriverException@Command(name="diocfgbit",
description="Configure one DIO line")
public void dioCfgBit(@Argument(name="bitnum",description="The line to configure")
int bitnum,
@Argument(name="value",description="The value: 0 = out; ~0 = in")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
bitnum - The line number (0 - 7)value - The direction to set: 0 = out; ~0 = inorg.lsst.ccs.drivers.commons.DriverException@Command(name="dioin",
description="Read the DIO port")
public void dioIn()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="dioinbit",
description="Read a DIO line")
public void dioInBit(@Argument(name="bitnum",description="The line to read")
int bitnum)
throws org.lsst.ccs.drivers.commons.DriverException
bitnum - The line number (0 - 7)org.lsst.ccs.drivers.commons.DriverException@Command(name="dioout",
description="Write to the DIO port")
public void dioOut(@Argument(name="value",description="The value to write")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
value - The value to writeorg.lsst.ccs.drivers.commons.DriverException@Command(name="diooutbit",
description="Write a DIO line")
public void dioOutBit(@Argument(name="bitnum",description="The line to write")
int bitnum,
@Argument(name="value",description="The value to write")
int value)
throws org.lsst.ccs.drivers.commons.DriverException
bitnum - The line number (0 - 7)value - The value to writeorg.lsst.ccs.drivers.commons.DriverException@Command(name="adin",
description="Read an ADC channel")
public void adIn(@Argument(name="chan",description="The channel to read")
int chan,
@Argument(name="units",description="The units for the value")
TestMccUsb.AdUnits units)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number (0 - 7)units - The units enumeration: conv or raworg.lsst.ccs.drivers.commons.DriverException@Command(name="adin",
description="Read an ADC channel")
public void adIn(@Argument(name="chan",description="The channel to read")
int chan)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number (0 - 7)org.lsst.ccs.drivers.commons.DriverException@Command(name="adscan",
description="Scan ADC channels")
public void adScan(@Argument(name="fchan",description="The first channel to read")
int fChan,
@Argument(name="lchan",description="The last channel to read")
int lChan,
@Argument(name="units",description="The units for the values")
TestMccUsb.AdUnits units)
throws org.lsst.ccs.drivers.commons.DriverException
fChan - The first channel number (0 - 7)lChan - The last channel number (0 - 7)units - The units enumeration: conv or raworg.lsst.ccs.drivers.commons.DriverException@Command(name="adscan",
description="Scan ADC channels")
public void adScan(@Argument(name="fchan",description="The first channel to read")
int fChan,
@Argument(name="lchan",description="The last channel to read")
int lChan)
throws org.lsst.ccs.drivers.commons.DriverException
fChan - The first channel number (0 - 7)lChan - The last channel number (0 - 7)org.lsst.ccs.drivers.commons.DriverException@Command(name="cntrinit",
description="Initialize the counter")
public void cntrinit()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="cntrread",
description="Read the counter")
public void cntrread()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="blink",
description="Blink the LED")
public void blink()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="reset",
description="Reset the device")
public void reset()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="status",
description="Show the calibration status")
public void status()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="itemset",
description="Display set configuration help")
public void itemSet(@Argument(name="item",description="The item name")
TestMccUsb.ItemName itemE,
@Argument(name="subitem",description="The subitem name")
TestMccUsb.SubiName subitemE)
throws org.lsst.ccs.drivers.commons.DriverException
itemE - The item enumerationsubitemE - The subitem enumerationorg.lsst.ccs.drivers.commons.DriverException@Command(name="itemset",
description="Set a configuration item")
public void itemSet(@Argument(name="item",description="The item name")
TestMccUsb.ItemName itemE,
@Argument(name="subitem",description="The subitem name")
TestMccUsb.SubiName subitemE,
@Argument(name="value",description="The value to set")
String sValue)
throws org.lsst.ccs.drivers.commons.DriverException
itemE - The item enumerationsubitemE - The subitem enumerationsValue - The value to setorg.lsst.ccs.drivers.commons.DriverException@Command(name="itemshow",
description="Show a configuration item")
public void itemShow(@Argument(name="item",description="The item name")
TestMccUsb.ItemName itemE,
@Argument(name="subitem",description="The subitem name")
TestMccUsb.SubiName subitemE)
throws org.lsst.ccs.drivers.commons.DriverException
itemE - The item enumerationsubitemE - The subitem enumerationorg.lsst.ccs.drivers.commons.DriverException@Command(name="alarmset",
description="Set an alarm configuration")
public void alarmSet(@Argument(name="alarm",description="The alarm number")
int alarm,
@Argument(name="ioptns",description="The input options")
int iOptns,
@Argument(name="ooptns",description="The output options")
int oOptns,
@Argument(name="value1",description="The first alarm value")
double value1,
@Argument(name="value2",description="The second alarm value")
double value2)
throws org.lsst.ccs.drivers.commons.DriverException
alarm - The alarm number (0 - 7)iOptns - The input optionsoOptns - The output optionsvalue1 - The first alarm valuevalue2 - The second alarm valueorg.lsst.ccs.drivers.commons.DriverException@Command(name="alarmshow",
description="Show an alarm configuration")
public void alarmShow(@Argument(name="alarm",description="The alarm number")
int alarm)
throws org.lsst.ccs.drivers.commons.DriverException
alarm - The alarm number (0 - 7)org.lsst.ccs.drivers.commons.DriverException@Command(name="showdev",
description="Show the name of the open device")
public void showDev()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showchan",
description="Show channel configuration")
public void showChan(@Argument(name="channel",description="The channel number")
int chan,
@Argument(name="type",description="Display type (brief or full)")
TestMccUsb.DispType type)
throws org.lsst.ccs.drivers.commons.DriverException
chan - The channel number (0 - 7)type - The display type enumerationorg.lsst.ccs.drivers.commons.DriverException@Command(name="showchan",
description="Show channel configuration")
public void showChan(@Argument(name="type",description="Display type (brief or full)")
TestMccUsb.DispType type)
throws org.lsst.ccs.drivers.commons.DriverException
type - The display type enumerationorg.lsst.ccs.drivers.commons.DriverException@Command(name="showchan",
description="Show channel configuration")
public void showChan()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="showburn",
description="Show and reset the burnout status")
public void showBurn(@Argument(name="mask",description="The mask of channels to not reset")
int mask)
throws org.lsst.ccs.drivers.commons.DriverException
mask - The mask of channels not to resetorg.lsst.ccs.drivers.commons.DriverException@Command(name="showcal",
description="Show the number of calibration steps")
public void showCal()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="calcfg",
description="Configure a calibration")
public void calCfg(@Argument(name="gain",description="The gain selector")
int gain,
@Argument(name="polarity",description="The polarity (positive or negative)")
TestMccUsb.CalPol polar,
@Argument(name="path",description="The path (high or low)")
TestMccUsb.CalPath path)
throws org.lsst.ccs.drivers.commons.DriverException
gain - The gain selectorpolar - The polarity enumerationpath - The path enumerationorg.lsst.ccs.drivers.commons.DriverException@Command(name="calibrate",
description="Perform a calibration")
public void calibrate(@Argument(name="type",description="The type (temp, voltage or abort)")
TestMccUsb.CalType type)
throws org.lsst.ccs.drivers.commons.DriverException
type - The type enumerationorg.lsst.ccs.drivers.commons.DriverExceptionCopyright © 2014 LSST. All rights reserved.