ACE  6.1.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
ACE::Monitor_Control::Monitor_Base Class Reference

Base class from which the template monitor point class is derived. More...

#include <Monitor_Base.h>

Inheritance diagram for ACE::Monitor_Control::Monitor_Base:
Inheritance graph
[legend]
Collaboration diagram for ACE::Monitor_Control::Monitor_Base:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
Monitor_Control_Types::ConstraintList 
CONSTRAINTS
typedef CONSTRAINTS::const_iterator CONSTRAINT_ITERATOR

Public Member Functions

 Monitor_Base (const char *name, Monitor_Control_Types::Information_Type type)
virtual ~Monitor_Base (void)
virtual void update (void)
virtual void receive (double data)
 Updates the monitor's data if it is a numeric floating point.
virtual void receive (size_t data)
 Updates the monitor's data if it is an integer size.
virtual void receive (const Monitor_Control_Types::NameList &data)
 Updates the monitor's data if it is a string type.
long add_constraint (const char *expression, Control_Action *action=0)
 Add a constraint, returns a unique constraint id.
Control_Actionremove_constraint (const long constraint_id)
CONSTRAINTSconstraints (void)
 Get all constraints.
virtual void clear (void)
 Reset function.
void retrieve (Monitor_Control_Types::Data &data) const
 Data accessors.
void retrieve_and_clear (Monitor_Control_Types::Data &data)
void add_to_registry (const ACE_Time_Value &time=ACE_Time_Value::zero)
 Common to all monitors.
void remove_from_registry (void)
const char * name (void) const
void name (const char *new_name)
void add_ref (void)
void remove_ref (void)
double average (void) const
 Calculate the average of the accumulated samples.
double sum_of_squares (void) const
 Calculate the sum of the squares of the samples.
size_t count (void) const
 Returns the number of samples.
double minimum_sample (void) const
 Returns the minimum sample value.
double maximum_sample (void) const
 Returns the maximum sample value.
double last_sample (void) const
 Returns the most recent sample value.
Monitor_Control_Types::Information_Type type (void) const
 Return the type of this statistic.
Monitor_Control_Types::NameList get_list (void) const
 Return the list or error msg if wrong type.

Protected Member Functions

virtual void clear_i (void)

Protected Attributes

Monitor_Control_Types::Data data_
ACE_SYNCH_MUTEX mutex_
CONSTRAINTS constraints_

Private Attributes

ACE_CString name_

Detailed Description

Base class from which the template monitor point class is derived.


Member Typedef Documentation


Constructor & Destructor Documentation


Member Function Documentation

long ACE::Monitor_Control::Monitor_Base::add_constraint ( const char *  expression,
Control_Action action = 0 
)

Add a constraint, returns a unique constraint id.

Thread-safe and guaranteed to be unique.

This is thread-safe on its own so we don't have to guard it here.

Since we know external key is unique, we don't check for failure.

Common to all monitors.

Calculate the average of the accumulated samples.

void ACE::Monitor_Control::Monitor_Base::clear ( void  ) [virtual]

Reset function.

Reimplemented in ACE::Monitor_Control::Size_Monitor.

void ACE::Monitor_Control::Monitor_Base::clear_i ( void  ) [protected, virtual]

Overridden in some monitors (for example the OS monitors) where clearing requires monitor-specific actions.

Get all constraints.

Returns the number of samples.

Return the list or error msg if wrong type.

Returns the most recent sample value.

Returns the maximum sample value.

Returns the minimum sample value.

const char * ACE::Monitor_Control::Monitor_Base::name ( void  ) const [inline]
void ACE::Monitor_Control::Monitor_Base::name ( const char *  new_name) [inline]
void ACE::Monitor_Control::Monitor_Base::receive ( double  data) [virtual]

Updates the monitor's data if it is a numeric floating point.

void ACE::Monitor_Control::Monitor_Base::receive ( size_t  data) [virtual]

Updates the monitor's data if it is an integer size.

Updates the monitor's data if it is a string type.

Remove a constraint and return the associated control action, which may be shared, for deletion or further use.

Data accessors.

Calculate the sum of the squares of the samples.

Return the type of this statistic.

void ACE::Monitor_Control::Monitor_Base::update ( void  ) [virtual]

Implemented by the most-derived class. Does the actual work of fetching the monitored value.

Overridden in derived classes.

Reimplemented in ACE::Monitor_Control::Size_Monitor.


Member Data Documentation


The documentation for this class was generated from the following files: