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

DC_ProfileList Class Reference

#include <DC_ProfileList.h>

Inheritance diagram for DC_ProfileList:

MonitoringProfile CC_RootObject List of all members.

Detailed Description

Monitoring profile that encapsulates a list of monitoring profiles.

This monitoring profile reports a "deviation from profile" if any of the monitoring profiles in the list report "deviation from profile". This component is useful when there is a need to subject a variable to a sequence of monitoring actions. Use of this component allows the client (the component that is responsible for performing the monitoring action) to be shielded from the knowledge of which and how many monitoring profiles are being used.

The size of the list of monitoring profiles is set as an initialization parameter.

Note: This class has effectively become redundant after class MonitoringProfile was modified to handle chains of linked monitoring profiles.

Author:
Alessandro Pasetti (P&P Software GmbH)

Roberto Totaro

Version:
1.2

Definition at line 43 of file DC_ProfileList.h.

Public Member Functions

 DC_ProfileList (void)
 Instantiate a monitoring profile list.

void setListSize (unsigned int listSize)
 Set the size of the list of monitoring profiles.

unsigned int getListSize (void) const
 Return the size of the list of monitoring profiles.

void setMonitoringProfile (unsigned int i, MonitoringProfile *item)
 Set the i-th entry in the list of monitoring profiles.

MonitoringProfilegetMonitoringProfile (unsigned int i) const
 Get the i-th entry in the list of monitoring profiles.

virtual bool isObjectConfigured (void)
 Perform a class-specific configuration check on the monitoring profile: verify that the size of the list of monitoring profiles has a value greater than zero and that all the entries in the list have been loaded with monitoring profiles.


Protected Member Functions

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

virtual bool doProfileCheck (TD_Float value)
 Pass the monitored value through all the monitoring profiles in the list and report "devation from profile" if any of the profiles in the list report "deviation from profile".


Constructor & Destructor Documentation

DC_ProfileList::DC_ProfileList void   ) 
 

Instantiate a monitoring profile list.

The class identifier is set, the size of the monitoring profile list is initialized to 0 to signify that the component is not yet configured.

Definition at line 26 of file DC_ProfileList.cpp.


Member Function Documentation

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

Pass the monitored value through all the monitoring profiles in the list and report "devation from profile" if any of the profiles in the list report "deviation from profile".

A pseudo-code implementation for this method is as follows:

   flag = NO_MON_PROFILE_DEVIATION;
   for (all monitoring profiles p in the list)
   {  if ( p->deviatesFromProfile(value) )
         flag = MON_PROFILE_DEVIATION;
   }
   return flag; 
Note that the monitored value is always passed through all monitoring profiles in the list.
Parameters:
value the value of the monitored variable
Returns:
true if the monitored variable deviates from the profile, false otherwise

Implements MonitoringProfile.

Definition at line 76 of file DC_ProfileList.cpp.

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

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

The logic of this method is the same as for the version that takes a TD_Float argument.

See also:
doProfileCheck

Implements MonitoringProfile.

Definition at line 63 of file DC_ProfileList.cpp.

unsigned int DC_ProfileList::getListSize void   )  const
 

Return the size of the list of monitoring profiles.

See also:
setListSize
Returns:
listSize the size of the monitoring list size

Definition at line 42 of file DC_ProfileList.cpp.

MonitoringProfile * DC_ProfileList::getMonitoringProfile unsigned int  i  )  const
 

Get the i-th entry in the list of monitoring profiles.

If the i-th entry has not yet been loaded, a null value is returned. The index i should lie in the range [0,N-1] where N is size of the monitoring profile list.

Parameters:
i the index of the monitoring list
Returns:
the item at position i of the monitoring profile list

Definition at line 56 of file DC_ProfileList.cpp.

bool DC_ProfileList::isObjectConfigured void   )  [virtual]
 

Perform a class-specific configuration check on the monitoring profile: verify that the size of the list of monitoring profiles has a value greater than zero and that all the entries in the list have been loaded with monitoring profiles.

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

Reimplemented from CC_RootObject.

Definition at line 89 of file DC_ProfileList.cpp.

void DC_ProfileList::setListSize unsigned int  listSize  ) 
 

Set the size of the list of monitoring profiles.

The list size defines the maximum number of monitoring profiles that can be loaded into this component. A call to this method causes memory for an internal data structure to be allocated. This is an initialization method: it shall be called only once, before the component is used for the first time. It is not legal to set the repository size to 0. The entries in the list are initialized to pNULL.

Parameters:
listSize the size of the monitoring list size

Definition at line 32 of file DC_ProfileList.cpp.

void DC_ProfileList::setMonitoringProfile unsigned int  i,
MonitoringProfile item
 

Set the i-th entry in the list of monitoring profiles.

Only non-null entries are legal. The index i must lie in the range [0,N-1] where N is size of the monitoring profile list. Use of illegal values result in the generation of the EVT_ILLEGAL_MP event report.

See also:
TD_EventId
Parameters:
i the index of the monitoring list
item the item to be added to the list at position i

Definition at line 46 of file DC_ProfileList.cpp.


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