public class FechnerDriver extends SynchronousCcdDriver
| Modifier and Type | Class and Description |
|---|---|
static class |
FechnerDriver.Test
A test class.
|
SynchronousCcdDriver.ExposureThread, SynchronousCcdDriver.ThreadShotAbstractCcdDriver.Endurance, AbstractCcdDriver.Exposure, AbstractCcdDriver.Shot| Modifier and Type | Field and Description |
|---|---|
private CCDClient |
ccdclient
RPC client instance.
|
private cmd |
command
cmd instance to specify the arguments for client functions.
|
static String |
DEFDRIVERNAME
Default name of the fechner ccd driver.
|
private static long |
DEFEXPOSEMULTIPLY
Default property value.
|
private static boolean |
DEFINCREMENTING
Default property value.
|
private static int |
DEFRPCTIMEOUT
Default property value.
|
private static String |
DEFSERVERNAME
Default property value.
|
private static String |
DEFSERVERPATH
Default property value.
|
private int |
fitscount
Internal counter to keep track of incremental images.
|
private static NumberFormat |
INCREMENTFORMAT
Formatter for running fits number..
|
static String |
INCREMENTSEPARATOR
General separator between fits filename and running number.
|
static String |
KEY_COUNTERRESET
If true, driver resets counter at any call to incrementing.
|
static String |
KEY_EXPOSEMULTIPLY
The multiplier for exposure times returned to ms.
|
static String |
KEY_INCREMENTING
Image incrementing at init.
|
static String |
KEY_RPCTIMEOUT
The RPC time-out in millisecond.
|
static String |
KEY_SERVERNAME
FCDN of the host where the guider rpc server is running.
|
static String |
KEY_SERVERPATH
The path where the server should store its fits.
|
static int |
OK
General return code from rpc calls indicating okay.
|
private erg |
result
erg instance to access return values of the client functions.
|
KEY_AMPLIFIERS, KEY_AREAREADOUT, KEY_COLUMNPOST, KEY_COLUMNPRIOR, KEY_COLUMNREADOUT, KEY_FIXEDREADOUT, KEY_INITSIZE, KEY_MAXTIME, KEY_MINTIME, KEY_ROWPOST, KEY_ROWPRIOR, KEY_ROWREADOUT, KEY_XBINNING, KEY_XCHIPSIZE, KEY_XDETECTORSIZE, KEY_XORIGIN, KEY_XSIZE, KEY_YBINNING, KEY_YCHIPSIZE, KEY_YDETECTORSIZE, KEY_YORIGIN, KEY_YSIZEKEY_DRIVERNAMEKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORFITSEXTENSIONCONFIG, KEY_CLASS| Constructor and Description |
|---|
FechnerDriver(Map<String,String> info)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clearArguments()
Initalizies the RPC function arguments.
|
boolean |
close()
Close the RPC communication.
|
int |
expose()
Make an exposure.
|
int |
exposeBias()
Makes a bias exposure.
|
int |
exposeDark()
Makes a dark exposure.
|
Dimension |
getBinning()
Get the binning values in x (columns) and y (rows).
|
Map<String,Object> |
getCcdInfo()
This ccd does not provide any additional info.
|
MFits |
getData()
Returns the output buffer.
|
double |
getExposureTime()
Get the current exposure time in milliseconds.
|
private String |
getFitsDir()
Get current FITS file output directory.
|
protected String |
getFitsName()
Get the current base of the output FITS file.
|
protected Dimension |
getMaxPixel()
Get the max_pixel values for x (columns) and y (rows).
|
Rectangle |
getWindow()
Get the current image origin (pre-gap) in x (columns) and y (rows) and
the size
|
void |
init()
On init, we default the initial read-out window to the chip size.
|
boolean |
isIncrementing()
Get the increment status.
|
boolean |
isOpen()
We consider the driver to be open if the ccdclient is initialized.
|
protected boolean |
openController()
Initializes an RPC driver.
|
boolean |
setBinning(int xbin,
int ybin)
Set the binning values in x (columns) and y (rows).
|
boolean |
setExposureTime(double exptime)
Set the current exposure time in milliseconds.
|
boolean |
setFileBuffer(String file)
Sets the output buffer.
|
private boolean |
setFitsDir(String dir)
Sets the fits directory.
|
protected boolean |
setFitsName(String filename)
Set the current name of the output FITS file.
|
boolean |
setIncrementing(boolean set)
Set the increment status parameter: true = increments a file number for
storing all fits files, false = overwriting of existing files.
|
protected boolean |
setMaxPixel(Dimension max)
Set the max_pixel values for x (columns) and y (rows).
|
boolean |
setWindow(Rectangle window)
Set the current image window.
|
cancelContinuous, ensureReady, getRunning, isExposing, isReadingOut, startContinuous, stopContinuous, threadedBiasExpose, threadedDarkExpose, threadedExposegetDetectorSize, getMaximumExposureTime, getMinimumExposureTime, getReadoutMaximum, getReadoutTime, opencreateDriver, equals, getDriverName, hashCodeaugment, augment, augment, augment, augment, clone, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, initProperties, isNew, parseObject, parseObject, reload, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitgetDetectorSize, getMaximumExposureTime, getMinimumExposureTime, getReadoutMaximum, getReadoutTimegetDriverName, openpublic static final String INCREMENTSEPARATOR
public static final int OK
public static final String KEY_INCREMENTING
public static final String KEY_COUNTERRESET
public static final String KEY_SERVERNAME
public static final String KEY_SERVERPATH
public static final String KEY_EXPOSEMULTIPLY
public static final String KEY_RPCTIMEOUT
public static final String DEFDRIVERNAME
private static final String DEFSERVERNAME
private static final String DEFSERVERPATH
private static final int DEFRPCTIMEOUT
private static final boolean DEFINCREMENTING
private static final long DEFEXPOSEMULTIPLY
private CCDClient ccdclient
private cmd command
private erg result
private int fitscount
private static final NumberFormat INCREMENTFORMAT
public void init()
throws InitException
init in interface Initializableinit in class AbstractCcdDriverInitExceptionprotected boolean openController()
throws IOException
openController in class AbstractCcdDriverIOException - If controller connection fails.public boolean isOpen()
public boolean close()
throws IOException
IOExceptionpublic int expose()
throws IOException
IOException - Any subclass of IOException.startExposepublic int exposeBias()
throws IOException
#KEY_SUPPORTBIAS key set to
false. In the latter case, this method thros an
UnsupportedOperationException.
The data buffer has to be set prior to a call to this method.
IOException - Any subclass of IOException.public int exposeDark()
throws IOException
#KEY_SUPPORTDARK key set to false. In the latter case, this
method thros an UnsupportedOperationException.
The data buffer has to be set prior to a call to this method.
IOException - Any subclass of IOException.public boolean setFileBuffer(String file) throws IOException
File or
URL object, a ClassCastException is thrown. In case of
invoking this method with an URL, only the file part is kept.IOExceptionpublic MFits getData() throws IOException
-0000n, n being the internal fits counter, to the
file name returned. An ending #FITS is appended. Return type is
of String. Can be used with a class loader to find the resource.IOException - Any subclass of IOException.public boolean setBinning(int xbin,
int ybin)
throws IOException
xbin - binning factor in x-direction (1 <= binning factor <= 255)ybin - binning factor in y-direction (1 <= binning factor <= 255)IOException - Any subclass of IOExceptionpublic Dimension getBinning() throws IOException
IOException - Any subclass of IOException.public boolean setWindow(Rectangle window) throws IOException
window - The origin being the upper left corner of the rectangle.IOException - Any subclass of IOException.public Rectangle getWindow() throws IOException
IOException - Any subclass of IOException.public boolean setExposureTime(double exptime)
throws IOException
expTime - exposure time in milliseconds. (0 <= expTime < 65536 ms)IOException - Any subclass of IOException.public double getExposureTime()
throws IOException
IOException - Any subclass of IOException.protected void clearArguments()
protected boolean setMaxPixel(Dimension max) throws IOException
xmax - maximum CCD size in x-direction (1 <= value < 65536)ymax - maximum CCD size in y-direction (1 <= value < 65536)IOExceptionprotected Dimension getMaxPixel() throws IOException
IOExceptionprotected boolean setFitsName(String filename) throws IOException
fileName - output FITS filename.IOExceptionprivate boolean setFitsDir(String dir) throws IOException
IOExceptionprotected String getFitsName() throws IOException
IOExceptionprivate String getFitsDir() throws IOException
IOExceptionpublic boolean setIncrementing(boolean set)
throws IOException
WARNING: There is no way to query TF's server for the true fits name,
thus setting this option may result in image trace lost. If this is not
what is intended, a partial workaround is to reset the internal counter
in TF guider_server.c, called BaseFn in each call to the
set_increment_1_svc method (which would be a good idea
anyhow). This allows tracing of the fits extension, but only, if no
fits file with this extension already exists.
set - boolean to set the incrementing facility.IOExceptionpublic boolean isIncrementing()
throws IOException
IOException