/* * Wrapper for the FMI function fmiSetReal. * Returns status. */ void fmi2SetReal_OMC(void* in_fmi2, int numberOfValueReferences, double* realValuesReferences, double* realValues, double* out_Values, int fmiType) { if (fmiType == 1) { FMI2ModelExchange* FMI2ME = (FMI2ModelExchange*)in_fmi2; fmi2_value_reference_t* valuesReferences_int = real_to_fmi2_value_reference(numberOfValueReferences, realValuesReferences); fmi2_import_set_real(FMI2ME->FMIImportInstance, valuesReferences_int, numberOfValueReferences, (fmi2_real_t*)realValues); } else if (fmiType == 2) { } }
/* * Wrapper for the FMI function fmi2SetReal. * Returns status. */ void fmi2SetReal_OMC(void* in_fmi2, int numberOfValueReferences, double* realValuesReferences, double* realValues, int fmiType) { if (fmiType == 1) { FMI2ModelExchange* FMI2ME = (FMI2ModelExchange*)in_fmi2; if (FMI2ME->FMISolvingMode == fmi2_instantiated_mode || FMI2ME->FMISolvingMode == fmi2_initialization_mode || FMI2ME->FMISolvingMode == fmi2_event_mode || FMI2ME->FMISolvingMode == fmi2_continuousTime_mode) { fmi2_value_reference_t* valuesReferences_int = real_to_fmi2_value_reference(numberOfValueReferences, realValuesReferences); fmi2_status_t status = fmi2_import_set_real(FMI2ME->FMIImportInstance, valuesReferences_int, numberOfValueReferences, (fmi2_real_t*)realValues); free(valuesReferences_int); if (status != fmi2_status_ok && status != fmi2_status_warning) { ModelicaFormatError("fmi2SetReal failed with status : %s\n", fmi2_status_to_string(status)); } } } else if (fmiType == 2) { } }