Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.FailureRecovery
Class SystemResetOnTooManyFailures

java.lang.Object
  |
  +--RtjAocsFramework.BasicObjects.RootObject
        |
        +--RtjAocsFramework.BasicObjects.AocsObject
              |
              +--RtjAocsFramework.FailureRecovery.RecoveryStrategy
                    |
                    +--RtjAocsFramework.FailureRecovery.SystemResetOnTooManyFailures
All Implemented Interfaces:
Configurable, Resettable, Telemeterable

public class SystemResetOnTooManyFailures
extends RecoveryStrategy

This recovery startegy will cause a software reset to be executed if the number of failure reports created since the last activation (or since the component was reset or initialized) is higher than a settable threshold. The software reset is performed by calling the software reset service offered by the system manager.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Failure Recovery Framelet Document., SystemManager

Field Summary
 
Fields inherited from interface RtjAocsFramework.TelemetryManagement.Telemeterable
DEBUG_TM, LONG_TM, NORMAL_TM, NTMFORMATS, SHORT_TM
 
Constructor Summary
SystemResetOnTooManyFailures()
          This component should not be used before it is configured by setting the the failure event threshold.
 
Method Summary
 void doRecovery()
          Warning: this implementation will fail when the failure event counter in the failure event repository wraps around.
 int getFailureEventThreshold()
           
 int getTelemetryImageLength()
          Return the length (in bits) of the telemetry image of the object.
 boolean isConfigured()
          Return false if some configuration data are missing.
 void reset()
          Set the state of the recovery strategy to 'enabled'.
 void resetConfiguration()
          Set the failure event threshold to zero.
 void setFailureEventRepository(FailureEventRepository r)
          This is an initialization method to load the failure event repository upon which the recovery strategy operates.
 void setFailureEventThreshold(int t)
          Set the failure event threshold.
 void writeToTelemetry(TelemetryStream tmStream)
          Direct the object to write its own state to the telemetry stream.
 
Methods inherited from class RtjAocsFramework.FailureRecovery.RecoveryStrategy
addRecoveryListener, fireModeEvent, getFailureEventRepository, getNextRecoveryStrategy, isEnabled, removeRecoveryListener, setEnabled, setMaxNumberOfRecoveryListeners, setNextRecoveryStrategy
 
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, 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

SystemResetOnTooManyFailures

public SystemResetOnTooManyFailures()
This component should not be used before it is configured by setting the the failure event threshold.

Method Detail

doRecovery

public void doRecovery()
Warning: this implementation will fail when the failure event counter in the failure event repository wraps around.

Overrides:
doRecovery in class RecoveryStrategy
See Also:
RecoveryStrategy.doRecovery()

resetConfiguration

public void resetConfiguration()
Set the failure event threshold to zero.

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

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 RecoveryStrategy

reset

public void reset()
Description copied from class: RecoveryStrategy
Set the state of the recovery strategy to 'enabled'.

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

setFailureEventRepository

public void setFailureEventRepository(FailureEventRepository r)
This is an initialization method to load the failure event repository upon which the recovery strategy operates.

Overrides:
setFailureEventRepository in class RecoveryStrategy

setFailureEventThreshold

public void setFailureEventThreshold(int t)
Set the failure event threshold. When the number of failure events recorded in the failure event repository in between two successive activation of doRecovery() or between the first activation of doRecovery() and the previous reset() exceeds this threshold, a software reset is commanded.


getFailureEventThreshold

public int getFailureEventThreshold()
See Also:
setFailureEventThreshold(int)

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 RecoveryStrategy

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 RecoveryStrategy

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