nxsconfigserver 2.15.0__tar.gz → 2.17.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nxsconfigserver-2.17.0/.ci/install.sh +85 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.github/workflows/tests.yml +1 -1
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/ChangeLog +8 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/NXSConfigServer.xmi +17 -4
- nxsconfigserver-2.17.0/PKG-INFO +476 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/Attributes.html +10 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/FullDocument.html +184 -46
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/Properties.html +6 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/Merger.py +114 -33
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/NXSConfigServer.py +48 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/Release.py +1 -1
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/XMLConfigurator.py +63 -0
- nxsconfigserver-2.17.0/nxsconfigserver.egg-info/PKG-INFO +476 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/Merger_test.py +328 -11
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/XMLConfigurator_test.py +6 -2
- nxsconfigserver-2.15.0/.ci/install.sh +0 -60
- nxsconfigserver-2.15.0/PKG-INFO +0 -477
- nxsconfigserver-2.15.0/nxsconfigserver.egg-info/PKG-INFO +0 -477
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian10_py2/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian10_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian11_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian8_py2/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian8_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian9_py2/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/debian9_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/run.sh +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.flake8 +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.gitignore +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/.oldtravis.yml +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/COPYRIGHT +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/MANIFEST.in +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/NXSConfigServer +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/README.rst +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/conf/my.cnf +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/conf/mysql_create.sql +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc/Makefile +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc/conf.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc/index.rst +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc/make.bat +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc/nxsconfigserver.rst +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrCanFailDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrJSONSettings.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrLinkDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrSTEPDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrSelection.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrVariables.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrVersion.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/AttrXMLString.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/ClassDescription.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdAvailableComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdAvailableDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdAvailableSelections.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdClose.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdComponentDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdComponentVariables.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdComponentsDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdComponentsVariables.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdCreateConfiguration.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdDeleteComponent.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdDeleteDataSource.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdDeleteSelection.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdDependentComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdInstantiatedComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdMandatoryComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdMerge.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdOpen.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdSelections.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdSetComponentDataSources.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdSetMandatoryComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdState.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdStatus.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdStoreComponent.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdStoreDataSource.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdStoreSelection.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/CmdUnsetMandatoryComponents.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/Commands.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/States.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/TitleBanner.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/doc_html/index.html +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/man/NXSConfigServer.1 +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/ComponentParser.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/Errors.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/MYSQLDataBase.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/StreamSet.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver/__init__.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver.egg-info/SOURCES.txt +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver.egg-info/dependency_links.txt +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver.egg-info/not-zip-safe +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver.egg-info/requires.txt +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/nxsconfigserver.egg-info/top_level.txt +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/setup.cfg +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/setup.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/ComponentHandler_test.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/Errors_test.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/MYSQLDataBase_test.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/NXSConfigServer_test.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/ServerSetUp.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/StreamSet_test.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/__init__.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/__main__.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/checks.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/test/main.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/tools/ndts.sql +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/tools/setupServer.py +0 -0
- {nxsconfigserver-2.15.0 → nxsconfigserver-2.17.0}/tools/simpleClient.py +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
echo "restart mysql service"
|
|
4
|
+
if [ "$1" = "debian11" ] || [ "$1" = "debian12" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu24.04" ]; then
|
|
5
|
+
docker exec --user root ndts service mariadb restart
|
|
6
|
+
else
|
|
7
|
+
# workaround for a bug in debian9, i.e. starting mysql hangs
|
|
8
|
+
docker exec --user root ndts service mysql stop
|
|
9
|
+
if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu22.04" ] ; then
|
|
10
|
+
docker exec --user root ndts /bin/bash -c 'usermod -d /var/lib/mysql/ mysql'
|
|
11
|
+
fi
|
|
12
|
+
# docker exec --user root ndts /bin/bash -c '$(service mysql start &) && sleep 30'
|
|
13
|
+
docker exec --user root ndts service mysql start
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
echo "install tango-common"
|
|
18
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-common; sleep 10'
|
|
19
|
+
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; then
|
|
20
|
+
# docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
|
|
21
|
+
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
|
|
22
|
+
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=localhost\npassword=rootpw" > /var/lib/tango/.my.cnf'
|
|
23
|
+
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON tango.* TO "tango"@"%" identified by "rootpw"'
|
|
24
|
+
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON tango.* TO "tango"@"localhost" identified by "rootpw"'
|
|
25
|
+
docker exec --user root ndts /usr/bin/mysql -e 'FLUSH PRIVILEGES'
|
|
26
|
+
fi
|
|
27
|
+
if [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "ubuntu21.04" ] || [ "$1" = "ubuntu21.10" ] || [ "$1" = "ubuntu22.04" ]; then
|
|
28
|
+
# docker exec --user tango ndts /bin/bash -c '/usr/lib/tango/DataBaseds 2 -ORBendPoint giop:tcp::10000 &'
|
|
29
|
+
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=root\npassword=rootpw" > /root/.my.cnf'
|
|
30
|
+
docker exec --user root ndts /bin/bash -c 'echo -e "[client]\nuser=tango\nhost=127.0.0.1\npassword=rootpw" > /var/lib/tango/.my.cnf'
|
|
31
|
+
fi
|
|
32
|
+
echo "install tango-db"
|
|
33
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-db; sleep 10'
|
|
34
|
+
if [ "$?" -ne "0" ]; then exit 255; fi
|
|
35
|
+
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; then
|
|
36
|
+
docker exec --user tango ndts /usr/bin/mysql -e 'create database tango'
|
|
37
|
+
docker exec --user tango ndts /bin/bash -c '/usr/bin/mysql tango < /usr/share/dbconfig-common/data/tango-db/install/mysql'
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
docker exec --user root ndts service tango-db restart
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
echo "install tango servers"
|
|
44
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; export DEBIAN_FRONTEND=noninteractive; apt-get -qq install -y tango-starter tango-test liblog4j1.2-java'
|
|
45
|
+
if [ "$?" -ne "0" ]; then exit 255; fi
|
|
46
|
+
|
|
47
|
+
docker exec --user root ndts service tango-starter restart
|
|
48
|
+
|
|
49
|
+
docker exec --user root ndts chown -R tango:tango .
|
|
50
|
+
|
|
51
|
+
if [ "$2" = "2" ]; then
|
|
52
|
+
echo "install pytango and nxsconfigserver-db"
|
|
53
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get install -y python-pytango nxsconfigserver-db ; sleep 10'
|
|
54
|
+
else
|
|
55
|
+
if [ "$1" = "debian10" ] || [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ] || [ "$1" = "ubuntu22.04" ] || [ "$1" = "ubuntu20.04" ] || [ "$1" = "ubuntu20.10" ] || [ "$1" = "debian11" ] || [ "$1" = "debian12" ] ; then
|
|
56
|
+
echo "install pytango"
|
|
57
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get install -y python3-tango'
|
|
58
|
+
echo "install nxsconfigserver-db"
|
|
59
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get install -y nxsconfigserver-db'
|
|
60
|
+
if [ "$1" = "ubuntu24.04" ] || [ "$1" = "ubuntu24.10" ]; then
|
|
61
|
+
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON nxsconfig.* TO "tango"@"%" identified by "rootpw"'
|
|
62
|
+
docker exec --user root ndts /usr/bin/mysql -e 'GRANT ALL PRIVILEGES ON nxsconfig.* TO "tango"@"localhost" identified by "rootpw"'
|
|
63
|
+
docker exec --user root ndts /usr/bin/mysql -e 'FLUSH PRIVILEGES'
|
|
64
|
+
docker exec --user tango ndts /usr/bin/mysql -e 'create database nxsconfig'
|
|
65
|
+
docker exec --user tango ndts /bin/bash -c '/usr/bin/mysql nxsconfig < /usr/share/dbconfig-common/data/nxsconfigserver-db/install/mysql'
|
|
66
|
+
fi
|
|
67
|
+
else
|
|
68
|
+
echo "install pytango and nxsconfigserver-db"
|
|
69
|
+
docker exec --user root ndts /bin/bash -c 'apt-get -qq update; apt-get -qq install -y python3-pytango nxsconfigserver-db; sleep 10'
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
if [ "$?" != "0" ]; then exit 255; fi
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
echo "install nxsconfigserver"
|
|
76
|
+
if [ "$2" = "2" ]; then
|
|
77
|
+
docker exec --user root ndts chown -R tango:tango .
|
|
78
|
+
docker exec ndts python setup.py build
|
|
79
|
+
docker exec --user root ndts python setup.py install
|
|
80
|
+
else
|
|
81
|
+
docker exec --user root ndts chown -R tango:tango .
|
|
82
|
+
docker exec ndts python3 setup.py build
|
|
83
|
+
docker exec --user root ndts python3 setup.py install
|
|
84
|
+
fi
|
|
85
|
+
if [ "$?" != "0" ]; then exit 255; fi
|
|
@@ -24,7 +24,7 @@ jobs:
|
|
|
24
24
|
runs-on: ubuntu-latest
|
|
25
25
|
strategy:
|
|
26
26
|
matrix:
|
|
27
|
-
os: [debian12, debian11, debian10,
|
|
27
|
+
os: [debian12, debian11, debian10, ubuntu24.10, ubuntu24.04, ubuntu22.04]
|
|
28
28
|
steps:
|
|
29
29
|
- uses: actions/checkout@v2
|
|
30
30
|
- uses: actions/setup-python@v2
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
2025-04-15 Jan Kotanski <jankotan@gmail.com>
|
|
2
|
+
* add ExtraLinkDataSources attribute and ExtraLinkPath property(#68)
|
|
3
|
+
* tagged as v2.17.0
|
|
4
|
+
|
|
5
|
+
2025-04-09 Jan Kotanski <jankotan@gmail.com>
|
|
6
|
+
* add support for vds tags (#65)
|
|
7
|
+
* tagged as v2.16.0
|
|
8
|
+
|
|
1
9
|
2023-11-09 Jan Kotanski <jankotan@gmail.com>
|
|
2
10
|
* change tango.Device_4Impl to tango.LatestDeviceImpl (#57)
|
|
3
11
|
* tagged as v2.15.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="ASCII"?>
|
|
2
|
-
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://
|
|
3
|
-
<classes name="NXSConfigServer" pogoRevision="9.
|
|
4
|
-
<description description="NeXuS Configuration Server is a Tango Server with its implementation based
on a MySQL database. It allows to store XML configuration datasources
and components. It also gives possibility to select mandatory components
and perform the process of component merging.

Source code: https://github.com/nexdatas/nxsconfigserver/
Web page: https://nexdatas.github.io/nxsconfigserver/
NexDaTaS Web page: https://nexdatas.github.io
" title="Configuration Server for Nexus Data Writer" sourcePath="/home/jkotan/ndts/
|
|
2
|
+
<pogoDsl:PogoSystem xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pogoDsl="http://tango.org/pogo/PogoDsl">
|
|
3
|
+
<classes name="NXSConfigServer" pogoRevision="9.8">
|
|
4
|
+
<description description="NeXuS Configuration Server is a Tango Server with its implementation based
on a MySQL database. It allows to store XML configuration datasources
and components. It also gives possibility to select mandatory components
and perform the process of component merging.

Source code: https://github.com/nexdatas/nxsconfigserver/
Web page: https://nexdatas.github.io/nxsconfigserver/
NexDaTaS Web page: https://nexdatas.github.io
" title="Configuration Server for Nexus Data Writer" sourcePath="/home/jkotan/ndts/nxsconfigserver" language="Python" filestogenerate="XMI file,Protected Regions,html Pages" license="GPL" hasMandatoryProperty="false" hasConcreteProperty="true" hasAbstractCommand="false" hasAbstractAttribute="false" descriptionHtmlExists="false">
|
|
5
5
|
<inheritances classname="Device_Impl" sourcePath=""/>
|
|
6
6
|
<identification contact="at desy.de - jan.kotanski" author="jan.kotanski" emailDomain="desy.de" classFamily="Acquisition" siteSpecific="" platform="All Platforms" bus="Not Applicable" manufacturer="DESY" reference=""/>
|
|
7
7
|
</description>
|
|
@@ -10,6 +10,11 @@
|
|
|
10
10
|
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
|
|
11
11
|
<DefaultPropValue>"XCS"</DefaultPropValue>
|
|
12
12
|
</deviceProperties>
|
|
13
|
+
<deviceProperties name="ExtraLinkPath" description="extra link path below NXentry, default: instrument:NXinstrument/collection:NXcollection">
|
|
14
|
+
<type xsi:type="pogoDsl:StringType"/>
|
|
15
|
+
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
|
|
16
|
+
<DefaultPropValue>"instrument:NXinstrument/collection:NXcollection"</DefaultPropValue>
|
|
17
|
+
</deviceProperties>
|
|
13
18
|
<commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0">
|
|
14
19
|
<argin description="none">
|
|
15
20
|
<type xsi:type="pogoDsl:VoidType"/>
|
|
@@ -387,6 +392,14 @@
|
|
|
387
392
|
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
|
|
388
393
|
<properties description="JSON list of datasources to be switched into CanFail mode during creating configuration process" label="Datasources to be switched into CanFail mode" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
|
|
389
394
|
</attributes>
|
|
395
|
+
<attributes name="ExtraLinkDataSources" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" allocReadMember="true" isDynamic="false">
|
|
396
|
+
<dataType xsi:type="pogoDsl:StringType"/>
|
|
397
|
+
<changeEvent fire="false" libCheckCriteria="false"/>
|
|
398
|
+
<archiveEvent fire="false" libCheckCriteria="false"/>
|
|
399
|
+
<dataReadyEvent fire="false" libCheckCriteria="true"/>
|
|
400
|
+
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
|
|
401
|
+
<properties description="JSON list of datasources to which links will be added" label="Datasources to which extra links will be added" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
|
|
402
|
+
</attributes>
|
|
390
403
|
<states name="ON" description="Server is ON">
|
|
391
404
|
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
|
|
392
405
|
</states>
|
|
@@ -396,6 +409,6 @@
|
|
|
396
409
|
<states name="RUNNING" description="Performing a query">
|
|
397
410
|
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
|
|
398
411
|
</states>
|
|
399
|
-
<preferences docHome="./doc_html" makefileHome="/
|
|
412
|
+
<preferences docHome="./doc_html" makefileHome="$(TANGO_DIR)/Libraries/cppserver/common"/>
|
|
400
413
|
</classes>
|
|
401
414
|
</pogoDsl:PogoSystem>
|
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: nxsconfigserver
|
|
3
|
+
Version: 2.17.0
|
|
4
|
+
Summary: Configuration Server for Nexus Data Writer
|
|
5
|
+
Home-page: http://github.com/jkotan/nexdatas/nxsconfigserver
|
|
6
|
+
Author: Jan Kotanski, Eugen Wintersberger , Halil Pasic
|
|
7
|
+
Author-email: jankotan@gmail.com, eugen.wintersberger@gmail.com, halil.pasic@gmail.com
|
|
8
|
+
License: GNU GENERAL PUBLIC LICENSE v3
|
|
9
|
+
Keywords: configuration MySQL writer Tango server nexus data
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
13
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
14
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
15
|
+
Classifier: Programming Language :: Python :: 2.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.4
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
|
|
25
|
+
======================================================
|
|
26
|
+
Welcome to NeXuS Configuration Server's documentation!
|
|
27
|
+
======================================================
|
|
28
|
+
|
|
29
|
+
|github workflow|
|
|
30
|
+
|docs|
|
|
31
|
+
|Pypi Version|
|
|
32
|
+
|Python Versions|
|
|
33
|
+
|
|
34
|
+
.. |github workflow| image:: https://github.com/nexdatas/nxsconfigserver/actions/workflows/tests.yml/badge.svg
|
|
35
|
+
:target: https://github.com/nexdatas/nxsconfigserver/actions
|
|
36
|
+
:alt:
|
|
37
|
+
|
|
38
|
+
.. |docs| image:: https://img.shields.io/badge/Documentation-webpages-ADD8E6.svg
|
|
39
|
+
:target: https://nexdatas.github.io/nxsconfigserver/index.html
|
|
40
|
+
:alt:
|
|
41
|
+
|
|
42
|
+
.. |Pypi Version| image:: https://img.shields.io/pypi/v/nxsconfigserver.svg
|
|
43
|
+
:target: https://pypi.python.org/pypi/nxsconfigserver
|
|
44
|
+
:alt:
|
|
45
|
+
|
|
46
|
+
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/nxsconfigserver.svg
|
|
47
|
+
:target: https://pypi.python.org/pypi/nxsconfigserver/
|
|
48
|
+
:alt:
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
Authors: Jan Kotanski, Eugen Wintersberger, Halil Pasic
|
|
53
|
+
|
|
54
|
+
NeXuS Configuration Server is a Tango Server with its implementation based
|
|
55
|
+
on a MySQL database. It allows to store XML configuration datasources
|
|
56
|
+
and components. It also gives possibility to select mandatory components
|
|
57
|
+
and perform the process of component merging.
|
|
58
|
+
|
|
59
|
+
Tango Server API: https://nexdatas.github.io/nxsconfigserver/doc_html
|
|
60
|
+
|
|
61
|
+
| Source code: https://github.com/nexdatas/nxsconfigserver/
|
|
62
|
+
| Web page: https://nexdatas.github.io/nxsconfigserver/
|
|
63
|
+
| NexDaTaS Web page: https://nexdatas.github.io
|
|
64
|
+
|
|
65
|
+
------------
|
|
66
|
+
Installation
|
|
67
|
+
------------
|
|
68
|
+
|
|
69
|
+
Install the dependencies:
|
|
70
|
+
|
|
71
|
+
| MySQLdb, PyTango, sphinx
|
|
72
|
+
|
|
73
|
+
From sources
|
|
74
|
+
^^^^^^^^^^^^
|
|
75
|
+
|
|
76
|
+
Download the latest version of NeXuS Configuration Server from
|
|
77
|
+
|
|
78
|
+
| https://github.com/nexdatas/nxsconfigserver/
|
|
79
|
+
| https://github.com/nexdatas/nxsconfigserver-db/
|
|
80
|
+
|
|
81
|
+
Extract the sources and run
|
|
82
|
+
|
|
83
|
+
.. code-block:: console
|
|
84
|
+
|
|
85
|
+
$ python setup.py install
|
|
86
|
+
|
|
87
|
+
To set database execute
|
|
88
|
+
|
|
89
|
+
.. code-block:: console
|
|
90
|
+
|
|
91
|
+
$ mysql < conf/mysql_create.sql
|
|
92
|
+
|
|
93
|
+
with proper privileges.
|
|
94
|
+
|
|
95
|
+
Debian packages
|
|
96
|
+
^^^^^^^^^^^^^^^
|
|
97
|
+
|
|
98
|
+
Debian Bookworm, Bullseye, Buster and as well as Ubuntu Lunar, Jammy packages can be found in the HDRI repository.
|
|
99
|
+
|
|
100
|
+
To install the debian packages, add the PGP repository key
|
|
101
|
+
|
|
102
|
+
.. code-block:: console
|
|
103
|
+
|
|
104
|
+
$ sudo su
|
|
105
|
+
$ wget -q -O - http://repos.pni-hdri.de/debian_repo.pub.gpg | apt-key add -
|
|
106
|
+
|
|
107
|
+
and then download the corresponding source list, e.g. for bookworm
|
|
108
|
+
|
|
109
|
+
.. code-block:: console
|
|
110
|
+
|
|
111
|
+
$ cd /etc/apt/sources.list.d
|
|
112
|
+
$ wget http://repos.pni-hdri.de/bookworm-pni-hdri.list
|
|
113
|
+
|
|
114
|
+
Finally, for python2 packages
|
|
115
|
+
|
|
116
|
+
.. code-block:: console
|
|
117
|
+
|
|
118
|
+
$ apt-get update
|
|
119
|
+
$ apt-get install python-nxsconfigserver nxsconfigserver-db
|
|
120
|
+
|
|
121
|
+
and the NXSConfigServer tango server (from 2.10.0)
|
|
122
|
+
|
|
123
|
+
$ apt-get install nxsconfigserver
|
|
124
|
+
|
|
125
|
+
or for python3
|
|
126
|
+
|
|
127
|
+
.. code-block:: console
|
|
128
|
+
|
|
129
|
+
$ apt-get update
|
|
130
|
+
$ apt-get install python3-nxsconfigserver nxsconfigserver-db
|
|
131
|
+
|
|
132
|
+
and the NXSConfigServer tango server (from 2.10.0)
|
|
133
|
+
|
|
134
|
+
$ apt-get install nxsconfigserver3
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
From pip
|
|
138
|
+
""""""""
|
|
139
|
+
|
|
140
|
+
To install it from pip you need pymysqldb e.g.
|
|
141
|
+
|
|
142
|
+
.. code-block:: console
|
|
143
|
+
|
|
144
|
+
$ python3 -m venv myvenv
|
|
145
|
+
$ . myvenv/bin/activate
|
|
146
|
+
|
|
147
|
+
$ pip install pymysqldb
|
|
148
|
+
|
|
149
|
+
$ pip install nxsconfigserver
|
|
150
|
+
|
|
151
|
+
Moreover it is also good to install
|
|
152
|
+
|
|
153
|
+
.. code-block:: console
|
|
154
|
+
|
|
155
|
+
$ pip install pytango
|
|
156
|
+
$ pip install nxstools
|
|
157
|
+
|
|
158
|
+
Setting NeXus Configuration Server
|
|
159
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
160
|
+
|
|
161
|
+
To set up NeXus Configuration Server with the default configuration run
|
|
162
|
+
|
|
163
|
+
.. code-block:: console
|
|
164
|
+
|
|
165
|
+
$ nxsetup -x NXSConfigServer
|
|
166
|
+
|
|
167
|
+
The *nxsetup* command comes from the **python-nxstools** package.
|
|
168
|
+
|
|
169
|
+
===========
|
|
170
|
+
Description
|
|
171
|
+
===========
|
|
172
|
+
|
|
173
|
+
Configuration Server is dedicated to store NXDL-like configuration needed for
|
|
174
|
+
Tango Data Writer runs. The server uses as a storage system a MYSQL database.
|
|
175
|
+
To create required DB tables one can use ndts.sql script from the repository.
|
|
176
|
+
|
|
177
|
+
In Configuration Server the configuration is memorized in separate elements:
|
|
178
|
+
datasources or components.
|
|
179
|
+
|
|
180
|
+
**DataSources** describe access to input data, i.e to specific hardware
|
|
181
|
+
TANGO devices or other databases as well to client data.
|
|
182
|
+
|
|
183
|
+
**Components** specify Nexus tree with positions of datasets for particular
|
|
184
|
+
pieces of hardware and writing strategy for corresponding to them data.
|
|
185
|
+
|
|
186
|
+
+ They can include datasources directly as well as links to datasources
|
|
187
|
+
defined in the server. To this end template syntax of
|
|
188
|
+
$datasources.<ds_name> type is used.
|
|
189
|
+
+ Moreover, they can holds links to other components which describe their
|
|
190
|
+
dependences. In this case $components.<comp_name> syntax is used.
|
|
191
|
+
+ Finally, the components can contains variables. The variables are defined
|
|
192
|
+
in XML code by $var.<var_name> syntax and can be provided to
|
|
193
|
+
the Configuration Server by passing a JSON string.
|
|
194
|
+
The default value for variables is an empty string.
|
|
195
|
+
|
|
196
|
+
All elements of configuration can be created by GUI tool - ComponentDesigner.
|
|
197
|
+
The tool can connect to Configuration Server and fetch or store
|
|
198
|
+
the separate elements of the XML configuration.
|
|
199
|
+
|
|
200
|
+
During creation of the final configuration Configuration Server merges
|
|
201
|
+
all required and dependent components, connected to them datasources and
|
|
202
|
+
provided values of the variables. As a result it returns a single XML string.
|
|
203
|
+
This XML string can be pass directly into the dedicated Tango Data Writer
|
|
204
|
+
attribute.
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
===========
|
|
209
|
+
Client code
|
|
210
|
+
===========
|
|
211
|
+
|
|
212
|
+
.. code-block:: python
|
|
213
|
+
|
|
214
|
+
# In this section we present an example how to communicate with
|
|
215
|
+
# Configuration Server making use of PyTango.
|
|
216
|
+
|
|
217
|
+
import tango
|
|
218
|
+
|
|
219
|
+
cnfServer = tango.DeviceProxy("p00/xmlconfigserver/exp.01")
|
|
220
|
+
|
|
221
|
+
cnfServer.JSONSettings = \
|
|
222
|
+
'{"db":"ndts_p02","read_default_file":"/etc/my.cnf","use_unicode":true}'
|
|
223
|
+
|
|
224
|
+
# opens DB connection
|
|
225
|
+
cnfServer.Open()
|
|
226
|
+
|
|
227
|
+
# After creating the server proxy we can set configuration for connection to
|
|
228
|
+
# the MYSQL DB.
|
|
229
|
+
# The JSONSettings attribute is memorized so you have to write it only when you
|
|
230
|
+
# change configuration of DB connection. Next, we open connection to
|
|
231
|
+
# DB specified by our JSONSettings.
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
# stores default component
|
|
236
|
+
cpxml = open("default.xml", 'r').read()
|
|
237
|
+
cnfServer.XMLString = cpxml
|
|
238
|
+
cnfServer.StoreComponent('default')
|
|
239
|
+
|
|
240
|
+
# stores slit1 component in DB
|
|
241
|
+
cpxml = open("slit1.xml", 'r').read()
|
|
242
|
+
cnfServer.XMLString = cpxml
|
|
243
|
+
cnfServer.StoreComponent('slit1')
|
|
244
|
+
|
|
245
|
+
# stores slit2 component in DB
|
|
246
|
+
cpxml = open("slit2.xml", 'r').read()
|
|
247
|
+
cnfServer.XMLString = cpxml
|
|
248
|
+
cnfServer.StoreComponent('slit2')
|
|
249
|
+
|
|
250
|
+
# stores slit3 component in DB
|
|
251
|
+
cpxml = open("slit3.xml", 'r').read()
|
|
252
|
+
cnfServer.XMLString = cpxml
|
|
253
|
+
cnfServer.StoreComponent('slit3')
|
|
254
|
+
|
|
255
|
+
# stores pilatus300k component in DB
|
|
256
|
+
cpxml = open("pilatus.xml", 'r').read()
|
|
257
|
+
cnfServer.XMLString = cpxml
|
|
258
|
+
cnfServer.StoreComponent('pilatus300k')
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
# stores motor01 datasource in DB
|
|
262
|
+
dsxml = open("motor.ds.xml", 'r').read()
|
|
263
|
+
cnfServer.XMLString = dsxml
|
|
264
|
+
cnfServer.StoreDataSource('motor01')
|
|
265
|
+
|
|
266
|
+
# stores motor02 datasource in DB
|
|
267
|
+
dsxml = open("motor.ds.xml", 'r').read()
|
|
268
|
+
cnfServer.XMLString = dsxml
|
|
269
|
+
cnfServer.StoreDataSource('motor02')
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# removes slit3 component from DB
|
|
274
|
+
cnfServer.DeleteComponent('slit3')
|
|
275
|
+
|
|
276
|
+
# removes motor02 datasource from DB
|
|
277
|
+
cnfServer.DeleteDataSource('motor02')
|
|
278
|
+
|
|
279
|
+
# If someone cannot use ComponentDesigner it is also an option to store
|
|
280
|
+
# or delete components and datasources using directly tango interface
|
|
281
|
+
# as it is shown above.
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
# provides names of available components
|
|
286
|
+
cmpNameList = cnfServer.AvailableComponents()
|
|
287
|
+
# provides names of available datasources
|
|
288
|
+
dsNameList = cnfServer.AvailableDataSources()
|
|
289
|
+
|
|
290
|
+
# To get information about names of available components and datasources
|
|
291
|
+
# in Configuration Server we use the above commands.
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
# provides a list of required components
|
|
296
|
+
cmpList = cnfServer.Components(cmpNameList)
|
|
297
|
+
# provides a list of required Datasources
|
|
298
|
+
dsList = cnfServer.DataSources(dsNameList)
|
|
299
|
+
|
|
300
|
+
# Having names of stored elements we can get their XML code.
|
|
301
|
+
|
|
302
|
+
# provides a list of Datasources from a given Component
|
|
303
|
+
dsList = cnf.Server.ComponentDataSources('pilatus300k')
|
|
304
|
+
dsList = cnf.Server.ComponentsDataSources(['pilatus300k', 'slit1'])
|
|
305
|
+
|
|
306
|
+
# as well as query Configuration Server which datasource
|
|
307
|
+
# are related to the particular component.
|
|
308
|
+
|
|
309
|
+
# provides a dependent components
|
|
310
|
+
cpList = cnf.Server.DependentComponents(['pilatus300k', 'slit3'])
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
# Moreover, one can also query Configuration Server for a list of
|
|
314
|
+
# dependent components
|
|
315
|
+
|
|
316
|
+
# provides a list of Variables from a given components
|
|
317
|
+
varList = cnf.Server.ComponentVariables('pilatus300k')
|
|
318
|
+
varList = cnf.Server.ComponentsVariables(['pilatus300k', 'slit3'])
|
|
319
|
+
|
|
320
|
+
#or ask for a list of variables which are related to the particular components.
|
|
321
|
+
|
|
322
|
+
# sets values of variables
|
|
323
|
+
cnf.Server.Variables = '{"entry_id":"123","beamtime_id":"123453535453"}'
|
|
324
|
+
|
|
325
|
+
#The variable values can be passed to the Configuration Server
|
|
326
|
+
# via a JSON string.
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
# sets given component as mandatory for the final configuration
|
|
331
|
+
cnfServer.SetMandatoryComponents(['default','slit1'])
|
|
332
|
+
# un-sets given component as mandatory for the final configuration
|
|
333
|
+
cnfServer.UnsetMandatoryComponents(['slit1'])
|
|
334
|
+
|
|
335
|
+
# provides names of mandatory components
|
|
336
|
+
man = cnfServer.MandatoryComponents()
|
|
337
|
+
|
|
338
|
+
# Some of the component can be set as mandatory in
|
|
339
|
+
# the final configuration. To define them Configuration Server provides
|
|
340
|
+
# above commands.
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
# provides the current configuration version
|
|
345
|
+
version = cnfServer.Version
|
|
346
|
+
|
|
347
|
+
# Each configuration has a revision number. It can be found
|
|
348
|
+
# together with Configuration Server version in Version attribute.
|
|
349
|
+
|
|
350
|
+
# creates the final configuration from slit2 and pilatus300k
|
|
351
|
+
# as well as all mandatory components
|
|
352
|
+
cnfServer.CreateConfiguration('slit2', 'pilatus300k')
|
|
353
|
+
# XML string ready to use by Tango Data Server
|
|
354
|
+
finalXML = cnfServer.XMLString
|
|
355
|
+
|
|
356
|
+
# In order to create our final configuration we execute CreateConfiguration
|
|
357
|
+
# command with a list of names of required components. The command merges
|
|
358
|
+
# these components with mandatory ones and provides the resulting NXDL-like
|
|
359
|
+
# configuration in the XMLString attribute.
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
# merges given components
|
|
365
|
+
mergedComp = cnfServer.Merge(['slit2', 'pilatus300k'])
|
|
366
|
+
|
|
367
|
+
# Similarly, the Merge command provides configuration by unresolved links
|
|
368
|
+
# to datasoures and with non-assigned variable values.
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
# closes connection to DB
|
|
372
|
+
cnfServer.close()
|
|
373
|
+
|
|
374
|
+
# Command close terminates our connection to the DB server.
|
|
375
|
+
|
|
376
|
+
=======================
|
|
377
|
+
Configuration Variables
|
|
378
|
+
=======================
|
|
379
|
+
|
|
380
|
+
Values of configuration variables can be also define inside the component xmls.
|
|
381
|
+
Let's consider two following components:
|
|
382
|
+
|
|
383
|
+
*mydetector* with a general detector transformation group
|
|
384
|
+
|
|
385
|
+
.. code-block:: xml
|
|
386
|
+
|
|
387
|
+
<definition>
|
|
388
|
+
<group type='NXentry' name='entry'>
|
|
389
|
+
<group type='NXinstrument' name='instrument'>
|
|
390
|
+
<group type='NXdetector' name='$var.detector#\"mydetector\"'>
|
|
391
|
+
<group type='NXtransformations' name='transformations'/>
|
|
392
|
+
</group>
|
|
393
|
+
</group>
|
|
394
|
+
</group>
|
|
395
|
+
</definition>
|
|
396
|
+
|
|
397
|
+
and *pilatus* created for the particular detector
|
|
398
|
+
|
|
399
|
+
.. code-block:: xml
|
|
400
|
+
|
|
401
|
+
<definition>
|
|
402
|
+
<group type='NXentry' name='entry'>
|
|
403
|
+
<group type='NXinstrument' name='instrument'>
|
|
404
|
+
<group type='NXdetector' name='pilatus'>
|
|
405
|
+
<field type='NX_FLOAT64' name='data'/>
|
|
406
|
+
</group>
|
|
407
|
+
</group>
|
|
408
|
+
</group>
|
|
409
|
+
<doc>$var(detector=pilatus)</doc>
|
|
410
|
+
</definition>
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
Creating configuration without variables
|
|
414
|
+
|
|
415
|
+
.. code-block:: python
|
|
416
|
+
|
|
417
|
+
cnfServer.Variables = '{}'
|
|
418
|
+
cnfServer.CreateConfiguration(["mydetector"])
|
|
419
|
+
|
|
420
|
+
results in
|
|
421
|
+
|
|
422
|
+
.. code-block:: xml
|
|
423
|
+
|
|
424
|
+
<definition>
|
|
425
|
+
<group type='NXentry' name='entry'>
|
|
426
|
+
<group type='NXinstrument' name='instrument'>
|
|
427
|
+
<group type='NXdetector' name='mydetector'>
|
|
428
|
+
<group type='NXtransformations' name='transformations'/>
|
|
429
|
+
</group>
|
|
430
|
+
</group>
|
|
431
|
+
</group>
|
|
432
|
+
</definition>
|
|
433
|
+
|
|
434
|
+
When configuration variables are defined
|
|
435
|
+
|
|
436
|
+
.. code-block:: python
|
|
437
|
+
|
|
438
|
+
cnfServer.Variables = '{"detector": "det1"}'
|
|
439
|
+
cnfServer.CreateConfiguration(["mydetector"])
|
|
440
|
+
|
|
441
|
+
one can get
|
|
442
|
+
|
|
443
|
+
.. code-block:: xml
|
|
444
|
+
|
|
445
|
+
<definition>
|
|
446
|
+
<group type='NXentry' name='entry'>
|
|
447
|
+
<group type='NXinstrument' name='instrument'>
|
|
448
|
+
<group type='NXdetector' name='det1'>
|
|
449
|
+
<group type='NXtransformations' name='transformations'/>
|
|
450
|
+
</group>
|
|
451
|
+
</group>
|
|
452
|
+
</group>
|
|
453
|
+
</definition>
|
|
454
|
+
|
|
455
|
+
Finally, creating configuration xml from our two components without variables
|
|
456
|
+
|
|
457
|
+
.. code-block:: python
|
|
458
|
+
|
|
459
|
+
cnfServer.Variables = '{}'
|
|
460
|
+
cnfServer.CreateConfiguration(["mydetector", "pilatus"])
|
|
461
|
+
|
|
462
|
+
results in
|
|
463
|
+
|
|
464
|
+
.. code-block:: xml
|
|
465
|
+
|
|
466
|
+
<definition>
|
|
467
|
+
<group name="entry" type="NXentry">
|
|
468
|
+
<group name="instrument" type="NXinstrument">
|
|
469
|
+
<group name="pilatus" type="NXdetector">
|
|
470
|
+
<group name="transformations" type="NXtransformations"/>
|
|
471
|
+
<field name="data" type="NX_FLOAT64"/>
|
|
472
|
+
</group>
|
|
473
|
+
</group>
|
|
474
|
+
</group>
|
|
475
|
+
<doc>$var(detector=pilatus)</doc>
|
|
476
|
+
</definition>
|
|
@@ -99,6 +99,16 @@
|
|
|
99
99
|
<td> OPERATOR </td>
|
|
100
100
|
<td> JSON list of datasources to be switched into CanFail mode during creating configuration process </td>
|
|
101
101
|
</tr>
|
|
102
|
+
<tr>
|
|
103
|
+
<td> <a href="AttrExtraLinkDataSources.html"> ExtraLinkDataSources </a> </td>
|
|
104
|
+
<td> false </td>
|
|
105
|
+
<td> false </td>
|
|
106
|
+
<td> Scalar </td>
|
|
107
|
+
<td> READ_WRITE </td>
|
|
108
|
+
<td> Tango::DEV_STRING </td>
|
|
109
|
+
<td> OPERATOR </td>
|
|
110
|
+
<td> JSON list of datasources to which links will be added </td>
|
|
111
|
+
</tr>
|
|
102
112
|
</table>
|
|
103
113
|
<br><br>
|
|
104
114
|
<hr>
|