/* * Wrapper for the FMI function fmiGetInteger. * parameter flowStatesInput is dummy and is only used to run the equations in sequence. * Returns integerValues. */ void fmi2GetInteger_OMC(void* in_fmi2, int numberOfValueReferences, double* integerValuesReferences, double flowStatesInput, int* integerValues, int fmiType) { if (fmiType == 1) { FMI2ModelExchange* FMI2ME = (FMI2ModelExchange*)in_fmi2; fmi2_value_reference_t* valuesReferences_int = real_to_fmi2_value_reference(numberOfValueReferences, integerValuesReferences); fmi2_import_get_integer(FMI2ME->FMIImportInstance, valuesReferences_int, numberOfValueReferences, (fmi2_integer_t*)integerValues); free(valuesReferences_int); } else if (fmiType == 2) { } }
/* * Wrapper for the FMI function fmi2GetInteger. * parameter flowStatesInput is dummy and is only used to run the equations in sequence. * Returns integerValues. */ void fmi2GetInteger_OMC(void* in_fmi2, int numberOfValueReferences, double* integerValuesReferences, double flowStatesInput, int* integerValues, int fmiType) { if (fmiType == 1) { FMI2ModelExchange* FMI2ME = (FMI2ModelExchange*)in_fmi2; fmi2_value_reference_t* valuesReferences_int = real_to_fmi2_value_reference(numberOfValueReferences, integerValuesReferences); fmi2_status_t status = fmi2_import_get_integer(FMI2ME->FMIImportInstance, valuesReferences_int, numberOfValueReferences, (fmi2_integer_t*)integerValues); free(valuesReferences_int); if (status != fmi2_status_ok && status != fmi2_status_warning) { ModelicaFormatError("fmi2GetInteger failed with status : %s\n", fmi2_status_to_string(status)); } } else if (fmiType == 2) { } }