-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart loops control offset #77
Smart loops control offset #77
Conversation
Sorry to bother but could we split this into two PRs |
@@ -69,7 +100,7 @@ public class EpicsTcsOffsetIOC implements TcsOffsetIOC { | |||
/** | |||
* HashMap used to store the open and close loops sequence actions. | |||
*/ | |||
private HashMap<String, ReadWriteClientEpicsChannel<String>> _chLoops = new HashMap<>(); | |||
private HashMap<String, ChannelAccess> _caLoops = new HashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change, If I understand correctly here we have a map of names to channel but it seems this is now a map of names to the global channel access? or is ChannelAccess
specific to one channel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it is implemented in the ChannelAccess (link) class and their derivated class. This one was necessary because I changed the structure of the json configuration file. Another important aspect of this json is that now the sequence defines what it depends on in order to open or close the loop. For example, if the operator is using P2, this value has to be true in the TCS. Therefore, the sequence will check this CA, and if the specified value is met, the integration will stop. All commands that were executed (in the "open loop sequence") are checked and in the "closed loop sequence" only those that were previously checked will be activated. Therefore, only the loops configured by the SOS will be actuated.
public boolean check(JsonElement val) { | ||
try { | ||
return val.getAsShort() == _epicsChannel.getFirst(); | ||
} catch (CAException | TimeoutException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, I haven't seen those early, this must be a newer java feature
@@ -1,7 +1,8 @@ | |||
# Contains the description of the properties that can be obtained through the | |||
# GIAPI. Each property has a string value associated. | |||
|
|||
GMP_HOST_NAME = localhost | |||
#GMP_HOST_NAME = localhost | |||
GMP_HOST_NAME = 172.18.13.80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the one we use for local development,, do we want it to point to IG2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, good point. I am going to change it. Thanks!!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks some small comments inline
…/gmp into smart_loops_control_offset
thank you Carlos for reviewing the PR. |
This version of GMP has two improvements:
It also has the latest keyword configuration updated.