Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.ReconfigurationManagement
Interface Reconfigurable

All Known Implementing Classes:
BasicUnitReconfigurer, ReconfigurerHelper

public interface Reconfigurable

Interface characterizing reconfiguration managers.

A reconfiguration manager is the object responsible for controlling reconfigurations within a reconfiguration group. A reconfiguration group is a set of objects offering a redundant functionality.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Reconfiguration Framelet Document.

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
 boolean isConfigurationHealthy(short n)
          Return true if configuration n is healthy
 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 restoreConfiguration(ConfigurationState s)
          Restore the internal configuration of the reconfiguration manager to the value stored in s.
 void saveConfiguration(ConfigurationState s)
          Save the internal configuration of the reconfiguration manager in the parameter s.
 void setConfiguration(short n)
          Force the current configuration to n.
 void setReconfigurationErrorRecoveryAction(RecoveryAction r)
          Setter method for the recovery action associated to a failed reconfiguration request
 

Method Detail

getAocsObject

public AocsObject getAocsObject()
Return the reconfiguration manager as an instance of type AocsObject. If the reconfiguration manager is not derived from class AocsObject, then null is returned.


getConfiguration

public short getConfiguration()
Return current configuration.


setConfiguration

public void setConfiguration(short n)
Force the current configuration to n.


markConfiguration

public void markConfiguration(short n,
                              boolean mark)
Mark configuration n healthy (true) or unhealthy (false).


rankConfiguration

public void rankConfiguration(short n,
                              short r)
Set the rank of configuration n to r.


enableConfiguration

public void enableConfiguration(short n)
Enable the n-th configuration.


disableConfiguration

public void disableConfiguration(short n)
Disable the n-th configuration.


enableReconfiguration

public void enableReconfiguration()
Enable all configurations.


disableReconfiguration

public void disableReconfiguration()
Disable all configurations


reconfigure

public void reconfigure()
Perform a reconfiguration, if one is possible. The reconfiguration is performed only if reconfigurations are enabled and if there is at least one healthy and enabled configuration. The end configuration is the one with the highest rank among the healthy and enabled configurations. If the reconfiguration is not possible because there are no more healthy enabled configurations, a failure is declared.


canReconfigure

public boolean canReconfigure()
Return true if a reconfiguration is possible


isConfigurationHealthy

public boolean isConfigurationHealthy(short n)
Return true if configuration n is healthy


getReconfigurationOrder

public int getReconfigurationOrder()
Return the reconfiguration order


getConfigurationRank

public short getConfigurationRank(short n)
Return the rank of configuration n


restoreConfiguration

public void restoreConfiguration(ConfigurationState s)
Restore the internal configuration of the reconfiguration manager to the value stored in s. The configuration of a reconfiguration manager may contain information that should survive system resets and other traumatic events. This is typically the case of the health status of the configurations they manage. For this reasons, reconfiguration managers expose operations to save/restore their configuration. A configuration is stored in an object of class ConfigurationState. A call to restoreConfiguration directs the reconfiguration manager to restore its own internal configuration to the value stored in the parameter s. The way in which configuration information is stored in the ConfigurationState object is an implementation issue for the reconfiguration manager (memento pattern).

In the framework, configuration state objects are stored in the System Manager.

See Also:
ConfigurationState, SystemManager

saveConfiguration

public void saveConfiguration(ConfigurationState s)
Save the internal configuration of the reconfiguration manager in the parameter s. The configuration of a reconfiguration manager may contain information that should survive system resets and other traumatic events. This is typically the case of the health status of the configurations they manage. For this reasons, reconfiguration managers expose operations to save/restore their configuration. A configuration is stored in an object of class ConfigurationState. A call to saveConfiguration directs the reconfiguration manager to save its own internal configuration to the value stored in the parameter s. The way in which configuration information is stored in the ConfigurationState object is an implementation issue for the reconfiguration manager (memento pattern).

In the framework, configuration state objects are stored in the System Manager.

See Also:
ConfigurationState, SystemManager

setReconfigurationErrorRecoveryAction

public void setReconfigurationErrorRecoveryAction(RecoveryAction r)
Setter method for the recovery action associated to a failed reconfiguration request


getReconfigurationErrorRecoveryAction

public RecoveryAction getReconfigurationErrorRecoveryAction()
Getter method for the recovery action associated to a failed reconfiguration request


addReconfigurationListener

public void addReconfigurationListener(ReconfigurationListener l)
Register a listener to reconfiguration events


removeReconfigurationListener

public void removeReconfigurationListener(ReconfigurationListener l)
Unregister a listener to reconfiguration events


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