GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



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

resourcebroker.h File Reference

Header file for the sample ResourceBroker CPI provider. More...

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

Included by dependency graph

Go to the source code of this file.

Defines

#define _RESOURCEBROKER_H_

Functions

GATResult resourcebroker_adaptor_Register_GATResourceBrokerCPI (GATContext error_context, GATRegistry registry, GATTable_const system_config, GATTable_const instance_config, void *token)
GATResult resourcebroker_adaptor_MyPreferences (GATContext context, GATPreferences *prefs)
 resourcebroker_adaptor_MyPreferences

GATResult resourcebroker_adaptor_make_sample_jobid (GATString_const vo_name, GATString *new_job_id)
GATResourceDescription resourcebroker_adaptor_CreateHardwareResourceDescription (void)
GATResult resourcebroker_adaptor_CreateResource (GATContext context, GATResourceDescription rd, GATResource *resource)
 resourcebroker_adaptor_CreateResource


Detailed Description

Header file for the sample ResourceBroker CPI provider.

Date:
Thu Oct 23 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/resourcebroker.h,v 1.4 2004/04/26 12:29:57 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 resourcebroker.h.


Define Documentation

#define _RESOURCEBROKER_H_
 

Definition at line 18 of file resourcebroker.h.


Function Documentation

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

Definition at line 98 of file resourcebroker.c.

References GATResourceBrokerCPI_Data::clone_instance, cpi, GATResourceBrokerCPI_Data::create_instance, GATResourceBrokerCPI_Data::data, GATResourceBrokerCPI_Data::destroy, GATResourceBrokerCPI_Data::destroy_instance, GATResourceBrokerCPI_Data::equals_instance, GATResourceBrokerCPI_Data::find_resources, GAT_CREATE_STATUS, GAT_CURRENT_STATUS, GAT_FAILED, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATPreferences_Add(), GATPreferences_Create(), GATPreferences_Destroy(), GATResourceBrokerCPI_Create(), GATResourceBrokerCPI_Destroy(), GATRESOURCEBROKERCPI_VERSION, GATResult, GATTable_const, GATResourceBrokerCPI_Data::reserve, GATResourceBrokerCPI_Data::reserve_description, resourcebroker_adaptor_GATResourceBrokerCPI_CloneInstance(), resourcebroker_adaptor_GATResourceBrokerCPI_CreateInstance(), resourcebroker_adaptor_GATResourceBrokerCPI_DestroyInstance(), resourcebroker_adaptor_GATResourceBrokerCPI_EqualsInstance(), resourcebroker_adaptor_GATResourceBrokerCPI_ServiceActions(), resourcebroker_adaptor_ResourceBrokerCPI_Destroy(), resourcebroker_adaptor_ResourceBrokerCPI_FindResources(), resourcebroker_adaptor_ResourceBrokerCPI_ReserveResource(), resourcebroker_adaptor_ResourceBrokerCPI_ReserveResource_Description(), resourcebroker_adaptor_ResourceBrokerCPI_SubmitJob(), GATResourceBrokerCPI_Data::service_actions, GATResourceBrokerCPI_Data::submit_job, and token.

Referenced by resourcebroker_adaptor_register().

GATResult resourcebroker_adaptor_MyPreferences GATContext    context,
GATPreferences   prefs
 

resourcebroker_adaptor_MyPreferences

Definition at line 621 of file resourcebroker.c.

References GAT_CREATE_STATUS, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_USES_STATUS, GATPreferences_Add(), and GATPreferences_Create().

Referenced by resourcebroker_adaptor_CreateResource(), resourcebroker_adaptor_GATSelfCPI_CreateRequestForListener(), resourcebroker_adaptor_GATSelfCPI_GetJob(), and resourcebroker_adaptor_SubmitJob().

GATResult resourcebroker_adaptor_make_sample_jobid GATString_const    vo_name,
GATString   new_job_id
 

Definition at line 651 of file resourcebroker.c.

References GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_SUCCEEDED, GATResult, GATString_Concatenate(), GATString_const, GATString_Create(), GATString_Destroy(), and GATuint32.

Referenced by resourcebroker_adaptor_GATSelfCPI_GetJob(), and resourcebroker_adaptor_SubmitJob().

GATResourceDescription resourcebroker_adaptor_CreateHardwareResourceDescription void   
 

Definition at line 712 of file resourcebroker.c.

References assert, GATTable_Add_float(), GATTable_Add_String(), GATTable_Create(), and GATTable_Destroy().

Referenced by resourcebroker_adaptor_GATSelfCPI_create_self_jobdescription(), resourcebroker_adaptor_GATSelfCPI_create_self_resource(), and resourcebroker_adaptor_ResourceBrokerCPI_FindResources().

GATResult resourcebroker_adaptor_CreateResource GATContext    context,
GATResourceDescription    rd,
GATResource   resource
 

resourcebroker_adaptor_CreateResource

The function resourcebroker_adaptor_CreateResource creates a new GATResource for the given resource description (which should match the local hardware).

Parameters:
context  The GATContext to use for creation of the GATResource.
rd  The resource description matching the local hardware.
resource  The pointer to the variable, which receives the resulting GATResource.
Returns:
An error code.

Definition at line 496 of file resourcebroker.c.

References GAT_CREATE_STATUS, GAT_CREATE_STATUS_IF, GAT_CURRENT_STATUS, GAT_INVALID_PARAMETER, GAT_MEMORYFAILURE, GAT_RETURN_STATUS, GAT_SUCCEEDED, GAT_USES_STATUS, GATHardwareResource, GATPreferences_Destroy(), GATResourceCPIInstance_Data_Create(), GATResourceCPIInstance_Data_Destroy(), GATResourceDescription, and resourcebroker_adaptor_MyPreferences().

Referenced by resourcebroker_adaptor_GATSelfCPI_create_self_resource(), and resourcebroker_adaptor_ResourceBrokerCPI_FindResources().