Project Parameters.
More...
|
sb_t_err | sb_par_init (sb_t_par *const par, sb_t_project_type project_type) |
| Initializes the fields of the structure. More...
|
|
sb_t_err | sb_par_add_model (sb_t_par *const par, const char *const model_name) |
| Adds the model to the parameter structure. More...
|
|
sb_t_err | sb_par_remove_model (sb_t_par *const par, const char *const model_name) |
| Removes the model from the structure of the project parameters. More...
|
|
sb_t_err | sb_par_add_level (sb_t_par *const par, const char *const model_name, float scale) |
| Adds the level to the parameter structure. More...
|
|
sb_t_err | sb_par_remove_level (sb_t_par *const par, const char *const model_name, float scale) |
| Removes the l-th level from the structure of the project parameters. More...
|
|
sb_t_err | sb_par_set_collaboration (sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int value) |
| Sets collaboration between two models. More...
|
|
sb_t_err | sb_par_get_collaboration (sb_t_par *par, const char *const model_name_1, const char *const model_name_2, int *const value) |
| Retreives the collaboration between two models. More...
|
|
sb_t_err | sb_par_format (const sb_t_par *const par, char *const str, int str_size) |
| Formats the parameters structure. More...
|
|
const char * | sb_floating_point_precision_type_format (sb_t_floating_point_op_type type) |
| Returns the string of the floating point precision type. More...
|
|
const char * | sb_interpolation_mode_format (sb_t_interpolation_mode mode) |
| Returns the string of the interpolation mode. More...
|
|
const char * | sb_device_type_format (sb_t_device_type type) |
| Returns the string of the device type. More...
|
|
Project Parameters.
◆ sb_device_type_format()
Returns the string of the device type.
Interprets the contents of the type and converts it to a C - string containing a human - readable version of the corresponding device type.
The string must not be freed.
- Parameters
-
- Returns
- A C - string containing the device type in a human - readable format.
◆ sb_floating_point_precision_type_format()
Returns the string of the floating point precision type.
Interprets the contents of the type and converts it to a C - string containing a human - readable version of the corresponding type.
The string must not be freed.
- Parameters
-
[in] | type | Floating point precision type. |
- Returns
- A C - string containing the floating point precision type in a human - readable format.
◆ sb_interpolation_mode_format()
Returns the string of the interpolation mode.
Interprets the contents of the mode and converts it to a C - string containing a human - readable version of the corresponding mode.
The string must not be freed.
- Parameters
-
[in] | mode | Interpolation mode. |
- Returns
- A C - string containing the interpolation mode in a human - readable format.
◆ sb_par_add_level()
sb_t_err sb_par_add_level |
( |
sb_t_par *const |
par, |
|
|
const char *const |
model_name, |
|
|
float |
scale |
|
) |
| |
Adds the level to the parameter structure.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | model_name | Model for which the level shoud be added. If NULL the level is added to all the models |
[in] | scale | Scale of the level to be added. |
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
- See also
- Levels
-
sb_par_remove_level
◆ sb_par_add_model()
Adds the model to the parameter structure.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | model_name | Name of the model to be added. The string must be compliant to UTF-8 format. |
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
- See also
- sb_par_remove_model
◆ sb_par_format()
sb_t_err sb_par_format |
( |
const sb_t_par *const |
par, |
|
|
char *const |
str, |
|
|
int |
str_size |
|
) |
| |
Formats the parameters structure.
Interprets the contents of par and converts it to a C-string containing a human-readable version of the corresponding structure.
- Parameters
-
[in] | par | Pointer to the parameters structure. |
[out] | str | Pointer to the string.
On successful return, this parameter will be filled with a human-readable version of the parameters structure. |
[in] | str_size | Number of bytes of the string str. |
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
◆ sb_par_get_collaboration()
sb_t_err sb_par_get_collaboration |
( |
sb_t_par * |
par, |
|
|
const char *const |
model_name_1, |
|
|
const char *const |
model_name_2, |
|
|
int *const |
value |
|
) |
| |
Retreives the collaboration between two models.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | model_name_1 | Name of the first model. |
[in] | model_name_2 | Name of the second model. |
[in] | value | Value of the collaboration between the two models. |
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
- See also
- sb_t_par::collaborations
-
sb_par_get_collaboration
◆ sb_par_init()
Initializes the fields of the structure.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | project_type | Project type. |
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
◆ sb_par_remove_level()
sb_t_err sb_par_remove_level |
( |
sb_t_par *const |
par, |
|
|
const char *const |
model_name, |
|
|
float |
scale |
|
) |
| |
Removes the l-th level from the structure of the project parameters.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | model_name | Model for which the level shoud be removed. If NULL the level is removed from all the models |
[in] | scale | Scale of the level to be removed.
|
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
- See also
- Levels
-
sb_par_add_level
◆ sb_par_remove_model()
sb_t_err sb_par_remove_model |
( |
sb_t_par *const |
par, |
|
|
const char *const |
model_name |
|
) |
| |
Removes the model from the structure of the project parameters.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | model_name | Name of the model to be removed.
|
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
- See also
- sb_par_add_model
◆ sb_par_set_collaboration()
sb_t_err sb_par_set_collaboration |
( |
sb_t_par * |
par, |
|
|
const char *const |
model_name_1, |
|
|
const char *const |
model_name_2, |
|
|
int |
value |
|
) |
| |
Sets collaboration between two models.
- Parameters
-
[in,out] | par | Pointer to the parameters structure. |
[in] | model_name_1 | Name of the first model. |
[in] | model_name_2 | Name of the second model. |
[in] | value | Value = 1 models are collaborative, value=0 models are not collaborative. |
- Returns
- If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.
- See also
- sb_t_par::collaborations
-
sb_par_get_collaboration