|
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.AocsEvent.EventRepository
Base class from which event repository classes are derived.
This class is not intended to be directly instantiated in the framework. It is used as a convenience class to collect together functionalities that are common to all event repository classes. The basic functionality that it provides is the management of the references to the events in the repository. The storage space for the event objects is provided in the derived, and event-specific, classes.
Iterators methods are also provided to go through all the events in the repository starting from the most recent.
The repository behaves like a circular buffer. When the it is full, the oldest event is overwritten.
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 | |
protected |
EventRepository()
Protected constructor. |
| Method Summary | |
boolean |
doConsistencyCheck()
Check that no events were lost. |
int |
getCounter()
Return the value of the iteration counter. |
int |
getListSize()
|
RecoveryAction |
getRecoveryAction()
Get the recovery action associated to the consistency check. |
int |
getTelemetryImageLength()
Return the length (in bits) of the telemetry image of the object. |
protected AocsEvent |
insert()
Create and return a new event. |
boolean |
isConfigured()
Return false if some configuration data are missing. |
boolean |
isIterationEnded()
Return true if the iteration is finished. |
AocsEvent |
latest()
Start an iteration by returning the most recently stored event. |
AocsEvent |
previous()
Return the next most recent event. |
void |
reset()
Bring the resettable state of the object to its initial default value. |
void |
resetConfiguration()
Clear all configuration information. |
protected void |
setEvent(int i,
AocsEvent evt)
Load the argument event in the i-th position in the repository. |
void |
setRecoveryAction(RecoveryAction r)
Set the recovery action associated to the consistency check. |
protected void |
setRepositorySize(int n)
Initialization method to set the maximum number of events that can be stored in the repository. |
void |
setTelemetryFormat(byte newFormat)
Set the telemetry format to 'newFormat'. |
void |
writeToTelemetry(TelemetryStream stream)
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 |
protected EventRepository()
| Method Detail |
protected void setRepositorySize(int n)
protected AocsEvent insert()
The caller wishes to have a new event inserted in the repository. If the internal buffer is not yet full, a reference to the next free event is returned. If the repository is full, then a reference to the oldest inserted event is returned.
protected void setEvent(int i,
AocsEvent evt)
The event repository should be pictured as an array modelling a circular buffer.
i - position where event should be loaded.evt - event to be loaded.public AocsEvent latest()
This method is used in conjunction with previous() and isIterationEnded() when iterating throughthe events in the repository.
Iterations through the list should be performed in a synchronized section.
public AocsEvent previous()
This method is used in conjunction with latest() and isIterationEnded() when iterating throughthe events in the repository.
Iterations through the list should be performed in a synchronized section.
public boolean isIterationEnded()
Iterations through the list should be performed in a synchronized section.
public int getCounter()
public int getListSize()
public void reset()
Resettable
reset in interface Resettablereset in class AocsObjectpublic void resetConfiguration()
ConfigurableCalls to resetConfiguration are propagated to objects that are in a relationship of strong aggregation.
resetConfiguration in interface ConfigurableresetConfiguration in class AocsObjectpublic 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 ConfigurableisConfigured in class AocsObjectpublic void writeToTelemetry(TelemetryStream stream)
Telemeterable
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectpublic void setTelemetryFormat(byte newFormat)
Telemeterable
setTelemetryFormat in interface TelemeterablesetTelemetryFormat in class AocsObjectpublic int getTelemetryImageLength()
Telemeterable
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObjectpublic boolean doConsistencyCheck()
doConsistencyCheck in interface ConsistencyCheckablepublic RecoveryAction getRecoveryAction()
ConsistencyCheckable
getRecoveryAction in interface ConsistencyCheckablepublic void setRecoveryAction(RecoveryAction r)
ConsistencyCheckable
setRecoveryAction in interface ConsistencyCheckable
|
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 | ||||||||||