82 lines
3.3 KiB
Markdown
82 lines
3.3 KiB
Markdown
# Configuring the variables and their parameters
|
|
|
|
A programmer can configure the curves that are displayed in the graphical part.
|
|
|
|
All this can be configured in the `variables_config.ini` file.
|
|
|
|
## Functionnalities summary
|
|
|
|
A programmer can :
|
|
|
|
For a variable :
|
|
- show a parameter which is not "value" or "target"
|
|
- hide "value" or "target" parameter
|
|
|
|
For a parameter :
|
|
- specify the category of the corresponding curve
|
|
- specify the color of the corresponding curve
|
|
- specify the unit of the corresponding curve
|
|
|
|
|
|
## File structure
|
|
|
|
```ini
|
|
[chart]
|
|
<variable.parameter>=<options>
|
|
```
|
|
|
|
## Indicating a parameter
|
|
|
|
To indicate a parameter, the programmer has first to indicate the SECOP name of the variable (case sensitive).
|
|
If the options are concerning the `value` field, then nothing more has to be specified.
|
|
- Example : `T_plato`
|
|
|
|
In the other case, the programmer has to use a dot, followed by the name of the parameter (as it is in NICOS).
|
|
- Example : `T_plato.raw`
|
|
|
|
Finally, the equal sign must be used to then indicate the options and their values.
|
|
- Example : `T_plato.target=<options>`
|
|
|
|
## Giving the options
|
|
|
|
### Using positionnal arguments
|
|
|
|
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.
|
|
|
|
### Using keywords arguments
|
|
|
|
One can indicate to which option a value is given, independently of its position in the comma separated list, by using keywords. This can be useful if we want to indicate only the unit without indicating/overwritting the category and/or the color.
|
|
|
|
To use keywords : `<keyword>:<value>`
|
|
|
|
Possible keywords are :
|
|
- `cat` : specifies the category
|
|
- `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).
|
|
|
|
### 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`.
|
|
|
|
## 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.
|
|
|
|
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.
|
|
|
|
## 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 |