|
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.ReconfigurationManagement.ReconfigurerHelper
Helper class for managing a reconfiguration group. The reconfigurable functionality is represented by interface Reconfigurable. There are however certain standard operations pertaining to the management of a reconfiguration group that apply in general to all reconfiguration groups and it is therefore convenient to capture their implementation and make it available to reconfiguration managers. The ReconfigurerHelper class was introduced for this purpose. Essentially, the reconfigurer helper manages a set of n identical configurations and implements all the methods defined by interface Reconfigurable for this situation . Specific reconfiguration managers would normally create an internal instance of the reconfigurer helper and delegate to it implementation of as many of the Reconfigurable operations as is possible.
This object can fire reconfiguration events. An event is fired when: 1) the configuration is updated, 2) when the health status of one of the configurations is updated, 3) when a reconfiguration fails. Typically listeners to reconfiguration events are the reconfiguration event repository and the system manager.
Copyright: see the Copyright Notice.
Change record:
Reconfigurable| Field Summary |
| Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable |
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM |
| Constructor Summary | |
ReconfigurerHelper()
Parameterless constructor. |
|
ReconfigurerHelper(short numberOfConfig,
int numberOfListener,
short defaultConfig,
Reconfigurable reconfigManager)
This constructor assumes that the system manager has already been loaded in the AocsObject base class. |
|
| Method Summary | |
void |
addReconfigurationListener(ReconfigurationListener l)
Register a listener to reconfiguration events |
boolean |
canReconfigure()
Return true if a reconfiguration is possible |
void |
disableConfiguration(short n)
Disable the n-th configuration. |
void |
disableReconfiguration()
Disable all configurations |
void |
enableConfiguration(short n)
Enable the n-th configuration. |
void |
enableReconfiguration()
Enable all configurations. |
AocsObject |
getAocsObject()
Return the reconfiguration manager as an instance of type AocsObject. |
short |
getConfiguration()
Return current configuration. |
short |
getConfigurationRank(short n)
Return the rank of configuration n |
RecoveryAction |
getReconfigurationErrorRecoveryAction()
Getter method for the recovery action associated to a failed reconfiguration request |
int |
getReconfigurationOrder()
Return the reconfiguration order |
int |
getTelemetryImageLength()
Return the length (in bits) of the telemetry image of the object. |
boolean |
isConfigurationHealthy(short n)
Return true if configuration n is healthy |
protected boolean |
isConfigurationLegal(short n)
Return true if a reconfiguration to configuration n is legal. |
boolean |
isConfigured()
Return false if some configuration data are missing. |
void |
markConfiguration(short n,
boolean mark)
Mark configuration n healthy (true) or unhealthy (false). |
void |
rankConfiguration(short n,
short r)
Set the rank of configuration n to r. |
void |
reconfigure()
Perform a reconfiguration, if one is possible. |
void |
removeReconfigurationListener(ReconfigurationListener l)
Unregister a listener to reconfiguration events |
void |
reset()
Mark all configurations as healthy and enabled, enable reconfigurations, give all configurations the same rank. |
void |
resetConfiguration()
Unload recovery action and reset configuration of event listeners. |
void |
restoreConfiguration(ConfigurationState s)
Set the internal configuration to the value coded in the ConfigurationState object. |
void |
saveConfiguration(ConfigurationState s)
Save internal configuration in a ConfigurationState object. |
void |
setConfiguration(short newConfiguration)
Set the current configuration to newConfiguration. |
void |
setDefaultConfiguration(short n)
Initialization method to set the default configuration. |
void |
setMaxNumberOfReconfigurationListeners(int n)
Initialization method to set the maximum number of listeners to reconfiguration events fired by this reconfigurer helper. |
void |
setNumberOfConfigurations(short n)
Initialization method to set the number of configurations in the configuration group managed by this reconfigurer helper. |
void |
setReconfigurationErrorRecoveryAction(RecoveryAction r)
Setter method for the recovery action associated to a failed reconfiguration request |
void |
setReconfigurationManager(Reconfigurable r)
Initialization method to set the reconfiguration manager that is using this reconfigurer helper. |
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 ReconfigurerHelper(short numberOfConfig,
int numberOfListener,
short defaultConfig,
Reconfigurable reconfigManager)
numberOfConfig - number of configuration in the configuration groupdefaultConfig - default configurationreconfigManager - reconfiguration manager who is using this
reconfiguration helperpublic ReconfigurerHelper()
| Method Detail |
protected boolean isConfigurationLegal(short n)
public void setNumberOfConfigurations(short n)
public void setMaxNumberOfReconfigurationListeners(int n)
public void setDefaultConfiguration(short n)
public void setReconfigurationManager(Reconfigurable r)
public short getConfiguration()
Reconfigurable
getConfiguration in interface Reconfigurablepublic void setConfiguration(short newConfiguration)
setConfiguration in interface Reconfigurable
public void markConfiguration(short n,
boolean mark)
Reconfigurable
markConfiguration in interface Reconfigurable
public void rankConfiguration(short n,
short r)
Reconfigurable
rankConfiguration in interface Reconfigurablepublic void enableConfiguration(short n)
Reconfigurable
enableConfiguration in interface Reconfigurablepublic void disableConfiguration(short n)
Reconfigurable
disableConfiguration in interface Reconfigurablepublic void enableReconfiguration()
Reconfigurable
enableReconfiguration in interface Reconfigurablepublic void disableReconfiguration()
Reconfigurable
disableReconfiguration in interface Reconfigurablepublic void reconfigure()
Reconfigurable
reconfigure in interface Reconfigurablepublic boolean canReconfigure()
Reconfigurable
canReconfigure in interface Reconfigurablepublic boolean isConfigurationHealthy(short n)
Reconfigurable
isConfigurationHealthy in interface Reconfigurablepublic int getReconfigurationOrder()
Reconfigurable
getReconfigurationOrder in interface Reconfigurablepublic short getConfigurationRank(short n)
Reconfigurable
getConfigurationRank in interface Reconfigurablepublic void restoreConfiguration(ConfigurationState s)
restoreConfiguration in interface ReconfigurableReconfigurable.restoreConfiguration(ConfigurationState)public void saveConfiguration(ConfigurationState s)
saveConfiguration in interface ReconfigurableReconfigurable.saveConfiguration(ConfigurationState)public void setReconfigurationErrorRecoveryAction(RecoveryAction r)
Reconfigurable
setReconfigurationErrorRecoveryAction in interface Reconfigurablepublic RecoveryAction getReconfigurationErrorRecoveryAction()
Reconfigurable
getReconfigurationErrorRecoveryAction in interface Reconfigurablepublic void resetConfiguration()
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 reset()
reset in interface Resettablereset in class AocsObjectpublic AocsObject getAocsObject()
Reconfigurable
getAocsObject in interface Reconfigurablepublic void addReconfigurationListener(ReconfigurationListener l)
Reconfigurable
addReconfigurationListener in interface Reconfigurablepublic void removeReconfigurationListener(ReconfigurationListener l)
Reconfigurable
removeReconfigurationListener in interface Reconfigurablepublic void writeToTelemetry(TelemetryStream tmStream)
Telemeterable
writeToTelemetry in interface TelemeterablewriteToTelemetry in class AocsObjectpublic int getTelemetryImageLength()
Telemeterable
getTelemetryImageLength in interface TelemeterablegetTelemetryImageLength in class AocsObject
|
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 | ||||||||||