blob: 792db456e5e73013d61196cb03779bca42524f3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
// -*- C++ -*-
//=============================================================================
/**
* @file Monitor_Control_Types.h
*
* $Id$
*
* @author Jeff Parsons <j.parsons@vanderbilt.edu>
*/
//=============================================================================
#ifndef MONITOR_CONTROL_TYPES_H
#define MONITOR_CONTROL_TYPES_H
#include /**/ "ace/pre.h"
#include "ace/Vector_T.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
#include "ace/Array_Map.h"
#include "ace/SString.h"
#include "ace/Time_Value.h"
ACE_BEGIN_VERSIONED_NAMESPACE_DECL
namespace ACE
{
namespace Monitor_Control
{
class Control_Action;
struct ACE_Export Monitor_Control_Types
{
/// A monitor can hold various types of data and maintains stats
/// differently depending upon the type of information stored.
enum Information_Type
{
MC_COUNTER,
MC_NUMBER,
MC_TIME,
MC_INTERVAL,
MC_LIST,
MC_GROUP
};
/**
* @brief An instance is contained by each enabled monitor point.
*/
struct ACE_Export Data
{
Data (Monitor_Control_Types::Information_Type type);
ACE_Time_Value timestamp_;
double value_;
ACE_Array_Base<char *> list_;
Information_Type type_;
size_t index_;
bool minimum_set_;
double minimum_;
double maximum_;
double sum_;
double sum_of_squares_;
double last_;
};
/**
* @brief Bundles the constrain string with its associated
* trigger action.
*/
struct ACE_Export Constraint
{
Constraint (void);
~Constraint (void);
/// Implemented explicitly so reference counting of control
/// actions can be managed.
Constraint (const Constraint& rhs);
Constraint& operator= (const Constraint& rhs);
ACE_CString expr;
Control_Action* control_action;
};
/**
* @brief Used by the admin class as a container for the data from
* a group of monitor points.
*/
typedef ACE_Vector<Data> DataList;
/**
* @brief Used in various places to pass around a set of string names.
*/
typedef ACE_Vector<ACE_CString> NameList;
/**
* @brief Holder for a monitor point's constraints.
*/
typedef ACE_Array_Map<long, Constraint> ConstraintList;
};
}
}
ACE_END_VERSIONED_NAMESPACE_DECL
#endif /* ACE_HAS_MONITOR_FRAMEWORK==1 */
#include /**/ "ace/post.h"
#endif // MONITOR_CONTROL_TYPES_H
|