|
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
Base class from which most non-trivial framework classes are derived. This class provides the following services to its children classes: failure reporting, configuration error reporting, provision of timing information.
This class confers the following properties upon its children classes: resettability, telemeterability and configurability.
This class can fire two types of events: failure and configuration events. Failure events are fired when method reportFailure is called. Configuration events are fired when method reportConfigurationEvent is called. These methods would normally be called by children classes when they encounter a failure or a configuration problem.
Change Record:
setFailureListenerList and
setConfigurationListenerList. Done by A. Pasetti on 19.11.02failureListenerList
and configurationListenerList to null,
changed the configuration check in method isConfigured, and
removed the methods setFailureListenerList and
setConfigurationListenerList. Done by A. Pasetti on 10.03.03
AocsClock,
FailureEventRepository,
ConfigurationEventRepository,
SystemManager| Field Summary |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
AocsObject()
Register with system manager, set telemetry image length, and reset state. |
|
| Method Summary | |
static void |
addConfigurationListener(ConfigurationListener l)
Initialization method to register failure listeners. |
static void |
addFailureListener(FailureListener l)
Initialization method to register failure listeners. |
protected void |
finalize()
Report a failure if an AocsObject is destroyed. |
static AocsClock |
getAocsClock()
|
static ConfigurationListenerList |
getConfigurationListenerList()
|
protected int |
getCycle()
Return the current time as provided by the AocsClock plug-in object. |
static RecoveryAction |
getDestructionRecoveryAction()
|
static FailureListenerList |
getFailureListenerList()
|
static SystemManager |
getSystemManager()
|
byte |
getTelemetryFormat()
Return the current telemetry format. |
int |
getTelemetryImageLength()
Return the length (in bits) of the telemetry image of the object. |
int |
getTime()
Return the current time as provided by the AocsClock plug-in object. |
boolean |
isConfigured()
Return false if some configuration data are missing. |
static void |
removeConfigurationListener(ConfigurationListener l)
Method to unregister configuration event listeners. |
static void |
removeFailureListener(FailureListener l)
Method to unregister failure listeners. |
protected void |
reportConfigurationEvent(short configType,
AocsObject creator)
Report a configuration event. |
protected void |
reportFailure(short failureType,
AocsObject creator,
RecoveryAction recoveryAction)
Report a failure event. |
void |
reset()
Bring the resettable state of the object to its initial default value. |
void |
resetConfiguration()
Clear all configuration information. |
static void |
resetStaticConfiguration()
Unload all static plug-in objects and all registered listeners. |
static void |
setAocsClock(AocsClock c)
|
static void |
setDestructionRecoveryAction(RecoveryAction r)
|
static void |
setMaxNumberOfConfigurationListeners(int n)
Initialization method to initialize the list of listeners to configuration events. |
static void |
setMaxNumberOfFailureListeners(int n)
Initialization method to initialize the list of listeners to failure events. |
static void |
setSystemManager(SystemManager s)
|
void |
setTelemetryFormat(byte newFormat)
Set the telemetry format to 'newFormat'. |
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 AocsObject()
| Method Detail |
protected void reportFailure(short failureType,
AocsObject creator,
RecoveryAction recoveryAction)
A failure event is an event that arises when the software detects an anomaly during its normal operation. This method is called by objects that wish to report a failure.
A failure event is configured and fired to the registered failure event listeners. In order to avoid dynamic memory allocation, the failure event is created during the application initialization phase.
failureType - failure type identifier.creator - object issuing the failure report (this is normally the
object that detected the failure).recoveryAction - recovery action associated to the failure event.
protected void reportConfigurationEvent(short configType,
AocsObject creator)
A configuration event is an event that arises during and is related to the process of configuring an object. This method is called by objects that wish to report a configuration event.
A configuration event is configured and fired to the registered configuration event listeners. In order to avoid dynamic memory allocation, the configuration event is created during the application initialization phase.
configType - configuration event type identifierpublic int getTime()
protected int getCycle()
protected void finalize()
By design, AOCS objects should never be destroyed. If they are, a failure event is generated by the object destructor.
finalize in class Objectpublic static void setAocsClock(AocsClock c)
public static AocsClock getAocsClock()
public static void setSystemManager(SystemManager s)
public static SystemManager getSystemManager()
public static void setDestructionRecoveryAction(RecoveryAction r)
public static RecoveryAction getDestructionRecoveryAction()
public static ConfigurationListenerList getConfigurationListenerList()
public static FailureListenerList getFailureListenerList()
public static void resetStaticConfiguration()
public void reset()
Resettable
reset in interface Resettablepublic void resetConfiguration()
ConfigurableCalls to resetConfiguration are propagated to objects that are in a relationship of strong aggregation.
resetConfiguration in interface Configurablepublic boolean isConfigured()
ConfigurableTypically, a false value indicates that a plug-in component is missing or that the object has not been initialized. This is a negative check only: a return value of true cannot guarantee that the object is correctly configured.
Calls to resetConfiguration on an object A are normally not propagated objects of type AocsObject that are contained or otherwise aggregated to A. The rationale for this policy is that all objects of type AocsObject implement interface configurable and therefore their configuration status should be checked externally (probably through the configuration check service of the system manager).
isConfigured in interface Configurablepublic void writeToTelemetry(TelemetryStream tmStream)
Telemeterable
writeToTelemetry in interface Telemeterablepublic void setTelemetryFormat(byte newFormat)
Telemeterable
setTelemetryFormat in interface Telemeterablepublic byte getTelemetryFormat()
Telemeterable
getTelemetryFormat in interface Telemeterablepublic int getTelemetryImageLength()
Telemeterable
getTelemetryImageLength in interface Telemeterablepublic static void setMaxNumberOfFailureListeners(int n)
public static void setMaxNumberOfConfigurationListeners(int n)
public static void removeFailureListener(FailureListener l)
public static void addFailureListener(FailureListener l)
public static void removeConfigurationListener(ConfigurationListener l)
public static void addConfigurationListener(ConfigurationListener l)
|
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 | ||||||||||