Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.AocsData
Class AocsDataPool

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.AocsData.AocsDataPool
All Implemented Interfaces:
Configurable, ConsistencyCheckable, Resettable, Telemeterable
Direct Known Subclasses:
AttitudeDataPool, JbedSmmDataPool

public class AocsDataPool
extends AocsObject
implements ConsistencyCheckable

Base class from which all AOCS data pool classes are derived.

Data exchanges among components in the AOCS framework are done through shared data areas called data pools. Data pools are based on the shared data design pattern. The data pools physically contain the data items. Data users access the data in the pool as instances of type AocsData.

Only one instance of a certain shared datum is stored in the pool. This means that if, for instance, the method to set the control torque in the attitude data pool is called twice, then the datum written to the pool at the second call overwrites the datum written at the first call. This data sharing mechanism is suitable for cyclical data whose number and type is fixed and can be determined at design time.

Note that data pools introduce some overhead because data have to be copied to a data pool.

Several classes of data pools may be present where every data pool class groups together logically related data. The AocsDataPool class provides a skeleton implementation of an emtpy data pool from which application specific data pools can be instantiated. This is the data pool subclass hot-spot.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
AocsData, Intercomponent Communication Framelet

Field Summary
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
protected AocsDataPool()
          The constructor is protected: only subclasses can be instantiated.
 
Method Summary
 boolean doConsistencyCheck()
          A consistency check is performed on all AOCS data in the pool and false is returned if any of these checks fails.
 AocsData first()
          Iterator method to iterate through the data in the data pool.
 int getDataPoolSize()
           
 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.
 boolean isConfigured()
          Return false if any of the data in the pool is not configured or if the recovery action is not loaded.
 boolean isLast()
          Iterator method to iterate through the data in the data pool.
protected  void loadData(AocsData data)
          Initialization method to load an AOCS datum into the pool.
protected  void localReset()
           
protected  void localResetConfiguration()
           
 AocsData next()
          Iterator method to iterate through the data in the data pool.
 void reset()
          Reset all objects in the data pool.
 void resetConfiguration()
          Reset configuration of all objects in the data pool and unload recovery action.
protected  void setDataPoolSize(int size)
          Initialization method to set the number of AOCS data that are stored in the data pool.
 void setRecoveryAction(RecoveryAction r)
          Set the recovery action associated to the consistency check.
 void setTelemetryFormat(byte newFormat)
          The format setting is propagated to all the AOCS data in the pool.
 void writeToTelemetry(TelemetryStream stream)
          Write content of the data pool to the telemetry stream.
 
Methods inherited from class RtjAocsFramework.BasicObjects.AocsObject
addConfigurationListener, addFailureListener, finalize, getAocsClock, getConfigurationListenerList, getCycle, getDestructionRecoveryAction, getFailureListenerList, getSystemManager, getTelemetryFormat, getTime, removeConfigurationListener, removeFailureListener, reportConfigurationEvent, reportFailure, resetStaticConfiguration, setAocsClock, setDestructionRecoveryAction, setMaxNumberOfConfigurationListeners, setMaxNumberOfFailureListeners, setSystemManager
 
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

AocsDataPool

protected AocsDataPool()
The constructor is protected: only subclasses can be instantiated.

Method Detail

localReset

protected void localReset()

localResetConfiguration

protected void localResetConfiguration()

loadData

protected void loadData(AocsData data)
Initialization method to load an AOCS datum into the pool. An AOCS data pool is internally organized around a list of type AocsDataList that stores all the data in the pool. The base class AocsDataPool implements the list management functionalities. This method is called by the constructor of its subclasses to load a certain AOCS datum into the internal data pool list.

Parameters:
data - datum to be loaded into the internal list of data in the pool.
See Also:
AocsDataList

setDataPoolSize

protected void setDataPoolSize(int size)
Initialization method to set the number of AOCS data that are stored in the data pool. This method is typically called by the constructor of the subclasses. It causes memory to be allocated for the list of AOCS data to be held in the data pool. The size of the data pool should be identical to the number of AOCS data that are loaded into the data pool with method loadData. This method should only be called once. Attempts to call it more than once will cause a configuration error event to be generated.


getDataPoolSize

public int getDataPoolSize()

first

public AocsData first()
Iterator method to iterate through the data in the data pool.


next

public AocsData next()
Iterator method to iterate through the data in the data pool.


isLast

public boolean isLast()
Iterator method to iterate through the data in the data pool.


reset

public void reset()
Reset all objects in the data pool.

Specified by:
reset in interface Resettable
Overrides:
reset in class AocsObject

resetConfiguration

public void resetConfiguration()
Reset configuration of all objects in the data pool and unload recovery action.

Specified by:
resetConfiguration in interface Configurable
Overrides:
resetConfiguration in class AocsObject

isConfigured

public boolean isConfigured()
Return false if any of the data in the pool is not configured or if the recovery action is not loaded.

Specified by:
isConfigured in interface Configurable
Overrides:
isConfigured in class AocsObject

writeToTelemetry

public void writeToTelemetry(TelemetryStream stream)
Write content of the data pool to the telemetry stream.

Short and Normal Format: send all the data items from all the AOCS data in the pool to the telemetry stream

Long and Debug Format: send all the AOCS data in the pool to the telemetry stream.

Specified by:
writeToTelemetry in interface Telemeterable
Overrides:
writeToTelemetry in class AocsObject

setTelemetryFormat

public void setTelemetryFormat(byte newFormat)
The format setting is propagated to all the AOCS data in the pool.

Specified by:
setTelemetryFormat in interface Telemeterable
Overrides:
setTelemetryFormat in class AocsObject

getTelemetryImageLength

public int getTelemetryImageLength()
Description copied from interface: Telemeterable
Return the length (in bits) of the telemetry image of the object. This method is useful to verify that the quantity of data generated by a given object is compatible with the capacity of the telemetry channel.

Specified by:
getTelemetryImageLength in interface Telemeterable
Overrides:
getTelemetryImageLength in class AocsObject

doConsistencyCheck

public boolean doConsistencyCheck()
A consistency check is performed on all AOCS data in the pool and false is returned if any of these checks fails.

Specified by:
doConsistencyCheck in interface ConsistencyCheckable
Returns:
true if the internal state was found to be consistent, false otherwise

getRecoveryAction

public RecoveryAction getRecoveryAction()
Description copied from interface: ConsistencyCheckable
Get the recovery action associated to the consistency check.

Specified by:
getRecoveryAction in interface ConsistencyCheckable

setRecoveryAction

public void setRecoveryAction(RecoveryAction r)
Description copied from interface: ConsistencyCheckable
Set the recovery action associated to the consistency check.

Specified by:
setRecoveryAction in interface ConsistencyCheckable

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland