|
Real-Time Java AOCS Framework v1.0 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--RtjAocsFramework.BasicObjects.RootObject
|
+--RtjAocsFramework.BasicObjects.AocsObject
|
+--RtjAocsFramework.ModeManagement.ModeChangeAction
Base class from which all objects encapsulating to be taken when a mode manager performs a mode change are derived. Often, a mode switch by a mode manager must be accompanied by some special actions related to the exit from the old mode and/or the entry into the new one. Consider for instance an attitude controller component that manages several control algorithms corresponding to different operational mode. When a new mode is entered, its associated control algorithm should be reset to remove the memory of previous activations.
Actions that are associated to a mode transition are called "mode change actions". The framework offers two mechanisms for their implementations. The most straightforward approach is simply to hard-code the mode change actions into the concrete mode manager. Thus, for instance, in the case of the attitude controller example, when the mode manager finds that it has to perform a change mode, then it executes any actions that are associated to the mode change. A second, more systematic approach, is to encapsulate the mode change actions into objects that are derived from this base class ModeChangeAction. Such objects are called "mode change objects". A mode change action object can be associated to a mode manager and then the mode manager calls method doModeExitAction on the mode change object when a mode is exited and method doModeEntryAction when a mode is entered.
Mode change actions can be linked together in a chain of responsibility. When the mode manager performs a mode transition, it calls methods doModeExitAction and doModeEntryAction on a ModeChangeAction object but the method calls might actually be passed along a chain of linked mode change action objects. In a typical configuration, each mode change action object in the chain specializes in one of the transition into or out of one particular mode.
Copyright: see the Copyright Notice.
| Field Summary |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
ModeChangeAction()
|
|
| Method Summary | |
void |
doModeEntryAction(int newMode)
Performs the actions associated to a transition into mode oldMode. |
void |
doModeExitAction(int oldMode)
Performs the actions associated to a transition out of mode oldMode. |
ModeChangeAction |
getNextModeChangeAction()
Return the next mode change action in the chain of responsibility. |
int |
getTelemetryImageLength()
Return the length (in bits) of the telemetry image of the object. |
void |
resetConfiguration()
Unload the link to the next mode change action in the chain of responsibility. |
void |
setNextModeChangeAction(ModeChangeAction n)
Set up the link to the next mode change action in the chain of responsibility. |
void |
writeToTelemetry(TelemetryStream tmStream)
Direct the object to write its own state to the telemetry stream. |
| Methods inherited from class RtjAocsFramework.BasicObjects.RootObject |
getClassId, getInstanceId, setClassId |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ModeChangeAction()
| Method Detail |
public void doModeExitAction(int oldMode)
public void doModeEntryAction(int newMode)
public void resetConfiguration()
resetConfiguration in interface ConfigurableresetConfiguration in class AocsObjectpublic void writeToTelemetry(TelemetryStream tmStream)
Telemeterable
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectpublic int getTelemetryImageLength()
Telemeterable
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObjectpublic void setNextModeChangeAction(ModeChangeAction n)
public ModeChangeAction getNextModeChangeAction()
|
Real-Time Java AOCS Framework v1.0 API Specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||