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
f2c650ef
Commit
f2c650ef
authored
Jun 13, 2017
by
legoc
Browse files
Merge branch 'change-event-process-order'
parents
7e0a75a3
94bf9b9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
f2c650ef
3.0.5-SNAPSHOT
--------------
* Catch exception thrown when trying to format a invalid float value (avoid a client crash : see brisp 03 nov 2016).
3.1.1
-----
* Catch exception thrown when trying to format a invalid float value (avoid a client crash : see brisp 03 nov 2016).
* Replaced Corba with Cameo.
3.0.4
-----
...
...
@@ -20,7 +21,6 @@
3.0.0
-----
* First release with Maven build process management.
* "GUI zero-crash" mode.
* Inherited controllers / drivers management.
...
...
src/main/java/fr/ill/ics/nscclient/notification/DataNotificationClient.java
View file @
f2c650ef
...
...
@@ -83,13 +83,23 @@ public class DataNotificationClient {
}
return
instance
;
}
private
void
updatePendingChanges
(
INotificationData
change
)
{
// We do not add the change at the end of the list if it is already there.
// We used to move it at the end but some priority inversion could lead to problems.
if
(!
pendingChanges
.
contains
(
change
))
{
pendingChanges
.
add
(
change
);
}
else
{
//System.out.println("Not adding " + change);
}
}
public
void
propertyChanged
(
int
databaseID
,
int
propertyID
)
{
//System.out.println("Got property change with ID " + propertyID);
synchronized
(
pendingChanges
)
{
PropertyChangedNotificationData
change
=
new
PropertyChangedNotificationData
(
databaseID
,
propertyID
);
pendingChanges
.
remove
(
change
);
pendingChanges
.
add
(
change
);
updatePendingChanges
(
change
);
}
}
...
...
@@ -97,8 +107,7 @@ public class DataNotificationClient {
//System.out.println("Got command state change with ID " + commandID + " with " + state);
synchronized
(
pendingChanges
)
{
CommandStateChangedNotificationData
change
=
new
CommandStateChangedNotificationData
(
databaseID
,
commandID
,
state
);
pendingChanges
.
remove
(
change
);
pendingChanges
.
add
(
change
);
updatePendingChanges
(
change
);
}
}
...
...
@@ -106,40 +115,40 @@ public class DataNotificationClient {
//System.out.println("Got command progression change with ID " + commandID);
synchronized
(
pendingChanges
)
{
CommandProgressionChangedNotificationData
change
=
new
CommandProgressionChangedNotificationData
(
databaseID
,
commandID
,
progression
);
pendingChanges
.
remove
(
change
);
pendingChanges
.
add
(
change
);
updatePendingChanges
(
change
);
}
}
public
void
configurationChanged
(
int
databaseID
,
int
servantID
,
ClientEnableState
enable
)
{
synchronized
(
pendingChanges
)
{
ConfigurationChangedNotificationData
change
=
new
ConfigurationChangedNotificationData
(
databaseID
,
servantID
,
enable
);
pendingChanges
.
remove
(
change
);
pendingChanges
.
add
(
change
);
updatePendingChanges
(
change
);
}
}
public
void
conditionStateChanged
(
int
conditionId
,
boolean
on
,
ClientConditionState
clientState
)
{
synchronized
(
pendingChanges
)
{
ConditionStateChangedNotificationData
change
=
new
ConditionStateChangedNotificationData
(
conditionId
,
on
,
clientState
);
pendingChanges
.
remove
(
change
);
pendingChanges
.
add
(
change
);
updatePendingChanges
(
change
);
}
}
public
void
conditionActionsStateChanged
(
int
conditionId
,
ClientConditionState
clientState
)
{
synchronized
(
pendingChanges
)
{
ConditionActionsStateChangedNotificationData
change
=
new
ConditionActionsStateChangedNotificationData
(
conditionId
,
clientState
);
pendingChanges
.
remove
(
change
);
pendingChanges
.
add
(
change
);
updatePendingChanges
(
change
);
}
}
public
void
errorOccurred
(
String
serverId
,
String
message
)
{
synchronized
(
pendingServerErrors
)
{
ServerErrorEvent
change
=
new
ServerErrorEvent
(
serverId
,
""
,
""
,
message
);
pendingChanges
.
remove
(
change
);
pendingServerErrors
.
add
(
change
);
// We do not add the change at the end of the list if it is already there.
// We used to move it at the end but some priority inversion could lead to problems.
if
(!
pendingServerErrors
.
contains
(
change
))
{
pendingServerErrors
.
add
(
change
);
}
}
}
...
...
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