Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.FailureDetection
Class FailureDetectionManager

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.FailureDetection.FailureDetectionManager
All Implemented Interfaces:
ActiveObject, Configurable, Resettable, Telemeterable

public class FailureDetectionManager
extends AocsObject
implements ActiveObject

This class encapsulates a failure detection manager. The objective of the failure detection manager is to perform failure detection tests on individual components. A failure is declared when a failure detection test fails.

The general principle adopted in the framework is that the knowledge required to perform the failure detection test should be confined to the tested component. The task of the failure detection manager is simply to ask for the test to be performed, to record the results, and to make them available to other interested components. The actual test is performed by the tested component.

Two types of failure detection tests are foreseen: consistency checks and monitoring checks.

A consistency check test verifies that the internal state of the object is consistent. Objects that can perform a consistency check upon themselves implement the ConsistencyCheckable interface. The failure detection manager internally maintains a list of objects of type ConsistencyCheckable that must be subjected to a consistency check at every activation. At each activation, the detection manager cycles through the objects in its list and directs them to perform the consistency check upon themselves. If the consistency check fails, a failure is declared.

A monitoring check encapsulates a failure detection test based on verifying that the value of a property follows a pre-specified behaviour. Monitoring checks are encapsulated in objects of type MonitoringCheck. These objects package the property to be checked, the change type and the recovery action to be performed in case the change is found to have occurred. The implementation of the monitoring check part of failure detection is done by maintaining a list of monitoring check objects and passing each property value through the corresponding change object. When a change is detected, the fact is reported as a change event and as a failure.

The failure detection manager is based on the failure detection management design pattern to separate the management of failure detection tests from their implementations.

The failure detection manager can fire change events in response to the violation of monitoring checks.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
ConsistencyCheckable, MonitoringCheck, ChangeEvent

Field Summary
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
FailureDetectionManager()
           
 
Method Summary
 void addChangeListener(ChangeListener l)
           
 FailureDetectionModeManager getFailureDetectionModeManager()
           
 int getTelemetryImageLength()
          Return the length (in bits) of the telemetry image of the object.
 boolean initialize()
          Initialize an active object before it is scheduled.
 boolean isConfigured()
          Return false if some configuration data are missing.
 void removeChangeListener(ChangeListener l)
           
 void resetConfiguration()
          Unload the mode manager and the monitoring check and consistency checkable lists.
 void runOneCycle(int deadline)
          Perform all actions associated to the current cycle.
 void setFailureDetectionModeManager(FailureDetectionModeManager tmm)
           
 void setMaxNumberOfChangeListeners(int n)
          Initialization method to set the maximum number of listeners to change events.
 boolean terminate()
          Perfrom any shutdown actions before an active is de-scheduled.
 void writeToTelemetry(TelemetryStream tmStream)
          Direct the object to write its own state 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, reset, resetStaticConfiguration, setAocsClock, setDestructionRecoveryAction, setMaxNumberOfConfigurationListeners, setMaxNumberOfFailureListeners, setSystemManager, setTelemetryFormat
 
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

FailureDetectionManager

public FailureDetectionManager()
Method Detail

runOneCycle

public void runOneCycle(int deadline)
Description copied from interface: ActiveObject
Perform all actions associated to the current cycle.

Specified by:
runOneCycle in interface ActiveObject
Parameters:
deadline - deadline by which the object must have returned. This parameter allows implementation of cooperative scheduling.

resetConfiguration

public void resetConfiguration()
Unload the mode manager and the monitoring check and consistency checkable lists.

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

isConfigured

public boolean isConfigured()
Description copied from interface: Configurable
Return false if some configuration data are missing.

Typically, 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).

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

addChangeListener

public void addChangeListener(ChangeListener l)

removeChangeListener

public void removeChangeListener(ChangeListener l)

setMaxNumberOfChangeListeners

public void setMaxNumberOfChangeListeners(int n)
Initialization method to set the maximum number of listeners to change events. Attempts to call it more than once will result in a configuration error being generated.


writeToTelemetry

public void writeToTelemetry(TelemetryStream tmStream)
Description copied from interface: Telemeterable
Direct the object to write its own state to the telemetry stream.

Specified by:
writeToTelemetry in interface Telemeterable
Overrides:
writeToTelemetry 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

setFailureDetectionModeManager

public void setFailureDetectionModeManager(FailureDetectionModeManager tmm)

getFailureDetectionModeManager

public FailureDetectionModeManager getFailureDetectionModeManager()

initialize

public boolean initialize()
Description copied from interface: ActiveObject
Initialize an active object before it is scheduled.

Specified by:
initialize in interface ActiveObject
Returns:
true if initialization was successful.

terminate

public boolean terminate()
Description copied from interface: ActiveObject
Perfrom any shutdown actions before an active is de-scheduled.

Specified by:
terminate in interface ActiveObject
Returns:
true if shutdown was successful.

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