]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
OPUS20: Implement ASG (read-only PVs)
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Thu, 10 Aug 2017 09:54:47 +0000 (11:54 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Thu, 10 Aug 2017 09:54:47 +0000 (11:54 +0200)
LUFFT_OPUS20/lufft_opus20_access.as [new file with mode: 0644]
LUFFT_OPUS20/lufft_opus20_ioc.py
LUFFT_OPUS20/lufft_opus20_pvdb.py

diff --git a/LUFFT_OPUS20/lufft_opus20_access.as b/LUFFT_OPUS20/lufft_opus20_access.as
new file mode 100644 (file)
index 0000000..139958e
--- /dev/null
@@ -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)
+}
index a40f02521aae0c82201360e3ccfaf9f5a300ac6b..9e9805c69c0eace885045b4204177aeb1aaa3b42 100755 (executable)
@@ -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)
 
index ad81e3236b8e07b36baa28ea68fb64a021a2ffce..4423f741b24ec83979f675306f9553eeda1ea52f 100644 (file)
@@ -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',
     },
 }