Data handling
Last update: 10.02.2025Create / Initialize Data Objects | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_loadDbFile (fmop_db_handle_t *database, const char *path) |
| Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_loadDbFileWMesh (fmop_db_handle_t *database, const char *path) |
| Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database This function also builds up all internal data structures needed to represent FEM meshes. Hence it may need more CPU time and RAM. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_getModel (fmop_db_handle_t database, fmop_dataobject_types data_type, const char *const fmop_ident, fmop_handle_t *fmop) |
| Loads a fmop_handle_t data object from the database given. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_releaseModel (fmop_handle_t *fmop) |
| Releases a fmop_handle_t object and dedicated memory. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_releaseDb (fmop_db_handle_t *database) |
| Releases a fmop_db_handle_t object and dedicated memory. More... | |
| DYNARDO_FMOP_API fmop_error_t | FMOP_releaseIdents (char ***const idents, const size_t *num_idents) |
| An auxiliary function to releases an array of char arrays and dedicated memory. More... | |
Detailed Description
Function Documentation
◆ FMOP_getModel()
| DYNARDO_FMOP_API fmop_error_t FMOP_getModel | ( | fmop_db_handle_t | database, |
| fmop_dataobject_types | data_type, | ||
| const char *const | fmop_ident, | ||
| fmop_handle_t * | fmop | ||
| ) |
Loads a fmop_handle_t data object from the database given.
- Parameters
-
[in] database The already initialized database handle [in] data_type The data type in question [in] fmop_ident The FMOP ident to be loaded from the database given [in,out] fmop On input *fmop must point to NULL. Returns an initialized fmop handle to the requested fmop_ident on output. Pointer ownership is up to the caller after return. Call FMOP_releaseModel (fmop_handle_t *) at the end of lifetime.
- Returns
- fmop_invalid_handle if the database or fmop_ident argument is a NULL pointer
- fmop_invalid_handle if the fmop argument does not hold a NULL pointer on input
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to load a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_model_missing if the handle initialization fails
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
- Note
- Assumes that FMOP_initialize() returned fmop_model_success
- Returns
- A success indicator. Call FMOP_getErrnoString to get a human readable representation
◆ FMOP_loadDbFile()
| DYNARDO_FMOP_API fmop_error_t FMOP_loadDbFile | ( | fmop_db_handle_t * | database, |
| const char * | path | ||
| ) |
Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database.
- Parameters
-
[in,out] database On input *database must point to NULL. Returns an initialized handle to the loaded database on ouptut. The database of the returned handle has been set to the content of the file path given. Pointer ownership is up to the caller after return. Call FMOP_releaseDb (fmop_db_handle_t *) at the end of lifetime. [in] path The path to the SoS database file as a NULL terminated character array
- Returns
- fmop_invalid_handle if the database argument does not hold a NULL pointer on input
- fmop_settings_error if the path argument doesn't point to an existing file
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to load a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success if the fmop_db_handle_t has been initialized successfully
- Call FMOP_getErrnoString() to get a human readable representation.
◆ FMOP_loadDbFileWMesh()
| DYNARDO_FMOP_API fmop_error_t FMOP_loadDbFileWMesh | ( | fmop_db_handle_t * | database, |
| const char * | path | ||
| ) |
Initializes a fmop_db_handle_t object from a previously saved Statistics on Structures (SoS) database This function also builds up all internal data structures needed to represent FEM meshes. Hence it may need more CPU time and RAM.
- Parameters
-
[in,out] database On input *database must point to NULL. Returns an initialized handle to the loaded database on ouptut. The database of the returned handle has been set to the content of the file path given. Pointer ownership is up to the caller after return. Call FMOP_releaseDb (fmop_db_handle_t *) at the end of lifetime. [in] path The path to the SoS database file as a NULL terminated character array
- Returns
- fmop_invalid_handle if the database argument does not hold a NULL pointer on input
- fmop_settings_error if the path argument doesn't point to an existing file
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to load a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success if the fmop_db_handle_t has been initialized successfully
- Call FMOP_getErrnoString() to get a human readable representation.
◆ FMOP_releaseDb()
| DYNARDO_FMOP_API fmop_error_t FMOP_releaseDb | ( | fmop_db_handle_t * | database | ) |
Releases a fmop_db_handle_t object and dedicated memory.
- Parameters
-
[in,out] database The fmop_db_handle_t to be released. Set to NULLptr on return.
- Returns
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
◆ FMOP_releaseIdents()
| DYNARDO_FMOP_API fmop_error_t FMOP_releaseIdents | ( | char ***const | idents, |
| const size_t * | num_idents | ||
| ) |
An auxiliary function to releases an array of char arrays and dedicated memory.
- Parameters
-
[in,out] idents A pointer to an array of char arrays. Set to NULLptr on return. [in] num_idents An already initialized scalar data object. Contains the number of idents in the char** array [] given
- Returns
- fmop_invalid_handle if the array argument is a NULL pointer or if *array points to NULL
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far
- fmop_settings_error if the num_idents argument is a NULL pointer
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation
◆ FMOP_releaseModel()
| DYNARDO_FMOP_API fmop_error_t FMOP_releaseModel | ( | fmop_handle_t * | fmop | ) |
Releases a fmop_handle_t object and dedicated memory.
- Parameters
-
[in,out] fmop The fmop_handle_t to be released. Set to NULLptr on return.
- Returns
- fmop_license_error if a license error occurs, e.g. no license has been acquired so far or one tries to release a 3D mesh but acquired a SoS license for 1D meshes, e.g. signals, only
- fmop_exception_occurred if any other failure get invoked
- fmop_success elsewise
- Call FMOP_getErrnoString() to get a human readable representation