@SCJAllowed public abstract class MissionSequencer<SpecificMission extends Mission> extends ManagedEventHandler
MissionSequencer oversees a sequence of Mission executions.
The sequence may include interleaved execution of independent missions
and repeated executions of missions.
As a subclass of ManagedEventHandler, MissionSequencer
has an execution priority and memory budget as specified by constructor parameters.
The MissionSequencer executes vendor-supplied infrastructure code which
invokes user-defined implementations of the method getNextMission, and for each mission
the user-defined initialize and cleanUp methods.
During execution of an inner-nested mission, the MissionSequencer remains blocked waiting for
the mission to terminate. An invocation of requestSequenceTermination will unblock it
so that it can perform an invocation of the running mission's requestTermination method,
if the mission is still running and its termination has not already been requested.
Note that if a MissionSequencer object is preallocated by the application, it
must be allocated in the same scope as its corresponding Missions.
- public final void requestSequenceTermination()
- public final boolean sequenceTerminationPending()
| Constructor and Description |
|---|
MissionSequencer(PriorityParameters priority,
StorageParameters storage)
Constructs a
MissionSequencer to run at the priority and
with the memory resources specified by its parameters. |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp()
Runs end-of-mission clean up associated with this schedulable object.
|
void |
handleAsyncEvent()
This method is declared final because the implementation is provided by
the infrastructure of the SCJ implementation and shall not be overridden.
|
void |
register()
Registers this event handler with the current mission.
|
void |
requestSequenceTermination()
Invokes the currently running
Mission's
requestTermination method. |
boolean |
sequenceTerminationPending()
Checks if the current
Mission is trying to terminate. |
getLastReleaseTime@SCJAllowed @SCJRestricted(value=INITIALIZE) public MissionSequencer(PriorityParameters priority, StorageParameters storage)
MissionSequencer to run at the priority and
with the memory resources specified by its parameters.@SCJAllowed(value=INFRASTRUCTURE) public final void handleAsyncEvent()
Missions by this MissionSequencer.handleAsyncEvent in class ManagedEventHandlerpublic final void register()
ManagedEventHandlerregister in interface ManagedSchedulableregister in class ManagedEventHandler@SCJAllowed public final void requestSequenceTermination()
Mission's
requestTermination method. Mission, this
MissionSequencer returns without starting any additional
missions.
Note that requestSequenceTermination does not force the
sequence to terminate because the currently running Mission
must voluntarily relinquish its resources.
@SCJAllowed public final boolean sequenceTerminationPending()
Mission is trying to terminate.MissionSequencer's
requestSequenceTermination method has been invoked.public final void cleanUp()
ManagedSchedulablecleanUp in interface ManagedSchedulablecleanUp in class ManagedEventHandler