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

DC_StuckDataProfile Class Reference

#include <DC_StuckDataProfile.h>

Inheritance diagram for DC_StuckDataProfile:

MonitoringProfile CC_RootObject List of all members.

Detailed Description

Default component implementing a "stuck data" monitoring profile.

This monitoring profile reports a "deviation from profile" if the value of the monitored variable remains unchanged for more a certain number of consecutive activations. The number of consecutive activations that the monitored variable must remain unchanged before the monitoring check is detected is called the stuck threshold. The stuck threshold is a settable parameter. Its value must be greater than zero.

This type of check only makes sense for monitored variables of integer type. The version of the monitoring check for variables of doble type is therefore implemented as a dummy operation that always returns "deviation from profile has been detected".

Author:
Alessandro Pasetti (P&P Software GmbH)

Roberto Totaro

Version:
1.1

Definition at line 41 of file DC_StuckDataProfile.h.

Public Member Functions

 DC_StuckDataProfile (void)
 Instantiate a stuck data profile.

void setStuckThreshold (unsigned int stuckThreshold)
 Set the stuck threshold.

unsigned int getStuckThreshold (void) const
 Get the stuck thresholde.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on the monitoring profile: verify that the stuck threshold has a value greater than zero.

virtual void reset (void)
 Reset the stuck value profile check.


Protected Member Functions

virtual bool doProfileCheck (TD_Integer value)
 Check whether the monitored value is stuck.

virtual bool doProfileCheck (TD_Float value)
 Dummy implementation of a monitoring check that always returns "deviation from profile detected".


Constructor & Destructor Documentation

DC_StuckDataProfile::DC_StuckDataProfile void   ) 
 

Instantiate a stuck data profile.

The class identifier is set, the stuck threshold is initialized to 0 to signify that the component is not yet configured, and the component is reset.

Definition at line 20 of file DC_StuckDataProfile.cpp.


Member Function Documentation

bool DC_StuckDataProfile::doProfileCheck TD_Float  value  )  [protected, virtual]
 

Dummy implementation of a monitoring check that always returns "deviation from profile detected".

This operation should never be called since stuck data monitoring checks on non-integer variables may give unpredictable results due to numerical precision errors.

Parameters:
value the value of the monitored variable
Returns:
always returns true

Implements MonitoringProfile.

Definition at line 26 of file DC_StuckDataProfile.cpp.

bool DC_StuckDataProfile::doProfileCheck TD_Integer  value  )  [protected, virtual]
 

Check whether the monitored value is stuck.

If it is, a "devation from profile" is reported. A pseudo-code implementation for this method is as follows:

   if ( value == previousValue )
   {  counter++;
      previousValue = value;
      if (counter == stuckThreshold)
      { counter = 0;
        return MON_PROFILE_DEVIATION; 
      }
      else
        return NO_MON_PROFILE_DEVIATION; 
   }
   else
      counter = 0;
   previousValue = value;   
   return NO_MON_PROFILE_DEVIATION; 

The value of previousValue and counter are initialized by the constructor and by method reset. Spurious triggerings can occurr either after a reset or after the component is created.

See also:
reset

DC_StuckDataProfile

Parameters:
value the value of the monitored variable
Returns:
true if the monitored variable is stuck, false otherwise

Implements MonitoringProfile.

Definition at line 31 of file DC_StuckDataProfile.cpp.

unsigned int DC_StuckDataProfile::getStuckThreshold void   )  const
 

Get the stuck thresholde.

See also:
setStuckThreshold
Returns:
the value of the stuck threshold

Definition at line 54 of file DC_StuckDataProfile.cpp.

bool DC_StuckDataProfile::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on the monitoring profile: verify that the stuck threshold has a value greater than zero.

Returns:
true if the monitoring profile is configured, false otherwise.

Reimplemented from CC_RootObject.

Definition at line 63 of file DC_StuckDataProfile.cpp.

void DC_StuckDataProfile::reset void   )  [virtual]
 

Reset the stuck value profile check.

With reference to the implementation of method doProfileCheck(TD_Integer), a call to this method causes the variable counter to be reset to zero and the variable previousValue to be reset to PREVIOUS_VALUE_INIT.

Reimplemented from MonitoringProfile.

Definition at line 58 of file DC_StuckDataProfile.cpp.

void DC_StuckDataProfile::setStuckThreshold unsigned int  stuckThreshold  ) 
 

Set the stuck threshold.

See also:
doProfileCheck
Parameters:
stuckThreshold the value of the stuck threshold

Definition at line 50 of file DC_StuckDataProfile.cpp.


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