GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

GATPipeCPI.h File Reference

Header for the GATPipeCPI class. More...

#include "GATContext.h"
#include "GATPreferences.h"
#include "GATMetricEvent.h"
#include "GATMetric.h"
#include "GATTime.h"
#include "GATPipe.h"
#include "GATMonitorable.h"

Include dependency graph for GATPipeCPI.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Compounds

struct  GATPipeCPI_Instance
 The #GATPipeCPI_Instance structure holds all data items supplied by the client during the construction of the GATPipe object. More...

struct  GATPipeCPI_Data

Defines

#define _GATPIPECPI_H_   1
#define GATPIPECPI_VERSION1   1
#define GATPIPECPI_VERSION   GATPIPECPI_VERSION1

Typedefs

typedef GATPipeCPI_SGATPipeCPI
typedef void(* GATPipeCPI_Adaptor_Destroy )(void *)
typedef GATResult(* GATPipeCPI_Adaptor_ServiceActions )(void *, GATPipeCPI_Instance *, GATTimePeriod_const)
typedef void(* GATPipeCPI_Adaptor_DestroyInstance )(void *, GATPipeCPI_Instance *)
typedef GATResult(* GATPipeCPI_Adaptor_CreateInstance )(void *, GATPipeCPI_Instance *, void *)
typedef GATResult(* GATPipeCPI_Adaptor_CloneInstance )(void *, GATPipeCPI_Instance const *, GATPipeCPI_Instance *)
typedef GATResult(* GATPipeCPI_Adaptor_EqualsInstance )(void *, GATPipeCPI_Instance const *, GATPipeCPI_Instance const *, GATBool *)
typedef GATResult(* GATPipeCPI_Adaptor_Read )(void *, GATPipeCPI_Instance const *, void *, GATuint32, GATuint32 *)
typedef GATResult(* GATPipeCPI_Adaptor_Write )(void *, GATPipeCPI_Instance const *, void const *, GATuint32, GATuint32 *)
typedef GATResult(* GATPipeCPI_Adaptor_Seek )(void *, GATPipeCPI_Instance const *, GATOrigin, GATint32, GATuint32 *)
typedef GATResult(* GATPipeCPI_Adaptor_Close )(void *, GATPipeCPI_Instance const *)
typedef GATResult(* GATPipeCPI_Adaptor_GetMetrics )(void *, GATPipeCPI_Instance const *, GATList_GATMetric *)
typedef GATResult(* GATPipeCPI_Adaptor_GetMetricEvent )(void *, GATPipeCPI_Instance const *, GATMetric, GATMetricEvent *)

Functions

GATPipeCPI GATPipeCPI_Create (unsigned long int version, GATPipeCPI_Data *data)
 GATPipeCPI_Create The GATPipeCPI constructor.

void GATPipeCPI_Destroy (GATPipeCPI *cpi)
 GATPipeCPI_Destroy The GATPipeCPI destructor.

GATResult GATPipeCPI_CreateInstance (GATPipeCPI cpi, GATPipeCPI_Instance *instance_data, void *information)
 GATPipeCPI_CreateInstance Create a new CPI object instance.

void GATPipeCPI_DestroyInstance (GATPipeCPI cpi, GATPipeCPI_Instance *instance_data)
 GATPipeCPI_DestroyInstance Create a new CPI object instance.

GATResult GATPipeCPI_CloneInstance (GATPipeCPI cpi, GATPipeCPI_Instance const *instance_data, GATPipeCPI_Instance *new_instance_data)
 GATPipeCPI_CloneInstance Clones a CPI object instance.

GATResult GATPipeCPI_EqualsInstance (GATPipeCPI cpi, GATPipeCPI_Instance const *lhs, GATPipeCPI_Instance const *rhs, GATBool *isequal)
 GATPipeCPI_EqualsInstance Compares two CPI object instances.

GATResult GATPipeCPI_Read (GATPipeCPI cpi, GATPipeCPI_Instance const *data, void *buffer, GATuint32 size, GATuint32 *read_bytes)
 GATPipeCPI_Read Read from this peep.

GATResult GATPipeCPI_Write (GATPipeCPI cpi, GATPipeCPI_Instance const *data, void const *buffer, GATuint32 size, GATuint32 *written_bytes)
 GATPipeCPI_Write Write to this peep.

GATResult GATPipeCPI_Seek (GATPipeCPI cpi, GATPipeCPI_Instance const *data, GATOrigin origin, GATint32 offset, GATuint32 *new_position)
 GATPipeCPI_Seek Seek on this peep.

GATResult GATPipeCPI_Close (GATPipeCPI cpi, GATPipeCPI_Instance const *data)
 GATPipeCPI_Close Closes this peep.

GATResult GATPipeCPI_GetMetrics (GATPipeCPI cpi, GATPipeCPI_Instance const *data, GATList_GATMetric *metrics)
 GATPipeCPI_GetMetrics.

GATResult GATPipeCPI_GetMetricEvent (GATPipeCPI cpi, GATPipeCPI_Instance const *data, GATMetric metric, GATMetricEvent *event)
 GATPipeCPI_GetMetricEvent.


Detailed Description

Header for the GATPipeCPI class.

A GATPipeCPI encapsulates all the methods that a GATPipe capability provider provides.

Date:
Date:
2004/03/24 19:30:58

Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATPipeCPI.h,v 1.6 2004/03/24 19:30:58 hartmutkaiser Exp

Copyright (C) Kelly Davis This is part of the GAT Engine. Contributed by Kelly Davis <kdavis@aei.mpg.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 GATPipeCPI.h.


Define Documentation

#define _GATPIPECPI_H_   1
 

Definition at line 21 of file GATPipeCPI.h.

#define GATPIPECPI_VERSION1   1
 

Definition at line 34 of file GATPipeCPI.h.

#define GATPIPECPI_VERSION   GATPIPECPI_VERSION1
 

Definition at line 37 of file GATPipeCPI.h.

Referenced by GATPipeCPI_Create(), and pipe_adaptor_register_pipe().


Typedef Documentation

typedef struct GATPipeCPI_S* GATPipeCPI
 

Definition at line 23 of file GATPipeCPI.h.

typedef void(* GATPipeCPI_Adaptor_Destroy)(void *)
 

Definition at line 52 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_ServiceActions)(void *, GATPipeCPI_Instance *, GATTimePeriod_const)
 

Definition at line 54 of file GATPipeCPI.h.

typedef void(* GATPipeCPI_Adaptor_DestroyInstance)(void *, GATPipeCPI_Instance *)
 

Definition at line 58 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_CreateInstance)(void *, GATPipeCPI_Instance *, void *)
 

Definition at line 61 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_CloneInstance)(void *, GATPipeCPI_Instance const *, GATPipeCPI_Instance *)
 

Definition at line 64 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_EqualsInstance)(void *, GATPipeCPI_Instance const *, GATPipeCPI_Instance const *, GATBool *)
 

Definition at line 67 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_Read)(void *, GATPipeCPI_Instance const *, void *, GATuint32, GATuint32 *)
 

Definition at line 72 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_Write)(void *, GATPipeCPI_Instance const *, void const *, GATuint32, GATuint32 *)
 

Definition at line 75 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_Seek)(void *, GATPipeCPI_Instance const *, GATOrigin, GATint32, GATuint32 *)
 

Definition at line 78 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_Close)(void *, GATPipeCPI_Instance const *)
 

Definition at line 81 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_GetMetrics)(void *, GATPipeCPI_Instance const *, GATList_GATMetric *)
 

Definition at line 86 of file GATPipeCPI.h.

typedef GATResult(* GATPipeCPI_Adaptor_GetMetricEvent)(void *, GATPipeCPI_Instance const *, GATMetric, GATMetricEvent *)
 

Definition at line 89 of file GATPipeCPI.h.


Function Documentation

GATPipeCPI GATPipeCPI_Create unsigned long int    version,
GATPipeCPI_Data   data
 

GATPipeCPI_Create The GATPipeCPI constructor.

This is the constructor for GATPipeCPI objects.

Parameters:
version  Version of the GATPipeCPI_Data structure
data  Pointer to adaptor CPI instance data structure.
Returns:
A new GATPipeCPI

Definition at line 76 of file GATPipeCPI.c.

References GATPipeCPI_Data::clone_instance, GATPipeCPI_S::clone_instance, GATPipeCPI_Data::close, GATPipeCPI_S::close, GATPipeCPI_Data::create_instance, GATPipeCPI_S::create_instance, GATPipeCPI_Data::data, GATPipeCPI_S::data, data, GATPipeCPI_Data::destroy, GATPipeCPI_S::destroy, GATPipeCPI_Data::destroy_instance, GATPipeCPI_S::destroy_instance, GATPipeCPI_Data::equals_instance, GATPipeCPI_S::equals_instance, GATPipeCPI_IsValidData_V1(), GATPIPECPI_VERSION, GATPipeCPI_Data::get_metric_event, GATPipeCPI_S::get_metric_event, GATPipeCPI_Data::get_metrics, GATPipeCPI_S::get_metrics, GATPipeCPI_Data::read, GATPipeCPI_S::read, GATPipeCPI_Data::seek, GATPipeCPI_S::seek, GATPipeCPI_Data::service_actions, GATPipeCPI_S::service_actions, GATPipeCPI_Data::write, and GATPipeCPI_S::write.

Referenced by pipe_adaptor_register_pipe().

void GATPipeCPI_Destroy GATPipeCPI   cpi
 

GATPipeCPI_Destroy The GATPipeCPI destructor.

This is the destructor for GATPipeCPI objects.

Parameters:
this  An old GATPipeCPI

Definition at line 132 of file GATPipeCPI.c.

References cpi.

Referenced by pipe_adaptor_register_pipe().

GATResult GATPipeCPI_CreateInstance GATPipeCPI    cpi,
GATPipeCPI_Instance   data,
void *    information
 

GATPipeCPI_CreateInstance Create a new CPI object instance.

Calls the adaptor to create a new CPI object instance.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
information  Information required to create an instance
Returns:
An error code.

Definition at line 153 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::create_instance, GATPipeCPI_S::data, and data.

Referenced by GATPipe_Create().

void GATPipeCPI_DestroyInstance GATPipeCPI    cpi,
GATPipeCPI_Instance   data
 

GATPipeCPI_DestroyInstance Create a new CPI object instance.

Calls the adaptor to destroy a CPI object instance.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object

Definition at line 167 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, data, and GATPipeCPI_S::destroy_instance.

Referenced by GATPipe_Destroy().

GATResult GATPipeCPI_CloneInstance GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data,
GATPipeCPI_Instance   new_data
 

GATPipeCPI_CloneInstance Clones a CPI object instance.

Calls the adaptor to clone a CPI object instance.

Parameters:
this  The CPI object.
instance_data  The instance data of the CPI object to clone.
rhs  The new instance data is to be returned here.
Returns:
An error code.

Definition at line 204 of file GATPipeCPI.c.

References GATPipeCPI_S::clone_instance, cpi, GATPipeCPI_S::data, and data.

Referenced by GATPipe_Clone().

GATResult GATPipeCPI_EqualsInstance GATPipeCPI    cpi,
GATPipeCPI_Instance const *    lhs,
GATPipeCPI_Instance const *    rhs,
GATBool   isequal
 

GATPipeCPI_EqualsInstance Compares two CPI object instances.

Calls the adaptor to compare two CPI object instances.

Parameters:
this  The CPI object.
lhs  The instance data of the left CPI object
rhs  The instance data of the right CPI object
isequal  The pointer to the variable, where the result is to be returned to.
Returns:
An error code.

Definition at line 186 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, GATPipeCPI_S::equals_instance, and GATBool.

Referenced by GATPipe_Equals().

GATResult GATPipeCPI_Read GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data,
void *    buffer,
GATuint32    size,
GATuint32   read_bytes
 

GATPipeCPI_Read Read from this peep.

Calls the adaptor to read from this peep.

Parameters:
cpi  The CPI object.
data  The instance data of the attached CPI object
buffer  The buffer to read into
size  Size of data to read
read_bytes  Number of bytes read
Returns:
An error code.

Definition at line 223 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, data, GATResult, GATuint32, GATPipeCPI_S::read, and size.

Referenced by GATPipe_Read().

GATResult GATPipeCPI_Write GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data,
void const *    buffer,
GATuint32    size,
GATuint32   written_bytes
 

GATPipeCPI_Write Write to this peep.

Calls the adaptor to write to this peep.

Parameters:
cpi  The CPI object.
data  The instance data of the attached CPI object
buffer  The buffer to write from
size  Size of data to write
read_bytes  Number of bytes written
Returns:
An error code.

Definition at line 241 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, data, GATResult, GATuint32, size, and GATPipeCPI_S::write.

Referenced by GATPipe_Write().

GATResult GATPipeCPI_Seek GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data,
GATOrigin    origin,
GATint32    offset,
GATuint32   new_position
 

GATPipeCPI_Seek Seek on this peep.

Calls the adaptor to seek on this peep.

Parameters:
cpi  The CPI object.
data  The instance data of the attached CPI object
origin  Where to seek from
offset  Offset of seek
new_position  New position
Returns:
An error code.

Definition at line 259 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, data, GATint32, GATOrigin, GATResult, GATuint32, and GATPipeCPI_S::seek.

Referenced by GATPipe_Seek().

GATResult GATPipeCPI_Close GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data
 

GATPipeCPI_Close Closes this peep.

Calls the adaptor to close this peep.

Parameters:
cpi  The CPI object.
data  The instance data of the attached CPI object
Returns:
An error code.

Definition at line 274 of file GATPipeCPI.c.

References GATPipeCPI_S::close, cpi, GATPipeCPI_S::data, data, and GATResult.

Referenced by GATPipe_Close().

GATResult GATPipeCPI_GetMetrics GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data,
GATList_GATMetric *    metrics
 

GATPipeCPI_GetMetrics.

The function GATPipeCPI_GetMetrics returns the list of metrics supported by this adaptor.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
The  pointer to the variable, which receives the resulting list of metrics.
Returns:
An error code.

Definition at line 292 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, data, and GATPipeCPI_S::get_metrics.

Referenced by GATPipe_Create().

GATResult GATPipeCPI_GetMetricEvent GATPipeCPI    cpi,
GATPipeCPI_Instance const *    data,
GATMetric    metric,
GATMetricEvent   event
 

GATPipeCPI_GetMetricEvent.

The function GATPipeCPI_GetMetricEvent returns the metric event, which is associated with the given metric.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
metric  The continuous metric, for which the metric event is to be returned.
event  The pointer to the variable, which receives the resulting metric event.
Returns:
An error code.

Definition at line 313 of file GATPipeCPI.c.

References cpi, GATPipeCPI_S::data, data, GATMetric, and GATPipeCPI_S::get_metric_event.

Referenced by GATPipe_RegisterPolling().