GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

GATEndpointCPI.c File Reference

Main .c for the GATEndpointCPI class. More...

#include <stdio.h>
#include <stdlib.h>
#include "GATEndpointCPI.h"

Include dependency graph for GATEndpointCPI.c:

Include dependency graph

Go to the source code of this file.

Compounds

struct  GATEndpointCPI_S

Functions

GATBool GATEndpointCPI_IsValidData_V1 (GATEndpointCPI_Data *data)
GATEndpointCPI GATEndpointCPI_Create (unsigned long int version, GATEndpointCPI_Data *data)
 GATEndpointCPI_Create The GATEndpointCPI constructor.

void GATEndpointCPI_Destroy (GATEndpointCPI *cpi)
 GATEndpointCPI_Destroy The GATEndpointCPI destructor.

GATResult GATEndpointCPI_CreateInstance (GATEndpointCPI cpi, GATEndpointCPI_Instance *data)
 GATEndpointCPI_CreateInstance Create a new CPI object instance.

void GATEndpointCPI_DestroyInstance (GATEndpointCPI cpi, GATEndpointCPI_Instance *data)
 GATEndpointCPI_DestroyInstance Create a new CPI object instance.

GATResult GATEndpointCPI_EqualsInstance (GATEndpointCPI cpi, GATEndpointCPI_Instance const *lhs, GATEndpointCPI_Instance const *rhs, GATBool *isequal)
 GATEndpointCPI_EqualsInstance Compares two CPI object instances.

GATResult GATEndpointCPI_CloneInstance (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATEndpointCPI_Instance *new_data)
 GATEndpointCPI_CloneInstance Clones a CPI object instance.

GATResult GATEndpointCPI_Serialise (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATObject stream, GATBool clear_dirty)
 GATEndpointCPI_Serialise Serialise the instance data.

GATResult GATEndpointCPI_DeSerialise (GATEndpointCPI cpi, GATObject stream, GATEndpointCPI_Instance *data)
 GATEndpointCPI_DeSerialise De-serialise the instance data.

GATResult GATEndpointCPI_Connect (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATPipe *peep)
 GATEndpointCPI_Connect Connect a client's endpoint.

GATResult GATEndpointCPI_Listen (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATPipe *peep)
 GATEndpointCPI_Listen Connect a server's endpoint.

GATResult GATEndpointCPI_AddGATPipeListener (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATPipeListener pipeListener, void *listenerData)
 GATEndpointCPI_AddGATPipeListener Add a GATPipeListener to this endpoint.

GATResult GATEndpointCPI_GetMetrics (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATList_GATMetric *metrics)
 GATEndpointCPI_GetMetrics.

GATResult GATEndpointCPI_GetMetricEvent (GATEndpointCPI cpi, GATEndpointCPI_Instance const *data, GATMetric metric, GATMetricEvent *event)
 GATEndpointCPI_GetMetricEvent.


Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATEndpointCPI.c,v 1.8 2004/04/02 12:31:57 hartmutkaiser Exp $"


Detailed Description

Main .c for the GATEndpointCPI class.

A GATEndpointCPI encapsulates all the methods that a GATEndpoint capability provider provides.

Date:
Date:
2004/04/02 12:31:57

Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATEndpointCPI.c,v 1.8 2004/04/02 12:31:57 hartmutkaiser Exp

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


Function Documentation

GATBool GATEndpointCPI_IsValidData_V1 GATEndpointCPI_Data   data [static]
 

Definition at line 347 of file GATEndpointCPI.c.

References GATEndpointCPI_Data::addPipeListener, GATEndpointCPI_Data::clone_instance, GATEndpointCPI_Data::connect, GATEndpointCPI_Data::create_instance, data, GATEndpointCPI_Data::deserialise, GATEndpointCPI_Data::destroy, GATEndpointCPI_Data::destroy_instance, GATEndpointCPI_Data::equals_instance, GATFalse, GATTrue, GATEndpointCPI_Data::get_metric_event, GATEndpointCPI_Data::get_metrics, GATEndpointCPI_Data::listen, and GATEndpointCPI_Data::serialise.

Referenced by GATEndpointCPI_Create().

GATEndpointCPI GATEndpointCPI_Create unsigned long int    version,
GATEndpointCPI_Data   data
 

GATEndpointCPI_Create The GATEndpointCPI constructor.

This is the constructor for GATEndpointCPI objects.

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

Definition at line 79 of file GATEndpointCPI.c.

References GATEndpointCPI_S::addPipeListener, GATEndpointCPI_Data::addPipeListener, GATEndpointCPI_S::clone_instance, GATEndpointCPI_Data::clone_instance, GATEndpointCPI_S::connect, GATEndpointCPI_Data::connect, GATEndpointCPI_S::create_instance, GATEndpointCPI_Data::create_instance, data, GATEndpointCPI_S::data, GATEndpointCPI_Data::data, GATEndpointCPI_S::deserialise, GATEndpointCPI_Data::deserialise, GATEndpointCPI_S::destroy, GATEndpointCPI_Data::destroy, GATEndpointCPI_S::destroy_instance, GATEndpointCPI_Data::destroy_instance, GATEndpointCPI_S::equals_instance, GATEndpointCPI_Data::equals_instance, GATEndpointCPI_IsValidData_V1(), GATENDPOINTCPI_VERSION, GATTrue, GATEndpointCPI_S::get_metric_event, GATEndpointCPI_Data::get_metric_event, GATEndpointCPI_S::get_metrics, GATEndpointCPI_Data::get_metrics, GATEndpointCPI_S::listen, GATEndpointCPI_Data::listen, GATEndpointCPI_S::serialise, GATEndpointCPI_Data::serialise, GATEndpointCPI_S::service_actions, and GATEndpointCPI_Data::service_actions.

Referenced by endpoint_adaptor_register_endpoint().

void GATEndpointCPI_Destroy GATEndpointCPI   cpi
 

GATEndpointCPI_Destroy The GATEndpointCPI destructor.

This is the destructor for GATEndpointCPI objects.

Parameters:
this  An old GATEndpointCPI

Definition at line 138 of file GATEndpointCPI.c.

References cpi.

Referenced by endpoint_adaptor_register_endpoint().

GATResult GATEndpointCPI_CreateInstance GATEndpointCPI    cpi,
GATEndpointCPI_Instance   data
 

GATEndpointCPI_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
Returns:
An error code.

Definition at line 159 of file GATEndpointCPI.c.

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

Referenced by GATEndpoint_Create().

void GATEndpointCPI_DestroyInstance GATEndpointCPI    cpi,
GATEndpointCPI_Instance   data
 

GATEndpointCPI_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 173 of file GATEndpointCPI.c.

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

Referenced by GATEndpoint_Destroy().

GATResult GATEndpointCPI_EqualsInstance GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    lhs,
GATEndpointCPI_Instance const *    rhs,
GATBool   isequal
 

GATEndpointCPI_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 192 of file GATEndpointCPI.c.

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

Referenced by GATEndpoint_Equals().

GATResult GATEndpointCPI_CloneInstance GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATEndpointCPI_Instance   new_data
 

GATEndpointCPI_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 210 of file GATEndpointCPI.c.

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

Referenced by GATEndpoint_Clone().

GATResult GATEndpointCPI_Serialise GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATObject    stream,
GATBool    clear_dirty
 

GATEndpointCPI_Serialise Serialise the instance data.

Calls the adaptor to serialise the instance data.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
stream  The stream to use be used for serialisation.
clear_dirty  If the clear_dirty parameter is set to GATTrue, the internal dirty flag of this object is to be reset.
Returns:
An error code.

Definition at line 230 of file GATEndpointCPI.c.

References cpi, data, GATEndpointCPI_S::data, GATBool, and GATEndpointCPI_S::serialise.

Referenced by GATEndpointCPI_SerialiseCallback().

GATResult GATEndpointCPI_DeSerialise GATEndpointCPI    cpi,
GATObject    stream,
GATEndpointCPI_Instance   data
 

GATEndpointCPI_DeSerialise De-serialise the instance data.

Call the adaptor to de-serialise the instance data.

Parameters:
context  The GAT context to be used for object construction.
stream  The stream interface to use for the serialisation.
instance_data  The pointer to a variable, which contains the client data of the new object. The member instance data of this object may receive the pointer to the new instance data of the CPI object.
Returns:
An error code.

Definition at line 250 of file GATEndpointCPI.c.

References cpi, data, GATEndpointCPI_S::data, and GATEndpointCPI_S::deserialise.

Referenced by GATEndpoint_DeSerialise_Create().

GATResult GATEndpointCPI_Connect GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATPipe   peep
 

GATEndpointCPI_Connect Connect a client's endpoint.

Calls the adaptor to connect a client's endpoint.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
peep  The connected GATPipe
Returns:
An error code.

Definition at line 267 of file GATEndpointCPI.c.

References GATEndpointCPI_S::connect, cpi, data, GATEndpointCPI_S::data, and GATResult.

Referenced by GATEndpoint_Connect().

GATResult GATEndpointCPI_Listen GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATPipe   peep
 

GATEndpointCPI_Listen Connect a server's endpoint.

Calls the adaptor to connect a server's endpoint.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
peep  The connected GATPipe
Returns:
An error code.

Definition at line 283 of file GATEndpointCPI.c.

References cpi, data, GATEndpointCPI_S::data, GATResult, and GATEndpointCPI_S::listen.

Referenced by GATEndpoint_Listen().

GATResult GATEndpointCPI_AddGATPipeListener GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATPipeListener    pipeListener,
void *    listenerData
 

GATEndpointCPI_AddGATPipeListener Add a GATPipeListener to this endpoint.

Calls the adaptor to add a GATPipeListener to this endpoint.

Parameters:
this  The CPI object.
instance_data  The instance data of the attached CPI object
pipeListener  The to be added GATPipeListener
listenerData  Callback data
Returns:
An error code.

Definition at line 300 of file GATEndpointCPI.c.

References GATEndpointCPI_S::addPipeListener, cpi, data, GATEndpointCPI_S::data, GATPipeListener, and GATResult.

Referenced by GATEndpoint_AddGATPipeListener().

GATResult GATEndpointCPI_GetMetrics GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATList_GATMetric *    metrics
 

GATEndpointCPI_GetMetrics.

The function GATEndpointCPI_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 318 of file GATEndpointCPI.c.

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

Referenced by GATEndpoint_Create(), and GATEndpoint_DeSerialise_Create().

GATResult GATEndpointCPI_GetMetricEvent GATEndpointCPI    cpi,
GATEndpointCPI_Instance const *    data,
GATMetric    metric,
GATMetricEvent   event
 

GATEndpointCPI_GetMetricEvent.

The function GATEndpointCPI_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 339 of file GATEndpointCPI.c.

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

Referenced by GATEndpoint_RegisterPolling().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATEndpointCPI.c,v 1.8 2004/04/02 12:31:57 hartmutkaiser Exp $" [static]
 

Definition at line 21 of file GATEndpointCPI.c.