stella.rmi
Interface TargetOfOpportunity

All Superinterfaces:
Remote, RmiStatusProviding, SchedulerControlling
All Known Implementing Classes:
DummyToO, MasterMind

public interface TargetOfOpportunity
extends SchedulerControlling

A target of opportunity scheduler allows target-of-opportunity instances to be observed. Its main use is tailored for GRB observation, hence there is a dedicated method here to put those on, triggerGrb(java.lang.String, double, double, double, boolean). More general ToO should be added with triggerToo(java.lang.String, java.lang.String, double, double, double, boolean), where a specific template may be specified. It is up to the implementation, whether the former method is simply a re-route to the latter with a specific template.
As soon as it receives the ra and dec (J2000.0, both degrees) in the triggerGrb(java.lang.String, double, double, double, boolean) interface, a new TooTarget is created and inserted into the scheduling list with its default priority. If the interrupt flag is set, the ongoing observation is interrupted, the data already gained might be lost, otherwise the GRB gets active only after the current observation has been finished. If exposure times or any other known fields should be updated while the GRB target is active, this can be acheived with the updateToo(java.lang.String, java.lang.String, java.lang.Object) method. The current status of the GRB target can be queried with #rmiTooStaus.


Method Summary
 Collection<String> getActive()
          Returns a list of all currently active ToO.
 boolean removeToo(String id)
          Removes the GRB of the stated target from the pool of observable targets.
 Serializable rmiTooStatus(String id)
          Returns a short description of the status of the ToO target queried.
 boolean triggerGrb(String id, double ra, double de, double exptime, boolean interrupt)
          This method triggers a new GRB observation.
 boolean triggerToo(String id, String template, double ra, double de, double exptime, boolean interrupt)
          This method triggers a new GRB observation.
 boolean updateToo(String id, String field, Object to)
          If a GRB target of the stated ID has been created by a trigger, this method can be used to change critical GrbTarget fields from their default values.
 
Methods inherited from interface stella.rmi.SchedulerControlling
addTarget, getAllTargets, getTarget, getTelescope, listAllTargets, reloadTargets, removeAllTargets, removeTarget
 
Methods inherited from interface util.rmi.RmiStatusProviding
rmiProvideStatus
 

Method Detail

triggerGrb

boolean triggerGrb(String id,
                   double ra,
                   double de,
                   double exptime,
                   boolean interrupt)
                   throws RemoteException
This method triggers a new GRB observation. The ID supplied must be an internal unique identifier (the string version of a count number suffices). Position of the GRB is given in degrees, J2000.0. The exposure time is the initial exposure time. If the interrupt flag is set, the ongoing observation is stopped, the data is lost.

Server-side, a new GrbTarget out of a template is generated, with the critical information (ra, de, exptime) filled in after instantiation.

Parameters:
id - A unique identifier for the GRB, can be a count number.
ra - The right ascension of the GRB, degrees, J2000.0
de - The declination of the GRB, degrees, J2000.0.
exptime - The initial exposure time in seconds.
interrupt - If true, ongoing observation should be canceled.
Returns:
True, if the new target could be created.
Throws:
RemoteException

triggerToo

boolean triggerToo(String id,
                   String template,
                   double ra,
                   double de,
                   double exptime,
                   boolean interrupt)
                   throws RemoteException
This method triggers a new GRB observation. The ID supplied must be an internal unique identifier (the string version of a count number suffices). Position of the GRB is given in degrees, J2000.0. The exposure time is the initial exposure time. If the interrupt flag is set, the ongoing observation is stopped, the data is lost.

Server-side, a new GrbTarget out of a template is generated, with the critical information (ra, de, exptime) filled in after instantiation.

Parameters:
id - A unique identifier for the GRB, can be a count number.
template - A resource description that describes the ToO to use.
ra - The right ascension of the GRB, degrees, J2000.0
de - The declination of the GRB, degrees, J2000.0.
exptime - The initial exposure time in seconds.
interrupt - If true, ongoing observation should be canceled.
Returns:
True, if the new target could be created.
Throws:
RemoteException

getActive

Collection<String> getActive()
                             throws RemoteException
Returns a list of all currently active ToO. Active in that sense means that they have been added to the scgeduler with one of the trigger methods, but never been removed with removeToo(java.lang.String). It does not specify only observable targets.

Returns:
a collection of ToO id's.
Throws:
RemoteException

updateToo

boolean updateToo(String id,
                  String field,
                  Object to)
                  throws RemoteException
If a GRB target of the stated ID has been created by a trigger, this method can be used to change critical GrbTarget fields from their default values. The caller has to ensure that the field and the ID is valid.

Parameters:
id - The id used on creation of the GRB.
field - The name of the field to be updated.
to - The new value of the field, possible a Number or String.
Returns:
True, if the field was updated successfully.
Throws:
RemoteException

removeToo

boolean removeToo(String id)
                  throws RemoteException
Removes the GRB of the stated target from the pool of observable targets. If an observation of the GRB is just ongoing, it is not interrupted.

Throws:
RemoteException

rmiTooStatus

Serializable rmiTooStatus(String id)
                          throws RemoteException
Returns a short description of the status of the ToO target queried.

Throws:
RemoteException