Main Page Alphabetical List Compound List File List Compound Members File Members
resource.c File ReferenceSource file for the GATResourceCPI provider class for the resourcebroker adaptor.
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "GATCPI.h"
#include "GATResourceCPIInstanceData.h"
Include dependency graph for resource.c:
Go to the source code of this file.
|
Functions |
| void | resourcebroker_adaptor_GATResourceCPI_Destroy (void *data) |
| GATResult | resourcebroker_adaptor_GATResourceCPI_ServiceActions (void *data, GATResourceCPI_Instance *instance_data, GATTimePeriod_const timeout) |
| | resourcebroker_adaptor_GATResourceCPI_ServiceActions
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_CreateInstance (void *data, GATResourceCPI_Instance *instance_data, void *initialisation_data) |
| | resourcebroker_adaptor_GATResourceCPI_CreateInstance Create a new CPI object instance.
|
| void | resourcebroker_adaptor_GATResourceCPI_DestroyInstance (void *data, GATResourceCPI_Instance *instance_data) |
| | resourcebroker_adaptor_GATResourceCPI_DestroyInstance Destroy a CPI object instance.
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_CloneInstance (void *data, GATResourceCPI_Instance const *instance_data, GATResourceCPI_Instance *new_instance_data) |
| | resourcebroker_adaptor_GATResourceCPI_CloneInstance Clone a CPI object instance.
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_EqualsInstance (void *data, GATResourceCPI_Instance const *lhs, GATResourceCPI_Instance const *rhs, GATBool *isequal) |
| | resourcebroker_adaptor_GATResourceCPI_EqualsInstance Clone a CPI object instance.
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_GetMetrics (void *data, GATResourceCPI_Instance const *instance_data, GATList_GATMetric *metrics) |
| | resourcebroker_adaptor_GATResourceCPI_GetMetrics
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_GetMetricEvent (void *data, GATResourceCPI_Instance const *instance_data, GATMetric metric, GATMetricEvent *event) |
| | resourcebroker_adaptor_GATResourceCPI_GetMetricEvent
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_Serialise (void *data, GATResourceCPI_Instance const *instance_data, GATObject stream, GATBool clear_dirty) |
| | resourcebroker_adaptor_GATResourceCPI_Serialise
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_DeSerialise (void *data, GATObject stream, GATResourceCPI_Instance *instance_data) |
| | resourcebroker_adaptor_GATResourceCPI_DeSerialise
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_GetResourceDescription (void *data, GATResourceCPI_Instance const *instance_data, GATResourceDescription_const *description) |
| | resourcebroker_adaptor_GATResourceCPI_GetResourceDescription
|
| GATResult | resourcebroker_adaptor_GATResourceCPI_GetReservation (void *data, GATResourceCPI_Instance const *instance_data, GATReservation_const *reservation) |
| GATResult | resourcebroker_adaptor_Register_GATResourceCPI (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/resource.c,v 1.11 2004/04/27 11:34:50 hartmutkaiser Exp $" |
Detailed Description
Source file for the GATResourceCPI provider class for the resourcebroker adaptor.
TODO: Fill in the description of the new CPI provider here
- Date:
-
Wed Nov 19 2003
- Version:
-
- Header:
-
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/adaptors/resourcebroker/resource.c,v 1.11 2004/04/27 11:34:50 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 resource.c.
Function Documentation
| void resourcebroker_adaptor_GATResourceCPI_Destroy |
( |
void * |
data |
) |
[static] |
|
|
|
resourcebroker_adaptor_GATResourceCPI_ServiceActions
The function resourcebroker_adaptor_GATResourceCPI_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 203 of file resource.c.
References data, GAT_NOTIMPL, and GATTimePeriod_const.
Referenced by resourcebroker_adaptor_Register_GATResourceCPI(). |
| GATResult resourcebroker_adaptor_GATResourceCPI_CreateInstance |
( |
void * |
data, |
|
|
GATResourceCPI_Instance * |
new_instance_data, |
|
|
void * |
initialisation_data |
|
) |
[static] |
|
| void resourcebroker_adaptor_GATResourceCPI_DestroyInstance |
( |
void * |
data, |
|
|
GATResourceCPI_Instance * |
instance_data |
|
) |
[static] |
|
|
|
resourcebroker_adaptor_GATResourceCPI_GetMetrics
The function resourcebroker_adaptor_GATResourceCPI_GetMetrics should return a list of GATMetric objects supported by this adaptor. I.e. the adaptor is capable to fire GATMetricEvents for the returned metrics. This list should include all the supported metrics, event like and continuous ones. - Parameters:
-
| data |
Adaptor-provided data object. |
| instance_data |
Instance data for the CPI provider object. |
| metrics |
The pointer to the variable, which receives the returned list of metrics. |
- Returns:
-
An error code.
Definition at line 349 of file resource.c.
References data, GAT_NOTIMPL, and GATResult.
Referenced by resourcebroker_adaptor_Register_GATResourceCPI(). |
|
|
resourcebroker_adaptor_GATResourceCPI_GetMetricEvent
The function resourcebroker_adaptor_GATResourceCPI_GetMetricEvent should return the GATMetricEvent associated with the given continuous metric. This function gets called for continuous metrics only, since returning the metric event object to the caller is th only way for the client to get access to it. - Parameters:
-
| data |
Adaptor-provided data object. |
| instance_data |
Instance data for the CPI provider object. |
| metric |
The metric instance describing the metric event to return. This metric should be equivalent to one of the metrics returned by our own GetMetrics CPI function (see above). If this is another (not known to us metric), an error should be returned. |
| event |
The pointer to the variable, which receives the metric event to return. |
- Returns:
-
An error code.
Definition at line 377 of file resource.c.
References data, GAT_NOTIMPL, GATMetric, and GATResult.
Referenced by resourcebroker_adaptor_Register_GATResourceCPI(). |
|
|
Definition at line 99 of file resource.c.
References GATResourceCPI_Data::clone_instance, cpi, GATResourceCPI_Data::create_instance, GATResourceCPI_Data::data, GATResourceCPI_Data::deserialise, GATResourceCPI_Data::destroy, GATResourceCPI_Data::destroy_instance, GATResourceCPI_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(), GATResourceCPI_Create(), GATResourceCPI_Destroy(), GATRESOURCECPI_VERSION, GATResult, GATTable_const, GATResourceCPI_Data::get_metric_event, GATResourceCPI_Data::get_metrics, GATResourceCPI_Data::get_reservation, GATResourceCPI_Data::get_resource_description, resourcebroker_adaptor_GATResourceCPI_CloneInstance(), resourcebroker_adaptor_GATResourceCPI_CreateInstance(), resourcebroker_adaptor_GATResourceCPI_DeSerialise(), resourcebroker_adaptor_GATResourceCPI_Destroy(), resourcebroker_adaptor_GATResourceCPI_DestroyInstance(), resourcebroker_adaptor_GATResourceCPI_EqualsInstance(), resourcebroker_adaptor_GATResourceCPI_GetMetricEvent(), resourcebroker_adaptor_GATResourceCPI_GetMetrics(), resourcebroker_adaptor_GATResourceCPI_GetReservation(), resourcebroker_adaptor_GATResourceCPI_GetResourceDescription(), resourcebroker_adaptor_GATResourceCPI_Serialise(), resourcebroker_adaptor_GATResourceCPI_ServiceActions(), GATResourceCPI_Data::serialise, GATResourceCPI_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/resource.c,v 1.11 2004/04/27 11:34:50 hartmutkaiser Exp $" [static]
|
|
|