
public class RaftsCommands extends Object
| Constructor and Description |
|---|
RaftsCommands(org.lsst.ccs.Subsystem subsys,
List<REBDevice> rebDevices,
GlobalProc globalProc,
org.lsst.ccs.utilities.ccd.Geometry geometry,
TempControl tempCtrl)
Public constructor for the Raft level commands object.
|
RaftsCommands(org.lsst.ccs.Subsystem subsys,
List<REBDevice> rebDevices,
GlobalProc globalProc,
org.lsst.ccs.utilities.ccd.Geometry geometry,
TempControl tempCtrl,
org.lsst.ccs.imagenaming.service.ImageNameService imageNameService)
Public constructor for the Raft level commands object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
acquireImage(String imageName)
Starts image acquisition.
|
void |
acquireImage(String imageName,
String folder,
int opcode,
String annotation)
Starts image acquisition.
|
org.lsst.ccs.imagenaming.ImageName |
acquireLSSTImage()
Starts image acquisition, using image name obtained by ImageNameService,
|
org.lsst.ccs.imagenaming.ImageName |
acquireLSSTImage(String folder,
int opcode,
String annotation)
Starts image acquisition, using image name obtained by ImageNameService,
|
void |
changeCcdType(String type)
Changes the CCD type.
|
List<Integer> |
checkAspics()
Checks all loaded ASPIC values against the configuration.
|
void |
checkSequencerState()
We check the sequencer state.
|
void |
enableScan(boolean value)
Sets the scan mode enables.
|
void |
generateAlert(RaftAlert raftAlert,
org.lsst.ccs.bus.states.AlertState state) |
String |
getCcdType()
Gets the CCD type
|
double |
getControlTemp()
Gets the control temperature
|
List<Integer> |
getDataSource()
Gets the data sources from all REBs.
|
List<Map<String,Integer>> |
getFunctionMap()
Deprecated.
|
List<Map<String,Integer>> |
getMainMap()
Deprecated.
|
List<Integer> |
getParameter(String name)
Deprecated.
|
List<Map<String,FPGA2Model.PointerInfo>> |
getPointers()
Deprecated.
|
List<String> |
getREBDeviceNames()
Gets the list of REB device names.
|
List<String> |
getREBDevices()
Deprecated.
|
List<Integer> |
getREBHwVersions()
Gets the list of REB hardware versions.
|
List<Integer> |
getREBIds()
Gets the list of REB IDs.
|
List<Long> |
getREBSerialNumbers()
Gets the list of REB serial numbers.
|
List<Map<String,Integer>> |
getSequencerFunctionMap()
Gets the list of all function maps.
|
List<Map<String,Integer>> |
getSequencerMainMap()
Gets the list of all main program maps.
|
List<Integer> |
getSequencerParameter(String name)
Gets the list of all values for a parameter.
|
List<Map<String,FPGA2Model.PointerInfo>> |
getSequencerPointers()
Gets the list of all pointer information maps.
|
String |
getSequencerStart()
Get the name of the Main routine that will be invoked when the sequencer
starts.
|
List<Map<String,Integer>> |
getSequencerSubroutineMap()
Gets the list of all subroutine maps.
|
List<Map<String,Integer>> |
getSubroutineMap()
Deprecated.
|
List |
getTime()
Gets all time base values.
|
Map<String,Long> |
getTimes()
Gets all time base values.
|
List<Boolean> |
isBackBiasOn()
Gets the back bias on states.
|
List<Boolean> |
isScanEnabled()
Gets the scan mode enabled states.
|
List<Boolean> |
isSequencerRunning()
Gets the running state of all sequencers.
|
boolean |
isTempControlActive()
Gets the temperature control state
|
int |
loadAspics(boolean all)
Loads ASPICs with their configured values.
|
int |
loadBiasDacs(boolean all)
Loads bias DACs with their configured values.
|
List<Integer> |
loadCompiledSequencer(FPGA2Model model,
String shortFileName)
Loads all sequencers from a precompiled sequencer model.
|
int |
loadDacs(boolean all)
Loads DACs with their configured values.
|
List<Integer> |
loadSequencer(String fileName)
Loads all sequencers from a file.
|
void |
powerCCDs(boolean on)
Powers on/off the REB CCDs.
|
int |
resetAspics()
Resets ASPICs.
|
void |
resetFirmware()
Resets the front ends.
|
void |
resetScan()
Resets the scan modes.
|
List<String> |
saveFitsImage(String dirName)
Saves the current image data as one or more FITS files.
|
List<String> |
saveFitsImage(String dirName,
org.lsst.ccs.utilities.image.FitsHeaderMetadataProvider provider) |
List<String> |
saveImage(String dirName)
Saves the current image data as one or more sets of raw bytes.
|
void |
setBackBias(boolean value)
Sets the back bias on states.
|
void |
setCcdType(CcdType type)
Sets the CCD type.
|
void |
setCcdType(String type)
Sets the CCD type.
|
void |
setControlTemp(double temp)
Sets the control temperature
|
void |
setDataSource(int value)
Sets the data sources in all REBs.
|
void |
setDefaultImageDirectory(String dirName)
Sets the default image directory.
|
void |
setExposureTime(double expTime)
Sets the FITS image exposure time.
|
void |
setFitsFileNamePattern(String pattern)
Sets the FITS image file name pattern.
|
void |
setHeaderKeyword(String hduName,
Map<String,Serializable> headersMap)
Set the values of a named HDU Header Keywords
|
void |
setHeaderKeyword(String hduName,
String name,
Serializable value)
Set the value of a named HDU Header Keyword
|
void |
setHeaderKeyword(String hduName,
String name,
Serializable value,
boolean sticky)
Set the value of a header keyword for a given named HDU.
|
void |
setHeaderKeywordForCCD(String ccdId,
String name,
Serializable value,
boolean sticky)
Set the value of a header keyword for a given named HDU.
|
void |
setImageDataFileNamePattern(String pattern)
Sets the raw image data file name pattern.
|
void |
setImageDataInversion(boolean invert)
Sets whether image data values are inverted
|
void |
setParameter(String name,
int value)
Deprecated.
|
void |
setPatternProperty(String propertyName,
String propertyValue)
Set a pattern property for resolving file name and output directory.
|
void |
setPrimaryHeaderKeyword(Map<String,Serializable> headersMap)
Set the values of Primary Header Keywords
|
void |
setPrimaryHeaderKeyword(String name,
Serializable value)
Set the value of Primary Header Keyword
|
void |
setSequenceNumber(int sequenceNumber)
Set an external sequence number.
|
void |
setSequencerParameter(String name,
int value)
Sets a sequencer parameter value in all REBs.
|
List<Integer> |
setSequencerStart(String mainName)
Sets the start address for all sequencers.
|
List<Integer> |
setStart(String mainName)
Deprecated.
|
void |
setTime()
Sets the time base to the current system time.
|
void |
startSequencer()
Starts the sequencers.
|
void |
startTempControl()
Starts temperature control
|
void |
stepSequencer()
Sends a sequencer step command.
|
void |
stopSequencer()
Sends a sequencer stop command.
|
void |
stopTempControl()
Stops temperature control
|
int |
waitForImage(int timeout)
Waits for image to arrive
|
void |
waitSequencerDone(int timeout)
Waits for the sequencers to be done.
|
public RaftsCommands(org.lsst.ccs.Subsystem subsys,
List<REBDevice> rebDevices,
GlobalProc globalProc,
org.lsst.ccs.utilities.ccd.Geometry geometry,
TempControl tempCtrl)
subsys - The associated subsystemrebDevices - The list of REBDevices for this raft.globalProc - The global proc for the raftgeometry - The geometry for this rafttempCtrl - The temperature controllerpublic RaftsCommands(org.lsst.ccs.Subsystem subsys,
List<REBDevice> rebDevices,
GlobalProc globalProc,
org.lsst.ccs.utilities.ccd.Geometry geometry,
TempControl tempCtrl,
org.lsst.ccs.imagenaming.service.ImageNameService imageNameService)
subsys - The associated subsystemrebDevices - The list of REBDevices for this raft.globalProc - The global proc for the raftgeometry - The geometry for this rafttempCtrl - The temperature controllerimageNameService - The image naming servicepublic void setCcdType(CcdType type)
type - The (enumerated) CCD typepublic void setCcdType(String type)
type - The CCD typepublic void changeCcdType(String type)
type - The CCD type@Command(type=ACTION,
description="Set the control temperature")
public void setControlTemp(@Argument(name="temp",description="Temperature value")
double temp)
temp - The temperature to set@Command(type=QUERY,
description="Get the control temperature")
public double getControlTemp()
@Command(type=ACTION,
description="Start temperature control")
public void startTempControl()
@Command(type=ACTION,
description="Stop temperature control")
public void stopTempControl()
@Command(type=QUERY,
description="Get temperature control state")
public boolean isTempControlActive()
@Command(type=QUERY,
description="Get the CCD type")
public String getCcdType()
@Command(type=QUERY,
description="Get the list of REB devices")
public List<String> getREBDeviceNames()
@Deprecated @Command(type=QUERY, description="Get the list of REB devices") public List<String> getREBDevices()
@Command(type=QUERY,
description="Get the list of REB hardware versions")
public List<Integer> getREBHwVersions()
@Command(type=QUERY,
description="Get the list of REB IDs")
public List<Integer> getREBIds()
@Command(type=QUERY,
description="Get the list of REB serial numbers")
public List<Long> getREBSerialNumbers()
@Command(type=ACTION,
description="Reset the front end")
public void resetFirmware()
throws Exception
Exception@Command(type=QUERY,
description="Get the data source")
public List<Integer> getDataSource()
throws Exception
Exception@Command(type=ACTION,
description="Set the data sources")
public void setDataSource(@Argument(name="value",description="The data source value")
int value)
throws Exception
value - The encoded data source: CCD or simulationException@Command(type=QUERY,
description="Get the scan mode enabled states")
public List<Boolean> isScanEnabled()
throws Exception
Exception@Command(type=ACTION,
description="Set the scan mode enables")
public void enableScan(@Argument(name="value",description="The scan mode enabled state")
boolean value)
throws Exception
value - The enabled state to set, true or falseException@Command(type=ACTION,
description="Reset the scan modes")
public void resetScan()
throws Exception
Exception@Command(type=ACTION,
description="Power on/off the CCDs")
public void powerCCDs(@Argument(description="Whether to power on")
boolean on)
throws Exception
on - Whether to power on (true) or off (false)Exception@Command(type=ACTION,
description="Load DACs")
public int loadDacs(@Argument(name="all",description="If true, load all DACs")
boolean all)
throws Exception
all - If true, all data are loaded; otherwise only changesException@Command(type=ACTION,
description="Load bias DACs")
public int loadBiasDacs(@Argument(name="all",description="If true, load all bias DACs")
boolean all)
throws Exception
all - If true, all data are loaded; otherwise only changesException@Command(type=ACTION,
description="Load ASPICs")
public int loadAspics(@Argument(name="all",description="If true, load all ASPICs")
boolean all)
throws Exception
all - If true, all data are loaded; otherwise only changesException@Command(type=QUERY,
description="Check all ASPICs")
public List<Integer> checkAspics()
throws Exception
Exception@Command(type=ACTION,
description="Reset ASPICs")
public int resetAspics()
throws Exception
Exception@Command(type=ACTION,
description="Set the REBs\' system time")
public void setTime()
throws Exception
Exception@Command(type=QUERY,
description="Get the REBs\' system times")
public Map<String,Long> getTimes()
throws Exception
Exception@Command(type=QUERY,
description="Get the REBs\' system times")
public List getTime()
throws Exception
Exception@Command(type=QUERY,
description="Get the back bias on states")
public List<Boolean> isBackBiasOn()
throws Exception
Exception@Command(type=ACTION,
description="Set the back bias on states")
public void setBackBias(@Argument(name="value",description="The back bias on state")
boolean value)
throws Exception
value - The on state to set, true or falseException@Command(type=QUERY,
description="Set a primary header keyword value")
public void setPrimaryHeaderKeyword(String name,
Serializable value)
name - The name of the header keywordvalue - The value of the header keyword@Command(type=QUERY,
description="Set primary header keyword values")
public void setPrimaryHeaderKeyword(Map<String,Serializable> headersMap)
headersMap - The map of header keyword name, value pairs to be set@Command(type=QUERY,
description="Set a header keyword value on a named HDU")
public void setHeaderKeyword(String hduName,
String name,
Serializable value)
hduName - The name of the HDU on which to set the header keywordname - The name of the header keywordvalue - The value of the header keywordpublic void setHeaderKeyword(String hduName, String name, Serializable value, boolean sticky)
hduName - The name of the HDU on which to set the header keywordname - The name of the header keywordvalue - The value of the header keywordsticky - If this value is stickypublic void setHeaderKeywordForCCD(String ccdId, String name, Serializable value, boolean sticky)
ccdId - The Id of the CCD for which this keyword is publishedname - The name of the header keywordvalue - The value of the header keywordsticky - If this value is sticky@Command(type=QUERY,
description="Set header keyword values on a named HDU")
public void setHeaderKeyword(String hduName,
Map<String,Serializable> headersMap)
hduName - The name of the HDU on which to set the header keywordheadersMap - The map of header keyword name, value pairs to be set@Command(type=ACTION,
description="Load all sequencers from a file")
public List<Integer> loadSequencer(@Argument(name="filename",description="Sequencer file name")
String fileName)
throws Exception,
IOException
fileName - The name of the file containing sequencer instructionsExceptionIOException@Command(type=ACTION,
description="Load all sequencers from a file")
public List<Integer> loadCompiledSequencer(@Argument(name="model",description="Compiled sequencer")
FPGA2Model model,
@Argument(name="filename",description="Sequencer file name")
String shortFileName)
throws Exception,
IOException
model - The compiled sequencershortFileName - The filename to be used in the FITS headerExceptionIOException@Command(type=QUERY,
description="Get the maps of mains")
public List<Map<String,Integer>> getSequencerMainMap()
@Deprecated @Command(type=QUERY, description="Get the maps of mains") public List<Map<String,Integer>> getMainMap()
@Command(type=QUERY,
description="Get the maps of subroutines")
public List<Map<String,Integer>> getSequencerSubroutineMap()
@Deprecated @Command(type=QUERY, description="Get the maps of subroutines") public List<Map<String,Integer>> getSubroutineMap()
@Command(type=QUERY,
description="Get the maps of sequencer functions")
public List<Map<String,Integer>> getSequencerFunctionMap()
@Deprecated @Command(type=QUERY, description="Get the maps of functions") public List<Map<String,Integer>> getFunctionMap()
@Command(type=QUERY,
description="Get the maps of sequencer pointers")
public List<Map<String,FPGA2Model.PointerInfo>> getSequencerPointers()
@Deprecated @Command(type=QUERY, description="Get the maps of pointers") public List<Map<String,FPGA2Model.PointerInfo>> getPointers()
@Command(type=QUERY,
description="Get sequencer parameter values")
public List<Integer> getSequencerParameter(@Argument(name="name",description="The parameter name")
String name)
throws Exception
name - The parameter nameException@Deprecated @Command(type=QUERY, description="Get parameter values") public List<Integer> getParameter(@Argument(name="name",description="The parameter name") String name) throws Exception
Exception@Command(type=ACTION,
description="Set a sequencer parameter value")
public void setSequencerParameter(@Argument(name="name",description="The parameter name")
String name,
@Argument(name="value",description="The value to set")
int value)
throws Exception
name - The parameter namevalue - The value to setException@Deprecated @Command(type=ACTION, description="Set a sequencer parameter value") public void setParameter(@Argument(name="name",description="The parameter name") String name, @Argument(name="value",description="The value to set") int value) throws Exception
Exception@Command(type=ACTION,
description="Set all sequencer start addresses")
public List<Integer> setSequencerStart(@Argument(name="mainName",description="Main routine name")
String mainName)
throws Exception
mainName - The name of the main sequencer program to start atExceptionpublic String getSequencerStart()
@Deprecated @Command(type=ACTION, description="Set all sequencer start addresses") public List<Integer> setStart(@Argument(name="mainName",description="Main routine name") String mainName) throws Exception
Exception@Command(type=ACTION,
description="Start the sequencers")
public void startSequencer()
throws Exception
Exception@Command(type=ACTION,
description="Send a sequencer stop command")
public void stopSequencer()
throws Exception
Exception@Command(type=ACTION,
description="Send a sequencer step command")
public void stepSequencer()
throws Exception
Exception@Command(type=QUERY,
description="Get the running states of the sequencers")
public List<Boolean> isSequencerRunning()
throws Exception
Exception@Command(type=ACTION,
description="Start the sequencers",
autoAck=false)
public void waitSequencerDone(@Argument(name="timeout",description="Timeout (ms)")
int timeout)
throws Exception
timeout - The maximum tiime to wait (ms)Exception@Command(type=ACTION,
description="Start image acquisition using standard LSST image name")
public org.lsst.ccs.imagenaming.ImageName acquireLSSTImage(@Argument(defaultValue="")
String folder,
@Argument(defaultValue="1")
int opcode,
@Argument(defaultValue="")
String annotation)
throws org.lsst.ccs.drivers.reb.REBException
folder - Optional folder name. If absent, the default folder is usedopcode - Optional opcode. Default is 1annotation - Optional annotation. Default is ""org.lsst.ccs.drivers.reb.REBException - If image acquisition fails, or no ImageNameService has been configured.ImageNameService}public org.lsst.ccs.imagenaming.ImageName acquireLSSTImage()
throws org.lsst.ccs.drivers.reb.REBException
org.lsst.ccs.drivers.reb.REBException - If image acquisition fails, or no ImageNameService has been configured.ImageNameService}@Command(type=ACTION,
description="Start image acquisition")
public void acquireImage(@Argument(defaultValue="")
String imageName,
@Argument(defaultValue="")
String folder,
@Argument(defaultValue="1")
int opcode,
@Argument(defaultValue="")
String annotation)
throws org.lsst.ccs.drivers.reb.REBException
imageName - Optional imageName. If absent subsystem makes up its own imageNamefolder - Optional folder name. If absent, the default folder is usedopcode - Optional opcode. Default is 1annotation - Optional annotation. Default is ""org.lsst.ccs.drivers.reb.REBExceptionpublic void acquireImage(String imageName) throws org.lsst.ccs.drivers.reb.REBException
imageName - Optional imageName.org.lsst.ccs.drivers.reb.REBException@Command(type=ACTION,
description="Wait for images to arrive",
autoAck=false)
public int waitForImage(int timeout)
timeout - The timeout period (msec)@Command(type=ACTION,
description="Save the current image as raw bytes")
public List<String> saveImage(@Argument(name="dirname",description="The directory to use",defaultValue="")
String dirName)
throws RaftException,
IOException
dirName - The name of the directory where the image file is to be saved.RaftExceptionIOException@Command(type=ACTION,
description="Save the current image as a FITS file")
public List<String> saveFitsImage(@Argument(name="dirname",description="The directory to use",defaultValue="")
String dirName)
throws IOException,
RaftException
dirName - The name of the directory where the FITS file is to be saved.RaftExceptionIOExceptionpublic List<String> saveFitsImage(String dirName, org.lsst.ccs.utilities.image.FitsHeaderMetadataProvider provider) throws IOException, RaftException
IOExceptionRaftException@Command(type=ACTION,
description="Set whether image data values are inverted")
public void setImageDataInversion(@Argument(name="invert",description="Whether to invert")
boolean invert)
invert - Whether data values are to be inverted@Command(type=ACTION,
description="Set the default image directory")
public void setDefaultImageDirectory(@Argument(name="dirname",description="The directory name")
String dirName)
dirName - The directory name@Command(type=ACTION,
description="Set the FITS file name pattern")
public void setFitsFileNamePattern(@Argument(name="pattern",description="The file name pattern")
String pattern)
pattern - The file name pattern to set@Command(type=ACTION,
description="Set the raw image data file name pattern")
public void setImageDataFileNamePattern(@Argument(name="pattern",description="The file name pattern")
String pattern)
pattern - The file name pattern to set@Command(type=ACTION,
description="Set the FITS exposure time")
public void setExposureTime(@Argument(name="exptime",description="The exposure time")
double expTime)
expTime - The exposure time (secs)@Command(type=ACTION,
description="Set a pattern property for resolving file names and output directory")
public void setPatternProperty(String propertyName,
String propertyValue)
propertyName - The name of the propertypropertyValue - The value of the propertypublic void checkSequencerState()
public void setSequenceNumber(int sequenceNumber)
sequenceNumber - the external sequence number.@Command(simulation=true)
public void generateAlert(@Argument(name="raftAlert")
RaftAlert raftAlert,
@Argument(name="alertState")
org.lsst.ccs.bus.states.AlertState state)
Copyright © 2020 LSST. All rights reserved.