#include <DC_FdirCheck.h>
Inheritance diagram for DC_FdirCheck:
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
).
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. | |
PunctualAction * | getFdiCheck (void) |
Get the FDI check. | |
void | setRecoveryAction (RecoveryAction *pRecoveryAction) |
Set the recovery action. | |
RecoveryAction * | getRecoveryAction (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. |
|
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. |
|
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.
Implements PunctualAction. Definition at line 23 of file DC_FdirCheck.cpp. |
|
Get the FDI check.
Definition at line 39 of file DC_FdirCheck.cpp. |
|
Get the recovery action.
Definition at line 49 of file DC_FdirCheck.cpp. |
|
Perform a class-specific configuration check on the FDIR check: verify that the recovery action and FDI check have been set.
Reimplemented from CC_RootObject. Definition at line 54 of file DC_FdirCheck.cpp. |
|
Set the FDI check.
Definition at line 34 of file DC_FdirCheck.cpp. |
|
Set the recovery action.
Definition at line 44 of file DC_FdirCheck.cpp. |