GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

reservation.c File Reference

Source file for the sample Reservation CPI provider. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GATCPI.h"
#include "GATUtil.h"

Include dependency graph for reservation.c:

Include dependency graph

Go to the source code of this file.

Functions

void resourcebroker_adaptor_GATReservationCPI_Destroy (void *data)
GATResult resourcebroker_adaptor_GATReservationCPI_ServiceActions (void *data, GATReservationCPI_Instance *instance_data, GATTimePeriod_const timeout)
 resourcebroker_adaptor_GATReservationCPI_ServiceActions

GATResult resourcebroker_adaptor_GATReservationCPI_CreateInstance (void *data, GATReservationCPI_Instance *instance_data)
 resourcebroker_adaptor_GATReservationCPI_CreateInstance Create a new CPI object instance.

void resourcebroker_adaptor_GATReservationCPI_DestroyInstance (void *data, GATReservationCPI_Instance *instance_data)
 resourcebroker_adaptor_GATReservationCPI_DestroyInstance Destroy a CPI object instance.

GATResult resourcebroker_adaptor_GATReservationCPI_CloneInstance (void *data, GATReservationCPI_Instance const *instance_data, GATReservationCPI_Instance *new_instance_data)
 resourcebroker_adaptor_GATReservationCPI_CloneInstance Clone a CPI object instance.

GATResult resourcebroker_adaptor_GATReservationCPI_EqualsInstance (void *data, GATReservationCPI_Instance const *lhs, GATReservationCPI_Instance const *rhs, GATBool *isequal)
 resourcebroker_adaptor_GATReservationCPI_EqualsInstance Clone a CPI object instance.

GATResult resourcebroker_adaptor_ReservationCPI_Cancel (void *data, GATReservationCPI_Instance *instance_data)
GATResult resourcebroker_adaptor_ReservationCPI_GetResource (void *data, GATReservationCPI_Instance const *instance_data, GATResource_const *resource)
GATResult resourcebroker_adaptor_Register_GATReservationCPI (GATContext error_context, GATRegistry registry, GATTable_const system_config, GATTable_const instance_config, void *token)

Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/reservation.c,v 1.7 2004/04/26 15:45:00 hartmutkaiser Exp $"


Detailed Description

Source file for the sample Reservation CPI provider.

Date:
Thu Oct 23 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/reservation.c,v 1.7 2004/04/26 15:45:00 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 reservation.c.


Function Documentation

void resourcebroker_adaptor_GATReservationCPI_Destroy void *    data [static]
 

Definition at line 143 of file reservation.c.

References data.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_GATReservationCPI_ServiceActions void *    data,
GATReservationCPI_Instance   instance_data,
GATTimePeriod_const    timeout
[static]
 

resourcebroker_adaptor_GATReservationCPI_ServiceActions

The function resourcebroker_adaptor_GATReservationCPI_ServiceActions is called, whenever the client calls GATContext_ServiceActions. This function is called for every created object. This function should be used to update all instance specific data, which may have been changed asynchronously or to fire pending events.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of this CPI object
timeout  This may be a 0 timeout to indicate no timeout at all, or a specific time length.
Returns:
An error code.

Definition at line 167 of file reservation.c.

References data, GAT_NOTIMPL, and GATTimePeriod_const.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_GATReservationCPI_CreateInstance void *    data,
GATReservationCPI_Instance   new_instance_data
 

resourcebroker_adaptor_GATReservationCPI_CreateInstance Create a new CPI object instance.

Adaptor implementation of create instance capability.

Parameters:
data  Adaptor-provided data object.
context  The GATContext for this CPI instance
target  The location of the file in question.
new_instance_data  The pointer to the variable, where the instance data of this CPI object is to be returned to.
Returns:
An error code.

Definition at line 186 of file reservation.c.

References data, GAT_INVALID_PARAMETER, GAT_SUCCESS, GATResult, and GATReservationCPI_Instance::instance_data.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

void resourcebroker_adaptor_GATReservationCPI_DestroyInstance void *    data,
GATReservationCPI_Instance   instance_data
 

resourcebroker_adaptor_GATReservationCPI_DestroyInstance Destroy a CPI object instance.

Adaptor implementation of destroy instance capability.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of the CPI object to destroy.

Definition at line 206 of file reservation.c.

References assert, data, and GATReservationCPI_Instance::instance_data.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_GATReservationCPI_CloneInstance void *    data,
GATReservationCPI_Instance const *    instance_data,
GATReservationCPI_Instance   new_instance_data
 

resourcebroker_adaptor_GATReservationCPI_CloneInstance Clone a CPI object instance.

Adaptor implementation of the clone instance capability.

Parameters:
data  Adaptor-provided data object.
instance_data  The instance data of this CPI object
new_instance_data  The pointer to the variable, where the instance data of the cloned CPI object is to be returned to.
Returns:
An error code.

Definition at line 224 of file reservation.c.

References data, GAT_SUCCESS, and GATReservationCPI_Instance::instance_data.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_GATReservationCPI_EqualsInstance void *    data,
GATReservationCPI_Instance const *    lhs,
GATReservationCPI_Instance const *    rhs,
GATBool   isequal
 

resourcebroker_adaptor_GATReservationCPI_EqualsInstance Clone a CPI object instance.

Adaptor implementation of the clone instance capability.

Parameters:
data  Adaptor-provided data object.
lhs  The instance data of the left CPI object.
lhs  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 248 of file reservation.c.

References data, GAT_INVALID_PARAMETER, GAT_SUCCESS, GATBool, GATResult, and GATTrue.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_ReservationCPI_Cancel void *    data,
GATReservationCPI_Instance   instance_data
[static]
 

Definition at line 265 of file reservation.c.

References data, GAT_NOTIMPL, and GATResult.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_ReservationCPI_GetResource void *    data,
GATReservationCPI_Instance const *    instance_data,
GATResource_const   resource
[static]
 

Definition at line 273 of file reservation.c.

References data, GAT_NOTIMPL, GATResource_const, and GATResult.

Referenced by resourcebroker_adaptor_Register_GATReservationCPI().

GATResult resourcebroker_adaptor_Register_GATReservationCPI GATContext    error_context,
GATRegistry    registry,
GATTable_const    system_config,
GATTable_const    instance_config,
void *    token
 

Definition at line 71 of file reservation.c.

References GATReservationCPI_Data::cancel, GATReservationCPI_Data::clone_instance, cpi, GATReservationCPI_Data::create_instance, GATReservationCPI_Data::data, GATReservationCPI_Data::destroy, GATReservationCPI_Data::destroy_instance, GATReservationCPI_Data::equals_instance, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAILED, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATPreferences_Add(), GATPreferences_Create(), GATPreferences_Destroy(), GATReservationCPI_Create(), GATReservationCPI_Destroy(), GATRESERVATIONCPI_VERSION, GATResult, GATTable_const, GATReservationCPI_Data::get_resource, resourcebroker_adaptor_GATReservationCPI_CloneInstance(), resourcebroker_adaptor_GATReservationCPI_CreateInstance(), resourcebroker_adaptor_GATReservationCPI_Destroy(), resourcebroker_adaptor_GATReservationCPI_DestroyInstance(), resourcebroker_adaptor_GATReservationCPI_EqualsInstance(), resourcebroker_adaptor_GATReservationCPI_ServiceActions(), resourcebroker_adaptor_ReservationCPI_Cancel(), resourcebroker_adaptor_ReservationCPI_GetResource(), GATReservationCPI_Data::service_actions, and token.

Referenced by resourcebroker_adaptor_register().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/reservation.c,v 1.7 2004/04/26 15:45:00 hartmutkaiser Exp $" [static]
 

Definition at line 17 of file reservation.c.