We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cse_slave* cse_local_slave_create(const char* fmuPath) { try { const auto importer = cse::fmi::importer::create(); const auto fmu = importer->import(fmuPath); auto slave = std::make_unique<cse_slave>(); slave->name = fmu->model_description()->name; // <----- HERE slave->instance = fmu->instantiate_slave(slave->name); // slave address not in use yet. Should be something else than a string. slave->address = "local"; slave->source = fmuPath; return slave.release(); } catch (...) { handle_current_exception(); return nullptr; } } cse_slave_index cse_execution_add_slave( cse_execution* execution, cse_slave* slave) { try { auto index = execution->cpp_execution->add_slave(cse::make_background_thread_slave(slave->instance), slave->name); execution->simulators[slave->name] = cse::simulator_map_entry{index, slave->source, slave->instance->model_description()}; // <---- HERE return index; } catch (...) { handle_current_exception(); return failure; } }
As highlighted above, execution->simulators[slave->name] is overwritten each time a new slave is added.
execution->simulators[slave->name]
The text was updated successfully, but these errors were encountered:
Fix broken cse_local_slave_create #381
2b1d8b5
Fix broken cse_local_slave_create #381 (#387)
1216875
* Fix broken cse_local_slave_create #381
Successfully merging a pull request may close this issue.
As highlighted above,
execution->simulators[slave->name]
is overwritten each time a new slave is added.The text was updated successfully, but these errors were encountered: