From: Philipp Klaus Date: Thu, 10 Aug 2017 09:54:47 +0000 (+0200) Subject: OPUS20: Implement ASG (read-only PVs) X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=6a44dd2efeb0096fb4d162b00c2cdb8206055b9f;p=mvd_epics.git OPUS20: Implement ASG (read-only PVs) --- diff --git a/LUFFT_OPUS20/lufft_opus20_access.as b/LUFFT_OPUS20/lufft_opus20_access.as new file mode 100644 index 0000000..139958e --- /dev/null +++ b/LUFFT_OPUS20/lufft_opus20_access.as @@ -0,0 +1,10 @@ +# readonly.as +# Access security rules +# documentation: http://www.aps.anl.gov/epics/EpicsDocumentation/AppDevManuals/AppDevGuide/3.13.0a3BookFiles/accessSecurity.html +# presentation: EPICS Channel Access Gateway and Access Security +# https://indico.gsi.de/event/4324/contribution/1/material/slides/0.pdf +# examples: https://github.com/ISISComputingGroup/EPICS-AccessSecurity/blob/master/default.acf + +ASG(readonly) { + RULE(1, READ) +} diff --git a/LUFFT_OPUS20/lufft_opus20_ioc.py b/LUFFT_OPUS20/lufft_opus20_ioc.py index a40f025..9e9805c 100755 --- a/LUFFT_OPUS20/lufft_opus20_ioc.py +++ b/LUFFT_OPUS20/lufft_opus20_ioc.py @@ -19,10 +19,10 @@ if __name__ == '__main__': parser.add_argument('--esys', required=True, help='The environmental sub system') args = parser.parse_args() - server = pcaspy.SimpleServer() - prefix = prefix.format(sys=args.sys, sub=args.sub, esys=args.esys) + server = pcaspy.SimpleServer() + server.initAccessSecurityFile('lufft_opus20_access.as', P=prefix) server.createPV(prefix, pvdb) driver = Opus20Driver(args.opus20_hostname) diff --git a/LUFFT_OPUS20/lufft_opus20_pvdb.py b/LUFFT_OPUS20/lufft_opus20_pvdb.py index ad81e32..4423f74 100644 --- a/LUFFT_OPUS20/lufft_opus20_pvdb.py +++ b/LUFFT_OPUS20/lufft_opus20_pvdb.py @@ -7,6 +7,7 @@ pvdb = { 'high' : 28, 'hihi' : 30, 'scan' : 5, + 'asg' : 'readonly', }, 'RelativeHumidity' : { 'prec' : 3, @@ -16,6 +17,7 @@ pvdb = { 'high' : 60, 'hihi' : 70, 'scan' : 5, + 'asg' : 'readonly', }, 'AbsoluteHumidity' : { 'prec' : 3, @@ -23,6 +25,7 @@ pvdb = { 'low' : 5, 'high' : 20, 'scan' : 5, + 'asg' : 'readonly', }, 'Dewpoint' : { 'prec' : 3, @@ -32,6 +35,7 @@ pvdb = { 'high' : 16, 'hihi' : 20, 'scan' : 5, + 'asg' : 'readonly', }, 'BatteryVoltage' : { 'prec' : 3, @@ -41,5 +45,6 @@ pvdb = { 'high' : 6.2, 'hihi' : 6.5, 'scan' : 5, + 'asg' : 'readonly', }, }