Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

DC_FdirCheck Class Reference
[Fault Detection Identification and Recovery]

#include <DC_FdirCheck.h>

Inheritance diagram for DC_FdirCheck:

PunctualAction CC_RootObject List of all members.

Detailed Description

Encapsulation of a failure detection and isolation check and of its associated recovery action.

A FDIR (fault detection, isolation and recovery) check usually consists of two parts. A check that determines the existence of a fault and isolates its cause (the failure detection and isolation check or FDI check), and a a recovery action to counteract the fault. This component encapsulates a complete FDIR check and allows both the FDI check and the recovery action to be executed as a single action.

This component assumes that the FDI check check is encapsulated in a component of type PunctualAction. and that the recovery action is encapsulated in a component of type RecoveryAction.

This component is offered as a form of punctual action (it is derived from the base class PunctualAction). Its associated action consists in the execution of the FDI check and, if this returns with a failure code, in the subsequent and immediate execution of the associated recovery action. Note that there is no conditional execution check associated to an FDIR check: the FDI check is always executed when the FdirCheck component is executed. If it is desired to have the FDIR check executed only if certain conditions hold, the conditional execution check can be built into the FDI check (this is typically done by implementing the FDI check as a subclass of ConditionalPunctualAction).

Todo:
change the name of this class to: DC_FdirAction (remember to update the comments to reflect the change of class name)
Author:
Alessandro Pasetti (P&P Software GmbH)
Version:
1.0

Definition at line 50 of file DC_FdirCheck.h.

Public Member Functions

 DC_FdirCheck (void)
 Instantiate an FDIR check.

void setFdiCheck (PunctualAction *pFdiCheck)
 Set the FDI check.

PunctualActiongetFdiCheck (void)
 Get the FDI check.

void setRecoveryAction (RecoveryAction *pRecoveryAction)
 Set the recovery action.

RecoveryActiongetRecoveryAction (void)
 Get the recovery action.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on the FDIR check: verify that the recovery action and FDI check have been set.


Protected Member Functions

virtual TD_ActionOutcome doAction (void)
 Execute the FDI check and, if this returns a failure code, execute the recovery action.


Constructor & Destructor Documentation

DC_FdirCheck::DC_FdirCheck void   ) 
 

Instantiate an FDIR check.

The recovery action and FDI check are left undefined to signify that the component is not yet configured.

Definition at line 17 of file DC_FdirCheck.cpp.


Member Function Documentation

TD_ActionOutcome DC_FdirCheck::doAction void   )  [protected, virtual]
 

Execute the FDI check and, if this returns a failure code, execute the recovery action.

A pseudo-code implementation for this method is as follows:

   outcome = pFdiCheck->execute();
   if ( outcome == ACTION_FAILURE )
      outcome = pRecoveryAction->execute();
   return outcome; 
Note that the outcome code returned by this punctual action is either the return code of the FDI check or of the recovery action, whichever is executed last.
See also:
TD_ActionOutcome
Returns:
the outcome code of the last recovery action to be executed or ACTION_CANNOT_EXECUTE if no action can be executed

Implements PunctualAction.

Definition at line 23 of file DC_FdirCheck.cpp.

PunctualAction * DC_FdirCheck::getFdiCheck void   ) 
 

Get the FDI check.

See also:
doAction
Returns:
the FDI check component

Definition at line 39 of file DC_FdirCheck.cpp.

RecoveryAction * DC_FdirCheck::getRecoveryAction void   ) 
 

Get the recovery action.

See also:
doAction
Returns:
the recovery action

Definition at line 49 of file DC_FdirCheck.cpp.

bool DC_FdirCheck::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on the FDIR check: verify that the recovery action and FDI check have been set.

Returns:
true if the FDIR check is configured, false otherwise.

Reimplemented from CC_RootObject.

Definition at line 54 of file DC_FdirCheck.cpp.

void DC_FdirCheck::setFdiCheck PunctualAction pFdiCheck  ) 
 

Set the FDI check.

See also:
doAction
Parameters:
pFdiCheck the FDI check component

Definition at line 34 of file DC_FdirCheck.cpp.

void DC_FdirCheck::setRecoveryAction RecoveryAction pRecoveryAction  ) 
 

Set the recovery action.

See also:
doAction
Parameters:
pRecoveryAction the recovery action

Definition at line 44 of file DC_FdirCheck.cpp.


The documentation for this class was generated from the following files:
Copyright 2003 P&P Software GmbH - All Rights Reserved