-
Notifications
You must be signed in to change notification settings - Fork 1
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
allow device to be put in read-only mode via the GUI #414
Conversation
@@ -27,7 +29,8 @@ CAENx527ConfigureCreate "hv0", "127.0.0.1" | |||
|
|||
## Load our record instances | |||
#dbLoadRecords("db/xxx.db","user=faa59Host") | |||
CAENx527DbLoadRecords("P=$(MYPVPREFIX)CAEN, ALARM_WHEN_ON=$(ALARM_WHEN_ON=NO_ALARM), ALARM_WHEN_RAMPING=$(ALARM_WHEN_RAMPING=NO_ALARM)") | |||
$(CAN_WRITE= ) CAENx527DbLoadRecords("P=$(MYPVPREFIX)CAEN, ALARM_WHEN_ON=$(ALARM_WHEN_ON=NO_ALARM), ALARM_WHEN_RAMPING=$(ALARM_WHEN_RAMPING=NO_ALARM), ASG=READONLY") | |||
$(IFREADONLY= ) CAENx527DbLoadRecords("P=$(MYPVPREFIX)CAEN, ALARM_WHEN_ON=$(ALARM_WHEN_ON=NO_ALARM), ALARM_WHEN_RAMPING=$(ALARM_WHEN_RAMPING=NO_ALARM), ASG=DEFAULT") |
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.
Using this approach we have to duplicate lines in a number of places, this makes the code harder to change in future. How about just passing down the ASG directly from the config (restricted to just READONLY
and DEFAULT
by the pattern)? This way we don't need to worry about any extra code. I also thing READONLY
/DEFAULT
are clearer options for a user than #
/
(even with an explanation).
<macros> | ||
<macro name ="IFREADONLY" pattern="^ |#$" description="Whether device is readonly. Set to # for readonly, default is ' ' (just spacebar), for read and write" /> | ||
</macros> | ||
</config_part> |
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 isn't a very user-friendly macro to set, even with the additional description/explanation. As per comment below maybe just pass the ASG directly here as DEFAULT
/READONLY
as this is clearer.
@KathrynBaker would the changes suggested here be acceptable? |
Description of work
Can now set the access security group for all output records to read-only, via a macro.
Ticket
DETMON: Read only option for the HVCAEN IOC #4184
Acceptance criteria
The IOC can be set to read-only mode via the "IFREADONLY" macro, but is not in read-only mode by default.
Code Review
Functional Tests
..._0n
wheren>1
) run correctlymacLib: macro
to find instances ofmacLib: macro [macro name] is undefined...
Final steps