public class WifsipSimulator extends GenericSimulator
NoCcd error independent of the command cycle.BiasCcd, DarkCcd,
ExposureAbortCcd, FitsCcd, GeometryCcd,
InitCcd, ParkCcd, ScientificCcd and
StatusCcd
commands. All commands where a read-out and data storage is commenced may
throw a NoDiskSpace error. InitCcd may throw a
CannotInitCcd error.CommandEvent.getExpectedAcknowledgeNumber().BiasCcd,
DarkCcd,
and ScientificCcd) and is unset as soon as the fits-data has been
writtn to disk (just prior to a done-exposure command).ReceiverTorso.CommandHandlerPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private boolean |
aborting
A boolean set to true if an exposure abort is handled.
|
private static String[] |
ACKTIMES
The acknowledge times.
|
private Map |
addfits
The fits header data added during operation, see
FitsCcd. |
private static String[] |
COMMANDS
The known command types, used for acknowledges and true dones.
|
private static String |
DEFDATAPATH
The default data path.
|
private static String |
DEFERRORCLASSES
The default error list.
|
private static String |
DEFERRORPROBABILITIES
The default error probabilities.
|
private static String |
DEFEXPOSING
The default exposing trigger name.
|
private static double |
DEFFAILFILTER
The default of the failure probability of a filter selection .
|
private static double |
DEFFAILFOCUS
The default of the failure probability of a filter selection .
|
private static double |
DEFFAILHARDDISK
The default of the failure probability of a write-to-disk.
|
private static double |
DEFFAILINIT
The default of the failure probability of a init ccd.
|
private static String |
DEFTRANSFERING
The default exposing trigger name.
|
private static String[] |
DIVERT
The actual divert factors for the commands.
|
private static String[] |
DONETIMES
The actual execution times for the commands.
|
private CommandEvent |
exposecommand
The last exposure command.
|
private File |
fitsfile
The fits file to create.
|
static String |
KEY_DATAPATH
The path to the data directory.
|
static String |
KEY_EXPOSING
The key matching to the name of the exposing trigger.
|
static String |
KEY_FAILFILTER
The key to the failure probability of filter selection.
|
static String |
KEY_FAILFOCUS
The key to the failure probability of the guider.
|
static String |
KEY_FAILHARDDISK
The key to the failure probability of a init ccd.
|
static String |
KEY_FAILINIT
The key to the failure probability of a write-to-disk.
|
static String |
KEY_TRANSFERING
The key matching to the name of the exposing trigger.
|
private ErrorEvent |
lasterror
The error occured at the last command processing simulation.
|
private boolean |
noccd
A boolean indicating that the ccd has failed.
|
private boolean |
nowheel
A boolean indicating that the filter wheel has failed.
|
ACKNOWLEDGEPREFIX, DEFUNIQUE, DEVIATEPREFIX, DONEPREFIX, KEY_ACCELERATE, KEY_ERRORCLASSES, KEY_ERRORINTERVAL, KEY_ERRORPROBABILITIES, KEY_GENERICACKNOWLEDGE, KEY_GENERICDEVIATE, KEY_GENERICDONE, KEY_SET, KEY_UNIQUE, randomKEY_BIND, KEY_BINDNAME, KEY_COMMANDCASTER, KEY_ERRORCOOLKEY_ALIVE, KEY_EXPORTPORT, KEY_INIT, KEY_LISTENERNAME, KEY_RETRY, KEY_RETRYSLEEP, KEY_SHUTDOWNDELAYKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORNAMING_EXTENSIONNAMING_EXTENSIONKEY_INITDEPTHKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
WifsipSimulator(Map<String,String> prop)
Constructs a new ccd simulator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(CommandEvent ce)
Returns true if this receiver accepts commands of the type handed over
as an argument.
|
protected long |
getCompletionTime(CommandEvent ce,
int acknr)
Returns the completion time.
|
protected ErrorEvent |
getLastError()
Returns the last error that occured during command processing.
|
protected long |
getSimulationTime(CommandEvent ce,
int acknr)
Returns the simulation time.
|
protected boolean |
isAllowed(ErrorEvent ee)
Returns true if the error handed over is a
NoCcd instance or
a {@link |
static void |
main(String[] arg)
Constructs a new ccd simulator.
|
private static Map |
myAugment(Map def)
Augmentes the properties for the acknowledge, done, and divert times.
|
protected boolean |
processCommand(CommandEvent ce,
int acknr)
Simulates execution of the particular ccd-command.
|
private boolean |
writeFits(File fits)
Writes the data allocated in the
MainCamera object to a fits
file provided as an argument. |
augmentProperties, exit, formatWithGlobals, getAcknowledgeNumber, getNoisyTime, getParameter, getParameterByKey, getParameterByName, getParameterCluster, getParameterValueByKey, getParameterValueByName, getTrigger, getUnique, getValue, initStep, setParameter, setParameterValueByKey, setParameterValueByName, setTrigger, setValue, shutdown, sleepFor, statusSimulatoraddRmiAcknowledgeListener, addRmiDoneListener, bindDefault, containsRemoteProperty, deregisterAtCaster, equals, getLastError, getRemoteProperties, getRemoteProperty, hashCode, notifyAcknowledgeListener, notifyDoneListener, registerAtCaster, removeRmiAcknowledgeListener, removeRmiDoneListener, rescanned, rmiCommand, sendAllPrematureDone, sendPrematureDone, setLastError, setRemoteProperty, toString, unbindDefaultaddErrorListener, addRmiErrorListener, bindToRegistry, getBindName, isValid, notifyErrorListener, removeErrorListener, removeRmiErrorListener, sendError, sendError, sendError, sendStatus, sendStatus, sendStatus, unbindFromRegistryallBound, blockBinding, blockBinding, disconnect, getIP, getListenerName, isConnected, listenerName, releaseBinding, releaseBinding, startBinding, startBindingclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, 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, isNew, parseObject, parseObject, reload, removeProperty, requires, setObject, setProperties, setProperty, stringPropertiesfinalize, getClass, notify, notifyAll, wait, wait, waitbindToRegistry, isValid, unbindFromRegistryaddErrorListener, removeErrorListenergetListenerNamedisconnect, isConnecteddefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_EXPOSING
public static final String KEY_TRANSFERING
public static final String KEY_DATAPATH
public static final String KEY_FAILINIT
public static final String KEY_FAILHARDDISK
public static final String KEY_FAILFILTER
public static final String KEY_FAILFOCUS
private static final String DEFEXPOSING
private static final String DEFTRANSFERING
private static final String DEFDATAPATH
private static final double DEFFAILINIT
private static final double DEFFAILHARDDISK
private static final double DEFFAILFILTER
private static final double DEFFAILFOCUS
private static final String DEFERRORCLASSES
private static final String DEFERRORPROBABILITIES
private static final String[] COMMANDS
private static final String[] ACKTIMES
private static final String[] DONETIMES
private static final String[] DIVERT
private File fitsfile
private ErrorEvent lasterror
private boolean aborting
private CommandEvent exposecommand
private boolean noccd
private boolean nowheel
public WifsipSimulator(Map<String,String> prop) throws RemoteException
#expose
used for signaling ongoing exposures to the sequencer.RemoteExceptionprivate static Map myAugment(Map def)
public boolean accepts(CommandEvent ce) throws RemoteException
CcdCommands plus the select filter command.RemoteExceptionprotected boolean isAllowed(ErrorEvent ee)
NoCcd instance or
a {@linkisAllowed in class GenericSimulatorprotected ErrorEvent getLastError()
protected long getCompletionTime(CommandEvent ce, int acknr)
DarkCcd or
a ScientificCcd and the acknowledge number is zero, add the
distorted exposure time carried by these commands to the value
returned by the parental method.getCompletionTime in class GenericSimulatorce - The command to process.acknr - The number of the acknowledge that will be sent back.protected long getSimulationTime(CommandEvent ce, int acknr)
DarkCcd or
a ScientificCcd and the acknowledge number is zero, add the
distorted exposure time carried by these commands to the value
returned by the parental method.getSimulationTime in class GenericSimulatorprotected boolean processCommand(CommandEvent ce, int acknr)
BiasCcd: Possibly fails with a NoDiskSpace on the
third acknowledge. Sets #expose trigger on first acknowledge,
unsets after last.DarkCcd: Possibly fails with a NoDiskSpace on the
third acknowledge. First acknowledge/done time calculated from the
exposure time (plus divergence) stated plus the time given in
ACKTIMES and DONETIMES, respectively.
Sets #expose trigger on first acknowledge,
unsets after last.ExposureAbortCcd: Possibly fails with a NoDiskSpace
on the third acknowledge.
Unsets #expose trigger after last acknowledge.FitsCcd: Never fails.GeometryCcd: Never fails.InitCcd: Possibly fails with a CannotInitCcd.ParkCcd: Never fails.ScientificCcd: Possibly fails with a NoDiskSpace on
the
third acknowledge. First acknowledge/done time calculated from the
exposure time (plus divergence) stated plus the time given in
ACKTIMES and DONETIMES, respectively.
Sets #expose trigger on first acknowledge,
unsets after last.StatusCcd: Not used by any parameter, therfore send back
a trivial status message stating the exposure state of the ccd.processCommand in class GenericSimulatorprivate boolean writeFits(File fits)
MainCamera object to a fits
file provided as an argument. If the argument is null this method
returns immediately without writing the file.public static void main(String[] arg) throws RemoteException
RemoteException