|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.nrao.sss.model.project.AbstractScheduleIterator
public class AbstractScheduleIterator
This class provides a template method (iterateOverSchedulingBlock(edu.nrao.sss.model.project.SchedulingBlock)
)
that iterates over all the scans in a SB. The class provides protected
variables that keep track of the current scan's start and stop MJD,
currentScanNumber, totalDuration (so far), the slew time of this scan, and a
boolean flag to indicate whether or not the passed in SB is scheduled
dymanically. Clients of this class must create a subclass and override one
or more of the following methods:
Subclasses may also toggle the
validatesSchedulingBlock
property. If
this class is NOT validating its scheduling block, it is the client's
responsibility to validate the SB before calling iterateOverSchedulingBlock.
If a SB is found to be incomplete the iteration will stop. If a scan is
found that has no source or no source position, a SourceNotFoundException
will be thrown. A CoordinateConversionException will be thrown if there is a
problem converting the source position to either RA/Dec or Az/El. If
validation is turned off, there is no gauruntee that the protected variables
this class provides during iteration will be correct.
Field Summary | |
---|---|
protected int |
currentScanNumber
|
protected boolean |
dynamicSched
|
protected JulianDate |
endMjd
|
protected static EarthPosition |
EVLA_LOCATION
|
protected static LocalSiderealTime |
EVLA_LST
|
protected int |
scanCount
|
protected EvlaTelescopeMotionSimulator |
sim
|
protected TimeDuration |
slewTime
|
protected JulianDate |
startMjd
|
protected static TimeDuration |
SUBREFLECTOR_SLEW
|
protected TimeDuration |
totalDuration
|
Constructor Summary | |
---|---|
AbstractScheduleIterator()
|
Method Summary | |
---|---|
protected void |
afterFirstScanAction(Scan scan)
|
protected void |
afterLastScanAction(Scan scan)
|
protected void |
afterScanAction(Scan scan)
|
protected void |
afterScanLoopAction(ScanLoop scan)
|
protected void |
beforeFirstScanAction(Scan scan)
|
protected void |
beforeIteratingAction()
|
protected void |
beforeLastScanAction(Scan scan)
|
protected void |
beforeScanAction(Scan scan)
|
protected void |
beforeScanLoopAction(ScanLoop scan)
|
protected SkyPosition |
getEndPosition(Scan scan,
Date dateTime)
Returns the appropriate end SkyPosition object for scan at
dateTime . |
TimeDuration |
getScheduleDuration()
Returns the total time spent in this schedule so far. |
protected SkyPosition |
getStartPosition(Scan scan,
Date dateTime)
Returns the appropriate start SkyPosition object for scan at
dateTime . |
boolean |
getValidatesSchedulingBlock()
|
List<ValidationFailure> |
getValidationFailures()
Returns a list of all warnings and errors that were found during the last call to iterateOverSchedulingBlock . |
boolean |
hasValidationErrors()
Returns true if the last call of iterateOverSchedulingBlock had
validation errors. |
boolean |
hasValidationWarnings()
Returns true if the last call of iterateOverSchedulingBlock had
validation warnings. |
void |
iterateOverSchedulingBlock(SchedulingBlock sb)
See class comments. |
protected void |
scanAction(Scan scan)
|
void |
setValidatesSchedulingBlock(boolean v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final EarthPosition EVLA_LOCATION
protected static final LocalSiderealTime EVLA_LST
protected static final TimeDuration SUBREFLECTOR_SLEW
protected EvlaTelescopeMotionSimulator sim
protected int currentScanNumber
protected int scanCount
protected JulianDate startMjd
protected JulianDate endMjd
protected TimeDuration totalDuration
protected TimeDuration slewTime
protected boolean dynamicSched
Constructor Detail |
---|
public AbstractScheduleIterator()
Method Detail |
---|
public boolean hasValidationErrors()
iterateOverSchedulingBlock
had
validation errors.
public boolean hasValidationWarnings()
iterateOverSchedulingBlock
had
validation warnings.
public List<ValidationFailure> getValidationFailures()
iterateOverSchedulingBlock
.
public boolean getValidatesSchedulingBlock()
public void setValidatesSchedulingBlock(boolean v)
public TimeDuration getScheduleDuration()
public void iterateOverSchedulingBlock(SchedulingBlock sb) throws IllegalArgumentException, CoordinateConversionException, SourceNotFoundException
IllegalArgumentException
CoordinateConversionException
SourceNotFoundException
protected SkyPosition getStartPosition(Scan scan, Date dateTime) throws SourceNotFoundException
scan
at
dateTime
. This method takes into account more complicated Scan
modes that do not necessarily specify a Source object for the scan.
SourceNotFoundException
protected SkyPosition getEndPosition(Scan scan, Date dateTime) throws SourceNotFoundException
scan
at
dateTime
. This method takes into account more complicated Scan
modes that do not necessarily specify a Source object for the scan.
SourceNotFoundException
protected void beforeScanLoopAction(ScanLoop scan)
protected void afterScanLoopAction(ScanLoop scan)
protected void beforeIteratingAction()
protected void beforeFirstScanAction(Scan scan)
protected void afterFirstScanAction(Scan scan)
protected void beforeLastScanAction(Scan scan)
protected void afterLastScanAction(Scan scan)
protected void beforeScanAction(Scan scan)
protected void scanAction(Scan scan)
protected void afterScanAction(Scan scan)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |