Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
Ploty2
Commits
033ddf9d
Commit
033ddf9d
authored
Mar 26, 2020
by
ics
Browse files
Multi client:
- No offscreen on remote client - Main plot connect to nomad server
parent
cfda126f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main.cpp
View file @
033ddf9d
...
...
@@ -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 reques
t
thread
plotRequestThread
(
bind
(
&
manager
::
RequestDealerManager
::
loop
,
manager
::
RequestDealer
Manager
::
getInstance
(),
requesterplot
));
// Start thread waiting and managing
log even
t
thread
serverLogSubscriberThread
(
bind
(
&
OffScreenPlotManager
::
loop
,
OffScreenPlot
Manager
::
getInstance
(),
logsubscriber
));
// S
et cameo application running
application
::
This
::
s
et
Running
(
);
// S
tart thread waiting and managing nomad gui request
thread
plotRequestThread
(
bind
(
&
manager
::
RequestDealerManager
::
loop
,
manager
::
RequestDealerManager
::
g
et
Instance
(),
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
();
}
...
...
src/mainplot.cpp
View file @
033ddf9d
...
...
@@ -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
::
getS
erver
()
);
nomadserver
=
getNomadInstance
(
s
erver
);
if
(
nomadserver
.
get
()
==
0
)
{
Error
(
"mainplot"
,
"No nomad server instance"
);
err
=
EXIT_FAILURE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment