Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.SystemManagement
Class SystemManager

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.SystemManagement.SystemManager
All Implemented Interfaces:
EventListener, ReconfigurationListener

public class SystemManager
extends RootObject
implements ReconfigurationListener

Encapsulation of a System Manager. The system manager object is responsible for performing system management operations. System management operations are operations that must be systematically performed on all (or a large number of) objects in an applications. Two system management operations are offered: system reset and system configuration check. A system reset causes the internal state of all AOCS objects to be reset to a default state. A configuration check causes the configuration of all AOCS objects to be checked.

There is some information that should be preserved across resets. This in particular concerns the state of the reconfiguration managers. This information should be preserved because it defines the health status of redundant functionalities or units. The system manager is responsible for maintaining and restoring the state of the reconfiguration managers. The mechanism through which this is done is as follows. The system manager registers as a listener to reconfiguration events fired by reconfiguration managers whenever they change their internal configuration. When it receives notification of a reconfiguration, it asks the reconfiguration manager to save its new configuration in an object of type ConfigurationState. After a software reset, the reverse operation is done with the system manager asking each reconfiguration manager to restore its internal configuration to the value stored in the ConfigurationState. In some implementations, the configuration information could be stored in some permanent storage to survive system reboots.

The system manager fires system events when a reset has been performed. The typical listener to this event is the system event repository.

Copyright: see the Copyright Notice.

Change record:

Version:
1.2
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The System Management Framelet Document., ConfigurationState

Constructor Summary
SystemManager()
          Default constructor.
SystemManager(int n, int m, SystemListener l)
          Construct and configure the system manager for immediate usage.
 
Method Summary
 void addSystemListener(SystemListener l)
          Initialization method to register listeners to system events.
protected  void fireSystemEvent(short eventTypeId)
          Fire a system event of type eventTypeId to all registered listeners.
 void internalAddAocsObject(AocsObject object)
          Register the AOCS object with the system manager.
 void internalAddReconfigurable(Reconfigurable r)
          Initialization method to register the reconfiguration manager t with the system manager.
 boolean isSystemConfigured()
          Perform a system configuration check.
 void processReconfigurationEvent(ReconfigurationEvent evt)
          Listener method called by a reconfiguration manager when it changes its configuration.
 void removeAocsObject(AocsObject object)
          Unregister the AOCS object from the system manager.
 void removeReconfigurable(Reconfigurable r)
          Initialization method to unregister the reconfiguration manager from the system manager.
 void removeSystemListener(SystemListener l)
          Initialization method to unregister system event listeners.
 void restoreConfigurations()
          Restore the configuration of the registered reconfiguration managers.
 void setMaxAocsObjects(int maxNumberOfObjects)
          Initialization method to set the maximum number of AocsObjects that can register with the system manager.
 void setMaxNumberOfSystemListeners(int n)
          Initialization method to set the maximum number of listeners to system events generated by the system manager.
 void setMaxReconfigurable(int maxNumberOfReconfigurable)
          Initialization method to set the maximum number of reconfiguration managers for which the system manager can save/restore configuration information.
 void systemReset()
          Perform a system reset.
 
Methods inherited from class RtjAocsFramework.BasicObjects.RootObject
getClassId, getInstanceId, setClassId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemManager

public SystemManager()
Default constructor. The component can be used only after the following configuration methods have been called: setMaxAocsObjects, setMaxReconfigurationManagers, setSystemEventRepository.


SystemManager

public SystemManager(int n,
                     int m,
                     SystemListener l)
Construct and configure the system manager for immediate usage.

Parameters:
n - maximum number of AOCS objects that can register with the system manager.
m - maximum number of reconfiguration managers that can register with the system manager.
l - listener to system events fired by the system manager (this is normally the system event repository).
Method Detail

setMaxAocsObjects

public void setMaxAocsObjects(int maxNumberOfObjects)
Initialization method to set the maximum number of AocsObjects that can register with the system manager. AOCS objects that have registered with the system manager are reset when a system reset is performed and have their configuration checked when a configuration check is performed.


setMaxReconfigurable

public void setMaxReconfigurable(int maxNumberOfReconfigurable)
Initialization method to set the maximum number of reconfiguration managers for which the system manager can save/restore configuration information.


setMaxNumberOfSystemListeners

public void setMaxNumberOfSystemListeners(int n)
Initialization method to set the maximum number of listeners to system events generated by the system manager.


addSystemListener

public void addSystemListener(SystemListener l)
Initialization method to register listeners to system events.


removeSystemListener

public void removeSystemListener(SystemListener l)
Initialization method to unregister system event listeners.


restoreConfigurations

public void restoreConfigurations()
Restore the configuration of the registered reconfiguration managers. The system manager stores the latest configuration of the configuration managers. This method restores the currently stored configuration in the reconfiguration managers. It would be typically called after a system reset or after a software reset. The implementation of the method relies on the list of registered reconfiguration managers remaining unchanged between the time when the first configuration data was stored and the time when the method is called.


internalAddAocsObject

public void internalAddAocsObject(AocsObject object)
Register the AOCS object with the system manager. Registered objects will be reset when a system reset is performed and will have their configuration checked when a configuration check is performed. If there is no place left in the internal list of registered objects, a system event is fired.

See Also:
systemReset(), isSystemConfigured()

removeAocsObject

public void removeAocsObject(AocsObject object)
Unregister the AOCS object from the system manager.

See Also:
#add(AocsObject)

internalAddReconfigurable

public void internalAddReconfigurable(Reconfigurable r)
Initialization method to register the reconfiguration manager t with the system manager. Registered reconfiguration managers are required to save their configuration in the system manager and the system manager can restore the last valid configuration after a software reset. For this purpose, the system manager registers as a listener for reconfiguration event fired by the reconfiguration manager.


removeReconfigurable

public void removeReconfigurable(Reconfigurable r)
Initialization method to unregister the reconfiguration manager from the system manager.


fireSystemEvent

protected void fireSystemEvent(short eventTypeId)
Fire a system event of type eventTypeId to all registered listeners.


processReconfigurationEvent

public void processReconfigurationEvent(ReconfigurationEvent evt)
Listener method called by a reconfiguration manager when it changes its configuration. The system manager responds by asking the reconfiguration manager to update the internal copy of its configuration state.

Specified by:
processReconfigurationEvent in interface ReconfigurationListener

systemReset

public void systemReset()
Perform a system reset. In a system reset, all registered AOCS objects are reset (their reset() method is called). After the reset operation, the internal configuration of registered reconfiguration managers is restored to the pre-reset value.


isSystemConfigured

public boolean isSystemConfigured()
Perform a system configuration check. The system manager calls method isConfigured() on all registered AOCS objects and returns true if all calls to isConfigured() returned true (ie. if all objects report themselves as being configured).


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