FMI Library: part of JModelica.org
Functions

List of Model Exchange wrapper functions. Common functions are not listed. More...

Functions

FMILIB_EXPORT const charfmi1_import_get_model_types_platform (fmi1_import_t *fmu)
 Wrapper for the FMI function fmiGetModelTypesPlatform(...) More...
 
FMILIB_EXPORT jm_status_enu_t fmi1_import_instantiate_model (fmi1_import_t *fmu, fmi1_string_t instanceName)
 Wrapper for the FMI function fmiInstantiateModel(...) More...
 
FMILIB_EXPORT void fmi1_import_free_model_instance (fmi1_import_t *fmu)
 Wrapper for the FMI function fmiFreeModelInstance(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_set_time (fmi1_import_t *fmu, fmi1_real_t time)
 Wrapper for the FMI function fmiSetTime(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_set_continuous_states (fmi1_import_t *fmu, const fmi1_real_t x[], size_t nx)
 Wrapper for the FMI function fmiSetContinuousStates(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_completed_integrator_step (fmi1_import_t *fmu, fmi1_boolean_t *callEventUpdate)
 Wrapper for the FMI function fmiCompletedIntegratorStep(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_initialize (fmi1_import_t *fmu, fmi1_boolean_t toleranceControlled, fmi1_real_t relativeTolerance, fmi1_event_info_t *eventInfo)
 Wrapper for the FMI function fmiInitialize(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_get_derivatives (fmi1_import_t *fmu, fmi1_real_t derivatives[], size_t nx)
 Wrapper for the FMI function fmiGetDerivatives(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_get_event_indicators (fmi1_import_t *fmu, fmi1_real_t eventIndicators[], size_t ni)
 Wrapper for the FMI function fmiGetEventIndicators(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_eventUpdate (fmi1_import_t *fmu, fmi1_boolean_t intermediateResults, fmi1_event_info_t *eventInfo)
 Wrapper for the FMI function fmiEventUpdate(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_get_continuous_states (fmi1_import_t *fmu, fmi1_real_t states[], size_t nx)
 Wrapper for the FMI function fmiGetContinuousStates(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_get_nominal_continuous_states (fmi1_import_t *fmu, fmi1_real_t x_nominal[], size_t nx)
 Wrapper for the FMI function fmiGetNominalContinuousStates(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_get_state_value_references (fmi1_import_t *fmu, fmi1_value_reference_t vrx[], size_t nx)
 Wrapper for the FMI function fmiGetStateValueReferences(...) More...
 
FMILIB_EXPORT fmi1_status_t fmi1_import_terminate (fmi1_import_t *fmu)
 Wrapper for the FMI function fmiTerminate(...) More...
 

Detailed Description

List of Model Exchange wrapper functions. Common functions are not listed.

Function Documentation

FMILIB_EXPORT const char* fmi1_import_get_model_types_platform ( fmi1_import_t fmu)

Wrapper for the FMI function fmiGetModelTypesPlatform(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
Returns
The platform the FMU was compiled for.
FMILIB_EXPORT jm_status_enu_t fmi1_import_instantiate_model ( fmi1_import_t fmu,
fmi1_string_t  instanceName 
)

Wrapper for the FMI function fmiInstantiateModel(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
instanceNameThe name of the instance.
Returns
Error status. Returnes jm_status_error if fmiInstantiateModel returned NULL, otherwise jm_status_success.
FMILIB_EXPORT void fmi1_import_free_model_instance ( fmi1_import_t fmu)

Wrapper for the FMI function fmiFreeModelInstance(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
FMILIB_EXPORT fmi1_status_t fmi1_import_set_time ( fmi1_import_t fmu,
fmi1_real_t  time 
)

Wrapper for the FMI function fmiSetTime(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
timeSet the current time.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_set_continuous_states ( fmi1_import_t fmu,
const fmi1_real_t  x[],
size_t  nx 
)

Wrapper for the FMI function fmiSetContinuousStates(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
xArray of state values.
nxNumber of states.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_completed_integrator_step ( fmi1_import_t fmu,
fmi1_boolean_t *  callEventUpdate 
)

Wrapper for the FMI function fmiCompletedIntegratorStep(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
callEventUpdate(Output) Call fmiEventUpdate indicator.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_initialize ( fmi1_import_t fmu,
fmi1_boolean_t  toleranceControlled,
fmi1_real_t  relativeTolerance,
fmi1_event_info_t eventInfo 
)

Wrapper for the FMI function fmiInitialize(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
toleranceControlledEnable or disable the use of relativeTolerance in the FMU.
relativeToleranceA relative tolerance used in the FMU.
eventInfo(Output) fmiEventInfo struct.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_get_derivatives ( fmi1_import_t fmu,
fmi1_real_t  derivatives[],
size_t  nx 
)

Wrapper for the FMI function fmiGetDerivatives(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
derivatives(Output) Array of the derivatives.
nxNumber of derivatives.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_get_event_indicators ( fmi1_import_t fmu,
fmi1_real_t  eventIndicators[],
size_t  ni 
)

Wrapper for the FMI function fmiGetEventIndicators(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
eventIndicators(Output) The event indicators.
niNumber of event indicators.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_eventUpdate ( fmi1_import_t fmu,
fmi1_boolean_t  intermediateResults,
fmi1_event_info_t eventInfo 
)

Wrapper for the FMI function fmiEventUpdate(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
intermediateResultsIndicate whether or not the fmiEventUpdate shall return after every internal event interation.
eventInfo(Output) An fmiEventInfo struct.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_get_continuous_states ( fmi1_import_t fmu,
fmi1_real_t  states[],
size_t  nx 
)

Wrapper for the FMI function fmiGetContinuousStates(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
states(Output) Array of state values.
nxNumber of states.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_get_nominal_continuous_states ( fmi1_import_t fmu,
fmi1_real_t  x_nominal[],
size_t  nx 
)

Wrapper for the FMI function fmiGetNominalContinuousStates(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
x_nominal(Output) The nominal values.
nxNumber of nominal values.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_get_state_value_references ( fmi1_import_t fmu,
fmi1_value_reference_t  vrx[],
size_t  nx 
)

Wrapper for the FMI function fmiGetStateValueReferences(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
vrx(Output) The value-references of the states.
nxNumber of value-references.
Returns
FMI status.
FMILIB_EXPORT fmi1_status_t fmi1_import_terminate ( fmi1_import_t fmu)

Wrapper for the FMI function fmiTerminate(...)

Parameters
fmuA model description object returned by fmi1_import_parse_xml() that has loaded the FMI functions, see fmi1_import_create_dllfmu().
Returns
FMI status.