Updated docs for variables config files
This commit is contained in:
@ -1,8 +1,21 @@
|
||||
# Configuring the variables and their parameters
|
||||
|
||||
A programmer can configure the curves that are displayed in the graphical part.
|
||||
A programmer can configure the curves that are displayed in the graphical part with one or more config files.
|
||||
|
||||
All this can be configured in the `variables_config.ini` file.
|
||||
Such a file has to be located under the `config/` folder.
|
||||
|
||||
## Chaining configuration files
|
||||
|
||||
The current process for getting the different information is the following :
|
||||
1. Available variables and parameters are got from InfluxDB, more specifically in the `setup_info` field of the measurements `nicos/se_main`, `nicos/se_stick`, `nicos/se_addons`. Here :
|
||||
- The category `+` is given to parameters `value` and `target`, the category `-` is given to any other parameters.
|
||||
- The unit is `1` is it is not present or if it is an empty string, or the unit if correct.
|
||||
- The color is not given yet.
|
||||
2. The configuration file `generic.ini` is first used to modify the different values for each couple variable/parameter.
|
||||
3. The configuration file `<instrument>.ini` is then used.
|
||||
4. When the available variables are got via the GUI, the user configuration is finally used.
|
||||
|
||||
If a color was not given yet, an automatic color is used.
|
||||
|
||||
## Functionnalities summary
|
||||
|
||||
@ -44,9 +57,7 @@ Finally, the equal sign must be used to then indicate the options and their valu
|
||||
One can give the different options for a parameter by using a comma separated value (without spaces around commas) list.
|
||||
The order is `cat`, `color`, `unit`.
|
||||
|
||||
- Example : `T_plato.raw=raw,#0000FF` This indicates that the `raw` parameter will be displayed in the raw category of its unit (found in NICOS if present), and will have a blue color.
|
||||
|
||||
Be aware that this example is not the same as : `T_plato.raw=raw,#0000FF,` that indicates a unit equal to nothing.
|
||||
- Example : `T_plato.raw=raw,#0000FF` This indicates that the `raw` parameter will be displayed in the raw category of its unit (inherited from previous configuration files), and will have a blue color.
|
||||
|
||||
### Using keywords arguments
|
||||
|
||||
@ -59,24 +70,23 @@ Possible keywords are :
|
||||
- `color` : specifies the color (6 digits hexadecimal color)
|
||||
- `unit` : specifies the unit
|
||||
|
||||
Example : `T_plato=color:#0000FF,cat:other` This indicates that the `value` parameter of T_plato will be displayed in blue, in the "other" category of its unit (found in NICOS if present).
|
||||
Example : `T_plato=color:#0000FF,cat:other` This indicates that the `value` parameter of T_plato will be displayed in blue, in the "other" category of its unit (inherited from previous configuration files).
|
||||
|
||||
### Using both
|
||||
|
||||
Once a keyword argument is used for a parameter, it is then not possible to use positionnal arguments for this parameter.
|
||||
- Example : `T_plato=unit:K,#FF0000` is invalid, because no keyword is given after the use of `unit` for the other options.
|
||||
|
||||
Valid syntaxes for this example are `T_plato=unit:K,color:#FF0000` or `T_plato=color:#FF0000,unit:K`.
|
||||
Valid syntaxes for this example are `T_plato=unit:K,color:#FF0000` or `T_plato=color:#FF0000,unit:K`, or `T_plato=,#FF0000,K`.
|
||||
|
||||
## Special values and omissions
|
||||
|
||||
If `cat` is `None`, then the associated parameter is not displayed. This value is case-sensitive. This can be used to explicitely hide `value` and/or `target` parameters of a variable.
|
||||
If `cat` is `+`, then the associated parameter is displayed, in the block of its unit.
|
||||
If `cat` is `-`, then the associated parameter is not displayed. This can be used to explicitely hide `value` and/or `target` parameters of a variable.
|
||||
|
||||
Omitting the category means that the parameter will be displayed in the default unit block.
|
||||
Omitting the color means that an automatic color will be given for this parameter.
|
||||
Omitting the unit means that it will be the one found in NICOS if present.
|
||||
Omitting a value means that it will be inherited from the previous configuration files.
|
||||
|
||||
## Diverse examples
|
||||
|
||||
- `T_plato=None` : the `value` parameter of T_plato is never displayed
|
||||
- `T_plato.raw=` : the `raw` parameter of T_plato will be displayed with an automatic color, will have its unit found in NICOS, and will be displayed in the default block corresponding to its unit
|
||||
- `T_plato=-` : the `value` parameter of T_plato is never displayed
|
||||
- `T_plato.raw=+` : the `raw` parameter of T_plato will be displayed in the default block corresponding to its unit
|
Reference in New Issue
Block a user