Main Page | Modules

Parameter
[NEES NTCP Types]

Functions


Detailed Description

This section describes the functions which may be executed to access the values of a NTCP parameter. Parameters are used to express experimental parameters as name-value pairs.

Function Documentation

int nees_ntcp_parameter_init nees_ntcp_parameter_t parameter  ) 
 

Construct a new parameter.

Parameters:
parameter A pointer to a nees_ntcp_parameter_t. This function will allocated a new parameter and modify the value pointed to by this to point to the new parameter. The plugin must destroy this parameter when no longer needed by calling nees_ntcp_parameter_destroy().
Returns:
This function returns 0 if the parameter was allocated successfully; it returns a non-zero value otherwise.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter was successfully initialized.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to initialize the parameter.

int nees_ntcp_parameter_copy const nees_ntcp_parameter_t  original,
nees_ntcp_parameter_t copy
 

Copy a parameter.

Parameters:
original The original parameter to copy.
copy A pointer to a nees_ntcp_parameter_t. This function will allocated a new parameter and modify the value pointed to by this to point to the new parameter. The name and value of the copy will match that of the original parameter. The plugin must destroy this parameter when no longer needed by calling nees_ntcp_parameter_destroy().
Returns:
This function returns 0 if the arguments to this function are valid and the parameter was copied successfully; it returns a non-zero value otherwise.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter was successfully copied.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to copy the parameter into copy.

int nees_ntcp_parameter_destroy nees_ntcp_parameter_t  parameter  ) 
 

Destroy a parameter.

Parameters:
parameter The parameter to destroy. After this function returns, the plugin must no longer access this parameter. A plugin should only pass parameters to this function which it had created by calling nees_ntcp_parameter_init() or nees_ntcp_parameter_copy().
Returns:
This function returns 0 if the arguments to this function are valid and the parameter was destroyed successfully; it returns a non-zero value otherwise.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter was successfully destroyed.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER The parameter passed to this function was NULL.

int nees_ntcp_parameter_get_name const nees_ntcp_parameter_t  parameter,
char **  return_name
 

Get a parameter's name.

Parameters:
parameter The parameter to query.
return_name A pointer to a char *. This function will modify the value of this to point to a newly allocated string containing the parameter name. The plugin is responsible for freeing this parameter by calling free() on this value.
Returns:
This function returns 0 if the arguments to it are valid and the parameter has a name; it returns a non-zero value otherwise. When an error value is returned, the value pointed to by return_name is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter name was successfully copied.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to copy the parameter's name into return_name.

int nees_ntcp_parameter_get_value const nees_ntcp_parameter_t  parameter,
char **  return_value
 

Get a parameter's value.

Parameters:
parameter The parameter to query.
return_value A pointer to a char *. This function will modify the value of this to point to a newly allocated string containing the parameter value. The plugin is responsible for freeing this parameter by calling free() on this value.
Returns:
This function returns 0 if the arguments to it are valid and the parameter has a value; it returns a non-zero value otherwise. When an error value is returned, the value pointed to by return_value is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter value was successfully copied.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to copy the parameter's value into return_value.

int nees_ntcp_parameter_set_name nees_ntcp_parameter_t  parameter,
const char *  name
 

Set a parameter's name.

Parameters:
parameter The parameter to query.
name The new value of the name. This name string will be copied into the parameter structure. The plugin is responsible for any deallocation needed for the value it passes to this function.
Returns:
This function returns 0 if the arguments to it are valid and the parameter name is modified; it returns a non-zero value otherwise.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter's name was successfully set.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to set the parameter's name.

int nees_ntcp_parameter_set_value nees_ntcp_parameter_t  parameter,
const char *  value
 

Set a parameter's value.

Parameters:
parameter The parameter to query.
value The new value of the parameter. This value string will be copied into the parameter structure. The plugin is responsible for any deallocation needed for the value it passes to this function.
Returns:
This function returns 0 if the arguments to it are valid and the parameter value is modified; it returns a non-zero value otherwise.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The parameter's value was successfully set.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to set the parameter's value.


about globus | grid research | globus toolkit | software development

Comments? webmaster@globus.org