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

DC_SimpleChangeProfile Class Reference

#include <DC_SimpleChangeProfile.h>

Inheritance diagram for DC_SimpleChangeProfile:

MonitoringProfile CC_RootObject List of all members.

Detailed Description

Default component implementing a simple change monitoring profile.

This monitoring profile reports a "deviation from profile" if the value of the monitored variable is different from a fixed reference value. The reference value is a settable parameter.

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 37 of file DC_SimpleChangeProfile.h.

Public Member Functions

 DC_SimpleChangeProfile (void)
 Instantiate a simple change profile.

void setReferenceValue (TD_Integer refValue)
 Set the reference value against which the monitoring check is performed.

TD_Integer getReferenceValue (void) const
 Get the reference value.


Protected Member Functions

virtual bool doProfileCheck (TD_Integer value)
 Check whether the monitored value is different from the reference value.

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


Constructor & Destructor Documentation

DC_SimpleChangeProfile::DC_SimpleChangeProfile void   ) 
 

Instantiate a simple change profile.

The class identifier is set and the reference value is initialized to zero.

Definition at line 20 of file DC_SimpleChangeProfile.cpp.


Member Function Documentation

bool DC_SimpleChangeProfile::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 simple monitoring check 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 25 of file DC_SimpleChangeProfile.cpp.

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

Check whether the monitored value is different from the reference value.

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

   if ( value != refValue )
     return MON_PROFILE_DEVIATION;
   return NO_MON_PROFILE_DEVIATION; 

Parameters:
value the value of the monitored variable
Returns:
true if the monitored variable is different from the reference value, false otherwise

Implements MonitoringProfile.

Definition at line 30 of file DC_SimpleChangeProfile.cpp.

TD_Integer DC_SimpleChangeProfile::getReferenceValue void   )  const
 

Get the reference value.

See also:
setReferenceValue
Returns:
the value of the reference value

Definition at line 38 of file DC_SimpleChangeProfile.cpp.

void DC_SimpleChangeProfile::setReferenceValue TD_Integer  refValue  ) 
 

Set the reference value against which the monitoring check is performed.

The reference value can be modified dynamically.

See also:
doProfileCheck
Parameters:
refValue the value of the reference value

Definition at line 34 of file DC_SimpleChangeProfile.cpp.


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