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

DC_DeltaProfile Class Reference

#include <DC_DeltaProfile.h>

Inheritance diagram for DC_DeltaProfile:

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 undergoes a change in between two successive checks greater than a certain threshold. The threshold is called the delta threshold. The delta threshold is a settable parameter. Its value must be greater than zero.

Author:
Alessandro Pasetti (P&P Software GmbH)

Roberto Totaro

Version:
1.1

Definition at line 34 of file DC_DeltaProfile.h.

Public Member Functions

 DC_DeltaProfile (void)
 Instantiate a delta monitoring profile.

void setDeltaThreshold (TD_Float deltaThreshold)
 Set the delta threshold.

TD_Float getDeltaThreshold (void)
 Get the delta threshold.

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

virtual void reset (void)
 Reset the delta monitoring profile check.


Protected Member Functions

virtual bool doProfileCheck (TD_Integer value)
 Version of method doProfileCheck() for monitored variables of type integer.

virtual bool doProfileCheck (TD_Float value)
 Check whether the monitored value differs from its value at the previous activation by more than the delta threshold.


Constructor & Destructor Documentation

DC_DeltaProfile::DC_DeltaProfile void   ) 
 

Instantiate a delta monitoring profile.

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

Definition at line 22 of file DC_DeltaProfile.cpp.


Member Function Documentation

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

Check whether the monitored value differs from its value at the previous activation by more than the delta threshold.

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

   if ( ( abs(value-previousValue) > deltaThreshold ) && notFirst )
   {  previousValue = value;
      return MON_PROFILE_DEVIATION; 
   }
   notFirst = true;
   previousValue = value;   
   return NO_MON_PROFILE_DEVIATION; 

The value of the notFirst flag is initialized to 'false' by the constructor and by the reset operation.

See also:
reset

DC_DeltaProfile

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

Implements MonitoringProfile.

Definition at line 29 of file DC_DeltaProfile.cpp.

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

Version of method doProfileCheck() for monitored variables of type integer.

The check is performed by using the "TD_Float" version of doProfileCheck. A pseudo-code implementation for this method is as follows:

   return doProfileCheck( (TD_Float)value ); 
See also:
doProfileCheck

Implements MonitoringProfile.

Definition at line 43 of file DC_DeltaProfile.cpp.

TD_Float DC_DeltaProfile::getDeltaThreshold void   ) 
 

Get the delta threshold.

See also:
doProfileCheck
Returns:
the value of the delta threshold

Definition at line 53 of file DC_DeltaProfile.cpp.

bool DC_DeltaProfile::isObjectConfigured void   )  [virtual]
 

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

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

Reimplemented from CC_RootObject.

Definition at line 62 of file DC_DeltaProfile.cpp.

void DC_DeltaProfile::reset void   )  [virtual]
 

Reset the delta monitoring profile check.

With reference to the implementation of method doProfileCheck(TD_Integer), a call to this method causes the flag notFirst to be reset to 'false'.

Reimplemented from MonitoringProfile.

Definition at line 58 of file DC_DeltaProfile.cpp.

void DC_DeltaProfile::setDeltaThreshold TD_Float  deltaThreshold  ) 
 

Set the delta threshold.

See also:
doProfileCheck
Parameters:
deltaThreshold the value of the delta threshold

Definition at line 48 of file DC_DeltaProfile.cpp.


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