Use the property file

Use the property file#

audience:administrators audience:developers

A property file is a file where you store all the properties related to devices belonging to a specific device server process. In this file, one can find:

  • Which devices have to be created for each Tango class embedded in the device server process

  • Device properties

  • Device attribute properties

This type of file is not required by a Tango control system as this information is stored in the Tango Database as well.

But if you want to run the File Database this is the format that will be used. These files can either be written from scratch using the example below or exported from Jive. To generate a device server process properties file, select your device server process in the Server tab, right click and select Save Server Data. A file selection window pops up allowing you to choose your file name and path. To load a file into the Tango database, click on File then Load Property File.

Property file example#

 1 #---------------------------------------------------------
 2 # SERVER TimeoutTest/manu, TimeoutTest device declaration
 3 #---------------------------------------------------------
 4
 5 TimeoutTest/manu/DEVICE/TimeoutTest: "et/to/01",\
 6                                      "et/to/02",\
 7                                      "et/to/03"
 8
 9
10 # --- et/to/01 properties
11 et/to/01->StringProp: Property
12 et/to/01->ArrayProp: 1,\
13                      2,\
14                      3
15 et/to/01->attr_min_poll_period: TheAttr,\
16                                 1000
17 et/to/01->AnotherStringProp: "A long string"
18 et/to/01->ArrayStringProp: "the first prop",\
19                            "the second prop"
20
21 # --- et/to/01 attribute properties
22 et/to/01/TheAttr->display_unit: 1.0
23 et/to/01/TheAttr->event_period: 1000
24 et/to/01/TheAttr->format: %4d
25 et/to/01/TheAttr->min_alarm: -2.0
26 et/to/01/TheAttr->min_value: -5.0
27 et/to/01/TheAttr->standard_unit: 1.0
28 et/to/01/TheAttr->__value: 111
29 et/to/01/BooAttr->event_period: 1000
30 et/to/01/TestAttr->display_unit: 1.0
31 et/to/01/TestAttr->event_period: 1000
32 et/to/01/TestAttr->format: %4d
33 et/to/01/TestAttr->standard_unit: 1.0
34 et/to/01/DbAttr->abs_change: 1.1
35 et/to/01/DbAttr->event_period: 1000
36
37 # --- class property
38 CLASS/TimeoutTest->InheritedFrom: Device_6Impl
39 CLASS/TimeoutTest->doc_url: "https://www.myfancywebsite.eu"
40
41 # --- class attribute property
42 CLASS/MotorClass/position->unit: "nm"
43
44 # --- free CtrlSystem property
45 FREE/CtrlSystem->AutoAlarmOnChangeEvent: false
Example explanations#

Line

Explanation

1-3

Comment lines start with the # character and extend until the end of the line

4

Blank lines are skipped

5-7

Device definition. DEVICE is the keyword to declare a devices definition sequence. The syntax is

  <DS name>/<inst name>/DEVICE/<Class name>: dev1,dev2,dev3

A device’s name can also follow on the next line if the line continuation character \ is used as the last character, see lines 5 and 6. The " (quote) characters around the device names are generated by Jive and are not mandatory.

11

Device property definition. The syntax is

    <device name>-><property name>: <property value>

In the case of array properties, the array element delimiter is the character ,. Array definition can be split over several lines if the last line character is \. Allowed characters after the : delimiter are space, tab or nothing.

12-15 & 15-16

Device property (array)

18

When a device string property contains special characters (spaces), the " character is used to delimit the strings.

22-35

Device attribute property definition. The syntax is

  <device name>/<attribute name>-><property name>: <property value>

Allowed characters after the : delimiter are space, tab or nothing.

38-39

Class property definition. The syntax is

  CLASS/<class name>-><property name>: <property value>

Allowed characters after the : delimiter are space, tab or nothing. On line 39, the " (quote) characters around the property value are mandatory due to the / character being contained in the property value.

42

Class attribute property definition. The syntax is

  CLASS/<class name>/<attribute name>-><property name>: <property value>

This differs from a class property only by the inserted /<attribute name>. Allowed characters after the : delimiter are space, tab or nothing.

45

Free properties. The syntax is

  FREE/<object name>-><property name>: <property value>

Although object name can be freely choosen, it is convention to use CtrlSystem for free properties used in across multiple tango applications. Allowed characters after the : delimiter are space, tab or nothing.