00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _GATMETRIC_H_
00020 #define _GATMETRIC_H_ 1
00021
00022
00023 #include "GATObject.h"
00024 #include "GATType.h"
00025 #include "GATMonitorable.h"
00026
00027
00028
00029 typedef struct GATStaticParameter_S
00030 {
00031 char const *key;
00032 GATType type;
00033 union {
00034 GATint16 int16_data;
00035 GATint32 int32_data;
00036 GATdouble64 double_data;
00037 GATfloat32 float_data;
00038 char const *string_data;
00039 } d;
00040 } GATStaticParameter;
00041
00042 typedef struct GATStaticMetric_S
00043 {
00044 char const *name;
00045 GATMeasurementType measurement_type;
00046 GATType data_type;
00047 char const *unit;
00048 GATuint32 parameter_count;
00049 GATStaticParameter *parameters;
00050 } GATStaticMetric;
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00056
00057 GATOBJECT_DECLARE_CONVERTERS(GATMetric);
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 GATMetric GATMetric_Create(char const *name, GATTable parameters,
00070 GATMeasurementType type, GATType datatype, char const *unit);
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 GATType GATMetric_GetType(GATMetric_const table);
00082
00083
00084
00085
00086
00087
00088
00089 void GATMetric_Destroy(GATMetric *metric);
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 GATResult
00105 GATMetric_Equals(GATMetric_const lhs, GATMetric_const rhs, GATBool *isequal);
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 GATResult
00120 GATMetric_Clone(GATMetric_const metric, GATMetric *new_table);
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 GATResult
00135 GATMetric_GetInterface(GATMetric_const table, GATInterface iftype,
00136 void const **ifp);
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149 char const *
00150 GATMetric_GetName(GATMetric_const metric);
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161 char const *
00162 GATMetric_GetUnit(GATMetric_const metric);
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173 GATType
00174 GATMetric_GetValueType(GATMetric_const metric);
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188 GATResult
00189 GATMetric_GetParameters(GATMetric_const metric, GATTable *table);
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 GATType
00203 GATMetric_GetParameterTypeByName(GATMetric_const metric,
00204 char const *name);
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221 GATResult
00222 GATMetric_GetParameterByName(GATMetric_const metric, char const *name,
00223 GATType type, void *buffer, GATuint32 size);
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236 GATResult
00237 GATMetric_CreateMetric(GATStaticMetric const *data, GATMetric *metric);
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252 GATResult
00253 GATMetric_CreateListOfMetrics(GATStaticMetric *data, GATuint32 count,
00254 GATList_GATMetric *list);
00255
00256 #ifdef __cplusplus
00257 }
00258 #endif
00259
00260 #endif
00261