Properties

Hi,
I'm reading some notes about Properties and they says:"
You can define properties at
- object level (free properties)
- class level
- device level "

Properties at class level and device level are clear for me, but I don't understand "object level". I searched in "The Tango Book" without success smile.

Thanks.


I guess the use case for this is to store free properties not tied to any specific class or device, but rather been of general interest for all the control system. For example you may want to have some general properties for your "Accelerator", which may include (for example) "Diameter", "Sectors", …

You can create free properties in jive in the "Edit -> Create free property". In our example this may be a free property named "Accelerator". Once created you can create properties for this new free property by going in jive to the "Property" tab, then selecting your free property (e.g. "Accelerator") and then clicking on the "New property" button to define your properties (e.g. "Diameter", "Sectors", …)

Then you can retrieve these properties in your code, for example in python:

import PyTango

db = PyTango.Database()
db.get_property("Accelerator",["Diameter"])
thanks!
 
Register or login to create to post a reply.