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
NomadCommandSystem
Commits
6c5d16ae
Commit
6c5d16ae
authored
Jun 26, 2020
by
Locatelli
Browse files
Start always ploty2, only nomadserver run offscreen plot
parent
f7fed684
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
6c5d16ae
* Start always ploty2, only nomadserver run offscreen plot
4.0.23 25/06/2020
------
* Ploty2, pass instrument nomad server end point as argument
...
...
src/main/java/fr/ill/ics/nscclient/ploty/PlotyInstance.java
View file @
6c5d16ae
...
...
@@ -90,30 +90,21 @@ public class PlotyInstance {
// nomad endpoint is build from selected instrument
nomadServerEndpoint
=
"tcp://"
+
SessionManager
.
getInstance
(
CommandZoneWrapper
.
SERVER_ID
).
getInstrumentName
()
+
":7000"
;
}
if
(
serverEndpoint
.
contentEquals
(
nomadServerEndpoint
))
{
// Client on a same machine as server
try
{
ploty
=
server
.
connect
(
PLOTY_NAME
);
}
catch
(
ConnectionTimeout
e
)
{
System
.
err
.
println
(
"Timeout while connecting "
+
PLOTY_NAME
);
return
false
;
}
// Client on a different machine as server
List
<
Info
>
info
=
server
.
getApplicationInfos
(
PLOTY_NAME
);
if
(
info
.
isEmpty
()
==
false
)
{
server
.
killAllAndWaitFor
(
PLOTY_NAME
);
}
else
{
// Client on a different machine as server
List
<
Info
>
info
=
server
.
getApplicationInfos
(
PLOTY_NAME
);
if
(
info
.
isEmpty
()
==
false
)
{
server
.
killAllAndWaitFor
(
PLOTY_NAME
);
}
// start ploty2 on remote
try
{
String
arg
[]
=
{
nomadServerEndpoint
};
ploty
=
server
.
start
(
PLOTY_NAME
,
arg
);
}
catch
(
ConnectionTimeout
e
)
{
System
.
err
.
println
(
"Timeout while starting "
+
PLOTY_NAME
);
return
false
;
}
// restart ploty2
try
{
String
arg
[]
=
{
nomadServerEndpoint
};
ploty
=
server
.
start
(
PLOTY_NAME
,
arg
);
}
catch
(
ConnectionTimeout
e
)
{
System
.
err
.
println
(
"Timeout while starting "
+
PLOTY_NAME
);
return
false
;
}
// Create the requester.
try
{
plotRequester
=
Application
.
Requester
.
create
(
ploty
,
"plot_requester"
);
...
...
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