GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

GATEndpoint.c File Reference

Main .c for the GATEndpoint class. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <sys/utsname.h>
#include "GAT.h"
#include "GATRegistry.h"
#include "GATInternal.h"
#include "GATXdsWrapper.h"
#include "GATEndpointCPI.h"
#include "GATMetricEvent.h"

Include dependency graph for GATEndpoint.c:

Include dependency graph

Go to the source code of this file.

Compounds

struct  GATEndpoint_S

Functions

 GATOBJECT_DEFINE_VTABLE (GATEndpoint)
 GATSERIALISABLE_DEFINE_VTABLE (GATEndpoint)
 GATMONITORABLE_DEFINE_VTABLE (GATEndpoint)
 GATOBJECT_DEFINE_CONVERTERS (GATEndpoint)
GATResult GATEndpoint_GetCPIInstanceData (GATEndpoint endpoint, void **data)
int GATEndpoint_DeSerialise_Create (GATContext context, GATObject stream, char const *name, GATEndpoint *new_endpoint)
 GATEndpoint_DeSerialise_Create.

GATResult GATEndpoint_GetNodename (struct utsname systemInfo, char **nodename)
 GATEndpoint_GetNodename.

GATResult GATEndpoint_CloneString (char **destination, const char *source)
 GATEndpoint_CloneString Creates a clone of a string.

GATResult GATEndpoint_Register_GATSerialisable (void)
 GATEndpoint_Register_GATSerialisable The GATEndpoint_Register_GATSerialisable function registers the serialization vtable with the GAT engine to allow generic object creation.

GATEndpoint GATEndpoint_Create (GATContext context, GATPreferences_const preferences)
 Constructs a unconnected instance of this class.

void GATEndpoint_Destroy (GATEndpoint *endpoint)
 GATEndpoint_Destroy The GATEndpoint destructor.

GATType GATEndpoint_GetType (GATEndpoint_const endpoint)
 int GATEndpoint_GetType(GATEndpoint_const endpoint) Return the type of the GATEndpoint

GATResult GATEndpoint_Clone (GATEndpoint_const endpoint, GATEndpoint *new_object)
 int GATEndpoint_Clone(GATEndpoint_const endpoint, GATEndpoint *new_endpoint) Clone the given GATEndpoint

GATResult GATEndpoint_Equals (GATEndpoint_const lhs, GATEndpoint_const rhs, GATBool *isequal)
 int GATEndpoint_Equals(GATEndpoint_const lhs, GATEndpoint_const rhs, GATBool *isequal) Compares two GATEndpoint objects

GATResult GATEndpoint_GetInterface (GATEndpoint_const endpoint, GATInterface iftype, void const **ifp)
 int GATEndpoint_GetInterface(GATEndpoint_const endpoint, GATInterface iftype, void const **ifp) Get an interface supported by a GATEndpoint

GATResult GATEndpoint_Connect (GATEndpoint_const endpoint, GATPipe *peep)
 When a GATEndpoint is obtained from an Advert Directory, it can be used to create a GATPipe connected to the advertising application, by calling connect on the GATEndpoint instance.

GATResult GATEndpoint_Listen (GATEndpoint_const endpoint, GATPipe *peep)
 The creator of an GATEndpoint can use the GATEndpoint to create GATPipes, which represent incoming connections.

GATResult GATEndpoint_AddGATPipeListener (GATEndpoint_const endpoint, GATPipeListener peepListener, void *listenerData)
 The creator of an GATEndpoint can use the GATEndpoint to create GATPipes, which represent incoming connections.

GATResult GATEndpoint_AddMetricListener (GATEndpoint endpoint, GATMetricListener listener, void *listener_data, GATMetric metric, GATuint32 *cookie)
 GATEndpoint_AddMetricListener.

GATResult GATEndpoint_RegisterPolling (GATEndpoint endpoint, GATMetric metric, GATMetricEvent *event, GATuint32 *cookie)
 GATEndpoint_RegisterPolling.

GATResult GATEndpoint_RemoveRegisteredMetric (GATEndpoint endpoint, GATMetric metric, GATuint32 cookie)
 GATEndpoint_RemoveRegisteredMetric.

GATResult GATEndpoint_GetMetrics (GATEndpoint_const endpoint, GATList_GATMetric *metrics)
 GATEndpoint_GetMetrics.

GATResult GATEndpointCPI_SerialiseCallback (GATObject object, GATObject stream, GATBool clear_dirty)
 GATEndpointCPI_SerialiseCallback.

GATResult GATEndpoint_Serialise (GATEndpoint endpoint, GATObject stream, GATBool clear_dirty)
 int GATEndpoint_Serialise(GATEndpoint endpoint, GATObject stream, GATBool clear_dirty) Serialise a GATEndpoint object

GATBool GATEndpointCPI_VersionCallback (GATuint32 version)
 GATEndpointCPI_VersionCallback.

GATResult GATEndpointCPI_DeSerialiseCallback (GATContext context, GATObject stream, GATObject *object, GATuint32 version, va_list args)
 GATEndpointCPI_DeSerialiseCallback.

GATEndpoint GATEndpoint_DeSerialise (GATContext context, GATObject stream, GATResult *result)
 GATEndpoint GATEndpoint_DeSerialise(GATContext context, GATObject stream, GATBool clear_dirty) De-serialise a GATEndpoint object.

GATResult GATEndpoint_GetIsDirty (GATEndpoint_const endpoint, GATBool *isdirty)
 GATEndpoint_GetIsDirty.


Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATEndpoint.c,v 1.22 2004/05/10 15:17:32 hartmutkaiser Exp $"
GATEndpoint_vtable GATEndpoint__vtable
GATEndpoint_ISerialisable_vtable GATEndpoint_ISerialisable__vtable
GATEndpoint_IMonitorable_vtable GATEndpoint_IMonitorable__vtable


Detailed Description

Main .c for the GATEndpoint class.

An GATEndpoint represents an end of a byte stream.

Date:
Date:
2004/05/10 15:17:32

Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATEndpoint.c,v 1.22 2004/05/10 15:17:32 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 GATEndpoint.c.


Function Documentation

GATOBJECT_DEFINE_VTABLE GATEndpoint   
 

GATSERIALISABLE_DEFINE_VTABLE GATEndpoint   
 

GATMONITORABLE_DEFINE_VTABLE GATEndpoint   
 

GATOBJECT_DEFINE_CONVERTERS GATEndpoint   
 

Definition at line 41 of file GATJob.c.

GATResult GATEndpoint_GetCPIInstanceData GATEndpoint    endpoint,
void **    data
[static]
 

Definition at line 1150 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::data, data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_RETURN_STATUS, and GAT_USES_STATUS.

GATResult GATEndpoint_DeSerialise_Create GATContext    context,
GATObject    stream,
char const *    name,
GATEndpoint   new_object
[static]
 

GATEndpoint_DeSerialise_Create.

The function GATEndpoint_DeSerialise_Create creates a new GATEndpoint object and tries to find a CPI provider to associate with this endpoint object. The CPI provider is selected by testing, which adapter is able to handle the streamed instance data of the original CPI provider.

Parameters:
context  The GAT context to use for creation of the GATEndpoint object.
stream  The object from which the adaptor should read the streamed instance data.
new_object  The pointer to the variable, which should receive the newly constructed GATEndpoint object.
Returns:
An error code.

Definition at line 956 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::cpi, GATEndpoint_S::cpilist, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_NO_MATCHING_CPI, GAT_NO_REGISTERED_CPI, GAT_NOTIMPL, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_SUCCESS, GAT_USES_STATUS, GATBool, GATContext_GetPreferences(), GATContext_internal_GetRegistry(), GATEndpoint__vtable, GATEndpoint_CloneString(), GATEndpoint_Destroy(), GATEndpoint_IMonitorable__vtable, GATEndpoint_ISerialisable__vtable, GATEndpointCPI_DeSerialise(), GATEndpointCPI_GetMetrics(), GATFalse, GATEndpoint_S::GATMonitorable__vtable, GATMonitorable_Impl_Create(), GATEndpoint_S::GATObject__vtable, GATOrigin_Current, GATOrigin_Set, GATPreferences_const, GATRegistry_const, GATResult, GATEndpoint_S::GATSerialisable__vtable, GATStreamable_Seek(), GATTrue, GATuint32, GATEndpointCPI_Instance::isdirty, GATEndpointCPI_Instance::monitorable, name, GATEndpointCPI_Instance::nodename, and GATEndpointCPI_Instance::source.

Referenced by GATEndpointCPI_DeSerialiseCallback().

GATResult GATEndpoint_GetNodename struct utsname    systemInfo,
char **    nodename
[static]
 

GATEndpoint_GetNodename.

This function takes a struct utsname struct and returns a copy of the nodename element in the passed structure.

Parameters:
systemInfo  The struct utsname to quell info from
nodename  A copy of the nodename contained in the passed structure
Returns:
A GAT error code

Definition at line 1097 of file GATEndpoint.c.

References GAT_INVALID_PARAMETER, GATEndpoint_CloneString(), and GATResult.

Referenced by GATEndpoint_Create().

GATResult GATEndpoint_CloneString char **    destination,
const char *    source
[static]
 

GATEndpoint_CloneString Creates a clone of a string.

Parameters:
destination  The destination string
source  The source string
Returns:
The error code

Definition at line 1115 of file GATEndpoint.c.

References GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCESS, and GATResult.

Referenced by GATEndpoint_Clone(), GATEndpoint_DeSerialise_Create(), and GATEndpoint_GetNodename().

GATResult GATEndpoint_Register_GATSerialisable void   
 

GATEndpoint_Register_GATSerialisable The GATEndpoint_Register_GATSerialisable function registers the serialization vtable with the GAT engine to allow generic object creation.

This function is called by the GAT engine, there is no need to use it directly.

Definition at line 109 of file GATEndpoint.c.

References GATEndpoint_ISerialisable__vtable, GATObject_Register_GATSerialisable(), GATResult, and GATType_GATEndpoint.

Referenced by GATObject_Register_GATSerialisables().

GATEndpoint GATEndpoint_Create GATContext    context,
GATPreferences_const    preferences
 

Constructs a unconnected instance of this class.

Parameters:
context  Used to broker resources.
preferences  User preferences for this instance.

Definition at line 122 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::cpi, GATEndpoint_S::cpilist, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAIL, GAT_FAILED, GAT_MEMORYFAILURE, GAT_NO_REGISTERED_CPI, GAT_NOTIMPL, GAT_STATUS_APIENTRY, GAT_STORE_STATUS, GAT_SUCCEEDED, GAT_SUCCESS, GATBool, GATContext_GetPreferences(), GATContext_internal_GetRegistry(), GATEndpoint__vtable, GATEndpoint_Destroy(), GATEndpoint_GetNodename(), GATEndpoint_IMonitorable__vtable, GATEndpoint_ISerialisable__vtable, GATEndpointCPI_CreateInstance(), GATEndpointCPI_GetMetrics(), GATFalse, GATEndpoint_S::GATMonitorable__vtable, GATMonitorable_Impl_Create(), GATEndpoint_S::GATObject__vtable, GATPreferences_const, GATRegistry_const, GATResult, GATEndpoint_S::GATSerialisable__vtable, GATTrue, GATEndpointCPI_Instance::isdirty, GATEndpointCPI_Instance::monitorable, GATEndpointCPI_Instance::nodename, and GATEndpointCPI_Instance::source.

Referenced by main().

void GATEndpoint_Destroy GATEndpoint   endpoint
 

GATEndpoint_Destroy The GATEndpoint destructor.

This is the destructor for GATEndpoint objects.

Parameters:
endpoint  An old GATEndpoint

Definition at line 241 of file GATEndpoint.c.

References GATEndpointCPI_DestroyInstance(), and GATMonitorable_Impl_Destroy().

Referenced by GATEndpoint_Clone(), GATEndpoint_Create(), GATEndpoint_DeSerialise_Create(), GATEndpointCPI_DeSerialiseCallback(), and main().

GATType GATEndpoint_GetType GATEndpoint_const    endpoint
 

int GATEndpoint_GetType(GATEndpoint_const endpoint) Return the type of the GATEndpoint

The function GATEndpoint_GetType always returns GATType_GATEndpoint.

Parameters:
object  The object to inspect
Returns:
returns always #GATType_GATEndpoint.

Definition at line 268 of file GATEndpoint.c.

References GAT_UNUSED_PARAMETER, GATEndpoint_const, GATType, and GATType_GATEndpoint.

GATResult GATEndpoint_Clone GATEndpoint_const    endpoint,
GATEndpoint   new_object
 

int GATEndpoint_Clone(GATEndpoint_const endpoint, GATEndpoint *new_endpoint) Clone the given GATEndpoint

The function GATEndpoint_Clone generates a (deep) copy of the given GATEndpoint.

Parameters:
endpoint  The object to clone
new_endpoint  The pointer, through which the result is to be returned.
Returns:
An error type.

Definition at line 286 of file GATEndpoint.c.

References assert, GATEndpointCPI_Instance::context, GATEndpoint_S::cpi, GATEndpoint_S::cpilist, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAILED, GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpoint__vtable, GATEndpoint_CloneString(), GATEndpoint_const, GATEndpoint_Destroy(), GATEndpoint_IMonitorable__vtable, GATEndpoint_ISerialisable__vtable, GATEndpointCPI_CloneInstance(), GATFalse, GATEndpoint_S::GATMonitorable__vtable, GATMonitorable_Impl_Clone(), GATEndpoint_S::GATObject__vtable, GATResult, GATEndpoint_S::GATSerialisable__vtable, GATEndpointCPI_Instance::isdirty, GATEndpointCPI_Instance::monitorable, GATEndpointCPI_Instance::nodename, and GATEndpointCPI_Instance::source.

GATResult GATEndpoint_Equals GATEndpoint_const    lhs,
GATEndpoint_const    rhs,
GATBool   isequal
 

int GATEndpoint_Equals(GATEndpoint_const lhs, GATEndpoint_const rhs, GATBool *isequal) Compares two GATEndpoint objects

The function GATEndpoint_Equals compares two endpoint objects of type #GATEndpoint.

Parameters:
lhs  The first endpoint object to compare
rhs  The second endpoint object to compare
isequal  The pointer to the GATBool variable, which should receive the result if the comparision
Returns:
An error code.

Definition at line 392 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATBool, GATEndpoint_const, GATEndpointCPI_EqualsInstance(), and GATFalse.

GATResult GATEndpoint_GetInterface GATEndpoint_const    endpoint,
GATInterface    iftype,
void const **    ifp
 

int GATEndpoint_GetInterface(GATEndpoint_const endpoint, GATInterface iftype, void const **ifp) Get an interface supported by a GATEndpoint

The function GATEndpoint_GetInterface allows to get a pointer to an additional interface supported by this GATEndpoint.

Parameters:
object  The object to be asked for the new interface.
iftype  The interface the object is to be asked for.
ifp  The pointer, through which the result is to be returned.
Returns:
An error type.

Definition at line 424 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_NO_INTERFACE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpoint_const, GATInterface, GATInterface_IAdvertisable, GATInterface_IMonitorable, and GATInterface_ISerialisable.

GATResult GATEndpoint_Connect GATEndpoint_const    endpoint,
GATPipe   peep
 

When a GATEndpoint is obtained from an Advert Directory, it can be used to create a GATPipe connected to the advertising application, by calling connect on the GATEndpoint instance.

This method takes no parameters. The GATEndpoint can be destroyed at any time without affecting the obtained GATPipe.

Parameters:
endpoint  The GATEndpoint on which to act
peep  A GATPipe connected to the endpoint

Definition at line 468 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpoint_const, GATEndpointCPI_Connect(), and GATResult.

Referenced by main().

GATResult GATEndpoint_Listen GATEndpoint_const    endpoint,
GATPipe   peep
 

The creator of an GATEndpoint can use the GATEndpoint to create GATPipes, which represent incoming connections.

This is done by calling Listen on the GATEndpoint instance. The GATEndpoint can be destroyed at any time without affecting the obtained GATPipe.

Parameters:
endpoint  The GATEndpoint on which to act
peep  A GATPipe connected to the endpoint

Definition at line 489 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpoint_const, GATEndpointCPI_Listen(), and GATResult.

Referenced by main().

GATResult GATEndpoint_AddGATPipeListener GATEndpoint_const    endpoint,
GATPipeListener    peepListener,
void *    listenerData
 

The creator of an GATEndpoint can use the GATEndpoint to create GATPipes, which represent incoming connections.

This is done by calling Listen on the GATEndpoint instance. This call is asynchroneous, and returns immediately. The GATPipe creation is performed on the passed GATPipeListener \object. The GATEndpoint can be destroyed at any time without affecting the obtained GATPipe.

Parameters:
endpoint  The GATEndpoint on which to act
peepListener  GATPipeListener object which handles incoming connections
listenerData  Callback data

Definition at line 515 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpoint_const, GATEndpointCPI_AddGATPipeListener(), and GATPipeListener.

GATResult GATEndpoint_AddMetricListener GATEndpoint    endpoint,
GATMetricListener    listener,
void *    listener_data,
GATMetric    metric,
GATuint32   cookie
 

GATEndpoint_AddMetricListener.

The function GATEndpoint_AddMetricListener adds the passed instance of a GATMetricListener to the list of GATMetricListeners which are notified of fired GATMetricEvents of the type described by the provided GATMetric instance.

Parameters:
endpoint  The GATEndpoint instance to add the GATMetricListener to.
listener  The GTAMetricListener to call, when the corresponding GATMetricEvent is fired.
listener_data  The client supplied data, which will be passed through to the GATMetricListener.
metric  The GATMetric instance describing the GATMetricEvent to pass to the GATMetricListener.
cookie  The returned value should be used to remove the GATMetricListener from this GATMonitorable.
Returns:
An error code.

Definition at line 550 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_NO_INTERFACE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATMetric, GATMetricListener, GATMonitorable_Impl_AddMetricListener(), GATuint32, and GATEndpointCPI_Instance::monitorable.

GATResult GATEndpoint_RegisterPolling GATEndpoint    endpoint,
GATMetric    metric,
GATMetricEvent   event,
GATuint32   cookie
 

GATEndpoint_RegisterPolling.

The function GATEndpoint_RegisterPolling registers a continuous metric with the given GATEndpoint instance.

Parameters:
endpoint  The GATEndpoint instance to register the metric with.
metric  The GATMetric instance describing the GATMetricEvent to pass to the GATMetricListener. This metric instance must be of type GATMeasurementType_Continuous, otherwise an error is returned.
event  The pointer to a variable, which should receive the resulting GATMetricEvent. The GATMetricEvent instance should be freed by the caller when it isn't used anymore.
cookie  The returned value should be used to remove the GATMetricListener from this GATEndpoint.
Returns:
An error code.

Definition at line 591 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::cpi, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAILED, GAT_INVALID_HANDLE, GAT_NO_INTERFACE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpointCPI_GetMetricEvent(), GATMetric, GATMonitorable_Impl_RegisterPolling(), GATMonitorable_Impl_RemoveRegisteredMetric(), GATuint32, and GATEndpointCPI_Instance::monitorable.

GATResult GATEndpoint_RemoveRegisteredMetric GATEndpoint    endpoint,
GATMetric    metric,
GATuint32    cookie
 

GATEndpoint_RemoveRegisteredMetric.

The function GATEndpoint_RemoveRegisteredMetric removes a GATMetricListener, which was previously registered with GATEndpoint_AddMetricListener.

Parameters:
endpoint  The GATEndpoint instance to remove the GATMetricListener from.
metric  The GATMetric instance describing the GATMetricEvent to pass to the GATMetricListener.
cookie  This value identifies the GATMetricListener to remove, it was returned from the corresponding GATMonitorable_AddMetricListener or GATMonitorable_MetricRegisterPolling functions.
Returns:
An error code.

Definition at line 639 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_NO_INTERFACE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATMetric, GATMonitorable_Impl_RemoveRegisteredMetric(), GATResult, GATuint32, and GATEndpointCPI_Instance::monitorable.

GATResult GATEndpoint_GetMetrics GATEndpoint_const    endpoint,
GATList_GATMetric *    metrics
 

GATEndpoint_GetMetrics.

The function GATEndpoint_GetMetrics returns a list of metrics supported by this GATEndpoint.

Parameters:
endpoint  The GATEndpoint instance, for which the supported metrics should be returned.
metrics  The pointer to the variable, which receives the resulting list of metrics.
Returns:
An error code.

Definition at line 675 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_NO_INTERFACE, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATEndpoint_const, and GATMonitorable_Impl_GetMetrics().

GATResult GATEndpointCPI_SerialiseCallback GATObject    object,
GATObject    stream,
GATBool    clear_dirty
[static]
 

GATEndpointCPI_SerialiseCallback.

The function GATEndpointCPI_SerialiseCallback is used as a callback function for the serialisation of a GATEndpoint object. It should be provided to serialise the associated CPI provider data for the given object.

Parameters:
object  The object to serialise. This is the same as the object passed as the first parameter to the function GATXds_SerialiseObject.
stream  The stream interface to use for the serialisation.
clear_dirty  If the clear_dirty parameter is set to GATTrue, the internal dirty flag of this object is to be reset (no used here)
Returns:
An error code.
Remarks:
This function is called from the GAT engine, there is no need to call it directly.

Definition at line 718 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::cpi, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_USES_STATUS, GATBool, GATEndpointCPI_Serialise(), GATFalse, GATTrue, and GATEndpointCPI_Instance::isdirty.

Referenced by GATEndpoint_Serialise().

GATResult GATEndpoint_Serialise GATEndpoint    endpoint,
GATObject    stream,
GATBool    clear_dirty
 

int GATEndpoint_Serialise(GATEndpoint endpoint, GATObject stream, GATBool clear_dirty) Serialise a GATEndpoint object

The function GATEndpoint_Serialise serialises the given GATFIle object into the given stream.

Parameters:
endpoint  The GATEndpoint object to serialise.
stream  The stream interface to use for the serialisation.
clear_dirty  If the clear_dirty parameter is set to GATTrue, the internal dirty flag of this object is to be reset (no used here)
Returns:
An error code.

Definition at line 753 of file GATEndpoint.c.

References GATEndpointCPI_Instance::context, GATEndpoint_S::data, GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATBool, GATENDPOINT_VERSION1, GATEndpointCPI_SerialiseCallback(), GATXds_SerialiseObject(), and GATEndpointCPI_Instance::nodename.

GATBool GATEndpointCPI_VersionCallback GATuint32    version [static]
 

GATEndpointCPI_VersionCallback.

The function GATEndpointCPI_VersionCallback is used as a callback function during the de-serialisation of a GATEndpoint. It should be provided to test, whether the de-serialised version matches the expected version.

Parameters:
version  The version number, which was de-serialised from the stream.
Returns:
This function should return GATTrue, if the version matches the expected value (version is valid), GATFalse otherwise.
Remarks:
This function is called from the GAT engine, there is no need to call it directly.

Definition at line 784 of file GATEndpoint.c.

References GATBool, GATENDPOINT_LASTVERSION, GATENDPOINT_MINOR_MASK, GATFalse, GATTrue, and GATuint32.

Referenced by GATEndpoint_DeSerialise().

GATResult GATEndpointCPI_DeSerialiseCallback GATContext    context,
GATObject    stream,
GATObject   object,
GATuint32    version,
va_list    args
[static]
 

GATEndpointCPI_DeSerialiseCallback.

The function GATEndpointCPI_DeSerialiseCallback is used as a callback function during the de-serialisation of a GATEndpoint. It should be provided for the instantiation of the new GATEndpoint object based on the already de-serialised data items and the de-serialisation of the associated CPI provider data for the given object.

Parameters:
context  The GAT context to be used for object construction.
stream  The stream interface to use for the serialisation.
object  The pointer to the variable, which should receive the newly constructed object.
version  The version of the saved data read from the input stream.
args  This parameter is the pointer to the va_list containing pointers to the already de-serialised data items accordingly to the format string, provided during the call to the GATEndpoint_DeSerialise function.
Returns:
An error code.
Remarks:
This function is called from the GAT engine, there is no need to call it directly.

Definition at line 818 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_CREATE_STATUS_IF, GAT_CURRENT_STATUS, GAT_INVALID_PARAMETER, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_UNUSED_PARAMETER, GAT_USES_STATUS, GATEndpoint_DeSerialise_Create(), GATEndpoint_Destroy(), GATuint32, and POSIX_TO_GAT.

Referenced by GATEndpoint_DeSerialise().

GATEndpoint GATEndpoint_DeSerialise GATContext    context,
GATObject    stream,
GATResult   result
 

GATEndpoint GATEndpoint_DeSerialise(GATContext context, GATObject stream, GATBool clear_dirty) De-serialise a GATEndpoint object.

The function GATEndpoint_DeSerialise de-serialises a streamed GATEndpoint object from the given stream It constructs a new instance of the de-serialised object.

Parameters:
context  The GAT context to be used for object construction.
stream  The stream interface to use for the serialisation.
result  The pointer to a variable, which receives the status code of the operation.
Returns:
The newly constructed GATEndpoint object.

Definition at line 868 of file GATEndpoint.c.

References GAT_BAD_OBJECT_CONVERSION, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAILED, GAT_STORE_STATUS, GAT_USES_STATUS, GATEndpointCPI_DeSerialiseCallback(), GATEndpointCPI_VersionCallback(), GATObject_Destroy(), GATResult, GATuint32, and GATXds_DeSerialiseObject().

GATResult GATEndpoint_GetIsDirty GATEndpoint_const    endpoint,
GATBool   isdirty
 

GATEndpoint_GetIsDirty.

The function GATEndpoint_GetIsDirty retrieves the status of the dirty flag of this GATEndpoint object.

Parameters:
endpoint  The GATEndpoint object to inspect for its dirty status.
isdirty  The pointer to a variable, which receives the dirty status.
Returns:
An error code.

Definition at line 918 of file GATEndpoint.c.

References GAT_CREATE_STATUS, GAT_INVALID_HANDLE, GAT_INVALID_PARAMETER, GAT_RETURN_STATUS, GAT_STATUS_APIENTRY, GATBool, GATEndpoint_const, and GATResult.


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/src/GATEndpoint.c,v 1.22 2004/05/10 15:17:32 hartmutkaiser Exp $" [static]
 

Definition at line 19 of file GATEndpoint.c.

GATEndpoint_vtable GATEndpoint__vtable [static]
 

Initial value:

 {
  GATEndpoint_GetType,
  GATEndpoint_Destroy,
  GATEndpoint_Equals,
  GATEndpoint_Clone,
  GATEndpoint_GetInterface,
  GATEndpoint_GetCPIInstanceData
}

Definition at line 79 of file GATEndpoint.c.

Referenced by GATEndpoint_Clone(), GATEndpoint_Create(), and GATEndpoint_DeSerialise_Create().

GATEndpoint_ISerialisable_vtable GATEndpoint_ISerialisable__vtable [static]
 

Initial value:

 {
  GATEndpoint_Serialise,
  GATEndpoint_DeSerialise,
  GATEndpoint_GetIsDirty
}

Definition at line 88 of file GATEndpoint.c.

Referenced by GATEndpoint_Clone(), GATEndpoint_Create(), GATEndpoint_DeSerialise_Create(), and GATEndpoint_Register_GATSerialisable().

GATEndpoint_IMonitorable_vtable GATEndpoint_IMonitorable__vtable [static]
 

Initial value:

 {
  GATEndpoint_AddMetricListener,
  GATEndpoint_RegisterPolling,
  GATEndpoint_RemoveRegisteredMetric,
  GATEndpoint_GetMetrics
}

Definition at line 94 of file GATEndpoint.c.

Referenced by GATEndpoint_Clone(), GATEndpoint_Create(), and GATEndpoint_DeSerialise_Create().