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
67924e18
Commit
67924e18
authored
Jul 17, 2020
by
Locatelli
Browse files
Add token stuff in ploty2
parent
45cdc9f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
67924e18
* Add token stuff in ploty2
4.0.27 06/07/2020
------
* Change updateImageData message for ploty version 1: give all the path of the image
...
...
pom.xml
View file @
67924e18
...
...
@@ -61,7 +61,7 @@
<dependency>
<groupId>
fr.ill.ics
</groupId>
<artifactId>
nomadcommandsystem-messages
</artifactId>
<version>
0.0.1
1
</version>
<version>
0.0.1
2
</version>
</dependency>
<dependency>
<groupId>
fr.ill.ics
</groupId>
...
...
src/main/java/fr/ill/ics/nscclient/ploty/PlotyInstance.java
View file @
67924e18
...
...
@@ -27,6 +27,7 @@ import java.util.List;
import
java.util.Set
;
import
fr.ill.ics.bridge.command.CommandZoneWrapper
;
import
fr.ill.ics.bridge.events.TokenEvent.RemoteControlServerState
;
import
fr.ill.ics.cameo.Application
;
import
fr.ill.ics.cameo.Application.Info
;
import
fr.ill.ics.cameo.ConnectionTimeout
;
...
...
@@ -35,6 +36,7 @@ import fr.ill.ics.cameo.Server;
import
fr.ill.ics.core.property.Property
;
import
fr.ill.ics.nscclient.sessionmanagement.SessionManager
;
import
fr.ill.ics.ploty.DataPlotMessages
;
import
fr.ill.ics.ploty.DataPlotMessages.ClientInfo
;
import
fr.ill.ics.ploty.DataPlotMessages.Message
;
import
fr.ill.ics.ploty.DataPlotMessages.PlotPropertyDataMessage
;
import
fr.ill.ics.util.ConfigManager
;
...
...
@@ -175,11 +177,24 @@ public class PlotyInstance {
System
.
out
.
println
(
"Unsubscribed from the spy plot change"
);
}
public
void
restorePlots
()
{
public
void
restorePlots
(
RemoteControlServerState
remoteaccess
,
boolean
tokenfree
,
boolean
tokenownebyme
)
{
Message
messageFirst
=
DataPlotMessages
.
Message
.
newBuilder
().
setType
(
DataPlotMessages
.
Message
.
Type
.
RestorePlots
).
build
();
plotRequester
.
send
(
messageFirst
.
toByteArray
());
int
remotecontrolstate
=
0
;
if
(
remoteaccess
==
RemoteControlServerState
.
DISABLED
)
{
remotecontrolstate
=
1
;
}
else
if
(
remoteaccess
==
RemoteControlServerState
.
ENABLED
)
{
remotecontrolstate
=
2
;
}
ClientInfo
messageSecond
=
DataPlotMessages
.
ClientInfo
.
newBuilder
().
setClientType
(
ConfigManager
.
getInstance
().
getClientType
()).
setClientId
(
SessionManager
.
getInstance
(
CommandZoneWrapper
.
SERVER_ID
).
getClientId
()).
setRemoteControlState
(
remotecontrolstate
).
setTokenfree
(
tokenfree
).
setTokenownbyme
(
tokenownebyme
).
build
();
plotRequester
.
sendTwoParts
(
messageFirst
.
toByteArray
(),
messageSecond
.
toByteArray
());
}
public
void
closePlots
()
{
...
...
@@ -205,8 +220,14 @@ public class PlotyInstance {
List
<
String
>
roiY0_parentPropName
,
List
<
String
>
roiX1_parentPropName
,
List
<
String
>
roiY1_parentPropName
,
List
<
String
>
roiSum_parentPropName
,
String
roiSelectedPlot_prop_name
,
String
roiSelectedRoi_prop_name
,
String
roiSelectedX0_prop_name
,
String
roiSelectedY0_prop_name
,
String
roiSelectedX1_prop_name
,
String
roiSelectedY1_prop_name
,
String
roiCommandAdd_prop_name
,
String
roiCommandRaz_prop_name
,
String
countActivated_prop_name
)
{
String
roiCommandAdd_prop_name
,
String
roiCommandRaz_prop_name
,
String
countActivated_prop_name
,
RemoteControlServerState
remoteaccess
,
boolean
tokenfree
,
boolean
tokenownebyme
)
{
int
remotecontrolstate
=
0
;
if
(
remoteaccess
==
RemoteControlServerState
.
DISABLED
)
{
remotecontrolstate
=
1
;
}
else
if
(
remoteaccess
==
RemoteControlServerState
.
ENABLED
)
{
remotecontrolstate
=
2
;
}
if
(
initOk
==
false
)
return
;
String
title_prop_name
=
""
;
...
...
@@ -227,6 +248,14 @@ public class PlotyInstance {
setType
(
DataPlotMessages
.
Message
.
Type
.
PlotPropertyData
).
build
();
ClientInfo
clientinfo
=
DataPlotMessages
.
ClientInfo
.
newBuilder
().
setClientType
(
ConfigManager
.
getInstance
().
getClientType
()).
setClientId
(
SessionManager
.
getInstance
(
CommandZoneWrapper
.
SERVER_ID
).
getClientId
()).
setRemoteControlState
(
remotecontrolstate
).
setTokenfree
(
tokenfree
).
setTokenownbyme
(
tokenownebyme
).
build
();
PlotPropertyDataMessage
messageSecond
=
DataPlotMessages
.
PlotPropertyDataMessage
.
newBuilder
().
setControllerName
(
controllerName
).
setPlotkey
(
plotkey
).
...
...
@@ -281,6 +310,7 @@ public class PlotyInstance {
setCommandRoiAddPropName
(
roiCommandAdd_prop_name
).
setCommandRoiRazPropName
(
roiCommandRaz_prop_name
).
setCountActivatedPropName
(
countActivated_prop_name
).
setClientinfo
(
clientinfo
).
build
();
plotRequester
.
sendTwoParts
(
messageFirst
.
toByteArray
(),
messageSecond
.
toByteArray
());
...
...
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