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

DC_ForbiddenValueProfile Class Reference

#include <DC_ForbiddenValueProfile.h>

Inheritance diagram for DC_ForbiddenValueProfile:

MonitoringProfile CC_RootObject List of all members.

Detailed Description

Default component implementing a forbidden value monitoring profile.

This monitoring profile reports a "deviation from profile" if the value of the monitored variable is equal to a pre-specified forbidden value. The forbidden 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 36 of file DC_ForbiddenValueProfile.h.

Public Member Functions

 DC_ForbiddenValueProfile (void)
 Instantiate a forbidden value profile.

void setForbiddenValue (TD_Integer forbiddenValue)
 Set the forbidden value against which the monitoring check is performed.

TD_Integer getForbiddenValue (void) const
 Get the forbidden value.


Protected Member Functions

virtual bool doProfileCheck (TD_Integer value)
 Check whether the monitored value is equal to the forbidden value.

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


Constructor & Destructor Documentation

DC_ForbiddenValueProfile::DC_ForbiddenValueProfile void   ) 
 

Instantiate a forbidden value profile.

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

Definition at line 20 of file DC_ForbiddenValueProfile.cpp.


Member Function Documentation

bool DC_ForbiddenValueProfile::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 a forbidden value 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_ForbiddenValueProfile.cpp.

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

Check whether the monitored value is equal to the forbidden value.

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

   if ( value == forbiddenValue )
     return MON_PROFILE_DEVIATION;
   return NO_MON_PROFILE_DEVIATION; 

Parameters:
value the value of the monitored variable
Returns:
true if the monitored variable is equal to the forbidden value, false otherwise

Implements MonitoringProfile.

Definition at line 30 of file DC_ForbiddenValueProfile.cpp.

TD_Integer DC_ForbiddenValueProfile::getForbiddenValue void   )  const
 

Get the forbidden value.

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

Definition at line 38 of file DC_ForbiddenValueProfile.cpp.

void DC_ForbiddenValueProfile::setForbiddenValue TD_Integer  forbiddenValue  ) 
 

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

The forbidden value can be modified dynamically.

See also:
doProfileCheck
Parameters:
forbiddenValue the forbidden value

Definition at line 34 of file DC_ForbiddenValueProfile.cpp.


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