|
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.ManoeuvreManagement.Manoeuvre
Manoeuvre is an abstract class providing default - and mostly trivial - implementations of its methods. Concrete manoeuvres are instances of subclasses of Manoeuvre. Manoeuvres are loaded in a manoeuvre manager that is responsible for correctly executing them. The manoeuvre manager uses the methods exposed by class Manoeuvre to control manoeuvre execution.
Manoeuvres are implemented as state machine. They can be in one of the following states: ready, inProcess, finished, aborted, onHold, beenReset. The current state is exposed as a monitorable property.
Manoeuvres act as event sources. They fire a manoeuvre event whenever their internal state changes and they fire a change event whenever their monitored property undergoes a change as specified by its registered monitors.
Copyright: see the Copyright Notice.
| Field Summary | |
static byte |
aborted
Manoeuvre state |
static byte |
beenReset
Manoeuvre state |
protected byte |
currentState
|
protected int |
execTime
|
static byte |
finished
Manoeuvre state |
static byte |
inProcess
Manoeuvre state |
static byte |
onHold
Manoeuvre state |
static byte |
ready
Manoeuvre state |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
Manoeuvre()
Manoeuvre |
|
| Method Summary | |
void |
abort()
The abort method is called to allow a manoeuvre to perform any clean-up actions before it is descheduled. |
void |
addChangeListener(ChangeListener l)
Initialization method to register listeners to change events. |
void |
addManoeuvreListener(ManoeuvreListener l)
Initialization method to register listeners to manoeuvre events. |
void |
addMonitor(PropertyMonitor m,
ChangeObject c)
Adds a new PropertyMonitor object into the list of registered property monitors together with a new ChangeObject specifying the change profile in which the registered minitor is interested. |
boolean |
canContinue()
Manoeuvre execution should only proceed if external conditions are safe. |
boolean |
canHold()
The manoeuvre manager may wish to temporarily interrupt execution of a manoeuvre. |
boolean |
canResume()
The manoeuvre manager can request from the manoeuvre and indication of whether or not its execution can be resumed by calling the method canResume. |
boolean |
canStart()
Return true if the manoeuvre is ready to start execution. |
void |
doContinue()
Manoeuvres execute over a prolonged period of time. |
protected void |
fireChangeEvent(short eventTypeId,
ChangeObject changeObject,
double lastValue)
Fire a change event to all registered listeners. |
protected void |
fireManoeuvreEvent(short eventTypeId)
Fire a manoeuvre event to all registered listeners. |
AocsObject |
getAocsObject()
Manouvres expose their current state as a monitorable property. |
double |
getMonitorablePropertyValue(int i)
Manouvres expose their current state as a monitorable property. |
int |
getNumberOfMonitorableProperties()
Manouvres expose a single monitorable property. |
byte |
getState()
Returns the current state of the manoeuvre. |
int |
getTelemetryImageLength()
Return the length in bits of the telemetry image that would be written by the object in response to a call to method writeToTelemetry. |
int |
getTimeTag()
Manoeuvres may carry a time tag defining the time after which they can be considered for execution. |
short |
getType()
Returns the manoeuvre type. |
void |
hold()
If the manoeuvre manager decides to interrupt execution of the manoeuvre, it should call the method hold on the manoeuvre to allow it to take any action required in connection with a suspension of the manoeuvre. |
void |
initialize()
Manoeuvres may have to perform some special initialization action when their execution begins. |
boolean |
isConfigured()
Checks the configuration. |
boolean |
isFinished()
The method isFinished returns true when the manoeuvre has terminated. |
boolean |
isHolding()
The manoeuvre manager can determine whether or not the manoeuvre is currently suspended by calling the method isHolding. |
boolean |
isInUse()
Returns the value of the inUse flag. |
protected void |
notifyMonitors(byte newManoeuvreState)
When a manoeuvre's state changes, the manoeuvre is responsible for notifying any registered property monitors of its state change. |
void |
removeChangeListener(ChangeListener l)
Initialization method to unregister change event listeners. |
void |
removeManoeuvreListener(ManoeuvreListener l)
Initialization method to unregister manoeuvre event listeners. |
void |
removeMonitor(PropertyMonitor m)
Removes a PropertyMonitor object from the list of registered monitors. |
void |
reset()
Resetting a manoeuvre is similar, but not quite identical, to aborting the manoeuvre. |
void |
resetConfiguration()
Resets configuration of the super object and performs the local reset of the configuration. |
void |
resume()
When the manoeuvre execution is resumed, method resume should be called. |
void |
setInUse(boolean inUse)
Flag inUse is true when the manoeuvre is loaded. |
void |
setMaxNumberOfChangeListeners(int n)
Initialization method to set the maximum number of listeners to change events. |
void |
setMaxNumberOfManoeuvreListeners(int n)
Initialization method to set the maximum number of listeners to manoeuvre events. |
void |
setPropertyMonitorListSize(int n)
Initialization method to set the maximum number of monitors for the manoeuvre state property. |
void |
setTimeTag(int t)
Sets a new time tag. |
void |
terminate()
When the manoeuvre manager detects that the manoeuvre has terminated execution, it calls terminate to give the manoeuvre the chance to perform any final closedown actions and then de-schedules it. |
boolean |
wasAborted()
Method wasAborted returns true if the manoeuvre has been aborted. |
void |
writeToTelemetry(TelemetryStream stream)
Causes 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 |
| Field Detail |
public static final byte ready
public static final byte inProcess
public static final byte finished
public static final byte aborted
public static final byte onHold
public static final byte beenReset
protected int execTime
protected byte currentState
| Constructor Detail |
public Manoeuvre()
| Method Detail |
public void addManoeuvreListener(ManoeuvreListener l)
public void removeManoeuvreListener(ManoeuvreListener l)
public void setMaxNumberOfManoeuvreListeners(int n)
public void addChangeListener(ChangeListener l)
public void removeChangeListener(ChangeListener l)
public void setMaxNumberOfChangeListeners(int n)
protected void fireManoeuvreEvent(short eventTypeId)
protected void fireChangeEvent(short eventTypeId,
ChangeObject changeObject,
double lastValue)
eventTypeId - the event type identifierchangeObject - the change object through which the propoerty value
was passed and that triggered the property changelastValue - the most recent value of the property that underwent the
changeprotected void notifyMonitors(byte newManoeuvreState)
newManoeuvreState - is a new changed manoeuvre state.public boolean canStart()
public void initialize()
public boolean canContinue()
public void doContinue()
public void abort()
public boolean wasAborted()
public void terminate()
public boolean isFinished()
public boolean canHold()
public void hold()
public boolean isHolding()
public boolean canResume()
public void resume()
public int getTelemetryImageLength()
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObjectpublic void writeToTelemetry(TelemetryStream stream)
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectstream - the telemetry streampublic void reset()
reset in interface Resettablereset in class AocsObjectpublic void resetConfiguration()
resetConfiguration in interface ConfigurableresetConfiguration in class AocsObjectpublic boolean isConfigured()
isConfigured in interface ConfigurableisConfigured in class AocsObjectpublic void setInUse(boolean inUse)
public boolean isInUse()
public void setPropertyMonitorListSize(int n)
n - is a size of the property monitor list
public void addMonitor(PropertyMonitor m,
ChangeObject c)
m - the property monitorc - the change object specifying the change profile in which the
property monitor is interestedpublic void removeMonitor(PropertyMonitor m)
m - the property monitorpublic int getTimeTag()
public void setTimeTag(int t)
t - the new time tagpublic byte getState()
public double getMonitorablePropertyValue(int i)
getMonitorablePropertyValue in interface MonitorableMonitorablepublic int getNumberOfMonitorableProperties()
getNumberOfMonitorableProperties in interface Monitorablepublic AocsObject getAocsObject()
getAocsObject in interface Monitorablepublic short getType()
|
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 | ||||||||||