paulscherrerinstitute / pcaspy

Portable Channel Access Server in Python
BSD 3-Clause "New" or "Revised" License
33 stars 24 forks source link

Do Not Have Acces To General Record Field Types #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Thank you for providing such a great python/epics interface.  I am new to this 
structure though, is there any way to define PVs so that I can have access to 
the general fields of PVs?  By this I mean, I would like to define TST:PV:01 
and be able to look at TST:PV:01.DESC for example.  Using the construction of 
PV databases in the tutorial does not seem to allow this functionality.  Am I 
missing something?

I am running 0.4.1 on a RedHat 6 machine

Any help would be greatly appreciated

Thank you

Original issue reported on code.google.com by reece.fi...@gmail.com on 21 Nov 2014 at 6:41

GoogleCodeExporter commented 9 years ago
Some background information. In EPICS IOC, the records consist of various 
fields, DESC, DTYP etc. Each of these fields is a PV (Process Variable) by 
themselves. The channel access server of IOC (named RSRV) understands that PV 
TST:PV:01.DESC is actually referring to the field of record TST:PV:01, and 
TST:PV:01.VAL is an alas of TST:PV:01. While in a Portable Channel Access 
Server (PCAS) application, like what we write in PCASpy, servers only PVs. This 
means if you only create PV TST:PV:01, you won't be able to access it with 
TST:PV:01.VAL, nor there exists TST:PV:01.DESC. EVETY PV must be created 
explicitly. 

For your application, the PV database would look like this

pvdb = {
   '01' : {'prec': 3, 'unit': 'Volts'},
   '01.DESC' : {'type': 'string', 'value': 'Power Supply Voltage'}
}

I hope this would make it clean.

Original comment by xiaoqian...@gmail.com on 21 Nov 2014 at 9:17

GoogleCodeExporter commented 9 years ago
Ah, I see.  Thank you for clarifying this.  Your response is very helpful.

Original comment by reece.fi...@gmail.com on 21 Nov 2014 at 10:16

GoogleCodeExporter commented 9 years ago

Original comment by xiaoqian...@gmail.com on 3 Dec 2014 at 8:30