ACE
6.2.8
|
Base class from which the template monitor point class is derived. More...
#include <Monitor_Base.h>
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. More... | |
virtual void | receive (size_t data) |
Updates the monitor's data if it is an integer size. More... | |
virtual void | receive (const Monitor_Control_Types::NameList &data) |
Updates the monitor's data if it is a string type. More... | |
long | add_constraint (const char *expression, Control_Action *action=0) |
Add a constraint, returns a unique constraint id. More... | |
Control_Action * | remove_constraint (const long constraint_id) |
CONSTRAINTS & | constraints (void) |
Get all constraints. More... | |
virtual void | clear (void) |
Reset function. More... | |
void | retrieve (Monitor_Control_Types::Data &data) const |
Data accessors. More... | |
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. More... | |
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. More... | |
double | sum_of_squares (void) const |
Calculate the sum of the squares of the samples. More... | |
size_t | count (void) const |
Returns the number of samples. More... | |
double | minimum_sample (void) const |
Returns the minimum sample value. More... | |
double | maximum_sample (void) const |
Returns the maximum sample value. More... | |
double | last_sample (void) const |
Returns the most recent sample value. More... | |
Monitor_Control_Types::Information_Type | type (void) const |
Return the type of this statistic. More... | |
Monitor_Control_Types::NameList | get_list (void) const |
Return the list or error msg if wrong type. More... | |
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_ |
Private Attributes inherited from ACE_Refcountable_T< ACE_SYNCH_MUTEX > | |
ACE_Atomic_Op< ACE_SYNCH_MUTEX, long > | refcount_ |
Current refcount. More... | |
Additional Inherited Members | |
Private Member Functions inherited from ACE_Refcountable_T< ACE_SYNCH_MUTEX > | |
virtual | ~ACE_Refcountable_T (void) |
Destructor. More... | |
long | increment (void) |
Increment refcount. More... | |
long | decrement (void) |
Decrement refcount. More... | |
long | refcount (void) const |
Returns the current refcount. More... | |
ACE_Refcountable_T (long refcount) | |
Protected constructor. More... | |
Base class from which the template monitor point class is derived.
ACE::Monitor_Control::Monitor_Base::Monitor_Base | ( | const char * | name, |
Monitor_Control_Types::Information_Type | type | ||
) |
|
virtual |
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.
|
inline |
void ACE::Monitor_Control::Monitor_Base::add_to_registry | ( | const ACE_Time_Value & | time = ACE_Time_Value::zero | ) |
Common to all monitors.
double ACE::Monitor_Control::Monitor_Base::average | ( | void | ) | const |
Calculate the average of the accumulated samples.
|
virtual |
Reset function.
Reimplemented in ACE::Monitor_Control::Size_Monitor.
|
protectedvirtual |
Overridden in some monitors (for example the OS monitors) where clearing requires monitor-specific actions.
|
inline |
Get all constraints.
size_t ACE::Monitor_Control::Monitor_Base::count | ( | void | ) | const |
Returns the number of samples.
Monitor_Control_Types::NameList ACE::Monitor_Control::Monitor_Base::get_list | ( | void | ) | const |
Return the list or error msg if wrong type.
double ACE::Monitor_Control::Monitor_Base::last_sample | ( | void | ) | const |
Returns the most recent sample value.
double ACE::Monitor_Control::Monitor_Base::maximum_sample | ( | void | ) | const |
Returns the maximum sample value.
double ACE::Monitor_Control::Monitor_Base::minimum_sample | ( | void | ) | const |
Returns the minimum sample value.
|
inline |
|
inline |
|
virtual |
Updates the monitor's data if it is a numeric floating point.
|
virtual |
Updates the monitor's data if it is an integer size.
|
virtual |
Updates the monitor's data if it is a string type.
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.
void ACE::Monitor_Control::Monitor_Base::remove_from_registry | ( | void | ) |
|
inline |
void ACE::Monitor_Control::Monitor_Base::retrieve | ( | Monitor_Control_Types::Data & | data | ) | const |
Data accessors.
void ACE::Monitor_Control::Monitor_Base::retrieve_and_clear | ( | Monitor_Control_Types::Data & | data | ) |
double ACE::Monitor_Control::Monitor_Base::sum_of_squares | ( | void | ) | const |
Calculate the sum of the squares of the samples.
|
inline |
Return the type of this statistic.
|
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.
|
protected |
|
protected |
|
mutableprotected |
|
private |