Main Page Alphabetical List Compound List File List Compound Members File Members
GATMetric.c File ReferenceSource file for the GATMetric class.
More...
#include <stdlib.h>
#include <string.h>
#include "GAT.h"
#include "GATInternal.h"
#include "GATUtil.h"
Include dependency graph for GATMetric.c:
Go to the source code of this file.
|
Functions |
| | GATOBJECT_DEFINE_VTABLE (GATMetric) |
| | GATOBJECT_DEFINE_CONVERTERS (GATMetric) struct GATMetric_S |
| GATMetric | GATMetric_Create (char const *name, GATTable parameters, GATMeasurementType type, GATType datatype, char const *unit) |
| | GATMetric_Create Create a new GATMetric object.
|
| void | GATMetric_Destroy (GATMetric *object) |
| | GATMetric_Destroy The GATMetric destructor.
|
| GATResult | GATMetric_Equals (GATMetric_const lhs, GATMetric_const rhs, GATBool *isequal) |
| | int GATMetric_Equals(GATMetric_const lhs, GATMetric_const rhs, GATBool *isequal) Compares two GATMetric objects
|
| GATResult | GATMetric_Clone (GATMetric_const handle, GATMetric *new_handle) |
| | int GATMetric_Clone(GATMetric_const filehandle, GATMetric *new_file) Clone the given GATMetric
|
| GATType | GATMetric_GetType (GATMetric_const description) |
| | int GATMetric_GetType(GATMetric_const file) Return the type of the GATMetric
|
| GATResult | GATMetric_GetInterface (GATMetric_const metric, GATInterface iftype, void const **ifp) |
| | int GATMetric_GetInterface(GATMetric_const table, GATInterface iftype, void const **ifp) Get an interface supported by a GATList
|
| GATuint32 | GATMetric_i_GetTypeSize (void) |
| | GATMetric_i_GetTypeSize.
|
| char const * | GATMetric_GetName (GATMetric_const metric) |
| | GATMetric_GetName.
|
| char const * | GATMetric_GetUnit (GATMetric_const metric) |
| | GATMetric_GetUnit.
|
| GATType | GATMetric_GetValueType (GATMetric_const metric) |
| | GATMetric_GetValueType.
|
| GATResult | GATMetric_GetParameters (GATMetric_const metric, GATTable *table) |
| | GATMetric_GetParameters.
|
| GATType | GATMetric_GetParameterTypeByName (GATMetric_const metric, char const *name) |
| | GATMetric_GetParameterTypeByName.
|
| GATResult | GATMetric_GetParameterByName (GATMetric_const metric, char const *name, GATType type, void *buffer, GATuint32 size) |
| | GATMetric_GetParameterByName.
|
| GATMeasurementType | GATMetric_GetMeasurementType (GATMetric_const metric) |
| | GATMetric_GetMeasurementType.
|
| GATResult | GATMetric_CreateMetric (GATStaticMetric const *data, GATMetric *metric) |
| | GATMetric_CreateMetric.
|
| GATResult | GATMetric_CreateListOfMetrics (GATStaticMetric *data, GATuint32 count, GATList_GATMetric *list) |
| | GATMetric_CreateListOfMetrics.
|
Variables |
| const char * | rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATMetric.c,v 1.13 2004/04/02 12:31:58 hartmutkaiser Exp $" |
| GATMetric_vtable | GATMetric__vtable |
Detailed Description
Source file for the GATMetric class.
- Date:
-
Tue Nov 4 2003
- Version:
-
- Header:
-
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATMetric.c,v 1.13 2004/04/02 12:31:58 hartmutkaiser Exp
Copyright (C) Hartmut Kaiser This file is part of the GAT Engine. Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.
Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)
Definition in file GATMetric.c.
Function Documentation
|
|
GATMetric_Create Create a new GATMetric object.
The function GATMetric_Create creates a new GATMetric object.
- Returns:
-
Returns a handle to the newly created GATMetric object. Returns 0 (zero) if an error occurs.
Definition at line 72 of file GATMetric.c.
References GAT_MEMORYFAILURE, GAT_SUCCESS, GATMeasurementType, GATMetric, GATMetric__vtable, GATMetric_Destroy(), GATResult, GATTable_Clone(), GATType, GATUtil_strdup(), and name.
Referenced by GATMetric_CreateMetric(). |
| void GATMetric_Destroy |
( |
GATMetric * |
object |
) |
|
|
|
|
GATMetric_Destroy The GATMetric destructor.
The function GATMetric_Destroy is the destructor used to free all the memory allocated by an GATMetric instance. - Parameters:
-
| description |
The pointer to the GATMetric to destroy |
Definition at line 117 of file GATMetric.c.
References GATMetric, and GATTable_Destroy().
Referenced by endpoint_adaptor_FireAddGATPipeListener(), endpoint_adaptor_FireConnect(), endpoint_adaptor_FireListen(), fileops_adaptor_FileCPI_GetMetricEvent(), fileops_adaptor_FireCopiedEvent(), fileops_adaptor_FireDeletedEvent(), fileops_adaptor_FireMovedEvent(), filestream_adaptor_FireCloseEvent(), filestream_adaptor_FireReadEvent(), filestream_adaptor_FireSeekEvent(), filestream_adaptor_FireWriteEvent(), GATMetric_Clone(), GATMetric_Create(), GATMetric_CreateListOfMetrics(), GATMetricEvent_Destroy(), GATMonitorable_Impl_DestroyKey(), logicalfile_adaptor_FireReplicatedEvent(), main(), pipe_adaptor_FireCloseEvent(), pipe_adaptor_FireReadEvent(), pipe_adaptor_FireSeekEvent(), and pipe_adaptor_FireWriteEvent(). |
|
|
int GATMetric_Equals(GATMetric_const lhs, GATMetric_const rhs, GATBool *isequal) Compares two GATMetric objects
The function GATMetric_Equals compares two objects of the GATMetric type. - Parameters:
-
| lhs |
The first list to compare |
| rhs |
The second list to compare |
| isequal |
The pointer to the location, where the outcome of the function has to be stored. |
- Returns:
-
An error code.
Definition at line 143 of file GATMetric.c.
References GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_SUCCESS, GATBool, GATFalse, GATMetric_const, GATResult, and GATTable_Equals().
Referenced by fileops_adaptor_FileCPI_GetMetricEvent(), GATMetricEvent_Equals(), and GATMonitorable_Impl_EqualKeys(). |
|
|
int GATMetric_Clone(GATMetric_const filehandle, GATMetric *new_file) Clone the given GATMetric
The function GATMetric_Clone generates a (deep) copy of the given GATMetric. - Parameters:
-
| description |
The object to clone |
| new_object |
The pointer, through which the result is to be returned. |
- Returns:
-
An error type.
Definition at line 181 of file GATMetric.c.
References GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCESS, GATMetric, GATMetric__vtable, GATMetric_const, GATMetric_Destroy(), GATResult, GATTable_Clone(), GATUtil_strdup(), and handle.
Referenced by GATMetricEvent_Clone(), GATMetricEvent_Create_Continuous(), GATMetricEvent_Create_EventLike(), and GATMonitorable_Impl_CloneKey(). |
|
|
GATMetric_GetName.
The function GATMetric_GetName gets the name associated with this GATMetric. - Parameters:
-
| metric |
The metric to ask for its name. |
- Returns:
-
The name associated with this metric.
Definition at line 302 of file GATMetric.c.
References GATMetric_const, and name.
Referenced by GATMonitorable_Impl_HashKey(). |
|
|
GATMetric_GetUnit.
The function GATMetric_GetUnit gets the measurement unit associated with this GATMetric. - Parameters:
-
| metric |
The metric to ask for its measurement unit. |
- Returns:
-
The unit associated with this metric.
Definition at line 322 of file GATMetric.c.
References GATMetric_const. |
|
|
GATMetric_GetParameters.
The function GATMetric_GetParameters gets the GATMetric parameter value associated with the passed GATMetric parameter name. Ther is returned a 0 (zero) if there is no GATMetric parameter value with the passed name. - Parameters:
-
| metric |
The metric to ask for its name. |
| table |
The pointer to a variable, which receives the returned parameter table. |
- Returns:
-
An error code.
Definition at line 365 of file GATMetric.c.
References GAT_INVALID_HANDLE, GATMetric_const, GATResult, and GATTable_Clone(). |
|
|
GATMetric_GetParameterTypeByName.
The function GATMetric_GetParameterTypeByName gets the type of the GATMetric parameter value associated with the passed GATMetric parameter name. - Parameters:
-
| metric |
The metric to ask for its name. |
| name |
The name of the parameter to query for. |
- Returns:
-
The type of the associated value.
Definition at line 387 of file GATMetric.c.
References GATMetric_const, GATTable_Get_ElementType(), GATType, GATType_NoType, and name. |
|
|
GATMetric_GetParameterByName.
The function GATMetric_GetParameterByName gets the GATMetric parameter value associated with the passed GATMetric parameter name. There is returned a 0 (zero) if there is no GATMetric parameter value with the passed name. - Parameters:
-
| metric |
The metric to ask for its name. |
| name |
The name of the parameter to query for. |
| buffer |
The buffer, where the retrieved value should be returned to. |
| size |
The size of the buffer. |
- Returns:
-
An error code.
Definition at line 413 of file GATMetric.c.
References GAT_INVALID_HANDLE, GAT_KEY_TYPE_ERROR, GATdouble64, GATfloat32, GATint16, GATint32, GATMetric_const, GATObject_const, GATResult, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATType, GATType_GATdouble64, GATType_GATfloat32, GATType_GATint16, GATType_GATint32, GATType_GATObject, GATType_String, GATuint32, name, and size. |
|
|
GATMetric_CreateMetric.
The function GATMetric_CreateMetric creates a GATMetric object from a given static metric data. This is a pure helper function for adaptor writers. - Parameters:
-
| data |
The address of the static metric data. |
| metric |
The pointer to the variable, which receives the resulting metric. |
- Returns:
-
An error code.
Definition at line 490 of file GATMetric.c.
References GATStaticParameter_S::d, data, GATStaticMetric_S::data_type, GAT_INVALID_PARAMETER, GAT_KEY_TYPE_ERROR, GAT_MEMORYFAILURE, GAT_SUCCESS, GATMetric, GATMetric_Create(), GATResult, GATTable_Add_double(), GATTable_Add_float(), GATTable_Add_int(), GATTable_Add_short(), GATTable_Add_String(), GATTable_Create(), GATTable_Destroy(), GATType_GATdouble64, GATType_GATfloat32, GATType_GATint16, GATType_GATint32, GATType_String, GATuint32, GATStaticParameter_S::key, GATStaticMetric_S::measurement_type, GATStaticMetric_S::name, GATStaticMetric_S::parameter_count, GATStaticMetric_S::parameters, GATStaticParameter_S::type, and GATStaticMetric_S::unit.
Referenced by endpoint_adaptor_FireAddGATPipeListener(), endpoint_adaptor_FireConnect(), endpoint_adaptor_FireListen(), fileops_adaptor_FileCPI_GetMetricEvent(), fileops_adaptor_FireCopiedEvent(), fileops_adaptor_FireDeletedEvent(), fileops_adaptor_FireMovedEvent(), filestream_adaptor_FireCloseEvent(), filestream_adaptor_FireReadEvent(), filestream_adaptor_FireSeekEvent(), filestream_adaptor_FireWriteEvent(), GATMetric_CreateListOfMetrics(), logicalfile_adaptor_FireReplicatedEvent(), main(), pipe_adaptor_FireCloseEvent(), pipe_adaptor_FireReadEvent(), pipe_adaptor_FireSeekEvent(), and pipe_adaptor_FireWriteEvent(). |
|
|
GATMetric_CreateListOfMetrics.
The function GATMetric_CreateListOfMetrics creates a list of GATMetric objects from a given list of static metric data. This is a pure helper function for adaptor writers. - Parameters:
-
| data |
The address of the static metric data array. |
| count |
The size of the given array of static metric data. |
| list |
The pointer to the variable, which receives the resulting list of metrics. |
- Returns:
-
An error code.
Definition at line 580 of file GATMetric.c.
References data, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCESS, GATMetric, GATMetric_CreateMetric(), GATMetric_Destroy(), GATResult, and GATuint32.
Referenced by endpoint_adaptor_EndpointCPI_GetMetrics(), fileops_adaptor_FileCPI_GetMetrics(), filestream_adaptor_FileStreamCPI_GetMetrics(), logicalfile_adaptor_LogicalFileCPI_GetMetrics(), pipe_adaptor_PipeCPI_GetMetrics(), and resourcebroker_adaptor_GATJobCPI_GetMetrics(). |
Variable Documentation
const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATMetric.c,v 1.13 2004/04/02 12:31:58 hartmutkaiser Exp $" [static]
|
|
| GATMetric_vtable GATMetric__vtable
|
|
|