Commit 033ddf9d authored by ics's avatar ics
Browse files

Multi client:

- No offscreen on remote client
- Main plot connect to nomad server
parent cfda126f
......@@ -135,24 +135,41 @@ int main(int32 argc, char* argv[]) {
// Init the nomad server requester manager
manager::ServerRequesterManager::getInstance()->init(requesterdb);
OffScreenPlotManager::getInstance()->init(mpl, spypublisher, remote);
// Start thread waiting and managing log event
thread serverLogSubscriberThread(bind(&OffScreenPlotManager::loop, OffScreenPlotManager::getInstance(), logsubscriber));
if (clientype == "main") {
OffScreenPlotManager::getInstance()->init(mpl, spypublisher, remote);
// Start thread waiting and managing nomad gui request
thread plotRequestThread(bind(&manager::RequestDealerManager::loop, manager::RequestDealerManager::getInstance(), requesterplot));
// Start thread waiting and managing log event
thread serverLogSubscriberThread(bind(&OffScreenPlotManager::loop, OffScreenPlotManager::getInstance(), logsubscriber));
// Set cameo application running
application::This::setRunning();
// Start thread waiting and managing nomad gui request
thread plotRequestThread(bind(&manager::RequestDealerManager::loop, manager::RequestDealerManager::getInstance(), requesterplot));
// Wait threads
plotRequestThread.join();
serverLogSubscriberThread.join();
// Set cameo application running
application::This::setRunning();
// Wait threads
plotRequestThread.join();
serverLogSubscriberThread.join();
// Reset manager
manager::RequestDealerManager::resetInstance();
}
else {
// Start thread waiting and managing nomad gui request
thread plotRequestThread(bind(&manager::RequestDealerManager::loop, manager::RequestDealerManager::getInstance(), requesterplot));
// Set cameo application running
application::This::setRunning();
// Wait threads
plotRequestThread.join();
// Reset manager
manager::RequestDealerManager::resetInstance();
}
// Reset manager
manager::RequestDealerManager::resetInstance();
OffScreenPlotManager::resetInstance();
manager::ServerRequesterManager::resetInstance();
}
......
......@@ -103,8 +103,11 @@ int32 main(int32 argc, char* argv[]) {
int32 err = EXIT_SUCCESS;
application::This::init(1, &argv[4]);
{
DBGMSG("Connected to " << getNomadServerEndPoint());
cameo::Server server(getNomadServerEndPoint());
// Get nomad server instance
nomadserver = getNomadInstance(application::This::getServer());
nomadserver = getNomadInstance(server);
if (nomadserver.get() == 0) {
Error("mainplot", "No nomad server instance");
err = EXIT_FAILURE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment