T controller tutorial and improve documentation
add tutorial for Berlin hands-on workshop + improve the documentation (hints for structure welcome) + remove 'optional' parameter property (is not yet used - should not appear in doc) + added test property in frappy_demo.cryo alters Parameter class ('test' property appears in Parameter doc) Change-Id: I3ea08f955a92f72451fd23a5ff00d1185c7fb00e
This commit is contained in:
@ -1,47 +1,42 @@
|
||||
Server
|
||||
------
|
||||
|
||||
Configuration
|
||||
.............
|
||||
|
||||
The configuration consists of a **NODE** section, an **INTERFACE** section and one
|
||||
section per SECoP module.
|
||||
The configuration code consists of a :ref:`Node() <node configuration>` section, and one
|
||||
:ref:`Mod() <mod configuration>` section per SECoP module.
|
||||
|
||||
The **NODE** section contains a description of the SEC node and a globally unique ID of
|
||||
the SEC node. Example:
|
||||
The **Node** section contains a globally unique ID of the SEC node,
|
||||
a description of the SEC node and the server interface uri. Example:
|
||||
|
||||
.. code::
|
||||
.. code:: python
|
||||
|
||||
[NODE]
|
||||
description = a description of the SEC node
|
||||
id = globally.valid.identifier
|
||||
Node('globally.valid.identifier',
|
||||
'a description of the SEC node',
|
||||
interface = 'tcp://5000')
|
||||
|
||||
The **INTERFACE** section defines the server interface. Currently only tcp is supported.
|
||||
When the TCP port is given as an argument of the server start script, this section is not
|
||||
needed or ignored. The main information is the port number, in this example 5000:
|
||||
For the interface scheme currently only tcp is supported.
|
||||
When the TCP port is given as an argument of the server start script, **interface** is not
|
||||
needed or ignored. The main information is the port number, in this example 5000.
|
||||
|
||||
.. code::
|
||||
|
||||
[INTERFACE]
|
||||
uri = tcp://5000
|
||||
|
||||
|
||||
All other sections define the SECoP modules. The section name itself is the module name,
|
||||
mandatory fields are **class** and **description**. **class** is a path to the Python class
|
||||
from there the module is instantiated, separated with dots. In the following example the class
|
||||
All other :ref:`Mod() <mod configuration>` sections define the SECoP modules.
|
||||
Mandatory fields are **name**, **cls** and **description**. **cls** is a path to the Python class
|
||||
from where the module is instantiated, separated with dots. In the following example the class
|
||||
**HeLevel** used by the **helevel** module can be found in the PSI facility subdirectory
|
||||
frappy_psi in the python module file ccu4.py:
|
||||
|
||||
.. code::
|
||||
.. code:: python
|
||||
|
||||
[helevel]
|
||||
class = frappy_psi.ccu4.HeLevel
|
||||
description = this is the He level sensor of the main reservoir
|
||||
empty = 380
|
||||
empty.export = False
|
||||
full = 0
|
||||
full.export = False
|
||||
Mod('helevel',
|
||||
'frappy_psi.ccu4.HeLevel',
|
||||
'this is the He level sensor of the main reservoir',
|
||||
empty_length = Param(380, export=False),
|
||||
full = Param(0, export=False))
|
||||
|
||||
It is highly recommended to use all lower case for the module name, as SECoP names have to be
|
||||
unique despite of casing. In addition, parameters, properties and parameter properties might
|
||||
be initialized in this section. In the above example **empty** and **full** are parameters,
|
||||
be initialized in this section. In the above example **empty_length** and **full_length** are parameters,
|
||||
the resistivity of the He Level sensor at the end of the ranges. In addition, we alter the
|
||||
default property **export** of theses parameters, as we do not want to expose these parameters to
|
||||
the SECoP interface.
|
||||
@ -54,12 +49,12 @@ The Frappy server can be started via the **bin/frappy-server** script.
|
||||
|
||||
.. parsed-literal::
|
||||
|
||||
usage: frappy-server [-h] [-v | -q] [-d] name
|
||||
usage: bin/frappy-server [-h] [-v | -q] [-d] [-t] [-p port] [-c cfgfiles] name
|
||||
|
||||
Manage a Frappy server
|
||||
|
||||
positional arguments:
|
||||
name name of the instance. Uses etc/name.cfg for configuration
|
||||
name name of the instance. Uses <config path>/name_cfg.py for configuration
|
||||
|
||||
optional arguments:
|
||||
-c, --cfgfiles config files to be used. Comma separated list.
|
||||
|
Reference in New Issue
Block a user