Split listening for simulators and loading their plugins

Previously loadSimulatorPlugin was doing two things. First starting
a listener and second loading the plugin itself. This was confusing
since the sequence is to listen first and load not before a simulator
is available.
This change splits this up properly into two methods. listenForSimulator()
is called when the plugin is started and as soon as a simulator is started,
its plugin will be loaded.

refs #909
This commit is contained in:
Roland Winklmeier
2017-03-25 19:03:24 +01:00
committed by Mathew Sutcliffe
parent aafe211b5c
commit 9dbb984e1a
2 changed files with 18 additions and 42 deletions

View File

@@ -178,14 +178,14 @@ namespace BlackCore
//! Reads list of enabled simulators, starts listeners
void restoreSimulatorPlugins();
//! Load plugin, if required start listeners before
bool loadSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorPluginInfo, bool withListeners);
//! Load plugin and connect
bool loadSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorPluginInfo);
//! Unload plugin, if desired restart listeners
void unloadSimulatorPlugin();
//! Listen for single simulator
void listenForSimulator(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo);
bool listenForSimulator(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo);
//! Listen for all simulators
void listenForAllSimulators();