C Configuration Space and Tuning Library (CCS)
Loading...
Searching...
No Matches
Functions
configuration.h File Reference

A configuration is a binding (see binding.h) on a configuration space (see configuration_space.h). More...

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

Go to the source code of this file.

Functions

ccs_result_t ccs_create_configuration (ccs_configuration_space_t configuration_space, ccs_features_t features, size_t num_values, ccs_datum_t *values, ccs_configuration_t *configuration_ret)
 Create a new instance of a configuration on a given configuration space.
 
ccs_result_t ccs_configuration_get_configuration_space (ccs_configuration_t configuration, ccs_configuration_space_t *configuration_space_ret)
 Get the associated configuration space.
 
ccs_result_t ccs_configuration_get_features (ccs_configuration_t configuration, ccs_features_t *features_ret)
 Get the associated features.
 

Detailed Description

A configuration is a binding (see binding.h) on a configuration space (see configuration_space.h).

Configurations are immutable except from a reference counting and callback management point of view.

Function Documentation

◆ ccs_configuration_get_configuration_space()

ccs_result_t ccs_configuration_get_configuration_space ( ccs_configuration_t  configuration,
ccs_configuration_space_t configuration_space_ret 
)
extern

Get the associated configuration space.

Parameters
[in]configuration
[out]configuration_space_reta pointer to the variable that will contain the configuration space
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if configuration is not a valid CCS configuration
CCS_RESULT_ERROR_INVALID_VALUE if configuration_ret is NULL
Remarks
This function is thread-safe

◆ ccs_configuration_get_features()

ccs_result_t ccs_configuration_get_features ( ccs_configuration_t  configuration,
ccs_features_t features_ret 
)
extern

Get the associated features.

Parameters
[in]configuration
[out]features_reta pointer to the variable that will contain the returned features or NULL if none is associated to the configuration.
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if configuration is not a valid CCS configuration
CCS_RESULT_ERROR_INVALID_VALUE if features_ret is NULL
Remarks
This function is thread-safe

◆ ccs_create_configuration()

ccs_result_t ccs_create_configuration ( ccs_configuration_space_t  configuration_space,
ccs_features_t  features,
size_t  num_values,
ccs_datum_t values,
ccs_configuration_t configuration_ret 
)
extern

Create a new instance of a configuration on a given configuration space.

If no values are provided the values will be initialized to CCS_DATA_TYPE_NONE.

Parameters
[in]configuration_space
[in]featuresan optional features to use. If NULL and a feature space was provided at configuration_space creation, the default features of the feature space will be used.
[in]num_valuesthe number of provided values to initialize the configuration
[in]valuesan optional array of values to initialize the configuration
[out]configuration_reta pointer to the variable that will hold the newly created configuration
Returns
CCS_RESULT_SUCCESS on success
CCS_RESULT_ERROR_INVALID_OBJECT if configuration_space is not a valid CCS configuration space; or if features is not NULL and is not a valid CCS features
CCS_RESULT_ERROR_INVALID_FEATURES if features feature space is not the same as the feature space provided at configuration_space creation.
CCS_RESULT_ERROR_INVALID_VALUE if configuration_ret is NULL; or if values is NULL and num_values is greater than 0; or if the number of values provided is not equal to the number of parameters in the configuration space
CCS_RESULT_ERROR_OUT_OF_MEMORY if there was a lack of memory to allocate the new configuration
Remarks
This function is thread-safe