FMI Library: part of JModelica.org
|
Variable lists are provided to handle sets of variables. More...
Functions | |
fmi1_import_variable_list_t * | fmi1_import_alloc_variable_list (fmi1_import_t *fmu, size_t size) |
FMILIB_EXPORT void | fmi1_import_free_variable_list (fmi1_import_variable_list_t *vl) |
Free a variable list. Note that variable lists are allocated dynamically and must be freed when not needed any longer. More... | |
FMILIB_EXPORT fmi1_import_variable_list_t * | fmi1_import_clone_variable_list (fmi1_import_variable_list_t *vl) |
Make a copy of the list. More... | |
FMILIB_EXPORT size_t | fmi1_import_get_variable_list_size (fmi1_import_variable_list_t *vl) |
Get number of variables in a list. More... | |
FMILIB_EXPORT const fmi1_value_reference_t * | fmi1_import_get_value_referece_list (fmi1_import_variable_list_t *vl) |
Get a pointer to the list of the value references for all the variables. More... | |
FMILIB_EXPORT fmi1_import_variable_t * | fmi1_import_get_variable (fmi1_import_variable_list_t *vl, unsigned int index) |
Get a single variable from the list. More... | |
Variable lists are provided to handle sets of variables.
Note that variable lists are allocated dynamically and must be freed when not needed any longer.
typedef int(* fmi1_import_variable_filter_function_ft) (fmi1_import_variable_t *vl, void *data) |
Callback function typedef for the fmiFilterVariables.
The function should return 0 to prevent a variable from coming to the output list.
Definition at line 81 of file fmi1_import_variable_list.h.
fmi1_import_variable_list_t* fmi1_import_alloc_variable_list | ( | fmi1_import_t * | fmu, |
size_t | size | ||
) |
FMILIB_EXPORT void fmi1_import_free_variable_list | ( | fmi1_import_variable_list_t * | vl | ) |
Free a variable list. Note that variable lists are allocated dynamically and must be freed when not needed any longer.
vl | A variable list. |
FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_clone_variable_list | ( | fmi1_import_variable_list_t * | vl | ) |
Make a copy of the list.
vl | A variable list. |
FMILIB_EXPORT size_t fmi1_import_get_variable_list_size | ( | fmi1_import_variable_list_t * | vl | ) |
Get number of variables in a list.
FMILIB_EXPORT const fmi1_value_reference_t* fmi1_import_get_value_referece_list | ( | fmi1_import_variable_list_t * | vl | ) |
Get a pointer to the list of the value references for all the variables.
FMILIB_EXPORT fmi1_import_variable_t* fmi1_import_get_variable | ( | fmi1_import_variable_list_t * | vl, |
unsigned int | index | ||
) |
Get a single variable from the list.
FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_get_sublist | ( | fmi1_import_variable_list_t * | vl, |
unsigned int | fromIndex, | ||
unsigned int | toIndex | ||
) |
Select sub-lists.
vl | A variable list. |
fromIndex | Zero based start index, inclusive. |
toIndex | Zero based end index, inclusive. |
FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_filter_variables | ( | fmi1_import_variable_list_t * | vl, |
fmi1_import_variable_filter_function_ft | filter, | ||
void * | context | ||
) |
Call the provided 'filter' function on every variable in the list and create a new list.
vl | A variable list. |
filter | A filter function according to fmi1_import_variable_filter_function_ft. |
context | A parameter to be forwarded to the filter function. |
FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_join_var_list | ( | fmi1_import_variable_list_t * | a, |
fmi1_import_variable_list_t * | b | ||
) |
Create a new variable list by concatenating two lists.
a | A variable list. |
b | A variable list. |
FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_append_to_var_list | ( | fmi1_import_variable_list_t * | vl, |
fmi1_import_variable_t * | v | ||
) |
Append a variable to the variable list.
vl | A variable list. |
v | A variable. |
FMILIB_EXPORT fmi1_import_variable_list_t* fmi1_import_prepend_to_var_list | ( | fmi1_import_variable_list_t * | vl, |
fmi1_import_variable_t * | v | ||
) |
Prepend a variable to the variable list.
vl | A variable list. |
v | A variable. |
FMILIB_EXPORT jm_status_enu_t fmi1_import_var_list_push_back | ( | fmi1_import_variable_list_t * | vl, |
fmi1_import_variable_t * | v | ||
) |
Add a variable to a variable list.
vl | A variable list. |
v | A variable. |