Subsections

C. Tango object naming (device, attribute and property)



1 Device name


A Tango device name is a three fields name. The field separator is the / character. The first field is named domain, the second field is named family and the last field is named member.A tango device name looks like
domain/family/member
It is a hierarchical notation. The member specifies which element within a family. The family specifies which kind of equipment within a domain. The domain groups devices related to which part of the accelerator/experiment they belongs to. At ESRF, some of the machine control system domain name are SR for the storage ring, TL1 for the transfer line 1 or SY for the synchrotron booster. For experiment, ID11 is the domain name for all devices belonging to the experiment behind insertion device 11. Here are some examples of Tango device name used at the ESRF :

2 Full object name


The device name as described above is not enough to cover all Tango usage like device server without database or device access for multi control system. With the naming schema, we must also be able to name attribute and property. Therefore, the full naming schema is
[protocol://][host:port/]device_name[/attribute][->property][#dbase=xx]
The protocol, host, port, attribute, property and dbase fields are optional. The meaning of these fields are : The host:port and dbase=xx fields are necessary only when creating the DeviceProxy object used to remotely access the device. The -> characters are used to specify a property name.

1 Some examples


1 Full device name examples


2 Attribute name examples


3 Attribute property name


4 Device property name


5 Class property name



3 Device and attribute name alias


Within Tango, each device or attribute can have an alias name defined in the database. Every time a device or an attribute name is requested by the API's, it is possible to use the alias. The alias is simply an open string stored in the database. The rule of the alias is to give device or attribute name a name more natural from the physicist point of view. Let's imagine that for experiment, the sample position is described by angles called teta and psi in physics book. It is more natural for physicist when they move the motor related to sample position to use teta and psi rather device name like idxx/mot/1 or idxx/mot/2. An attribute alias is a synonym for the four fields used to name an attribute. For instance, the attribute Current of a power-supply device called sr/ps/dipole could have an alias DipoleCurrent. This alias can be used when creating an instance of a AttributeProxy class instead of the full attribute name which is sr/ps/dipole/Current. Device alias name are uniq within a Tango control system. Attribute alias name are also uniq within a Tango control system.

4 Reserved words and characters, limitations


From the naming schema described above, the reserved characters are :,#,/ and the reserved string is : ->. On top of that, the dbt_update tool (tool to fulfill database from the content of a file) reserved the device word
The device name, its domain, member and family fields and its alias are stored in the Tango database. The default maximum size for these items are :



Item max length
device name 255
domain field 85
family field 85
member field 85
device alias name 255





The device name, the command name, the attribute name, the property name, the device alias name and the device server name are case insensitive.
Emmanuel Taurel 2012-06-06