ACE 8.0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
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]

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 ()
 
virtual void update ()
 
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 ()
 Get all constraints.
 
virtual void clear ()
 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 ()
 
const charname () const
 
void name (const char *new_name)
 
void add_ref ()
 
void remove_ref ()
 
double average () const
 Calculate the average of the accumulated samples.
 
double sum_of_squares () const
 Calculate the sum of the squares of the samples.
 
size_t count () const
 Returns the number of samples.
 
double minimum_sample () const
 Returns the minimum sample value.
 
double maximum_sample () const
 Returns the maximum sample value.
 
double last_sample () const
 Returns the most recent sample value.
 
Monitor_Control_Types::Information_Type type () const
 Return the type of this statistic.
 
Monitor_Control_Types::NameList get_list () const
 Return the list or error msg if wrong type.
 

Protected Member Functions

virtual void clear_i ()
 

Protected Attributes

Monitor_Control_Types::Data data_
 
ACE_SYNCH_MUTEX mutex_
 
CONSTRAINTS constraints_
 

Private Attributes

ACE_CString name_
 
- Private Attributes inherited from ACE_Refcountable_T< ACE_SYNCH_MUTEX >
ACE_Atomic_Op< ACE_SYNCH_MUTEX, longrefcount_
 Current refcount.
 

Additional Inherited Members

- Private Member Functions inherited from ACE_Refcountable_T< ACE_SYNCH_MUTEX >
virtual ~ACE_Refcountable_T ()=default
 Destructor.
 
long increment ()
 Increment refcount.
 
long decrement ()
 Decrement refcount.
 
long refcount () const
 Returns the current refcount.
 
 ACE_Refcountable_T (long refcount)
 Protected constructor.
 

Detailed Description

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

Member Typedef Documentation

◆ CONSTRAINT_ITERATOR

◆ CONSTRAINTS

Constructor & Destructor Documentation

◆ Monitor_Base()

ACE::Monitor_Control::Monitor_Base::Monitor_Base ( const char * name,
Monitor_Control_Types::Information_Type type )

◆ ~Monitor_Base()

ACE::Monitor_Control::Monitor_Base::~Monitor_Base ( )
virtual

Member Function Documentation

◆ add_constraint()

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.

◆ add_ref()

void ACE::Monitor_Control::Monitor_Base::add_ref ( )
inline

◆ add_to_registry()

void ACE::Monitor_Control::Monitor_Base::add_to_registry ( const ACE_Time_Value & time = ACE_Time_Value::zero)

Common to all monitors.

◆ average()

double ACE::Monitor_Control::Monitor_Base::average ( ) const

Calculate the average of the accumulated samples.

◆ clear()

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

Reset function.

Reimplemented in ACE::Monitor_Control::Size_Monitor.

◆ clear_i()

void ACE::Monitor_Control::Monitor_Base::clear_i ( )
protectedvirtual

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

◆ constraints()

Monitor_Base::CONSTRAINTS & ACE::Monitor_Control::Monitor_Base::constraints ( )
inline

Get all constraints.

◆ count()

size_t ACE::Monitor_Control::Monitor_Base::count ( ) const

Returns the number of samples.

◆ get_list()

Monitor_Control_Types::NameList ACE::Monitor_Control::Monitor_Base::get_list ( ) const

Return the list or error msg if wrong type.

◆ last_sample()

double ACE::Monitor_Control::Monitor_Base::last_sample ( ) const

Returns the most recent sample value.

◆ maximum_sample()

double ACE::Monitor_Control::Monitor_Base::maximum_sample ( ) const

Returns the maximum sample value.

◆ minimum_sample()

double ACE::Monitor_Control::Monitor_Base::minimum_sample ( ) const

Returns the minimum sample value.

◆ name() [1/2]

const char * ACE::Monitor_Control::Monitor_Base::name ( ) const
inline

◆ name() [2/2]

void ACE::Monitor_Control::Monitor_Base::name ( const char * new_name)
inline

◆ receive() [1/3]

void ACE::Monitor_Control::Monitor_Base::receive ( const Monitor_Control_Types::NameList & data)
virtual

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

◆ receive() [2/3]

void ACE::Monitor_Control::Monitor_Base::receive ( double data)
virtual

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

◆ receive() [3/3]

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

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

◆ remove_constraint()

Control_Action * ACE::Monitor_Control::Monitor_Base::remove_constraint ( const long constraint_id)

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

◆ remove_from_registry()

void ACE::Monitor_Control::Monitor_Base::remove_from_registry ( )

◆ remove_ref()

void ACE::Monitor_Control::Monitor_Base::remove_ref ( )
inline

◆ retrieve()

void ACE::Monitor_Control::Monitor_Base::retrieve ( Monitor_Control_Types::Data & data) const

Data accessors.

◆ retrieve_and_clear()

void ACE::Monitor_Control::Monitor_Base::retrieve_and_clear ( Monitor_Control_Types::Data & data)

◆ sum_of_squares()

double ACE::Monitor_Control::Monitor_Base::sum_of_squares ( ) const

Calculate the sum of the squares of the samples.

◆ type()

Monitor_Control_Types::Information_Type ACE::Monitor_Control::Monitor_Base::type ( ) const
inline

Return the type of this statistic.

◆ update()

void ACE::Monitor_Control::Monitor_Base::update ( )
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

◆ constraints_

CONSTRAINTS ACE::Monitor_Control::Monitor_Base::constraints_
protected

◆ data_

Monitor_Control_Types::Data ACE::Monitor_Control::Monitor_Base::data_
protected

◆ mutex_

ACE_SYNCH_MUTEX ACE::Monitor_Control::Monitor_Base::mutex_
mutableprotected

◆ name_

ACE_CString ACE::Monitor_Control::Monitor_Base::name_
private

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