{"id":315250,"date":"2020-12-21T15:01:11","date_gmt":"2020-12-21T15:01:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=315250"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=315250","title":{"rendered":"HDB++ TANGO Archiving System"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" alt=\"main\" width=\"800\" src=\"https:\/\/habrastorage.org\/webt\/tu\/vr\/ec\/tuvrecn2a_yv1mikcfb39r9hlfa.png\"><\/div>\n<p>  <\/p>\n<h2 id=\"chto-takoe-hdbhttpswwwtango-controlsorgcommunityproject-docshdbplusplus\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <a href=\"https:\/\/www.tango-controls.org\/community\/project-docs\/hdbplusplus\/\" rel=\"nofollow\">HDB++<\/a>?<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f TANGO, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 TANGO.<br \/>  \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Linux (<a href=\"https:\/\/s2innovation.sharepoint.com\/:f:\/s\/Developers\/EovD2IBwhppAp-ZLXtawQ6gB9F6aXPPs2msr2hgPGTO-FQ?e=Ii3tnr\" rel=\"nofollow\"><strong>TangoBox 9.3<\/strong><\/a> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Ubuntu 18.04), \u044d\u0442\u043e \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u0434\u0435 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"o-chem-statya\">\u041e \u0447\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u044f?<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/li>\n<li>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0443\u0448\u043b\u043e ~ 2 \u043d\u0435\u0434\u0435\u043b\u0438 \u0447\u0442\u043e \u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f <strong>python<\/strong> \u043f\u043e\u0434 \u044d\u0442\u043e \u0434\u0435\u043b\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"dlya-chego-eto-nuzhno\">\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0412\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414.<\/li>\n<li>\u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/li>\n<\/ul>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"gde-vzyat\">\u0413\u0434\u0435 \u0432\u0437\u044f\u0442\u044c?<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.tango-controls.org\/community\/project-docs\/hdbplusplus\/hdbplusplus-downloads\/\" rel=\"nofollow\"><strong>deb &amp;&amp; sql<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/github.com\/tango-controls-hdbpp\" rel=\"nofollow\"><strong>\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/www.tango-controls.org\/community\/project-docs\/hdbplusplus\/hdbplusplus-doc\/\" rel=\"nofollow\"><strong>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/strong><\/a><\/li>\n<li><a href=\"https:\/\/tango-controls.readthedocs.io\/en\/latest\/installation\/virtualmachine.html\" rel=\"nofollow\"><strong>\u043e\u0431\u0440\u0430\u0437 TangoBox \u043d\u0430 \u0431\u0430\u0437\u0435 Ubuntu<\/strong><\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"arhitektura\">\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/si\/9f\/sq\/si9fsq0jjolmzn2t2-ka9n_svnk.png\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0434\u0432\u0435 \u0441\u0430\u043c\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0432\u0435\u0449\u0438 \u2014 \u044d\u0442\u043e <strong>Archiver<\/strong> \u0438 <strong>Archiving DB<\/strong>. <strong>HDB++ Configuration<\/strong> \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f Archiver. <strong>HDB++ Viewer<\/strong> \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 Archiving DB.<\/p>\n<p>  <\/p>\n<p><strong>Archiver<\/strong> \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0448\u0438 <strong>Device Server<\/strong>-\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0432 <strong>Archiving DB<\/strong>.<br \/>  Archiver \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 Device Server:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wx\/bw\/4c\/wxbw4cyo_occntl8jparsj2drbo.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p><strong>Archiving DB<\/strong> \u0432 \u043d\u0430\u0448\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0431\u0430\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 <strong>MySQL<\/strong>, \u043e\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0434\u043e\u043a\u0435\u0440\u0435 <strong>tangobox-hdbpp<\/strong>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lx\/zx\/tf\/lxzxtfz04nofarfshjy4jdh3hhy.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<h2 id=\"archiver\">Archiver<\/h2>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bc\/dd\/mw\/bcddmwci_lpsr7exia445op9nze.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u044d\u0442\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/e7\/qk\/ts\/e7qktshbfap5gkk3dm_de-uqyxg.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0430\u043d\u0434 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c Device Server-\u043e\u043c<\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>AttibuteAdd<\/strong> \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442.<\/li>\n<li><strong>AttibutePause<\/strong> \u2014 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e \u043d\u0430 \u043f\u0430\u0443\u0437\u0443.<\/li>\n<li><strong>AttibuteRemove<\/strong> \u2014 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442.<\/li>\n<li><strong>AttibuteStart<\/strong> \u2014 \u043d\u0430\u0447\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e.<\/li>\n<li><strong>AttibuteStatus<\/strong> \u2014 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/li>\n<li><strong>AttibuteStop<\/strong> \u2014 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0435\u0440\u0435\u0437 <strong>Jive<\/strong> \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0441\u043b\u0435\u0434\u0438\u0442 Archiver:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">jive<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wx\/bw\/4c\/wxbw4cyo_occntl8jparsj2drbo.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0414\u0432\u0430\u0436\u0434\u044b \u0449\u0435\u043b\u043a\u0430\u0435\u043c \u043d\u0430 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gq\/li\/qa\/gqliqanb2roaz98yqhl0b4lxhkk.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0423\u043f\u0440\u0430\u0432\u043d\u0435\u0435 \u044d\u0442\u0438\u043c Device Server-\u043e\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0443\u0442\u0438\u043b\u0438\u0442\u0443 <strong>HDB++ Configuration<\/strong>, \u044d\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u044b\u0448\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 <strong>archiving\/hdbpp\/eventsubscriber.1<\/strong>. \u0414\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043a\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"hdb-configuration\">HDB++ Configuration<\/h2>\n<p>  <\/p>\n<pre><code class=\"bash\">hdbpp-configurator -configure<\/code><\/pre>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/sv\/nw\/bh\/svnwbh8yxo3l170gmibfly0gdzi.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f\/\u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044f \u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u0432\u0430\u0436\u0434\u044b \u0449\u0435\u043b\u043a\u0430\u0435\u043c \u043f\u043e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0443:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ve\/gq\/qt\/vegqqtoux5y-2cctdn1dugymqzw.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<ul>\n<li><strong>TTL<\/strong> \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0434\u043b\u0438\u0442\u044c\u0441\u044f \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0438.<\/li>\n<li><strong>absolute change<\/strong> \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445.<\/li>\n<li><strong>relative change<\/strong> \u2014 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445.<\/li>\n<li><strong>event period<\/strong> \u2014 \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c, \u0442\u043e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0435 \u043c\u0441.<\/li>\n<li><strong>Attibute polling period<\/strong> \u2014 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0435 \u043c\u0441.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"archiving-db\">Archiving DB<\/h2>\n<p>  <\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u0442\u044c \u0411\u0414 <strong>hdbpp<\/strong>:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5e\/hh\/15\/5ehh15mfnxsnbr_di1sc_oqfhzk.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0411\u0414, \u0441 \u043a\u0430\u043a\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b \u0438 \u043a\u043e\u043c\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f (\u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043c\u043d\u0435 \u0431\u044b\u043b\u043e \u043b\u0435\u043d\u044c, \u043b\u0435\u0433\u0447\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.):<\/p>\n<p>  <\/p>\n<pre><code class=\"sql\">GRANT ALL PRIVILEGES on *.* to 'root'@'172.18.0.1' IDENTIFIED BY 'tango'; FLUSH PRIVILEGES;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u0448\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0438\u043c\u0435\u0435\u0442 \u0430\u0434\u0440\u0435\u0441 <strong>172.18.0.1<\/strong>, docker \u0441 \u0411\u0414 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 <strong>172.18.0.7<\/strong>.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0411\u0414, \u0437\u0434\u0435\u0441\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 <strong>att_conf<\/strong>. \u0412 \u043d\u0435\u0439 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u044b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043f\u0430\u043b\u0438 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/p5\/qb\/jn\/p5qbjnakml0npautm0rhfiz8ixw.jpeg\" alt=\"image\"><\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0430\u0436\u043d\u044b\u0435 \u043f\u043e\u043b\u044f <strong>att_conf_id<\/strong> \u0438 <strong>att_conf_data_type_id<\/strong>. \u041f\u043e att_conf_data_type_id \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b <strong>att_conf_data_type<\/strong> \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>scalar_devushort_ro<\/strong>, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0437\u043d\u0430\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f. \u0418\u043c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 <strong>att_scalar_devushort_ro<\/strong>, \u0438\u0437 \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u043e att_conf_id \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0430\u0440\u0445\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0441 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"python\">Python<\/h2>\n<p>  <\/p>\n<p>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b python \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 HDB++.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u044c \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f python<strong>2.7<\/strong> \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 HDB++ <a href=\"https:\/\/github.com\/tango-controls\/PyTangoArchiving\" rel=\"nofollow\">PyTangoArchiving<\/a>. \u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0439 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0441\u0432\u043e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u041f\u043e \u043d\u0435\u0439 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0442\u043e\u0434\u044b, \u043a\u0430\u043a\u0438\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u0445 (<strong>\u042d\u0442\u043e \u043c\u043e\u0435 \u043c\u043d\u0435\u043d\u0438\u0435<\/strong>).<\/p>\n<p>  <\/p>\n<p>\u041c\u043e\u0439 <a href=\"https:\/\/github.com\/dvjdjvu\/hdbpp\" rel=\"nofollow\"><strong>\u043c\u043e\u0434\u0443\u043b\u044c<\/strong><\/a> \u0441\u043e\u0437\u0434\u0430\u043d \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 <strong>3.7<\/strong>. \u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430 <strong>TangoBox 9.3<\/strong> \u0437\u0430\u0434\u0430\u043d\u044b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<h3 id=\"ustanovka-modulya\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f<\/h3>\n<p>  <\/p>\n<pre><code class=\"bash\">sudo python3.7 setup.py install<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><strong>mysql-connector<\/strong>&gt;=2.2.9<\/li>\n<li><strong>pytango<\/strong>&gt;=9.3.2<\/li>\n<li><strong>distribute<\/strong>&gt;=0.7.3<\/li>\n<\/ul>\n<p>  <\/p>\n<h3 id=\"kak-ispolzovat\">\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c<\/h3>\n<p>  <\/p>\n<pre><code class=\"python\">from hdbpp import HDBPP  if __name__ == '__main__':     hdbpp = HDBPP()      # \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0438 \u043a \u0411\u0414 \u0441 \u0430\u0440\u0445\u0438\u0432\u0430\u043c\u0438.     if hdbpp.connect() == False :         exit(0)      # \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0437\u0430 \u0432\u0441\u0435 \u0432\u0440\u0435\u043c\u044f.     archive = hdbpp.get_archive('tango:\/\/tangobox:10000\/ECG\/ecg\/1\/Lead')     for a in archive:         print(a)     # \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u0441\u0442\u0430\u0442\u0443\u0441 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430     ret = hdbpp.archiving_status('tango:\/\/tangobox:10000\/ECG\/ecg\/1\/Lead')     print(ret)      # \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u0438     hdbpp.archiving_add(['tango:\/\/tangobox:10000\/ECG\/ecg\/1\/Lead'])      # \u041d\u0430\u0447\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430     hdbpp.archiving_start('tango:\/\/tangobox:10000\/ECG\/ecg\/1\/Lead', 10 * 60 * 1000, 5 * 60 * 1000, 2, 1)     # \u0433\u0434\u0435:     # 10 * 60 * 1000 - \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0438 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043a\u0430\u0436\u0434\u044b\u0435 \u043c\u0441     # 5 * 60 * 1000 - \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 \u043a\u0430\u0436\u0434\u044b\u0435 \u043c\u0441, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0448\u043b\u043e \u0437\u0430 \u043f\u043e\u0440\u043e\u0433     # 2 - \u043f\u043e\u0440\u043e\u0433 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0432 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445     # 1 - \u043f\u043e\u0440\u043e\u0433 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u0445     # \u041e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0430\u0446\u0438\u044e \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430     hdbpp.archiving_stop('tango:\/\/tangobox:10000\/ECG\/ecg\/1\/Lead')      # \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435     hdbpp.close()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0432 \u043a\u043e\u0434\u0435.<br \/>  \u0415\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">pydoc3.7 hdbpp.HDBPP<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"ssylki\">\u0421\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/dvjdjvu\/hdbpp\" rel=\"nofollow\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/post\/507144\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e Tango Controls<\/a><\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421\u0442\u0430\u0442\u044c\u044e \u043f\u0438\u0441\u0430\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0438 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/533040\/\"> https:\/\/habr.com\/ru\/post\/533040\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\">\n<div style=\"text-align:center;\"><img decoding=\"async\" alt=\"main\" width=\"800\" src=\"https:\/\/habrastorage.org\/webt\/tu\/vr\/ec\/tuvrecn2a_yv1mikcfb39r9hlfa.png\"><\/div>\n<p>  <\/p>\n<h2 id=\"chto-takoe-hdbhttpswwwtango-controlsorgcommunityproject-docshdbplusplus\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <a href=\"https:\/\/www.tango-controls.org\/community\/project-docs\/hdbplusplus\/\" rel=\"nofollow\">HDB++<\/a>?<\/h2>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f TANGO, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 TANGO.<br \/>  \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Linux (<a href=\"https:\/\/s2innovation.sharepoint.com\/:f:\/s\/Developers\/EovD2IBwhppAp-ZLXtawQ6gB9F6aXPPs2msr2hgPGTO-FQ?e=Ii3tnr\" rel=\"nofollow\"><strong>TangoBox 9.3<\/strong><\/a> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Ubuntu 18.04), \u044d\u0442\u043e \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u0434\u0435 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"o-chem-statya\">\u041e \u0447\u0435\u043c \u0441\u0442\u0430\u0442\u044c\u044f?<\/h2>\n<p>  <\/p>\n<ul>\n<li>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/li>\n<li>\u041a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0423 \u043c\u0435\u043d\u044f \u0443\u0448\u043b\u043e ~ 2 \u043d\u0435\u0434\u0435\u043b\u0438 \u0447\u0442\u043e \u0431\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0434\u043b\u044f <strong>python<\/strong> \u043f\u043e\u0434 \u044d\u0442\u043e \u0434\u0435\u043b\u043e.<\/p>\n<p>  <\/p>\n<h2 id=\"dlya-chego-eto-nuzhno\">\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e?<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0412\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0411\u0414.<\/li>\n<li>\u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0441 \u043a\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0440\u0445\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/li>\n<\/ul>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-315250","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=315250"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/315250\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}