Main Page | Modules

Control Point
[NEES NTCP Types]

Functions


Detailed Description

This section describes the functions which may be executed to access the values of a NTCP control point. Control points are used to name a set of force, movement, displacement, and rotations along an axis.

Function Documentation

int nees_ntcp_control_point_init nees_ntcp_control_point_t control_point  ) 
 

Construct a new control point.

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

int nees_ntcp_control_point_copy const nees_ntcp_control_point_t  original,
nees_ntcp_control_point_t copy
 

Copy a control_point.

Parameters:
original The original control_point to copy.
copy A pointer to a nees_ntcp_control_point_t. This function will allocated a new control_point and modify the value pointed to by this to point to the new control point. The name and geometry parameters associated with this control point will be modified to match that of the original control point. The plugin must destroy this control_point when no longer needed by calling nees_ntcp_control_point_destroy().
Returns:
This function returns 0 if the arguments to this function are valid and the control point was copied successfully; otherwise, it returns a non-zero value and the value of copy is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The control point was successfully copied to copy.
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 control point.

int nees_ntcp_control_point_destroy nees_ntcp_control_point_t  control_point  ) 
 

Destroy a control point.

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

int nees_ntcp_control_point_array_alloc size_t  array_size,
nees_ntcp_control_point_t **  control_points
 

Alocate an array of control points.

Parameters:
array_size The number of control points to be allocated in the control_points array.
control_points A pointer to an array of control_points. This function will modify the value pointed to by this pointer to a newly allocated array of length array_size control points. Each control point in the array will be initialized. The plugin is responsible for freeing this array by calling nees_ntcp_control_point_array_free(). The
Returns:
This function returns 0 if the arguments to this function are valid and control_points array could be allocated successfully; otherwise it returns a non-zero value and the value of control_points is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The control point array was successfully allocated.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters passed to this function was NULL.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to allocate the control point array.

int nees_ntcp_control_point_array_free nees_ntcp_control_point_t control_points,
size_t  array_size
 

Free an array of control points.

Parameters:
control_points A pointer to an array of control points to free. This function will free each individual control point in this array as well as the memory associated with the array.
array_size The size of the control_points array.
Returns:
This function returns 0 if the arguments to this function are valid and it is able to free the control point array; it returns a non-zero value otherwise.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The control point array was successfully freed.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER The control_points array passed to this function was NULL.

int nees_ntcp_control_point_get_name const nees_ntcp_control_point_t  control_point,
char **  result_name
 

Get the name of a control point.

Parameters:
control_point A control point to query.
result_name A pointer to a char *. This function will modify the value pointed to by this to point to a copy of the name of the control point. The plugin is responsible for freeing this name by calling free() on the value.
Returns:
This function returns 0 if the arguments to this function are valid and it is able to return a copy of the control point's name; it returns a non-zero value otherwise, and the value pointed to by result_name is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The control point name was successfully copied into result_name.
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 control points's name into return_name.

int nees_ntcp_control_point_get_geometry_parameter_count const nees_ntcp_control_point_t  control_point,
size_t *  result_count
 

Get the number of number of geometry parameters associated with a control point.

Parameters:
control_point The control point to query.
result_count A pointer to a size_t. The value pointed to by this will be modified to contain the number of geometry parameters associated with this control point.
Returns:
This function returns 0 if the arguments to this function are valid and it is able to return the count of geometry parameters associated with a control point; it returns a non-zero value otherwise, and the value pointed to by result_count is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The control point parameter count was successfully copied into result_count.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null.

int nees_ntcp_control_point_get_geometry_parameter const nees_ntcp_control_point_t  control_point,
size_t  i,
nees_ntcp_geom_parameter_t result_geom_parameter
 

Get one geometry parameter associated with a control point.

Parameters:
control_point The control point to query.
i The index of the geometry parameter to retrieve.
result_geom_parameter A pointer to a nees_ntcp_geom_parameter_t. This function will modify the value pointed to by this to point to a copy of the geometry parameter in the slot indicated by the i parameter. The plugin must free this geometry parameter by calling nees_ntcp_control_point_geom_parameter_free() when done accessing this parameter.
Returns:
This function returns 0 if the arguments to it are valid and it is able to generate a copy of the geometry parameter; otherwise, it returns a non-zero value and the value pointed to by result_geom_parameter is undefined.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The geometry parameter was successfully copied into result_geom_parameter.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null or i is outside the acceptable range of geometry parameters for this control point.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to copy the geometry parameter value into return_geom_parameter.

int nees_ntcp_control_point_set_name nees_ntcp_control_point_t  control_point,
const char *  name
 

Set the name of a control point.

Parameters:
control_point The control point to modify.
name The new value of the control point's name. This name string will be copied into the control point 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 it is able to set the name of the control point; otherwise, it returns a non-zero value and the control_point is unmodified..
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The name of the control point was set successfully.
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 name into control point.

int nees_ntcp_control_point_set_geometry_parameter nees_ntcp_control_point_t  control_point,
size_t  i,
const nees_ntcp_geom_parameter_t  geom_parameter
 

Set the value of one geometry parameter in a control point.

Parameters:
control_point The control point to modify.
i The index of the geometry parameter to set. Valid values are in the range 0 to 11, inclusive.
geom_parameter The new value of the geometry parameter. The value of this parameter will be copied into the ith parameter in the control point. The caller is responsable for freeing geom_parameter after this function returns.
Returns:
This function returns 0 if the arguments to it are valid and it is able to set the indicated parameter; otherwise, it returns a non-zero value and the control_point is unmodified.
Return values:
NEES_NTCP_CONTROL_PLUGIN_OK The ith geometry parameter of the control point was set successfully.
NEES_NTCP_CONTROL_PLUGIN_INVALID_PARAMETER One of the parameters to this function was null or i is outside the acceptable range of geometry parameters for this control point.
NEES_NTCP_CONTROL_PLUGIN_OUT_OF_MEMORY There is not enough free memory to copy the geometry parameter into control point.


about globus | grid research | globus toolkit | software development

Comments? webmaster@globus.org