|
OMSimulatorLib
The OMSimulator project is a FMI-based co-simulation environment.
|
#include "OMSimulator/OMSimulator.h"#include "Component.h"#include "ComRef.h"#include "Element.h"#include "Flags.h"#include "FMUInfo.h"#include "Logging.h"#include "MatReader.h"#include "Model.h"#include "OMSString.h"#include "ResultReader.h"#include "Scope.h"#include "SignalDerivative.h"#include "Snapshot.h"#include "System.h"#include "SystemWC.h"#include "OMSimulator/Types.h"#include "Version.h"#include "miniunz.h"#include "pugixml.hpp"#include <chrono>#include <future>#include <string>#include <thread>Functions | |
| void | oms_setLoggingCallback (void(*cb)(oms_message_type_enu_t type, const char *message)) |
| oms_status_enu_t | oms_setLogFile (const char *filename) |
| oms_status_enu_t | oms_setLoggingInterval (const char *cref_, double loggingInterval) |
| oms_status_enu_t | oms_setLoggingLevel (int logLevel) |
| void | oms_setMaxLogFileSize (const unsigned long size) |
| oms_status_enu_t | oms_setTempDirectory (const char *newTempDir) |
| oms_status_enu_t | oms_setWorkingDirectory (const char *newWorkingDir) |
| oms_status_enu_t | oms_newModel (const char *cref) |
| oms_status_enu_t | oms_rename (const char *cref_, const char *newCref_) |
| int | oms_compareSimulationResults (const char *filenameA, const char *filenameB, const char *var, double relTol, double absTol) |
| oms_status_enu_t | oms_getResultFileSignals (const char *filename, const char **signalNames) |
| oms_status_enu_t | oms_delete (const char *cref) |
| oms_status_enu_t | oms_deleteResources (const char *cref_) |
| oms_status_enu_t | oms_referenceResources (const char *cref_, const char *ssmFile) |
| oms_status_enu_t | oms_reduceSSV (const char *cref, const char *ssvfile, const char *ssmfile, const char *filepath) |
| oms_status_enu_t | oms_export (const char *cref, const char *filename) |
| oms_status_enu_t | oms_importFile (const char *filename, char **cref) |
| oms_status_enu_t | oms_list (const char *cref_, char **contents) |
| oms_status_enu_t | oms_listVariants (const char *cref, char **contents) |
| oms_status_enu_t | oms_exportSnapshot (const char *cref_, char **contents) |
| oms_status_enu_t | oms_exportSSVTemplate (const char *cref_, const char *filename) |
| oms_status_enu_t | oms_exportSSMTemplate (const char *cref_, const char *filename) |
| oms_status_enu_t | oms_listUnconnectedConnectors (const char *cref_, char **contents) |
| oms_status_enu_t | oms_loadSnapshot (const char *cref, const char *snapshot, char **newCref) |
| oms_status_enu_t | oms_importSnapshot (const char *cref, const char *snapshot, char **newCref) |
| oms_status_enu_t | oms_newResources (const char *cref_) |
| oms_status_enu_t | oms_addResources (const char *cref_, const char *path) |
| oms_status_enu_t | oms_addSystem (const char *cref_, oms_system_enu_t type) |
| oms_status_enu_t | oms_copySystem (const char *source, const char *target) |
| void | oms_freeMemory (void *obj) |
| oms_status_enu_t | oms_getElement (const char *cref, oms_element_t **element) |
| oms_status_enu_t | oms_getElements (const char *cref, oms_element_t ***elements) |
| oms_status_enu_t | oms_getFixedStepSize (const char *cref, double *stepSize) |
| oms_status_enu_t | oms_setElementGeometry (const char *cref, const ssd_element_geometry_t *geometry) |
| oms_status_enu_t | oms_addConnector (const char *cref, oms_causality_enu_t causality, oms_signal_type_enu_t type) |
| oms_status_enu_t | oms_getConnector (const char *cref, oms_connector_t **connector) |
| oms_status_enu_t | oms_setCommandLineOption (const char *cmd) |
| oms_status_enu_t | oms_getSystemType (const char *cref, oms_system_enu_t *type) |
| oms_status_enu_t | oms_getVariableType (const char *cref, oms_signal_type_enu_t *type) |
| oms_status_enu_t | oms_addConnection (const char *crefA, const char *crefB, bool suppressUnitConversion) |
| oms_status_enu_t | oms_deleteConnection (const char *crefA, const char *crefB) |
| oms_status_enu_t | oms_setConnectorGeometry (const char *cref, const ssd_connector_geometry_t *geometry) |
| oms_status_enu_t | oms_setConnectionGeometry (const char *crefA, const char *crefB, const ssd_connection_geometry_t *geometry) |
| oms_status_enu_t | oms_getConnections (const char *cref, oms_connection_t ***connections) |
| oms_status_enu_t | oms_addBus (const char *cref) |
| oms_status_enu_t | oms_getBus (const char *cref, oms_busconnector_t **busConnector) |
| oms_status_enu_t | oms_setBusGeometry (const char *cref, const ssd_connector_geometry_t *geometry) |
| oms_status_enu_t | oms_addConnectorToBus (const char *busCref, const char *connectorCref) |
| oms_status_enu_t | oms_deleteConnectorFromBus (const char *busCref, const char *connectorCref) |
| oms_status_enu_t | oms_addSubModel (const char *cref, const char *fmuPath) |
| oms_status_enu_t | oms_setExportName (const char *cref, const char *exportName) |
| oms_status_enu_t | oms_activateVariant (const char *crefA, const char *crefB) |
| oms_status_enu_t | oms_duplicateVariant (const char *crefA, const char *crefB) |
| oms_status_enu_t | oms_replaceSubModel (const char *cref, const char *fmuPath, bool dryRun, int *warningCount) |
| oms_status_enu_t | oms_getComponentType (const char *cref, oms_component_enu_t *type) |
| oms_status_enu_t | oms_getSubModelPath (const char *cref, char **path) |
| oms_status_enu_t | oms_getFMUInfo (const char *cref, const oms_fmu_info_t **fmuInfo) |
| oms_status_enu_t | oms_instantiate (const char *cref_) |
| oms_status_enu_t | oms_initialize (const char *cref_) |
| oms_status_enu_t | oms_simulate (const char *cref_) |
| oms_status_enu_t | oms_doStep (const char *cref_) |
| oms_status_enu_t | oms_stepUntil (const char *cref_, double stopTime) |
| oms_status_enu_t | oms_reset (const char *cref_) |
| static int | do_simulation (std::string model, std::chrono::duration< double > timeout) |
| oms_status_enu_t | oms_extractFMIKind (const char *filename, oms_fmi_kind_enu_t *kind, oms_fmu_default_experiment_settings *defaultExperiment, std::string &modelName) |
| oms_status_enu_t | SimulateSingleFMU (const filesystem::path &path) |
| oms_status_enu_t | oms_RunFile (const char *filename) |
| oms_status_enu_t | oms_terminate (const char *cref_) |
| oms_status_enu_t | oms_exportDependencyGraphs (const char *cref, const char *initialization, const char *event, const char *simulation) |
| oms_status_enu_t | oms_getReal (const char *cref, double *value) |
| oms_status_enu_t | oms_getState (const char *cref) |
| oms_status_enu_t | oms_setState (const char *cref) |
| oms_status_enu_t | oms_freeState (const char *cref) |
| oms_status_enu_t | oms_getDirectionalDerivative (const char *unknownCref, const char *knownCref, double *value) |
| oms_status_enu_t | oms_getResultFile (const char *cref_, char **filename, int *bufferSize) |
| oms_status_enu_t | oms_getSolver (const char *cref, oms_solver_enu_t *solver) |
| oms_status_enu_t | oms_getInteger (const char *cref, int *value) |
| oms_status_enu_t | oms_getBoolean (const char *cref, bool *value) |
| oms_status_enu_t | oms_setReal (const char *cref, double value) |
| oms_status_enu_t | oms_setRealInputDerivative (const char *cref, double value) |
| oms_status_enu_t | oms_setInteger (const char *cref, int value) |
| oms_status_enu_t | oms_setBoolean (const char *cref, bool value) |
| oms_status_enu_t | oms_setResultFile (const char *cref_, const char *filename, int bufferSize) |
| oms_status_enu_t | oms_addSignalsToResults (const char *cref, const char *regex) |
| oms_status_enu_t | oms_removeSignalsFromResults (const char *cref, const char *regex) |
| oms_status_enu_t | oms_getStartTime (const char *cref, double *startTime) |
| oms_status_enu_t | oms_setStartTime (const char *cref, double startTime) |
| oms_status_enu_t | oms_getStopTime (const char *cref, double *stopTime) |
| oms_status_enu_t | oms_getString (const char *cref, char **value) |
| oms_status_enu_t | oms_setStopTime (const char *cref, double stopTime) |
| oms_status_enu_t | oms_setString (const char *cref, const char *value) |
| oms_status_enu_t | oms_setUnit (const char *cref, const char *value) |
| oms_status_enu_t | oms_getTime (const char *cref, double *time) |
| oms_status_enu_t | oms_setFixedStepSize (const char *cref, double stepSize) |
| oms_status_enu_t | oms_setVariableStepSize (const char *cref, double initialStepSize, double minimumStepSize, double maximumStepSize) |
| oms_status_enu_t | oms_getModelState (const char *cref, oms_modelState_enu_t *modelState) |
| oms_status_enu_t | oms_getTolerance (const char *cref, double *relativeTolerance) |
| oms_status_enu_t | oms_getVariableStepSize (const char *cref, double *initialStepSize, double *minimumStepSize, double *maximumStepSize) |
| const char * | oms_getVersion () |
| oms_status_enu_t | oms_getWorkingDirectory (char **workingDir) |
| oms_status_enu_t | oms_setSolver (const char *cref, oms_solver_enu_t solver) |
| oms_status_enu_t | oms_setTolerance (const char *cref, double relativeTolerance) |
|
static |
| oms_status_enu_t oms_activateVariant | ( | const char * | crefA, |
| const char * | crefB | ||
| ) |
| oms_status_enu_t oms_addBus | ( | const char * | cref | ) |
| oms_status_enu_t oms_addConnection | ( | const char * | crefA, |
| const char * | crefB, | ||
| bool | suppressUnitConversion | ||
| ) |
| oms_status_enu_t oms_addConnector | ( | const char * | cref, |
| oms_causality_enu_t | causality, | ||
| oms_signal_type_enu_t | type | ||
| ) |
| oms_status_enu_t oms_addConnectorToBus | ( | const char * | busCref, |
| const char * | connectorCref | ||
| ) |
| oms_status_enu_t oms_addResources | ( | const char * | cref_, |
| const char * | path | ||
| ) |
| oms_status_enu_t oms_addSignalsToResults | ( | const char * | cref, |
| const char * | regex | ||
| ) |
| oms_status_enu_t oms_addSubModel | ( | const char * | cref, |
| const char * | fmuPath | ||
| ) |
| oms_status_enu_t oms_addSystem | ( | const char * | cref_, |
| oms_system_enu_t | type | ||
| ) |
| int oms_compareSimulationResults | ( | const char * | filenameA, |
| const char * | filenameB, | ||
| const char * | var, | ||
| double | relTol, | ||
| double | absTol | ||
| ) |
| oms_status_enu_t oms_copySystem | ( | const char * | source, |
| const char * | target | ||
| ) |
| oms_status_enu_t oms_delete | ( | const char * | cref | ) |
| oms_status_enu_t oms_deleteConnection | ( | const char * | crefA, |
| const char * | crefB | ||
| ) |
| oms_status_enu_t oms_deleteConnectorFromBus | ( | const char * | busCref, |
| const char * | connectorCref | ||
| ) |
| oms_status_enu_t oms_deleteResources | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_doStep | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_duplicateVariant | ( | const char * | crefA, |
| const char * | crefB | ||
| ) |
| oms_status_enu_t oms_export | ( | const char * | cref, |
| const char * | filename | ||
| ) |
| oms_status_enu_t oms_exportDependencyGraphs | ( | const char * | cref, |
| const char * | initialization, | ||
| const char * | event, | ||
| const char * | simulation | ||
| ) |
| oms_status_enu_t oms_exportSnapshot | ( | const char * | cref_, |
| char ** | contents | ||
| ) |
| oms_status_enu_t oms_exportSSMTemplate | ( | const char * | cref_, |
| const char * | filename | ||
| ) |
| oms_status_enu_t oms_exportSSVTemplate | ( | const char * | cref_, |
| const char * | filename | ||
| ) |
| oms_status_enu_t oms_extractFMIKind | ( | const char * | filename, |
| oms_fmi_kind_enu_t * | kind, | ||
| oms_fmu_default_experiment_settings * | defaultExperiment, | ||
| std::string & | modelName | ||
| ) |
| void oms_freeMemory | ( | void * | obj | ) |
| oms_status_enu_t oms_freeState | ( | const char * | cref | ) |
| oms_status_enu_t oms_getBoolean | ( | const char * | cref, |
| bool * | value | ||
| ) |
| oms_status_enu_t oms_getBus | ( | const char * | cref, |
| oms_busconnector_t ** | busConnector | ||
| ) |
| oms_status_enu_t oms_getComponentType | ( | const char * | cref, |
| oms_component_enu_t * | type | ||
| ) |
| oms_status_enu_t oms_getConnections | ( | const char * | cref, |
| oms_connection_t *** | connections | ||
| ) |
| oms_status_enu_t oms_getConnector | ( | const char * | cref, |
| oms_connector_t ** | connector | ||
| ) |
| oms_status_enu_t oms_getDirectionalDerivative | ( | const char * | unknownCref, |
| const char * | knownCref, | ||
| double * | value | ||
| ) |
| oms_status_enu_t oms_getElement | ( | const char * | cref, |
| oms_element_t ** | element | ||
| ) |
| oms_status_enu_t oms_getElements | ( | const char * | cref, |
| oms_element_t *** | elements | ||
| ) |
| oms_status_enu_t oms_getFixedStepSize | ( | const char * | cref, |
| double * | stepSize | ||
| ) |
| oms_status_enu_t oms_getFMUInfo | ( | const char * | cref, |
| const oms_fmu_info_t ** | fmuInfo | ||
| ) |
| oms_status_enu_t oms_getInteger | ( | const char * | cref, |
| int * | value | ||
| ) |
| oms_status_enu_t oms_getModelState | ( | const char * | cref, |
| oms_modelState_enu_t * | modelState | ||
| ) |
| oms_status_enu_t oms_getReal | ( | const char * | cref, |
| double * | value | ||
| ) |
| oms_status_enu_t oms_getResultFile | ( | const char * | cref_, |
| char ** | filename, | ||
| int * | bufferSize | ||
| ) |
| oms_status_enu_t oms_getResultFileSignals | ( | const char * | filename, |
| const char ** | signalNames | ||
| ) |
| oms_status_enu_t oms_getSolver | ( | const char * | cref, |
| oms_solver_enu_t * | solver | ||
| ) |
| oms_status_enu_t oms_getStartTime | ( | const char * | cref, |
| double * | startTime | ||
| ) |
| oms_status_enu_t oms_getState | ( | const char * | cref | ) |
| oms_status_enu_t oms_getStopTime | ( | const char * | cref, |
| double * | stopTime | ||
| ) |
| oms_status_enu_t oms_getString | ( | const char * | cref, |
| char ** | value | ||
| ) |
| oms_status_enu_t oms_getSubModelPath | ( | const char * | cref, |
| char ** | path | ||
| ) |
| oms_status_enu_t oms_getSystemType | ( | const char * | cref, |
| oms_system_enu_t * | type | ||
| ) |
| oms_status_enu_t oms_getTime | ( | const char * | cref, |
| double * | time | ||
| ) |
| oms_status_enu_t oms_getTolerance | ( | const char * | cref, |
| double * | relativeTolerance | ||
| ) |
| oms_status_enu_t oms_getVariableStepSize | ( | const char * | cref, |
| double * | initialStepSize, | ||
| double * | minimumStepSize, | ||
| double * | maximumStepSize | ||
| ) |
| oms_status_enu_t oms_getVariableType | ( | const char * | cref, |
| oms_signal_type_enu_t * | type | ||
| ) |
| const char* oms_getVersion | ( | ) |
| oms_status_enu_t oms_getWorkingDirectory | ( | char ** | workingDir | ) |
| oms_status_enu_t oms_importFile | ( | const char * | filename, |
| char ** | cref | ||
| ) |
| oms_status_enu_t oms_importSnapshot | ( | const char * | cref, |
| const char * | snapshot, | ||
| char ** | newCref | ||
| ) |
| oms_status_enu_t oms_initialize | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_instantiate | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_list | ( | const char * | cref_, |
| char ** | contents | ||
| ) |
| oms_status_enu_t oms_listUnconnectedConnectors | ( | const char * | cref_, |
| char ** | contents | ||
| ) |
| oms_status_enu_t oms_listVariants | ( | const char * | cref, |
| char ** | contents | ||
| ) |
| oms_status_enu_t oms_loadSnapshot | ( | const char * | cref, |
| const char * | snapshot, | ||
| char ** | newCref | ||
| ) |
| oms_status_enu_t oms_newModel | ( | const char * | cref | ) |
| oms_status_enu_t oms_newResources | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_reduceSSV | ( | const char * | cref, |
| const char * | ssvfile, | ||
| const char * | ssmfile, | ||
| const char * | filepath | ||
| ) |
| oms_status_enu_t oms_referenceResources | ( | const char * | cref_, |
| const char * | ssmFile | ||
| ) |
| oms_status_enu_t oms_removeSignalsFromResults | ( | const char * | cref, |
| const char * | regex | ||
| ) |
| oms_status_enu_t oms_rename | ( | const char * | cref_, |
| const char * | newCref_ | ||
| ) |
| oms_status_enu_t oms_replaceSubModel | ( | const char * | cref, |
| const char * | fmuPath, | ||
| bool | dryRun, | ||
| int * | warningCount | ||
| ) |
| oms_status_enu_t oms_reset | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_RunFile | ( | const char * | filename | ) |
| oms_status_enu_t oms_setBoolean | ( | const char * | cref, |
| bool | value | ||
| ) |
| oms_status_enu_t oms_setBusGeometry | ( | const char * | cref, |
| const ssd_connector_geometry_t * | geometry | ||
| ) |
| oms_status_enu_t oms_setCommandLineOption | ( | const char * | cmd | ) |
| oms_status_enu_t oms_setConnectionGeometry | ( | const char * | crefA, |
| const char * | crefB, | ||
| const ssd_connection_geometry_t * | geometry | ||
| ) |
| oms_status_enu_t oms_setConnectorGeometry | ( | const char * | cref, |
| const ssd_connector_geometry_t * | geometry | ||
| ) |
| oms_status_enu_t oms_setElementGeometry | ( | const char * | cref, |
| const ssd_element_geometry_t * | geometry | ||
| ) |
| oms_status_enu_t oms_setExportName | ( | const char * | cref, |
| const char * | exportName | ||
| ) |
| oms_status_enu_t oms_setFixedStepSize | ( | const char * | cref, |
| double | stepSize | ||
| ) |
| oms_status_enu_t oms_setInteger | ( | const char * | cref, |
| int | value | ||
| ) |
| oms_status_enu_t oms_setLogFile | ( | const char * | filename | ) |
| void oms_setLoggingCallback | ( | void(*)(oms_message_type_enu_t type, const char *message) | cb | ) |
| oms_status_enu_t oms_setLoggingInterval | ( | const char * | cref_, |
| double | loggingInterval | ||
| ) |
| oms_status_enu_t oms_setLoggingLevel | ( | int | logLevel | ) |
| void oms_setMaxLogFileSize | ( | const unsigned long | size | ) |
| oms_status_enu_t oms_setReal | ( | const char * | cref, |
| double | value | ||
| ) |
| oms_status_enu_t oms_setRealInputDerivative | ( | const char * | cref, |
| double | value | ||
| ) |
| oms_status_enu_t oms_setResultFile | ( | const char * | cref_, |
| const char * | filename, | ||
| int | bufferSize | ||
| ) |
| oms_status_enu_t oms_setSolver | ( | const char * | cref, |
| oms_solver_enu_t | solver | ||
| ) |
| oms_status_enu_t oms_setStartTime | ( | const char * | cref, |
| double | startTime | ||
| ) |
| oms_status_enu_t oms_setState | ( | const char * | cref | ) |
| oms_status_enu_t oms_setStopTime | ( | const char * | cref, |
| double | stopTime | ||
| ) |
| oms_status_enu_t oms_setString | ( | const char * | cref, |
| const char * | value | ||
| ) |
| oms_status_enu_t oms_setTempDirectory | ( | const char * | newTempDir | ) |
| oms_status_enu_t oms_setTolerance | ( | const char * | cref, |
| double | relativeTolerance | ||
| ) |
| oms_status_enu_t oms_setUnit | ( | const char * | cref, |
| const char * | value | ||
| ) |
| oms_status_enu_t oms_setVariableStepSize | ( | const char * | cref, |
| double | initialStepSize, | ||
| double | minimumStepSize, | ||
| double | maximumStepSize | ||
| ) |
| oms_status_enu_t oms_setWorkingDirectory | ( | const char * | newWorkingDir | ) |
| oms_status_enu_t oms_simulate | ( | const char * | cref_ | ) |
| oms_status_enu_t oms_stepUntil | ( | const char * | cref_, |
| double | stopTime | ||
| ) |
| oms_status_enu_t oms_terminate | ( | const char * | cref_ | ) |
| oms_status_enu_t SimulateSingleFMU | ( | const filesystem::path & | path | ) |