From 35a226e90bc2e5d64ba98426fc5e053c9bf91576 Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Thu, 1 Oct 2020 10:28:05 +0200 Subject: [PATCH 1/7] Update documentation on hdbpp. break down the big document under services in smaller files for easier management. --- .../services/{hdbpp/index.rst => hdbpp.rst} | 11 +- .../hdbpp/hdb++-design-guidelines.rst | 2428 +---------------- .../services/hdbpp/hdb-legacy.rst | 94 + .../services/hdbpp/hdbpp-cassandra.rst | 985 +++++++ .../services/hdbpp/hdbpp-cm-interface.rst | 152 ++ .../services/hdbpp/hdbpp-es-interface.rst | 272 ++ .../services/hdbpp/hdbpp-mysql.rst | 854 ++++++ .../services/hdbpp/hdbpp-timescaledb.rst | 14 + source/administration/services/index.rst | 2 +- .../tools-and-extensions/archiving/HDB++.rst | 66 +- 10 files changed, 2467 insertions(+), 2411 deletions(-) rename source/administration/services/{hdbpp/index.rst => hdbpp.rst} (61%) create mode 100644 source/administration/services/hdbpp/hdb-legacy.rst create mode 100644 source/administration/services/hdbpp/hdbpp-cassandra.rst create mode 100644 source/administration/services/hdbpp/hdbpp-cm-interface.rst create mode 100644 source/administration/services/hdbpp/hdbpp-es-interface.rst create mode 100644 source/administration/services/hdbpp/hdbpp-mysql.rst create mode 100644 source/administration/services/hdbpp/hdbpp-timescaledb.rst diff --git a/source/administration/services/hdbpp/index.rst b/source/administration/services/hdbpp.rst similarity index 61% rename from source/administration/services/hdbpp/index.rst rename to source/administration/services/hdbpp.rst index cd74db0b..c41e2b2d 100644 --- a/source/administration/services/hdbpp/index.rst +++ b/source/administration/services/hdbpp.rst @@ -10,8 +10,13 @@ For overview, see :ref:`hdbpp_manual` of :ref:`tools_index` section. .. toctree:: :name: hdbppdesignguidelines - :maxdepth: 2 - - hdb++-design-guidelines + :maxdepth: 4 + hdbpp/hdb++-design-guidelines + hdbpp/hdbpp-es-interface + hdbpp/hdbpp-cm-interface + hdbpp/hdb-legacy + hdbpp/hdbpp-timescaledb + hdbpp/hdbpp-mysql + hdbpp/hdbpp-cassandra diff --git a/source/administration/services/hdbpp/hdb++-design-guidelines.rst b/source/administration/services/hdbpp/hdb++-design-guidelines.rst index efb62f08..f2e2aaa0 100644 --- a/source/administration/services/hdbpp/hdb++-design-guidelines.rst +++ b/source/administration/services/hdbpp/hdb++-design-guidelines.rst @@ -1,3 +1,6 @@ + +.. _hdbpp_design: + :audience:`administrators, developers`, :lang:`C++` @@ -27,7 +30,7 @@ It’s written in C++ and is fully event-driven. **Contributions** -| *R. Bourtembourg, J.M. Chaize, F.Poncet, J.L. Pons, P.Verdier* - ESRF +| *R. Bourtembourg, J.M. Chaize, F.Poncet, J.L. Pons, P.Verdier, D.Lacoste* - ESRF | *C.Scafuri, G.Scalamera, G.Strangolino, L.Zambon* - ELETTRA | @@ -104,7 +107,7 @@ must have the following characteristics: #. one additional thread, acting as consumer of the FIFO, is in charge of pushing the data into the database back-end, preserving the event data time-stamp; the code to access the database engine shall be structured - to allow the use of different back-ends (MySQL, Oracle, etc...) + to allow the use of different back-ends (Timescaledb, MySQL, Oracle, etc...) #. the device server methods, commands and attributes, must allow to perform the following operations: @@ -176,7 +179,7 @@ Some of the attribute configuration parameters, such as *display-unit*, and updated by means of the attribute configuration change event. A mechanism to specify per-attribute archiving strategies, called -context, has been defined ad added to the EventSubscriber. The syntax of the +context, has been defined and added to the EventSubscriber. The syntax of the AttributeList Property has been modified to support a *name=value* syntax for the context, except for the Attribute name; fields are separated by semicolon. Keeping the current syntax for the attribute @@ -187,32 +190,36 @@ field allows for unchanged backwards compatibility: $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/eos/climate/18b20 eos.01/State;strategy=RUN|SHUTDOWN -The labels for the context, implemented as enum, are defined in a free +The labels for the context, are defined in a free property, and/or in the class property and/or in the device property, with increasing priority. The defaults values, as well as the default context, are pre-defined but can be modified by the user. The default values are shown in table. -+------------+---------+ -| label | value | -+============+=========+ -| ALWAYS | 0 | -+------------+---------+ -| RUN | 1 | -+------------+---------+ -| SHUTDOWN | 2 | -+------------+---------+ -| SERVICE | 3 | -+------------+---------+ ++------------+ +| label | ++============+ +| ALWAYS | ++------------+ +| RUN | ++------------+ +| SHUTDOWN | ++------------+ +| SERVICE | ++------------+ Table 1: Context default labels. -Whenever not specified the default context is ALWAYS. A new memorized -attribute, named **Context**, written by upper layer logic, tells the -archiver about the current context status or rather the required context -transition. +Each context is exclusive, except for the ALWAYS context. An attribute +configured to be run in the ALWAYS context will be archived at any time. +This is why the ALWAYS context must be defined, it it is not it will be +automatically added to the list of context. +A new memorized attribute, named **Context**, written by upper layer logic, +tells the archiver about the current context status or rather the required +context transition. Being a memorized Attribute, the **Context** attribute needs to be written -at least once before the EventSubscriber device actually starting archiving. +at least once. If not set, a warning will be displayed in the device status, +and only the attributes with the ALWAYS context will be archived. This means that, once the device has been deployed, and the AttributeList pupulated with the relevant attributes to be archived, complete with the strategy, the appropriate label has to be written in **Context**. @@ -249,427 +256,6 @@ The device server must maintain at least the following operating states: - **OFF**: archiving stopped -Event Subscriber interface --------------------------- - -More in detail the device server interface is summarized in table 2 and table 3. - -Commands -~~~~~~~~ - -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeAdd | add an attribute to archiving; the complete FQDN has to be specified otherwise it is completed by the using getaddrinfo() | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeContext | read the specified attribute current context | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributePause | pause archiving specified attribute but do not unsubscribe archive event | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeStatus | read attribute status | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeStart | start archiving specified attribute | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeStop | stop archiving specified attribute, unsubscribe archive event | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| AttributeUpdate | update context of an already archived attribute | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| Pause | pause archiving all attributes but do not unsubscribe archive events | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| Start | start archiving | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| Stop | stop archiving, usubscribe all archive events | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ -| ResetStatistics | reset statistics | -+--------------------+-----------------------------------------------------------------------------------------------------------------------------+ - -Table 2: Event Subscriber Command. - -Attributes -~~~~~~~~~~ - -+------------------------------+-------------------------------------------------------+ -| AttributeContextList | return the list of attribute contexts | -+------------------------------+-------------------------------------------------------+ -| AttributeErrorList | return the list of attribute errors | -+------------------------------+-------------------------------------------------------+ -| AttributeEventNumberList | number of events received for each attribute | -+------------------------------+-------------------------------------------------------+ -| AttributeFailureFreq | total number of failures per time | -+------------------------------+-------------------------------------------------------+ -| AttributeFailureFreqList | per-attribute number of failures per time | -+------------------------------+-------------------------------------------------------+ -| AttributeList | return configured attribute list | -+------------------------------+-------------------------------------------------------+ -| AttributeMaxPendingNumber | maximum number of attributes waiting to be archived | -+------------------------------+-------------------------------------------------------+ -| AttributeMaxProcessingTime | max processing time | -+------------------------------+-------------------------------------------------------+ -| AttributeMaxStoreTime | max storing time | -+------------------------------+-------------------------------------------------------+ -| AttributeMinProcessingTime | min processing time | -+------------------------------+-------------------------------------------------------+ -| AttributeMinStoreTime | min storing time | -+------------------------------+-------------------------------------------------------+ -| AttributeNokList | return the list of attribute in error | -+------------------------------+-------------------------------------------------------+ -| AttributeNokNumber | number of archived attribute in error | -+------------------------------+-------------------------------------------------------+ -| AttributeNumber | number of attributes configured for archiving | -+------------------------------+-------------------------------------------------------+ -| AttributeOkList | return the list of attributes not in error | -+------------------------------+-------------------------------------------------------+ -| AttributeOkNumber | number of archived attributes not in error | -+------------------------------+-------------------------------------------------------+ -| AttributePausedList | list of paused attributes | -+------------------------------+-------------------------------------------------------+ -| AttributePausedNumber | number of paused attributes | -+------------------------------+-------------------------------------------------------+ -| AttributePendingList | list of attributes waiting to be archived | -+------------------------------+-------------------------------------------------------+ -| AttributePendingNumber | number of attributes waiting to be archived | -+------------------------------+-------------------------------------------------------+ -| AttributeRecordFreq | total number of records per time | -+------------------------------+-------------------------------------------------------+ -| AttributeRecordFreqList | per-attribute number of records per time | -+------------------------------+-------------------------------------------------------+ -| AttributeStartedList | list of started attributes | -+------------------------------+-------------------------------------------------------+ -| AttributeStartedNumber | number of started attributes | -+------------------------------+-------------------------------------------------------+ -| AttributeStoppedList | list of stopped attributes | -+------------------------------+-------------------------------------------------------+ -| AttributeStoppedNumber | number of stopped attributes | -+------------------------------+-------------------------------------------------------+ -| Context | archiver current context (r/w) | -+------------------------------+-------------------------------------------------------+ -| StatisticsResetTime | seconds elapsed since last statistics reset | -+------------------------------+-------------------------------------------------------+ - -Table 3: Event Subscriber Attributes. - -The class and device properties availabile for configuration are shown -in table. According to TANGO -device server design guidelines Device Properties, when defined, -override Class properties. Please note that class and device Properties -have changed since release of the TANGO device server. - -Class properties -~~~~~~~~~~~~~~~~ - -+-----------------------------+------------------------------------------------------------------+ -| CheckPeriodicTimeoutDelay | delay before timeout when checking periodic events, in seconds | -+-----------------------------+------------------------------------------------------------------+ -| PollingThreadPeriod | default period for polling thread, in seconds | -+-----------------------------+------------------------------------------------------------------+ -| LibConfiguration | configuration parameters for backend support library | -+-----------------------------+------------------------------------------------------------------+ -| HdbppContext | definition of possible archiver operating contexts | -+-----------------------------+------------------------------------------------------------------+ -| DefaultContext | archiver default context | -+-----------------------------+------------------------------------------------------------------+ -| StartArchivingAtStartup | start archiving at startup | -+-----------------------------+------------------------------------------------------------------+ -| StatisticsTimeWindow | timeslot for statistics in seconds | -+-----------------------------+------------------------------------------------------------------+ -| SubscribeRetryPeriod | retry period for subscribe event, in seconds | -+-----------------------------+------------------------------------------------------------------+ - -Table 4: Event Subscriber Class properties. - -The **LibConfiguration** property contains the following multi-line -configuration parameters *host*, *user*, *password*, *dbname*, *libname*, *port*. -Table shows example configuration parameters for backend: - -+-------------------------------------------+ -| host=srv-log-srf.fcs.elettra.trieste.it | -+-------------------------------------------+ -| user=hdbarchiver | -+-------------------------------------------+ -| password=myownpassword | -+-------------------------------------------+ -| dbname=hdbpp | -+-------------------------------------------+ -| libname=dependOnDatabase (see below) | -+-------------------------------------------+ -| port=3306 | -+-------------------------------------------+ - -Table 5: LibConfiguration parameters for database. - -.. note:: - *libname* should be set to one of the following values: - - libname=libhdb++mysql.so if you intend to use HDB++ with the MySQL backend - libname=libhdbmysql.so if you intend to use HDB++ with the MySQL Legacy backend - libname=libhdb++cassandra.so if you intend to use HDB++ with the Cassandra backend - - The library specified in LibConfiguration->libname is loaded dynamically by the EventSubscriber device (e.g. *hdb++-es-srv*). - You need to have your LD_LIBRARY_PATH environment variable correctly set (including the directory - where the library you intend to use is located). - - libhdb++mysql and libhdb++cassandra are just implementations of the classes defined in libhdb++ library. - The user can decide which implementation to use by specifying this LibConfiguration -> libname device property config parameter. - - The device dynamically laods the configured library configured (using dlopen()) during the device initialization. - See `Database interface`_ section for more information. - - - -The **HdbppContext property** contains the enum specifying the possible -user-defined operating contexts in the form *number:label*. The default -values are: - -+--------------+ -| 0:ALWAYS | -+--------------+ -| 1:RUN | -+--------------+ -| 2:SHUTDOWN | -+--------------+ -| 3:SERVICE | -+--------------+ - -Table 6: HdbppContext enum default values. - -Device properties -~~~~~~~~~~~~~~~~~ - -+-----------------------------+------------------------------------------------------------------+ -| AttributeList | list of configured attributes | -+-----------------------------+------------------------------------------------------------------+ -| CheckPeriodicTimeoutDelay | delay before timeout when checking periodic events, in seconds | -+-----------------------------+------------------------------------------------------------------+ -| PollingThreadPeriod | default period for polling thread, in seconds | -+-----------------------------+------------------------------------------------------------------+ -| LibConfiguration | configuration parameters for backend support library | -+-----------------------------+------------------------------------------------------------------+ -| HdbppContext | definition of possible archiver operating contexts | -+-----------------------------+------------------------------------------------------------------+ -| DefaultContext | archiver default context | -+-----------------------------+------------------------------------------------------------------+ -| StartArchivingAtStartup | start archiving at startup | -+-----------------------------+------------------------------------------------------------------+ -| StatisticsTimeWindow | timeslot for statistics | -+-----------------------------+------------------------------------------------------------------+ -| SubscribeRetryPeriod | retry period for subscribe event, in seconds | -+-----------------------------+------------------------------------------------------------------+ - -Table 7: Event Subscriber Device properties. - -In addition to the already described Class properties, device Properties -comprehend the AttributeList property which contains the list of -attributes in charge of the current device. The sintax is -*fully-qualified-attribute-name;context=CONTEXT* where *CONTEXT* can be -one or a combination of the defined contexts (logic OR). Whenever not -specified the DefaultContext specified in the Class property or in the -Device Property applies. Table shows some examples: - -.. code-block:: console - :linenos: - - $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/eos/climate/18b20 eos.01/State;context=RUN|SHUTDOWN - $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/eos/climate/18b20 eos.01/Temperature;context=RUN|SHUTDOWN - $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/ctf/diagnostics/ccd_ctf.01/State;context=RUN - $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/ctf/diagnostics/ccd_ctf.01/HorProfile;context=RUN - $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/ctf/diagnostics/ccd_ctf.01/VerProfile;context=RUN - -Table 8: AttributeList example - -The first two attributes will be archived in both RUN and SHUTDOWN -contexts; the last three only when in RUN. - -In order to address large archiving systems the need to distribute the -workload over a large number of shows up. A device server will assist in -the operations of adding, editing, moving, deleting an attribute the -archiving system. All the configuration parameters, such as polling -period, variation thresholds etc., are kept in the database as -properties of the archived attribute. In order to be managed by the -device server each instance has to added to the pool using the -ArchiverAdd command. - -The device server shall be able to perform the following operations on -the managed pool: - -#. manage the request of archiving a new attribute - - - create an entry in the HDB++ if not already done - - - setup the attribute’s archive event configuration - - - assign the new attribute to one of the device servers - - - following some rules of load balancing - - - to the specified device server - -#. move an attribute from an device server to another one - -#. keep trace of which attribute is assigned to which - -#. start/stop the archiving of an attribute at runtime - -#. remove an attribute from archiving - -The configuration shall be possible via the device server API as well as -via a dedicated GUI interface; the GUI just use the provided API. - -The may also expose a certain number of attributes to give the status of -what is going on: - -- total number of - -- total number of working attributes - -- total number of faulty attributes - -- total number of calls per second - -These attributes could be themselves archived to enable a follow up -versus time. - -Configuration Manager interface -------------------------------- - -More in detail the device server exposes the following interface. - -Commands -~~~~~~~~ - -The commands availabile in the are summarized in commands-table. - -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ArchiverAdd | add a new instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding an device to an existing instance is not supported | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ArchiverRemove | remove an from the list; neither the device instance nor the attributes configured are removed from the database | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeAdd | add an attribute to archiving | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeAssign | assign attribute to | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeGetArchiver | return in charge of attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributePause | pause archiving specified attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeSearch | return list of attributes containing input pattern | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStart | start archiving an attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStatus | read attribute archiving status | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStop | stop archiving an attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeUpdate | update context of an already archived attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Context | set context to all managed archivers | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ResetStatistics | reset statistics of and all | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - -Table 9: Configuration Manager Commands. - -Note that the list of managed is stored into the ArchiverList device -property that is maintained via the ArchiverAdd, -ArchiverRemove and AttributeSetArchiver commands. Therefore in the -archiving system the device server instances can also be configured by -hand, if required, an run independently. - -Attributes -~~~~~~~~~~ - -The attributes of the are summarized in attributes-table. - -+-------------------------------+-------------------------------------------------------------------+ -| ArchiverContext | return archiver context | -+-------------------------------+-------------------------------------------------------------------+ -| ArchiverList | return list of managed archivers | -+-------------------------------+-------------------------------------------------------------------+ -| ArchiverStatisticsResetTime | seconds elapsed since last statistics reset | -+-------------------------------+-------------------------------------------------------------------+ -| ArchiverStatus | return archiver status information | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeFailureFreq | total number of failures per time | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeMaxPendingNumber | max number of attributes waiting to be archived (all archivers) | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeMaxProcessingTime | max processing time (all archivers) | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeMaxStoreTime | max storing time (all archivers) | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeMinProcessingTime | min processing time (all archivers) | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeMinStoreTime | min storing time (all archivers) | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeNokNumber | total number of archived attribute in error | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeNumber | total number of attributes configured for archiving | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeOkNumber | total number of archived attribute not in error | -+-------------------------------+-------------------------------------------------------------------+ -| AttributePausedNumber | total number of paused attributes | -+-------------------------------+-------------------------------------------------------------------+ -| AttributePendingNumber | total number of attributes waiting to be archived | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeRecordFreq | total number of records per time | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeStartedNumber | total number of started attributes | -+-------------------------------+-------------------------------------------------------------------+ -| AttributeStoppedNumber | total number of stopped attributes | -+-------------------------------+-------------------------------------------------------------------+ -| SetAbsoluteEvent | set archive absolute thresholds; for archiving setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetArchiver | support attribute for setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetAttributeName | support attribute for setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetCodePushedEvent | specify event pushed in the code | -+-------------------------------+-------------------------------------------------------------------+ -| SetContext | set archiving context; for archiving setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetPeriodEvent | set archive period; for archiving setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetPollingPeriod | set polling period; for archiving setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetRelativeEvent | set archive relative thresholds; for archiving setup | -+-------------------------------+-------------------------------------------------------------------+ -| SetTTL | set time-to-live for temporary storage; for archiving setup | -+-------------------------------+-------------------------------------------------------------------+ - -Table 10: Configuration Manager Attributes. - -The SetXxxYyy attributes are used for archive event and archiver -instance configuration setup and must be filled before calling the -AttributeAdd command. The AttributeAdd checks the consistency of the -desired event configuration and then adds the new attribute to the -archiver instance specified with SetArchiver. Then the AttributeAdd -command creates the required entries into the historical database. - -Class properties -~~~~~~~~~~~~~~~~ - -+--------------------+--------------------------------------------------------+ -| LibConfiguration | configuration parameters for backend support library | -+--------------------+--------------------------------------------------------+ -| MaxSearchSize | max size for AttributeSearch result | -+--------------------+--------------------------------------------------------+ - -Table 11: Event Subscriber Class properties. - -Device properties -~~~~~~~~~~~~~~~~~ - -+--------------------+--------------------------------------------------------+ -| ArchiverList | list of existing archivers | -+--------------------+--------------------------------------------------------+ -| LibConfiguration | configuration parameters for backend support library | -+--------------------+--------------------------------------------------------+ -| MaxSearchSize | max size for AttributeSearch result | -+--------------------+--------------------------------------------------------+ - -Table 12: Configuration Manager device properties. - Configuration and diagnostic tools ================================== @@ -686,6 +272,7 @@ documentation page for any additional information: `HDB++ Configuration GUI documentation `_ `Download GUI jar file `_ +.. _database-interface: Database interface ================== @@ -693,21 +280,23 @@ Database interface A C++ API will be developed to address the writing and reading operations on the database and made availabile as a library. This library will provide the *essential* methods for accessing the database. -The , the , the device servers, library and tools will eventually take +The device servers, library and tools will eventually take advantage of the library. Actually a number of libraries are already -available to encapsulate database access decouple the : - -+-----------------------+-----+-----------------------------------+ -| *libhdb++* | : | abstraction layer | -+-----------------------+-----+-----------------------------------+ -| *libhdb++mysql* | : | table support, MySQL | -+-----------------------+-----+-----------------------------------+ -| *libhdb++cassandra* | : | table support, Cassandra | -+-----------------------+-----+-----------------------------------+ -| *libhdbmysql* | : | legacy HDB table support, MySQL | -+-----------------------+-----+-----------------------------------+ - -Table 13: Available database interfacement libraries. +available to encapsulate database access: + ++-----------------------+-----------------------------------+ +| *libhdb++* | abstraction layer | ++-----------------------+-----------------------------------+ +| *libhdb++timescale* | table support, Timescaledb | ++-----------------------+-----------------------------------+ +| *libhdb++mysql* | table support, MySQL | ++-----------------------+-----------------------------------+ +| *libhdb++cassandra* | table support, Cassandra | ++-----------------------+-----------------------------------+ +| *libhdbmysql* | legacy HDB table support, MySQL | ++-----------------------+-----------------------------------+ + +Table 2: Available database interfacement libraries. Additional libraries are foreseen to support different database engines, such as Oracle, Postgres or possibly noSQL implementations. @@ -735,15 +324,15 @@ microsecond resolution support for daytime. Three SQL scripts are provided to create the necessary database structure for MySQL or Cassandra backend: -+--------------------------------+-----+---------------------------+ -| *create_hdb_mysql.sql* | : | legacy HDB MySQL schema | -+--------------------------------+-----+---------------------------+ -| *create_hdb++_mysql.sql* | : | MySQL schema | -+--------------------------------+-----+---------------------------+ -| *create_hdb_cassandra.sql* | : | Cassandra schema | -+--------------------------------+-----+---------------------------+ ++--------------------------------+---------------------------+ +| *create_hdb_mysql.sql* | legacy HDB MySQL schema | ++--------------------------------+---------------------------+ +| *create_hdb++_mysql.sql* | MySQL schema | ++--------------------------------+---------------------------+ +| *create_hdb_cassandra.sql* | Cassandra schema | ++--------------------------------+---------------------------+ -Table 14: Database setup scripts. +Table 3: Database setup scripts. The *att_conf* table associates the attribute name with a unique id and selects the data type; it’s worth notice that the *att_name* raw always @@ -893,7 +482,7 @@ timestamp. | att_scalar_string_rw | att_array_string_rw | +-------------------------------+------------------------------+ -Table 15: Supported data types. +Table 4: Supported data types. To support temporary storage of historical data the att_ttl column has to be added to the att_conf table. The att_ttl defines the @@ -985,1922 +574,13 @@ already needed by the core. Project references and source code ================================== -The HDB++ project page is available on `GitHub `_. +The HDB++ project page is available on `GitHub `_. The HDB++ source code for the archiving engine as well as the configuration tools, extraction libraries and GUI are available on `Sourceforge `_ -Legacy HDB tables structure -=========================== - -:: - - mysql> describe adt; - +-------------+-------------------------------+------+-----+---------+----------------+ - | Field | Type | Null | Key | Default | Extra | - +-------------+-------------------------------+------+-----+---------+----------------+ - | ID | smallint(5) unsigned zerofill | NO | PRI | NULL | auto_increment | - | time | datetime | YES | | NULL | | - | full_name | varchar(200) | NO | PRI | | | - | device | varchar(150) | NO | | | | - | domain | varchar(35) | NO | | | | - | family | varchar(35) | NO | | | | - | member | varchar(35) | NO | | | | - | att_name | varchar(50) | NO | | | | - | data_type | tinyint(1) | NO | | 0 | | - | data_format | tinyint(1) | NO | | 0 | | - | writable | tinyint(1) | NO | | 0 | | - | max_dim_x | smallint(6) unsigned | NO | | 0 | | - | max_dim_y | smallint(6) unsigned | NO | | 0 | | - | levelg | tinyint(1) | NO | | 0 | | - | facility | varchar(45) | NO | | | | - | archivable | tinyint(1) | NO | | 0 | | - | substitute | smallint(9) | NO | | 0 | | - +-------------+-------------------------------+------+-----+---------+----------------+ - - -:: - - mysql> describe amt; - +-------------------+-------------------------------+------+-----+---------+-------+ - | Field | Type | Null | Key | Default | Extra | - +-------------------+-------------------------------+------+-----+---------+-------+ - | ID | smallint(5) unsigned zerofill | NO | | 00000 | | - | archiver | varchar(255) | NO | | | | - | start_date | datetime | YES | | NULL | | - | stop_date | datetime | YES | | NULL | | - | per_mod | int(1) | NO | | 0 | | - | per_per_mod | int(5) | YES | | NULL | | - | abs_mod | int(1) | NO | | 0 | | - | per_abs_mod | int(5) | YES | | NULL | | - | dec_del_abs_mod | double | YES | | NULL | | - | gro_del_abs_mod | double | YES | | NULL | | - | rel_mod | int(1) | NO | | 0 | | - | per_rel_mod | int(5) | YES | | NULL | | - | n_percent_rel_mod | double | YES | | NULL | | - | p_percent_rel_mod | double | YES | | NULL | | - | thr_mod | int(1) | NO | | 0 | | - | per_thr_mod | int(5) | YES | | NULL | | - | min_val_thr_mod | double | YES | | NULL | | - | max_val_thr_mod | double | YES | | NULL | | - | cal_mod | int(1) | NO | | 0 | | - | per_cal_mod | int(5) | YES | | NULL | | - | val_cal_mod | int(3) | YES | | NULL | | - | type_cal_mod | int(2) | YES | | NULL | | - | algo_cal_mod | varchar(20) | YES | | NULL | | - | dif_mod | int(1) | NO | | 0 | | - | per_dif_mod | int(5) | YES | | NULL | | - | ext_mod | int(1) | NO | | 0 | | - | refresh_mode | tinyint(4) | YES | | 0 | | - +-------------------+-------------------------------+------+-----+---------+-------+ - - -:: - - mysql> describe apt; - +---------------+--------------------------+------+-----+---------+-------+ - | Field | Type | Null | Key | Default | Extra | - +---------------+--------------------------+------+-----+---------+-------+ - | ID | int(5) unsigned zerofill | NO | PRI | 00000 | | - | time | datetime | YES | | NULL | | - | description | varchar(255) | NO | | | | - | label | varchar(64) | NO | | | | - | unit | varchar(64) | NO | | 1 | | - | standard_unit | varchar(64) | NO | | 1 | | - | display_unit | varchar(64) | NO | | | | - | format | varchar(64) | NO | | | | - | min_value | varchar(64) | NO | | 0 | | - | max_value | varchar(64) | NO | | 0 | | - | min_alarm | varchar(64) | NO | | 0 | | - | max_alarm | varchar(64) | NO | | 0 | | - +---------------+--------------------------+------+-----+---------+-------+ - - -schema SQL source (MySQL) -========================= - -:: - - CREATE TABLE IF NOT EXISTS att_conf - ( - att_conf_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - att_name VARCHAR(255) UNIQUE NOT NULL, - att_conf_data_type_id INT UNSIGNED NOT NULL, - att_ttl INT UNSIGNED NULL DEFAULT NULL, - facility VARCHAR(255) NOT NULL DEFAULT '', - domain VARCHAR(255) NOT NULL DEFAULT '', - family VARCHAR(255) NOT NULL DEFAULT '', - member VARCHAR(255) NOT NULL DEFAULT '', - name VARCHAR(255) NOT NULL DEFAULT '', - INDEX(att_conf_data_type_id) - ) ENGINE=MyISAM COMMENT='Attribute Configuration Table'; - - DROP TABLE att_conf_data_type; - CREATE TABLE IF NOT EXISTS att_conf_data_type - ( - att_conf_data_type_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - data_type VARCHAR(255) NOT NULL, - tango_data_type TINYINT(1) NOT NULL - ) ENGINE=MyISAM COMMENT='Attribute types description'; - - INSERT INTO att_conf_data_type (data_type, tango_data_type) VALUES - ('scalar_devboolean_ro', 1),('scalar_devboolean_rw', 1),('array_devboolean_ro', 1), - ('array_devboolean_rw', 1),('scalar_devuchar_ro', 22),('scalar_devuchar_rw', 22), - ('array_devuchar_ro', 22),('array_devuchar_rw', 22),('scalar_devshort_ro', 2), - ('scalar_devshort_rw', 2),('array_devshort_ro', 2),('array_devshort_rw', 2), - ('scalar_devushort_ro', 6),('scalar_devushort_rw', 6),('array_devushort_ro', 6), - ('array_devushort_rw', 6),('scalar_devlong_ro', 3),('scalar_devlong_rw', 3), - ('array_devlong_ro', 3),('array_devlong_rw', 3),('scalar_devulong_ro', 7), - ('scalar_devulong_rw', 7),('array_devulong_ro', 7),('array_devulong_rw', 7), - ('scalar_devlong64_ro', 23),('scalar_devlong64_rw', 23),('array_devlong64_ro', 23), - ('array_devlong64_rw', 23),('scalar_devulong64_ro', 24),('scalar_devulong64_rw', 24), - ('array_devulong64_ro', 24),('array_devulong64_rw', 24),('scalar_devfloat_ro', 4), - ('scalar_devfloat_rw', 4),('array_devfloat_ro', 4),('array_devfloat_rw', 4), - ('scalar_devdouble_ro', 5),('scalar_devdouble_rw', 5),('array_devdouble_ro', 5), - ('array_devdouble_rw', 5),('scalar_devstring_ro', 8),('scalar_devstring_rw', 8), - ('array_devstring_ro', 8),('array_devstring_rw', 8),('scalar_devstate_ro', 19), - ('scalar_devstate_rw', 19),('array_devstate_ro', 19),('array_devstate_rw', 19), - ('scalar_devencoded_ro', 28),('scalar_devencoded_rw', 28),('array_devencoded_ro', 28), - ('array_devencoded_rw', 28); - - CREATE TABLE IF NOT EXISTS att_history - ( - att_conf_id INT UNSIGNED NOT NULL, - time TIMESTAMP(6) DEFAULT 0, - att_history_event_id INT UNSIGNED NOT NULL, - INDEX(att_conf_id), - INDEX(att_history_event_id) - ) ENGINE=MyISAM COMMENT='Attribute Configuration Events History Table'; - - DROP TABLE att_history_event; - CREATE TABLE IF NOT EXISTS att_history_event - ( - att_history_event_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - event VARCHAR(255) NOT NULL - ) ENGINE=MyISAM COMMENT='Attribute history events description'; - - INSERT INTO att_history_event (event) VALUES - ('add'),('remove'),('start'),('stop'),('crash'),('pause'); - - CREATE TABLE IF NOT EXISTS att_parameter - ( - att_conf_id INT UNSIGNED NOT NULL, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - label VARCHAR(255) NOT NULL DEFAULT '', - unit VARCHAR(64) NOT NULL DEFAULT '', - standard_unit VARCHAR(64) NOT NULL DEFAULT '1', - display_unit VARCHAR(64) NOT NULL DEFAULT '', - format VARCHAR(64) NOT NULL DEFAULT '', - archive_rel_change VARCHAR(64) NOT NULL DEFAULT '', - archive_abs_change VARCHAR(64) NOT NULL DEFAULT '', - archive_period VARCHAR(64) NOT NULL DEFAULT '', - description VARCHAR(1024) NOT NULL DEFAULT '', - INDEX(recv_time), - INDEX(att_conf_id) - ) ENGINE=MyISAM COMMENT='Attribute configuration parameters'; - - CREATE TABLE IF NOT EXISTS att_error_desc - ( - att_error_desc_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - error_desc VARCHAR(255) UNIQUE NOT NULL - ) ENGINE=MyISAM COMMENT='Error Description Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devboolean_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r TINYINT(1) UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Boolean ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devboolean_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r TINYINT(1) UNSIGNED DEFAULT NULL, - value_w TINYINT(1) UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Boolean ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devboolean_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r TINYINT(1) UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Boolean ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devboolean_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r TINYINT(1) UNSIGNED DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w TINYINT(1) UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Boolean ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devuchar_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar UChar ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devuchar_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - value_w TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar UChar ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devuchar_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array UChar ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devuchar_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array UChar ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devshort_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r SMALLINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Short ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devshort_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r SMALLINT DEFAULT NULL, - value_w SMALLINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Short ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devshort_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r SMALLINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Short ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devshort_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r SMALLINT DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w SMALLINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Short ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devushort_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r SMALLINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar UShort ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devushort_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r SMALLINT UNSIGNED DEFAULT NULL, - value_w SMALLINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar UShort ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devushort_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r SMALLINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array UShort ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devushort_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r SMALLINT UNSIGNED DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w SMALLINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array UShort ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r INT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Long ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r INT DEFAULT NULL, - value_w INT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Long ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r INT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Long ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r INT DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w INT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Long ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r INT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar ULong ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r INT UNSIGNED DEFAULT NULL, - value_w INT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar ULong ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r INT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array ULong ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r INT UNSIGNED DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w INT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array ULong ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong64_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r BIGINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Long64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong64_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r BIGINT DEFAULT NULL, - value_w BIGINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Long64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong64_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r BIGINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Long64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong64_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r BIGINT DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w BIGINT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Long64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong64_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r BIGINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar ULong64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong64_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r BIGINT UNSIGNED DEFAULT NULL, - value_w BIGINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar ULong64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong64_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r BIGINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array ULong64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong64_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r BIGINT UNSIGNED DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w BIGINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array ULong64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devfloat_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r FLOAT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Float ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devfloat_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r FLOAT DEFAULT NULL, - value_w FLOAT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Float ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devfloat_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r FLOAT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Float ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devfloat_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r FLOAT DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w FLOAT DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Float ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devdouble_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r DOUBLE DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Double ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devdouble_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r DOUBLE DEFAULT NULL, - value_w DOUBLE DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Double ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devdouble_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r DOUBLE DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Double ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devdouble_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r DOUBLE DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w DOUBLE DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Double ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstring_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r VARCHAR(16384) DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar String ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstring_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r VARCHAR(16384) DEFAULT NULL, - value_w VARCHAR(16384) DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar String ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstring_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r VARCHAR(16384) DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array String ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstring_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r VARCHAR(16384) DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w VARCHAR(16384) DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array String ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstate_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar State ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstate_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - value_w TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar State ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstate_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array State ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstate_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r TINYINT UNSIGNED DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w TINYINT UNSIGNED DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array State ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devencoded_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r BLOB DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Encoded ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devencoded_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - value_r BLOB DEFAULT NULL, - value_w BLOB DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Scalar Encoded ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devencoded_ro - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r BLOB DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Encoded ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devencoded_rw - ( - att_conf_id INT UNSIGNED NOT NULL, - data_time TIMESTAMP(6) DEFAULT 0, - recv_time TIMESTAMP(6) DEFAULT 0, - insert_time TIMESTAMP(6) DEFAULT 0, - idx INT UNSIGNED NOT NULL, - dim_x_r INT UNSIGNED NOT NULL, - dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, - value_r BLOB DEFAULT NULL, - dim_x_w INT UNSIGNED NOT NULL, - dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, - value_w BLOB DEFAULT NULL, - quality TINYINT(1) DEFAULT NULL, - att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, - INDEX att_conf_id_data_time (att_conf_id,data_time) - ) ENGINE=MyISAM COMMENT='Array Encoded ReadWrite Values Table'; - - -schema CQL source (Cassandra) -============================= - -:: - - -- Create hdb keyspace - -- Please adapt the replication factor (3 by default here) to your use case - CREATE KEYSPACE IF NOT EXISTS hdb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'DC1' : 3 }; - - USE hdb; - - CREATE TYPE IF NOT EXISTS devencoded ( - encoded_format text, - encoded_data blob - ); - - CREATE TABLE IF NOT EXISTS att_conf ( - cs_name text, - att_name text, - att_conf_id timeuuid, - data_type text, -- data_types set in the future? - PRIMARY KEY (cs_name, att_name) - ) - WITH comment='Attribute Configuration Table' - AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; - - CREATE INDEX on att_conf(data_type); - CREATE INDEX on att_conf(att_conf_id); - - CREATE TABLE IF NOT EXISTS att_history - ( - att_conf_id timeuuid, - time timestamp, - time_us int, - event text, -- 'add','remove','start','stop' or 'crash' - PRIMARY KEY(att_conf_id, time, time_us) - ) - WITH comment='Attribute Configuration Events History Table'; - - - CREATE TABLE IF NOT EXISTS att_scalar_devboolean_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r boolean, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevBoolean ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devboolean_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r boolean, - value_w boolean, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevBoolean ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devuchar_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) WITH comment='Scalar DevUChar ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devuchar_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - value_w int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevUChar ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devshort_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) WITH comment='Scalar DevShort ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devshort_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - value_w int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevShort ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devushort_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevUShort ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devushort_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - value_w int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevUShort ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevLong ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - value_w int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevLong ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r bigint, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevULong ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r bigint, - value_w bigint, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevULong ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong64_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r bigint, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevLong64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devlong64_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r bigint, - value_w bigint, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevLong64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong64_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r bigint, // issue here with very big numbers - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevULong64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devulong64_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r bigint, // issue here with very big numbers - value_w bigint, // issue here with very big numbers - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevLong64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devfloat_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r float, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevFloat ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devfloat_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r float, - value_w float, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevFloat ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devdouble_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r double, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevDouble ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devdouble_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r double, - value_w double, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevDouble ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstring_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r text, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevString ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstring_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r text, - value_w text, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevString ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstate_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevState ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devstate_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r int, - value_w int, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevState ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devencoded_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r frozen, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevEncoded ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_scalar_devencoded_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r frozen, - value_w frozen, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Scalar DevEncoded ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devboolean_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevBoolean ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devboolean_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevBoolean ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devuchar_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevUChar ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devuchar_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevUChar ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devshort_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevShort ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devshort_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevShort ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devushort_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevUShort ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devushort_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevUShort ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevLong ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevLong ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevULong ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevULong ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong64_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevLong64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devlong64_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevLong64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong64_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, // issue with very big numbers - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevULong64 ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devulong64_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, // issue with very big numbers - value_w list, // issue with very big numbers - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevULong64 ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devfloat_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevFloat ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devfloat_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevFloat ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devdouble_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevDouble ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devdouble_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevDouble ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstring_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevString ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstring_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, - value_w list, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevString ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstate_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list, // Store a special type here - // where we could store an int and a string? - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevState ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devstate_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list,// Store a special type here - value_w list,// where we could store an int and a string? - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevState ReadWrite Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devencoded_ro ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list>, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevEncoded ReadOnly Values Table'; - - CREATE TABLE IF NOT EXISTS att_array_devencoded_rw ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - value_r list>, - value_w list>, - quality int, - error_desc text, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Array DevEncoded ReadWrite Values Table'; - - ------------------------- - -- att_parameter table -- - ------------------------- - CREATE TABLE IF NOT EXISTS att_parameter ( - att_conf_id timeuuid, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - label text, - unit text, - standard_unit text, - display_unit text, - format text, - archive_rel_change text, - archive_abs_change text, - archive_period text, - description text, - PRIMARY KEY((att_conf_id), recv_time, recv_time_us) - ) WITH COMMENT='Attribute configuration parameters'; - - -------------------------------- - -- Attributes browsing tables -- - -------------------------------- - CREATE TABLE IF NOT EXISTS domains ( - cs_name text, - domain text, - PRIMARY KEY (cs_name, domain) - ) - WITH CLUSTERING ORDER BY (domain ASC) - AND comment='Domains Table' - AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; - - CREATE TABLE IF NOT EXISTS families ( - cs_name text, - domain text, - family text, - PRIMARY KEY ((cs_name, domain),family) - ) - WITH CLUSTERING ORDER BY (family ASC) - AND comment='Families Table' - AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; - - CREATE TABLE IF NOT EXISTS members ( - cs_name text, - domain text, - family text, - member text, - PRIMARY KEY ((cs_name, domain,family),member) - ) - WITH CLUSTERING ORDER BY (member ASC) - AND comment='Members Table' - AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; - - CREATE TABLE IF NOT EXISTS att_names ( - cs_name text, - domain text, - family text, - member text, - name text, - PRIMARY KEY ((cs_name, domain,family,member),name) - ) - WITH CLUSTERING ORDER BY (name ASC) - AND comment='Attributes Names Table' - AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; - - CREATE TABLE IF NOT EXISTS time_stats ( - att_conf_id timeuuid, - period text, - data_time timestamp, - data_time_us int, - recv_time timestamp, - recv_time_us int, - insert_time timestamp, - insert_time_us int, - PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) - ) - WITH comment='Time Statistics Table'; - - Event Subscriber full documentation =================================== diff --git a/source/administration/services/hdbpp/hdb-legacy.rst b/source/administration/services/hdbpp/hdb-legacy.rst new file mode 100644 index 00000000..1a360922 --- /dev/null +++ b/source/administration/services/hdbpp/hdb-legacy.rst @@ -0,0 +1,94 @@ +.. _hdbpp_legacy: + +:audience:`administrators, developers`, :lang:`SQL` + + +Legacy HDB tables structure +=========================== +.. contents:: + :depth: 2 + +.. Legacy HDB tables structure + +:: + + mysql> describe adt; + +-------------+-------------------------------+------+-----+---------+----------------+ + | Field | Type | Null | Key | Default | Extra | + +-------------+-------------------------------+------+-----+---------+----------------+ + | ID | smallint(5) unsigned zerofill | NO | PRI | NULL | auto_increment | + | time | datetime | YES | | NULL | | + | full_name | varchar(200) | NO | PRI | | | + | device | varchar(150) | NO | | | | + | domain | varchar(35) | NO | | | | + | family | varchar(35) | NO | | | | + | member | varchar(35) | NO | | | | + | att_name | varchar(50) | NO | | | | + | data_type | tinyint(1) | NO | | 0 | | + | data_format | tinyint(1) | NO | | 0 | | + | writable | tinyint(1) | NO | | 0 | | + | max_dim_x | smallint(6) unsigned | NO | | 0 | | + | max_dim_y | smallint(6) unsigned | NO | | 0 | | + | levelg | tinyint(1) | NO | | 0 | | + | facility | varchar(45) | NO | | | | + | archivable | tinyint(1) | NO | | 0 | | + | substitute | smallint(9) | NO | | 0 | | + +-------------+-------------------------------+------+-----+---------+----------------+ + + +:: + + mysql> describe amt; + +-------------------+-------------------------------+------+-----+---------+-------+ + | Field | Type | Null | Key | Default | Extra | + +-------------------+-------------------------------+------+-----+---------+-------+ + | ID | smallint(5) unsigned zerofill | NO | | 00000 | | + | archiver | varchar(255) | NO | | | | + | start_date | datetime | YES | | NULL | | + | stop_date | datetime | YES | | NULL | | + | per_mod | int(1) | NO | | 0 | | + | per_per_mod | int(5) | YES | | NULL | | + | abs_mod | int(1) | NO | | 0 | | + | per_abs_mod | int(5) | YES | | NULL | | + | dec_del_abs_mod | double | YES | | NULL | | + | gro_del_abs_mod | double | YES | | NULL | | + | rel_mod | int(1) | NO | | 0 | | + | per_rel_mod | int(5) | YES | | NULL | | + | n_percent_rel_mod | double | YES | | NULL | | + | p_percent_rel_mod | double | YES | | NULL | | + | thr_mod | int(1) | NO | | 0 | | + | per_thr_mod | int(5) | YES | | NULL | | + | min_val_thr_mod | double | YES | | NULL | | + | max_val_thr_mod | double | YES | | NULL | | + | cal_mod | int(1) | NO | | 0 | | + | per_cal_mod | int(5) | YES | | NULL | | + | val_cal_mod | int(3) | YES | | NULL | | + | type_cal_mod | int(2) | YES | | NULL | | + | algo_cal_mod | varchar(20) | YES | | NULL | | + | dif_mod | int(1) | NO | | 0 | | + | per_dif_mod | int(5) | YES | | NULL | | + | ext_mod | int(1) | NO | | 0 | | + | refresh_mode | tinyint(4) | YES | | 0 | | + +-------------------+-------------------------------+------+-----+---------+-------+ + + +:: + + mysql> describe apt; + +---------------+--------------------------+------+-----+---------+-------+ + | Field | Type | Null | Key | Default | Extra | + +---------------+--------------------------+------+-----+---------+-------+ + | ID | int(5) unsigned zerofill | NO | PRI | 00000 | | + | time | datetime | YES | | NULL | | + | description | varchar(255) | NO | | | | + | label | varchar(64) | NO | | | | + | unit | varchar(64) | NO | | 1 | | + | standard_unit | varchar(64) | NO | | 1 | | + | display_unit | varchar(64) | NO | | | | + | format | varchar(64) | NO | | | | + | min_value | varchar(64) | NO | | 0 | | + | max_value | varchar(64) | NO | | 0 | | + | min_alarm | varchar(64) | NO | | 0 | | + | max_alarm | varchar(64) | NO | | 0 | | + +---------------+--------------------------+------+-----+---------+-------+ + diff --git a/source/administration/services/hdbpp/hdbpp-cassandra.rst b/source/administration/services/hdbpp/hdbpp-cassandra.rst new file mode 100644 index 00000000..940e45e0 --- /dev/null +++ b/source/administration/services/hdbpp/hdbpp-cassandra.rst @@ -0,0 +1,985 @@ +.. _hdbpp_cassandra: + +:audience:`administrators, developers`, :lang:`CQL` + + +schema CQL source (Cassandra) +============================= +.. contents:: + :depth: 1 + +.. schema CQL source (Cassandra) + +:: + + -- Create hdb keyspace + -- Please adapt the replication factor (3 by default here) to your use case + CREATE KEYSPACE IF NOT EXISTS hdb WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'DC1' : 3 }; + + USE hdb; + + CREATE TYPE IF NOT EXISTS devencoded ( + encoded_format text, + encoded_data blob + ); + + CREATE TABLE IF NOT EXISTS att_conf ( + cs_name text, + att_name text, + att_conf_id timeuuid, + data_type text, -- data_types set in the future? + PRIMARY KEY (cs_name, att_name) + ) + WITH comment='Attribute Configuration Table' + AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; + + CREATE INDEX on att_conf(data_type); + CREATE INDEX on att_conf(att_conf_id); + + CREATE TABLE IF NOT EXISTS att_history + ( + att_conf_id timeuuid, + time timestamp, + time_us int, + event text, -- 'add','remove','start','stop' or 'crash' + PRIMARY KEY(att_conf_id, time, time_us) + ) + WITH comment='Attribute Configuration Events History Table'; + + + CREATE TABLE IF NOT EXISTS att_scalar_devboolean_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r boolean, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevBoolean ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devboolean_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r boolean, + value_w boolean, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevBoolean ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devuchar_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) WITH comment='Scalar DevUChar ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devuchar_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + value_w int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevUChar ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devshort_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) WITH comment='Scalar DevShort ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devshort_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + value_w int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevShort ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devushort_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevUShort ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devushort_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + value_w int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevUShort ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevLong ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + value_w int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevLong ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r bigint, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevULong ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r bigint, + value_w bigint, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevULong ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong64_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r bigint, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevLong64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong64_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r bigint, + value_w bigint, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevLong64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong64_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r bigint, // issue here with very big numbers + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevULong64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong64_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r bigint, // issue here with very big numbers + value_w bigint, // issue here with very big numbers + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevLong64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devfloat_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r float, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevFloat ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devfloat_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r float, + value_w float, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevFloat ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devdouble_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r double, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevDouble ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devdouble_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r double, + value_w double, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevDouble ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstring_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r text, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevString ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstring_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r text, + value_w text, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevString ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstate_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevState ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstate_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r int, + value_w int, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevState ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devencoded_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r frozen, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevEncoded ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devencoded_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r frozen, + value_w frozen, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Scalar DevEncoded ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devboolean_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevBoolean ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devboolean_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevBoolean ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devuchar_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevUChar ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devuchar_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevUChar ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devshort_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevShort ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devshort_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevShort ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devushort_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevUShort ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devushort_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevUShort ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevLong ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevLong ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevULong ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevULong ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong64_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevLong64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong64_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevLong64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong64_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, // issue with very big numbers + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevULong64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong64_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, // issue with very big numbers + value_w list, // issue with very big numbers + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevULong64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devfloat_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevFloat ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devfloat_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevFloat ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devdouble_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevDouble ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devdouble_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevDouble ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstring_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevString ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstring_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, + value_w list, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevString ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstate_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list, // Store a special type here + // where we could store an int and a string? + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevState ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstate_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list,// Store a special type here + value_w list,// where we could store an int and a string? + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevState ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devencoded_ro ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list>, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevEncoded ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devencoded_rw ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + value_r list>, + value_w list>, + quality int, + error_desc text, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Array DevEncoded ReadWrite Values Table'; + + ------------------------- + -- att_parameter table -- + ------------------------- + CREATE TABLE IF NOT EXISTS att_parameter ( + att_conf_id timeuuid, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + label text, + unit text, + standard_unit text, + display_unit text, + format text, + archive_rel_change text, + archive_abs_change text, + archive_period text, + description text, + PRIMARY KEY((att_conf_id), recv_time, recv_time_us) + ) WITH COMMENT='Attribute configuration parameters'; + + -------------------------------- + -- Attributes browsing tables -- + -------------------------------- + CREATE TABLE IF NOT EXISTS domains ( + cs_name text, + domain text, + PRIMARY KEY (cs_name, domain) + ) + WITH CLUSTERING ORDER BY (domain ASC) + AND comment='Domains Table' + AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; + + CREATE TABLE IF NOT EXISTS families ( + cs_name text, + domain text, + family text, + PRIMARY KEY ((cs_name, domain),family) + ) + WITH CLUSTERING ORDER BY (family ASC) + AND comment='Families Table' + AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; + + CREATE TABLE IF NOT EXISTS members ( + cs_name text, + domain text, + family text, + member text, + PRIMARY KEY ((cs_name, domain,family),member) + ) + WITH CLUSTERING ORDER BY (member ASC) + AND comment='Members Table' + AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; + + CREATE TABLE IF NOT EXISTS att_names ( + cs_name text, + domain text, + family text, + member text, + name text, + PRIMARY KEY ((cs_name, domain,family,member),name) + ) + WITH CLUSTERING ORDER BY (name ASC) + AND comment='Attributes Names Table' + AND caching = {'keys' : 'NONE', 'rows_per_partition': 'ALL' }; + + CREATE TABLE IF NOT EXISTS time_stats ( + att_conf_id timeuuid, + period text, + data_time timestamp, + data_time_us int, + recv_time timestamp, + recv_time_us int, + insert_time timestamp, + insert_time_us int, + PRIMARY KEY ((att_conf_id ,period),data_time,data_time_us) + ) + WITH comment='Time Statistics Table'; + diff --git a/source/administration/services/hdbpp/hdbpp-cm-interface.rst b/source/administration/services/hdbpp/hdbpp-cm-interface.rst new file mode 100644 index 00000000..dfc58897 --- /dev/null +++ b/source/administration/services/hdbpp/hdbpp-cm-interface.rst @@ -0,0 +1,152 @@ +.. _hdbpp_cm-interface: + +:audience:`administrators, developers`, :lang:`C++` + + +Configuration Manager interface +------------------------------- + +.. contents:: + :depth: 2 + +.. Configuration Manager interface + +More in detail the device server exposes the following interface. + +Commands +~~~~~~~~ + +The commands availabile in the are summarized in commands-table. + ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ArchiverAdd | add a new instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding an device to an existing instance is not supported | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ArchiverRemove | remove an from the list; neither the device instance nor the attributes configured are removed from the database | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeAdd | add an attribute to archiving | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeAssign | assign attribute to | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeGetArchiver | return in charge of attribute | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributePause | pause archiving specified attribute | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeSearch | return list of attributes containing input pattern | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStart | start archiving an attribute | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStatus | read attribute archiving status | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStop | stop archiving an attribute | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeUpdate | update context of an already archived attribute | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Context | set context to all managed archivers | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ResetStatistics | reset statistics of and all | ++------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +Table 1: Configuration Manager Commands. + +Note that the list of managed is stored into the ArchiverList device +property that is maintained via the ArchiverAdd, +ArchiverRemove and AttributeSetArchiver commands. Therefore in the +archiving system the device server instances can also be configured by +hand, if required, an run independently. + +Attributes +~~~~~~~~~~ + +The attributes of the are summarized in attributes-table. + ++-------------------------------+-------------------------------------------------------------------+ +| ArchiverContext | return archiver context | ++-------------------------------+-------------------------------------------------------------------+ +| ArchiverList | return list of managed archivers | ++-------------------------------+-------------------------------------------------------------------+ +| ArchiverStatisticsResetTime | seconds elapsed since last statistics reset | ++-------------------------------+-------------------------------------------------------------------+ +| ArchiverStatus | return archiver status information | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeFailureFreq | total number of failures per time | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeMaxPendingNumber | max number of attributes waiting to be archived (all archivers) | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeMaxProcessingTime | max processing time (all archivers) | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeMaxStoreTime | max storing time (all archivers) | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeMinProcessingTime | min processing time (all archivers) | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeMinStoreTime | min storing time (all archivers) | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeNokNumber | total number of archived attribute in error | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeNumber | total number of attributes configured for archiving | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeOkNumber | total number of archived attribute not in error | ++-------------------------------+-------------------------------------------------------------------+ +| AttributePausedNumber | total number of paused attributes | ++-------------------------------+-------------------------------------------------------------------+ +| AttributePendingNumber | total number of attributes waiting to be archived | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeRecordFreq | total number of records per time | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeStartedNumber | total number of started attributes | ++-------------------------------+-------------------------------------------------------------------+ +| AttributeStoppedNumber | total number of stopped attributes | ++-------------------------------+-------------------------------------------------------------------+ +| SetAbsoluteEvent | set archive absolute thresholds; for archiving setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetArchiver | support attribute for setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetAttributeName | support attribute for setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetCodePushedEvent | specify event pushed in the code | ++-------------------------------+-------------------------------------------------------------------+ +| SetContext | set archiving context; for archiving setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetPeriodEvent | set archive period; for archiving setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetPollingPeriod | set polling period; for archiving setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetRelativeEvent | set archive relative thresholds; for archiving setup | ++-------------------------------+-------------------------------------------------------------------+ +| SetTTL | set time-to-live for temporary storage; for archiving setup | ++-------------------------------+-------------------------------------------------------------------+ + +Table 2: Configuration Manager Attributes. + +The SetXxxYyy attributes are used for archive event and archiver +instance configuration setup and must be filled before calling the +AttributeAdd command. The AttributeAdd checks the consistency of the +desired event configuration and then adds the new attribute to the +archiver instance specified with SetArchiver. Then the AttributeAdd +command creates the required entries into the historical database. + +Class properties +~~~~~~~~~~~~~~~~ + ++--------------------+--------------------------------------------------------+ +| LibConfiguration | configuration parameters for backend support library | ++--------------------+--------------------------------------------------------+ +| MaxSearchSize | max size for AttributeSearch result | ++--------------------+--------------------------------------------------------+ + +Table 3: Event Subscriber Class properties. + +Device properties +~~~~~~~~~~~~~~~~~ + ++--------------------+--------------------------------------------------------+ +| ArchiverList | list of existing archivers | ++--------------------+--------------------------------------------------------+ +| LibConfiguration | configuration parameters for backend support library | ++--------------------+--------------------------------------------------------+ +| MaxSearchSize | max size for AttributeSearch result | ++--------------------+--------------------------------------------------------+ + +Table 4: Configuration Manager device properties. + diff --git a/source/administration/services/hdbpp/hdbpp-es-interface.rst b/source/administration/services/hdbpp/hdbpp-es-interface.rst new file mode 100644 index 00000000..74625548 --- /dev/null +++ b/source/administration/services/hdbpp/hdbpp-es-interface.rst @@ -0,0 +1,272 @@ +.. _hdbpp_es-interface: + +:audience:`administrators, developers`, :lang:`C++` + + +Event Subscriber interface +-------------------------- + +.. contents:: + :depth: 2 + +.. Event Subscriber interface + +More in detail the device server interface is summarized in table 1 and table 2. + +Commands +~~~~~~~~ + ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeAdd | add an attribute to archiving; the complete FQDN has to be specified otherwise it is completed by the using getaddrinfo() | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeContext | read the specified attribute current context | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributePause | pause archiving specified attribute but do not unsubscribe archive event | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeStatus | read attribute status | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeStart | start archiving specified attribute | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeStop | stop archiving specified attribute, unsubscribe archive event | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| AttributeUpdate | update context of an already archived attribute | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| Pause | pause archiving all attributes but do not unsubscribe archive events | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| Start | start archiving | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| Stop | stop archiving, usubscribe all archive events | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ +| ResetStatistics | reset statistics | ++--------------------+-----------------------------------------------------------------------------------------------------------------------------+ + +Table 1: Event Subscriber Command. + +Attributes +~~~~~~~~~~ + ++------------------------------+-------------------------------------------------------+ +| AttributeContextList | return the list of attribute contexts | ++------------------------------+-------------------------------------------------------+ +| AttributeErrorList | return the list of attribute errors | ++------------------------------+-------------------------------------------------------+ +| AttributeEventNumberList | number of events received for each attribute | ++------------------------------+-------------------------------------------------------+ +| AttributeFailureFreq | total number of failures per time | ++------------------------------+-------------------------------------------------------+ +| AttributeFailureFreqList | per-attribute number of failures per time | ++------------------------------+-------------------------------------------------------+ +| AttributeList | return configured attribute list | ++------------------------------+-------------------------------------------------------+ +| AttributeMaxPendingNumber | maximum number of attributes waiting to be archived | ++------------------------------+-------------------------------------------------------+ +| AttributeMaxProcessingTime | max processing time | ++------------------------------+-------------------------------------------------------+ +| AttributeMaxStoreTime | max storing time | ++------------------------------+-------------------------------------------------------+ +| AttributeMinProcessingTime | min processing time | ++------------------------------+-------------------------------------------------------+ +| AttributeMinStoreTime | min storing time | ++------------------------------+-------------------------------------------------------+ +| AttributeNokList | return the list of attribute in error | ++------------------------------+-------------------------------------------------------+ +| AttributeNokNumber | number of archived attribute in error | ++------------------------------+-------------------------------------------------------+ +| AttributeNumber | number of attributes configured for archiving | ++------------------------------+-------------------------------------------------------+ +| AttributeOkList | return the list of attributes not in error | ++------------------------------+-------------------------------------------------------+ +| AttributeOkNumber | number of archived attributes not in error | ++------------------------------+-------------------------------------------------------+ +| AttributePausedList | list of paused attributes | ++------------------------------+-------------------------------------------------------+ +| AttributePausedNumber | number of paused attributes | ++------------------------------+-------------------------------------------------------+ +| AttributePendingList | list of attributes waiting to be archived | ++------------------------------+-------------------------------------------------------+ +| AttributePendingNumber | number of attributes waiting to be archived | ++------------------------------+-------------------------------------------------------+ +| AttributeRecordFreq | total number of records per time | ++------------------------------+-------------------------------------------------------+ +| AttributeRecordFreqList | per-attribute number of records per time | ++------------------------------+-------------------------------------------------------+ +| AttributeStartedList | list of started attributes | ++------------------------------+-------------------------------------------------------+ +| AttributeStartedNumber | number of started attributes | ++------------------------------+-------------------------------------------------------+ +| AttributeStoppedList | list of stopped attributes | ++------------------------------+-------------------------------------------------------+ +| AttributeStoppedNumber | number of stopped attributes | ++------------------------------+-------------------------------------------------------+ +| Context | archiver current context (r/w) | ++------------------------------+-------------------------------------------------------+ +| StatisticsResetTime | seconds elapsed since last statistics reset | ++------------------------------+-------------------------------------------------------+ + +Table 2: Event Subscriber Attributes. + +The class and device properties availabile for configuration are shown +in table. According to TANGO +device server design guidelines Device Properties, when defined, +override Class properties. Please note that class and device Properties +have changed since release of the TANGO device server. + +Class properties +~~~~~~~~~~~~~~~~ + ++-----------------------------+------------------------------------------------------------------+ +| CheckPeriodicTimeoutDelay | delay before timeout when checking periodic events, in seconds | ++-----------------------------+------------------------------------------------------------------+ +| PollingThreadPeriod | default period for polling thread, in seconds | ++-----------------------------+------------------------------------------------------------------+ +| LibConfiguration | configuration parameters for backend support library | ++-----------------------------+------------------------------------------------------------------+ +| ContextsList | definition of possible archiver operating contexts | ++-----------------------------+------------------------------------------------------------------+ +| DefaultStrategy | default context for a new attribute (Default to RUN) | ++-----------------------------+------------------------------------------------------------------+ +| StatisticsTimeWindow | timeslot for statistics in seconds | ++-----------------------------+------------------------------------------------------------------+ +| SubscribeRetryPeriod | retry period for subscribe event, in seconds | ++-----------------------------+------------------------------------------------------------------+ + +Table 3: Event Subscriber Class properties. + +The **LibConfiguration** property contains the following multi-line +configuration parameters *host*, *user*, *password*, *dbname*, *libname*, *port*. +Table shows example configuration parameters for backend: + ++-------------------------------------------+ +| host=srv-log-srf.fcs.elettra.trieste.it | ++-------------------------------------------+ +| user=hdbarchiver | ++-------------------------------------------+ +| password=myownpassword | ++-------------------------------------------+ +| dbname=hdbpp | ++-------------------------------------------+ +| libname=dependOnDatabase (see below) | ++-------------------------------------------+ +| port=3306 | ++-------------------------------------------+ + +Table 4: LibConfiguration parameters for database. + +.. note:: + .. deprecated:: 2 + + **This is information is no longer relevant as the EventSubscriber is directly linked towards the necessary backend.** + + *libname* should be set to one of the following values: + + libname=libhdb++mysql.so if you intend to use HDB++ with the MySQL backend + libname=libhdbmysql.so if you intend to use HDB++ with the MySQL Legacy backend + libname=libhdb++cassandra.so if you intend to use HDB++ with the Cassandra backend + libname=libhdb++timescale.so if you intend to use HDB++ with the TimescaleDB backend + + The library specified in LibConfiguration->libname is loaded dynamically by the EventSubscriber device (e.g. *hdb++-es-srv*). + You need to have your LD_LIBRARY_PATH environment variable correctly set (including the directory + where the library you intend to use is located). + + libhdb++mysql and libhdb++cassandra are just implementations of the classes defined in libhdb++ library. + The user can decide which implementation to use by specifying this LibConfiguration -> libname device property config parameter. + + The device dynamically laods the configured library configured (using dlopen()) during the device initialization. + See :ref:`database-interface` section for more information. + + + +Device properties +~~~~~~~~~~~~~~~~~ + ++-----------------------------+------------------------------------------------------------------+ +| AttributeList | list of configured attributes | ++-----------------------------+------------------------------------------------------------------+ +| CheckPeriodicTimeoutDelay | delay before timeout when checking periodic events, in seconds | ++-----------------------------+------------------------------------------------------------------+ +| PollingThreadPeriod | default period for polling thread, in seconds | ++-----------------------------+------------------------------------------------------------------+ +| LibConfiguration | configuration parameters for backend support library | ++-----------------------------+------------------------------------------------------------------+ +| ContextsList | definition of possible archiver operating contexts | ++-----------------------------+------------------------------------------------------------------+ +| DefaultStrategy | default context for a new attribute (Default to RUN) | ++-----------------------------+------------------------------------------------------------------+ +| StatisticsTimeWindow | timeslot for statistics | ++-----------------------------+------------------------------------------------------------------+ +| SubscribeRetryPeriod | retry period for subscribe event, in seconds | ++-----------------------------+------------------------------------------------------------------+ + +Table 5: Event Subscriber Device properties. + +In addition to the already described Class properties, device Properties +comprehend the AttributeList property which contains the list of +attributes in charge of the current device. The syntax is +*fully-qualified-attribute-name;context=CONTEXT* where *CONTEXT* can be +one or a combination of the defined contexts (logic OR). Whenever not +specified the DefaultContext specified in the Class property or in the +Device Property applies. Table shows some examples: + +.. code-block:: console + :linenos: + + $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/eos/climate/18b20 eos.01/State;context=RUN|SHUTDOWN + $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/eos/climate/18b20 eos.01/Temperature;context=RUN|SHUTDOWN + $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/ctf/diagnostics/ccd_ctf.01/State;context=RUN + $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/ctf/diagnostics/ccd_ctf.01/HorProfile;context=RUN + $ tango://srv-tango-srf.fcs.elettra.trieste.it:20000/ctf/diagnostics/ccd_ctf.01/VerProfile;context=RUN + +Table 6: AttributeList example + +The first two attributes will be archived in both RUN and SHUTDOWN +contexts; the last three only when in RUN. + +In order to address large archiving systems the need to distribute the +workload over a large number of event subscriber shows up. A device server will assist in +the operations of adding, editing, moving, deleting an attribute the +archiving system. All the configuration parameters, such as polling +period, variation thresholds etc., are kept in the database as +properties of the archived attribute. In order to be managed by the +device server each instance has to added to the pool using the +ArchiverAdd command. + +The device server shall be able to perform the following operations on +the managed pool: + +#. manage the request of archiving a new attribute + + - setup the attribute’s archive event configuration + + - assign the new attribute to one of the device servers + + - following some rules of load balancing + + - to the specified device server + +#. move an attribute from an device server to another one + +#. keep trace of which attribute is assigned to which + +#. start/stop the archiving of an attribute at runtime + +#. remove an attribute from archiving + +The configuration shall be possible via the device server API as well as +via a dedicated GUI interface; the GUI just use the provided API. + +The may also expose a certain number of attributes to give the status of +what is going on: + +- total number of + +- total number of working attributes + +- total number of faulty attributes + +- total number of calls per second + +These attributes could be themselves archived to enable a follow up +versus time. + diff --git a/source/administration/services/hdbpp/hdbpp-mysql.rst b/source/administration/services/hdbpp/hdbpp-mysql.rst new file mode 100644 index 00000000..a1327411 --- /dev/null +++ b/source/administration/services/hdbpp/hdbpp-mysql.rst @@ -0,0 +1,854 @@ +.. _hdbpp_mysql: + +:audience:`administrators, developers`, :lang:`SQL` + + +schema SQL source (MySQL) +========================= +.. contents:: + :depth: 1 + +.. schema SQL source (MySQL) + +:: + + CREATE TABLE IF NOT EXISTS att_conf + ( + att_conf_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + att_name VARCHAR(255) UNIQUE NOT NULL, + att_conf_data_type_id INT UNSIGNED NOT NULL, + att_ttl INT UNSIGNED NULL DEFAULT NULL, + facility VARCHAR(255) NOT NULL DEFAULT '', + domain VARCHAR(255) NOT NULL DEFAULT '', + family VARCHAR(255) NOT NULL DEFAULT '', + member VARCHAR(255) NOT NULL DEFAULT '', + name VARCHAR(255) NOT NULL DEFAULT '', + INDEX(att_conf_data_type_id) + ) ENGINE=MyISAM COMMENT='Attribute Configuration Table'; + + DROP TABLE att_conf_data_type; + CREATE TABLE IF NOT EXISTS att_conf_data_type + ( + att_conf_data_type_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + data_type VARCHAR(255) NOT NULL, + tango_data_type TINYINT(1) NOT NULL + ) ENGINE=MyISAM COMMENT='Attribute types description'; + + INSERT INTO att_conf_data_type (data_type, tango_data_type) VALUES + ('scalar_devboolean_ro', 1),('scalar_devboolean_rw', 1),('array_devboolean_ro', 1), + ('array_devboolean_rw', 1),('scalar_devuchar_ro', 22),('scalar_devuchar_rw', 22), + ('array_devuchar_ro', 22),('array_devuchar_rw', 22),('scalar_devshort_ro', 2), + ('scalar_devshort_rw', 2),('array_devshort_ro', 2),('array_devshort_rw', 2), + ('scalar_devushort_ro', 6),('scalar_devushort_rw', 6),('array_devushort_ro', 6), + ('array_devushort_rw', 6),('scalar_devlong_ro', 3),('scalar_devlong_rw', 3), + ('array_devlong_ro', 3),('array_devlong_rw', 3),('scalar_devulong_ro', 7), + ('scalar_devulong_rw', 7),('array_devulong_ro', 7),('array_devulong_rw', 7), + ('scalar_devlong64_ro', 23),('scalar_devlong64_rw', 23),('array_devlong64_ro', 23), + ('array_devlong64_rw', 23),('scalar_devulong64_ro', 24),('scalar_devulong64_rw', 24), + ('array_devulong64_ro', 24),('array_devulong64_rw', 24),('scalar_devfloat_ro', 4), + ('scalar_devfloat_rw', 4),('array_devfloat_ro', 4),('array_devfloat_rw', 4), + ('scalar_devdouble_ro', 5),('scalar_devdouble_rw', 5),('array_devdouble_ro', 5), + ('array_devdouble_rw', 5),('scalar_devstring_ro', 8),('scalar_devstring_rw', 8), + ('array_devstring_ro', 8),('array_devstring_rw', 8),('scalar_devstate_ro', 19), + ('scalar_devstate_rw', 19),('array_devstate_ro', 19),('array_devstate_rw', 19), + ('scalar_devencoded_ro', 28),('scalar_devencoded_rw', 28),('array_devencoded_ro', 28), + ('array_devencoded_rw', 28); + + CREATE TABLE IF NOT EXISTS att_history + ( + att_conf_id INT UNSIGNED NOT NULL, + time TIMESTAMP(6) DEFAULT 0, + att_history_event_id INT UNSIGNED NOT NULL, + INDEX(att_conf_id), + INDEX(att_history_event_id) + ) ENGINE=MyISAM COMMENT='Attribute Configuration Events History Table'; + + DROP TABLE att_history_event; + CREATE TABLE IF NOT EXISTS att_history_event + ( + att_history_event_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + event VARCHAR(255) NOT NULL + ) ENGINE=MyISAM COMMENT='Attribute history events description'; + + INSERT INTO att_history_event (event) VALUES + ('add'),('remove'),('start'),('stop'),('crash'),('pause'); + + CREATE TABLE IF NOT EXISTS att_parameter + ( + att_conf_id INT UNSIGNED NOT NULL, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + label VARCHAR(255) NOT NULL DEFAULT '', + unit VARCHAR(64) NOT NULL DEFAULT '', + standard_unit VARCHAR(64) NOT NULL DEFAULT '1', + display_unit VARCHAR(64) NOT NULL DEFAULT '', + format VARCHAR(64) NOT NULL DEFAULT '', + archive_rel_change VARCHAR(64) NOT NULL DEFAULT '', + archive_abs_change VARCHAR(64) NOT NULL DEFAULT '', + archive_period VARCHAR(64) NOT NULL DEFAULT '', + description VARCHAR(1024) NOT NULL DEFAULT '', + INDEX(recv_time), + INDEX(att_conf_id) + ) ENGINE=MyISAM COMMENT='Attribute configuration parameters'; + + CREATE TABLE IF NOT EXISTS att_error_desc + ( + att_error_desc_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, + error_desc VARCHAR(255) UNIQUE NOT NULL + ) ENGINE=MyISAM COMMENT='Error Description Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devboolean_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r TINYINT(1) UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Boolean ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devboolean_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r TINYINT(1) UNSIGNED DEFAULT NULL, + value_w TINYINT(1) UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Boolean ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devboolean_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r TINYINT(1) UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Boolean ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devboolean_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r TINYINT(1) UNSIGNED DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w TINYINT(1) UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Boolean ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devuchar_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar UChar ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devuchar_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + value_w TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar UChar ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devuchar_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array UChar ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devuchar_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array UChar ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devshort_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r SMALLINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Short ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devshort_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r SMALLINT DEFAULT NULL, + value_w SMALLINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Short ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devshort_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r SMALLINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Short ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devshort_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r SMALLINT DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w SMALLINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Short ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devushort_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r SMALLINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar UShort ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devushort_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r SMALLINT UNSIGNED DEFAULT NULL, + value_w SMALLINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar UShort ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devushort_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r SMALLINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array UShort ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devushort_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r SMALLINT UNSIGNED DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w SMALLINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array UShort ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r INT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Long ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r INT DEFAULT NULL, + value_w INT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Long ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r INT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Long ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r INT DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w INT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Long ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r INT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar ULong ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r INT UNSIGNED DEFAULT NULL, + value_w INT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar ULong ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r INT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array ULong ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r INT UNSIGNED DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w INT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array ULong ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong64_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r BIGINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Long64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devlong64_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r BIGINT DEFAULT NULL, + value_w BIGINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Long64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong64_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r BIGINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Long64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devlong64_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r BIGINT DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w BIGINT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Long64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong64_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r BIGINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar ULong64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devulong64_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r BIGINT UNSIGNED DEFAULT NULL, + value_w BIGINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar ULong64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong64_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r BIGINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array ULong64 ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devulong64_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r BIGINT UNSIGNED DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w BIGINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array ULong64 ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devfloat_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r FLOAT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Float ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devfloat_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r FLOAT DEFAULT NULL, + value_w FLOAT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Float ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devfloat_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r FLOAT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Float ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devfloat_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r FLOAT DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w FLOAT DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Float ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devdouble_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r DOUBLE DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Double ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devdouble_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r DOUBLE DEFAULT NULL, + value_w DOUBLE DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Double ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devdouble_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r DOUBLE DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Double ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devdouble_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r DOUBLE DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w DOUBLE DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Double ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstring_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r VARCHAR(16384) DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar String ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstring_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r VARCHAR(16384) DEFAULT NULL, + value_w VARCHAR(16384) DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar String ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstring_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r VARCHAR(16384) DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array String ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstring_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r VARCHAR(16384) DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w VARCHAR(16384) DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array String ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstate_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar State ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devstate_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + value_w TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar State ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstate_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array State ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devstate_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r TINYINT UNSIGNED DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w TINYINT UNSIGNED DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array State ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devencoded_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r BLOB DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Encoded ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_scalar_devencoded_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + value_r BLOB DEFAULT NULL, + value_w BLOB DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Scalar Encoded ReadWrite Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devencoded_ro + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r BLOB DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Encoded ReadOnly Values Table'; + + CREATE TABLE IF NOT EXISTS att_array_devencoded_rw + ( + att_conf_id INT UNSIGNED NOT NULL, + data_time TIMESTAMP(6) DEFAULT 0, + recv_time TIMESTAMP(6) DEFAULT 0, + insert_time TIMESTAMP(6) DEFAULT 0, + idx INT UNSIGNED NOT NULL, + dim_x_r INT UNSIGNED NOT NULL, + dim_y_r INT UNSIGNED NOT NULL DEFAULT 0, + value_r BLOB DEFAULT NULL, + dim_x_w INT UNSIGNED NOT NULL, + dim_y_w INT UNSIGNED NOT NULL DEFAULT 0, + value_w BLOB DEFAULT NULL, + quality TINYINT(1) DEFAULT NULL, + att_error_desc_id INT UNSIGNED NULL DEFAULT NULL, + INDEX att_conf_id_data_time (att_conf_id,data_time) + ) ENGINE=MyISAM COMMENT='Array Encoded ReadWrite Values Table'; + diff --git a/source/administration/services/hdbpp/hdbpp-timescaledb.rst b/source/administration/services/hdbpp/hdbpp-timescaledb.rst new file mode 100644 index 00000000..b44d684c --- /dev/null +++ b/source/administration/services/hdbpp/hdbpp-timescaledb.rst @@ -0,0 +1,14 @@ +.. _hdbpp_timescale: + +:audience:`administrators, developers`, :lang:`SQL` + + +schema SQL source (TimescaleDb) +=============================== +.. contents:: + :depth: 1 + +.. schema SQL source (TimescaleDb) + +All the sql resources for TimescaleDb can be found on the github project https://github.com/tango-controls-hdbpp/hdbpp-timescale-project. +Under resource/schema. On top of the general architecture you can find extensions schemas for reordering, aggregates and any other features. diff --git a/source/administration/services/index.rst b/source/administration/services/index.rst index bad4a2d6..991136f7 100644 --- a/source/administration/services/index.rst +++ b/source/administration/services/index.rst @@ -9,4 +9,4 @@ Services events access-control - hdbpp/index \ No newline at end of file + hdbpp diff --git a/source/tools-and-extensions/archiving/HDB++.rst b/source/tools-and-extensions/archiving/HDB++.rst index 26d5173b..f7366177 100755 --- a/source/tools-and-extensions/archiving/HDB++.rst +++ b/source/tools-and-extensions/archiving/HDB++.rst @@ -41,7 +41,7 @@ Elements +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | HDB++ Diagnostic | Standalone JAVA application that visualizes both the status of all the archiver device servers and the overall archiving system | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Archiving DB | Specific Database devoted to storing attribute values. It can be either Mysql or Cassandra for the moment. | +| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra or Timescaledb. | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Tango Configuration DB | Tango database where every property and configuration of the Tango control framework is stored | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,12 +58,32 @@ Elements -HDB++ inherits the database structure from the existing Tango Historical Data Base (:ref:`hdb_archiving`) and introduces new storage architecture possibilities, better internal diagnostic capabilities and an optimized API. Its design allows storing data into traditional database management systems such as MySQL or into NoSQL database such as Apache Cassandra. +HDB++ inherits the database structure from the existing Tango Historical Data Base (:ref:`hdb_archiving`) and introduces new storage architecture possibilities, better internal diagnostic capabilities and an optimized API. Different backends to store the data can be implemented through an unified interface, currently Timescaledb, MySQL and Apache Cassandra are supported. The HDB++ archiving system must fully comply to the Tango device server model, with two immediate benefits. First, all the required configuration parameters are stored to and retrieved from the Tango database; some of these parameters are, for user convenience, duplicated into a dedicated table of the HDB++ schema by a mechanism that guarantees the consistency of the copy. Second, the HDB++ archiving system inherits the Tango scaling capability: any number of EventSubscriber instances can be deployed according to the desired architecture and overall performance. The HDB++ architecture is fully event based; therefore, a part of HDB++ setup consists of conveniently configure Tango device servers to send events as required. +Backend support +*************** + +A C++ interface *libhdb++* offers an interface for any backend to implement for data storage. +These libraries, written in C++, are addressed to the EventSubscriber Tango device server and +their main purpose is to provide *an abstraction layer*. Actually, some shared objects are available +implementing the abstraction layer and the specific interface: + +|libs| + +Figure 4: HDB++ Device Servers design + + +* **libhdb++**: database abstraction layer, decouples the interface to the database back-end from the implementation. +* **libhdbmysql**: legacy HDB schema support for MySQL back-end +* **libhdb++mysql**: HDB++ schema support for MySQL back-end +* **libhdb++cassandra**: Cassandra back-end implementation of libhdb++ +* **libhdb++timescale**: Timescaledb back-end implementation of libhdb++ + +These libraries allow reusing the EventSubscriber, the ConfigurationManager and the GUIs without changes. Configuration Manager Device Server @@ -74,7 +94,6 @@ Configuration Manager Tango device server will assist in the operations of addin The ConfigurationManager device server is able to perform the following operations on the managed EventSubscriber pool: * handle the request of archiving a new Attribute; -* create an entry in the database if not existing; * setup the Attribute archive event configuration; * assign the new Attribute to one of the archivers; * move an Attribute from one archiver to another; @@ -165,36 +184,16 @@ HdbViewer ********* It visualizes the data stored in the historical database. -Two libraries have been developed to the *historical data extraction*: the first, written in C++ -is dedicated *Qt/Qtango* based GUIs or to C++ Tango device servers; the second, -written in Java, has been used for the *HdbViewer* GUI and is a native choice for Java device servers. -The HdbViewer Java framework, in addition to the legacy ESRF historical database support, -allows retrieving the data from the new Cassandra back-end as well as managing the Cassandra -partitioning period. - -.. note:: - The C++ extraction library currently supports only the MySQL back-end. - -The *HdbExtractor++ multithread library* allows fetching the data from the legacy HDB and the new HDB++ MySQL schema in a simple Object Oriented way. An additional module provides a Qt interface to the HdbExtractor++ and a dedicated GUI, exploiting the MathGL framework, aimed -at displaying mono and bidimensional data over time. +Two libraries have been developed to the *historical data extraction*: +* A java implementation, *libhdbpp-extraction-java*, has been used for the *HdbViewer* GUI and is a native choice for Java device servers. The HdbViewer Java framework, supports both legacy HDB archiving system, and the new HDB++ design. +* A C++ implementation, dedicated *Qt/Qtango* based GUIs or to C++ Tango device servers. + The *HdbExtractor++ multithread library* allows fetching the data from the legacy HDB and the new HDB++ MySQL schema in a simple Object Oriented way. An additional module provides a Qt interface to the HdbExtractor++ and a dedicated GUI, exploiting the MathGL framework, aimed at displaying mono and bidimensional data over time. -Some shared libraries provide the methods for writing to the database back-end. -These libraries, written in C++, are addressed to the EventSubscriber Tango device server and -their main purpose is to provide *an abstraction layer*. Actually, some shared objects are available -implementing the abstraction layer and the specific interface: - -|libs| - -Figure 4: HDB++ Device Servers design - + .. note:: + The C++ extraction library currently supports only the MySQL back-end. -* **libhdb++**: database abstraction layer, decouples the interface to the database back-end from the implementation. -* **libhdbmysql**: legacy HDB schema support for MySQL back-end -* **libhdb++mysql**: HDB++ schema support for MySQL back-end -* **libhdb++cassandra**: methods from libhdb++ for Cassandra back-end -These libraries allow reusing the EventSubscriber, the ConfigurationManager and the GUIs without changes. Source code @@ -202,6 +201,7 @@ Source code The source code is available on GitHub in the following repositories: +.. _hdbpp-timescale-project: https://github.com/tango-controls-hdbpp/hdbpp-timescale-project .. _hdbpp-cm: https://github.com/tango-controls-hdbpp/hdbpp-cm .. _hdbpp-es: https://github.com/tango-controls-hdbpp/hdbpp-es .. _hdbpp-cm-es: https://github.com/tango-controls-hdbpp/hdbpp-cm-es @@ -209,6 +209,7 @@ The source code is available on GitHub in the following repositories: .. _libhdbpp-mysql: https://github.com/tango-controls-hdbpp/libhdbpp-mysql .. _libhdbpp-mysql-legacy: https://github.com/tango-controls-hdbpp/libhdbpp-mysql-legacy .. _libhdbpp-cassandra: https://github.com/tango-controls-hdbpp/libhdbpp-cassandra +.. _libhdbpp-timescale: https://github.com/tango-controls-hdbpp/libhdbpp-timescale .. _CassandraMonitor: https://github.com/tango-controls-hdbpp/CassandraMonitor .. _hdbpp-configurator: https://github.com/tango-controls-hdbpp/hdbpp-configurator .. _hdbpp-viewer: https://github.com/tango-controls-hdbpp/hdbpp-viewer @@ -216,6 +217,7 @@ The source code is available on GitHub in the following repositories: .. _libhdbpp-extraction-cpp: https://github.com/tango-controls-hdbpp/libhdbpp-extraction-cpp .. _eGiga2m: https://github.com/luciozambon/eGiga2m +* hdbpp-timescale-project_: A project to centralize and build all the needed components of a full HDB++ setup with the Timescaledb backend. * hdbpp-cm_ : the HDB++ Configuration Manager device server * hdbpp-es_: the HDB++ Event Subscriber device server * hdbpp-cm-es_: Device server able to export HDB++ Event Subscriber and Configuration Manager devices in the same device server. It is a multiclass Tango device server capable of both CongigurationManager and EventSubscriber devices. Can be used in place of hdbpp-cm and hdbpp-es devices. @@ -223,6 +225,7 @@ The source code is available on GitHub in the following repositories: * libhdbpp-mysql_: the HDB++ insertion library for MySQL backend * libhdbpp-mysql-legacy_: the HDB++ insertion library for MySQL backend using the old Tango HDB database schema * libhdbpp-cassandra_: the HDB++ insertion library for Cassandra backend +* libhdbpp-timescale_: the HDB++ insertion library for Timescaledb backend * CassandraMonitor_: A Java client/server to monitor cassandra nodes using jmx calls. * hdbpp-configurator_: the HDB++ Configuration GUI (in Java). * hdbpp-viewer_: the HDB++ Viewer GUI (in Java) @@ -243,12 +246,9 @@ different git repositories from https://github.com/tango-controls-hdbpp Github o Please, have a look at the README files from the different git repositories -(For instance: https://github.com/tango-controls-hdbpp/hdbpp-cm-es). +(For instance: https://github.com/tango-controls-hdbpp/hdbpp-timescale-project). They explain how to install the HDB++ libraries as well as the device servers. -The latest versions of *hdbpp-es* and *hdbpp-cm* are now loading dynamically (using dlopen) the HDB++ library used for MySQL/legacy HDB schema, MySQL HDB++ schema, Cassandra. - - .. note:: -v5 can be used to see the DEBUG messages coming from the Tango library itself too. It also sets the logging level of the device to DEBUG. -v4 can be used to see the DEBUG messages coming from the Tango devices themselves. From cbee3a8d313fc8a07986a705ca4fc259d2d3a285 Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Fri, 30 Oct 2020 15:24:24 +0100 Subject: [PATCH 2/7] Fix some typos. added missing "archiver" and "configuration manager" in hdbpp-cm-interface fixed warning on libhdbpp dynamic loading not supported. moved cm information from es page to cm one. added postgres as a supported backend, as it is in a way. --- .../services/hdbpp/hdbpp-cm-interface.rst | 114 +++++++++++++----- .../services/hdbpp/hdbpp-es-interface.rst | 53 +------- .../tools-and-extensions/archiving/HDB++.rst | 2 +- 3 files changed, 85 insertions(+), 84 deletions(-) diff --git a/source/administration/services/hdbpp/hdbpp-cm-interface.rst b/source/administration/services/hdbpp/hdbpp-cm-interface.rst index dfc58897..15c9a8e9 100644 --- a/source/administration/services/hdbpp/hdbpp-cm-interface.rst +++ b/source/administration/services/hdbpp/hdbpp-cm-interface.rst @@ -11,46 +11,94 @@ Configuration Manager interface .. Configuration Manager interface +In order to address large archiving systems the need to distribute the +workload over a large number of event subscriber shows up. +The configuration manager device server will assist in +the operations of adding, editing, moving, deleting an attribute the +archiving system. All the configuration parameters, such as polling +period, variation thresholds etc., are kept in the database as +properties of the archived attribute. In order to be managed by the +device server each instance has to added to the pool using the +ArchiverAdd command. + +The configuration manager shall be able to perform the following operations on +the managed pool: + +#. manage the request of archiving a new attribute + + - setup the attribute’s archive event configuration + + - assign the new attribute to one of the device servers + + - following some rules of load balancing + + - to the specified device server + +#. move an attribute from an device server to another one + +#. keep trace of which attribute is assigned to which + +#. start/stop the archiving of an attribute at runtime + +#. remove an attribute from archiving + +The configuration shall be possible via the device server API as well as +via a dedicated GUI interface; the GUI just use the provided API. + +The may also expose a certain number of attributes to give the status of +what is going on: + +- total number of + +- total number of working attributes + +- total number of faulty attributes + +- total number of calls per second + +These attributes could be themselves archived to enable a follow up +versus time. + More in detail the device server exposes the following interface. Commands ~~~~~~~~ -The commands availabile in the are summarized in commands-table. - -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ArchiverAdd | add a new instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding an device to an existing instance is not supported | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ArchiverRemove | remove an from the list; neither the device instance nor the attributes configured are removed from the database | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeAdd | add an attribute to archiving | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeAssign | assign attribute to | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeGetArchiver | return in charge of attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributePause | pause archiving specified attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeSearch | return list of attributes containing input pattern | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStart | start archiving an attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStatus | read attribute archiving status | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStop | stop archiving an attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeUpdate | update context of an already archived attribute | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Context | set context to all managed archivers | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ResetStatistics | reset statistics of and all | -+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +The available commands are summarized in commands-table. + ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ArchiverAdd | add a new archiver instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding a device to an existing instance is not supported | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ArchiverRemove | remove an archiver from the list; neither the device instance nor the attributes configured are removed from the database | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeAdd | add an attribute to archiving | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeAssign | assign attribute to an archiver | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeGetArchiver | return the archiver in charge of attribute | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributePause | pause archiving specified attribute | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeSearch | return list of attributes containing input pattern | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStart | start archiving an attribute | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStatus | read attribute archiving status | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStop | stop archiving an attribute | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeUpdate | update context of an already archived attribute | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Context | set context to all managed archivers | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ResetStatistics | reset statistics the configuration manager of and all archivers | ++------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Table 1: Configuration Manager Commands. -Note that the list of managed is stored into the ArchiverList device +Note that the list of managed archivers is stored into the ArchiverList device property that is maintained via the ArchiverAdd, ArchiverRemove and AttributeSetArchiver commands. Therefore in the archiving system the device server instances can also be configured by @@ -59,7 +107,7 @@ hand, if required, an run independently. Attributes ~~~~~~~~~~ -The attributes of the are summarized in attributes-table. +The attributes of the configuration manager are summarized in attributes-table. +-------------------------------+-------------------------------------------------------------------+ | ArchiverContext | return archiver context | diff --git a/source/administration/services/hdbpp/hdbpp-es-interface.rst b/source/administration/services/hdbpp/hdbpp-es-interface.rst index 74625548..a49a6b73 100644 --- a/source/administration/services/hdbpp/hdbpp-es-interface.rst +++ b/source/administration/services/hdbpp/hdbpp-es-interface.rst @@ -155,9 +155,8 @@ Table shows example configuration parameters for backend: Table 4: LibConfiguration parameters for database. .. note:: - .. deprecated:: 2 - - **This is information is no longer relevant as the EventSubscriber is directly linked towards the necessary backend.** + **The event subscriber can be built directly against a specific backend or the dynamic libhdbpp.** + **In case of direct linking, this information is not relevant.** *libname* should be set to one of the following values: @@ -173,7 +172,7 @@ Table 4: LibConfiguration parameters for database. libhdb++mysql and libhdb++cassandra are just implementations of the classes defined in libhdb++ library. The user can decide which implementation to use by specifying this LibConfiguration -> libname device property config parameter. - The device dynamically laods the configured library configured (using dlopen()) during the device initialization. + The device dynamically loads the configured library configured (using dlopen()) during the device initialization. See :ref:`database-interface` section for more information. @@ -223,50 +222,4 @@ Table 6: AttributeList example The first two attributes will be archived in both RUN and SHUTDOWN contexts; the last three only when in RUN. -In order to address large archiving systems the need to distribute the -workload over a large number of event subscriber shows up. A device server will assist in -the operations of adding, editing, moving, deleting an attribute the -archiving system. All the configuration parameters, such as polling -period, variation thresholds etc., are kept in the database as -properties of the archived attribute. In order to be managed by the -device server each instance has to added to the pool using the -ArchiverAdd command. - -The device server shall be able to perform the following operations on -the managed pool: - -#. manage the request of archiving a new attribute - - - setup the attribute’s archive event configuration - - - assign the new attribute to one of the device servers - - - following some rules of load balancing - - - to the specified device server - -#. move an attribute from an device server to another one - -#. keep trace of which attribute is assigned to which - -#. start/stop the archiving of an attribute at runtime - -#. remove an attribute from archiving - -The configuration shall be possible via the device server API as well as -via a dedicated GUI interface; the GUI just use the provided API. - -The may also expose a certain number of attributes to give the status of -what is going on: - -- total number of - -- total number of working attributes - -- total number of faulty attributes - -- total number of calls per second - -These attributes could be themselves archived to enable a follow up -versus time. diff --git a/source/tools-and-extensions/archiving/HDB++.rst b/source/tools-and-extensions/archiving/HDB++.rst index f7366177..20c5f986 100755 --- a/source/tools-and-extensions/archiving/HDB++.rst +++ b/source/tools-and-extensions/archiving/HDB++.rst @@ -41,7 +41,7 @@ Elements +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | HDB++ Diagnostic | Standalone JAVA application that visualizes both the status of all the archiver device servers and the overall archiving system | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra or Timescaledb. | +| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra, PostgreSQL or Timescaledb. | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Tango Configuration DB | Tango database where every property and configuration of the Tango control framework is stored | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ From cbc4540160fc023327e07eea74365f261afad2e7 Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Fri, 30 Oct 2020 17:08:40 +0100 Subject: [PATCH 3/7] Remove misplaced information for archiverAdd command documentation add table number --- .../services/hdbpp/hdbpp-cm-interface.rst | 58 +++++++++---------- .../services/hdbpp/hdbpp-es-interface.rst | 4 +- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/source/administration/services/hdbpp/hdbpp-cm-interface.rst b/source/administration/services/hdbpp/hdbpp-cm-interface.rst index 15c9a8e9..d0a4d15d 100644 --- a/source/administration/services/hdbpp/hdbpp-cm-interface.rst +++ b/source/administration/services/hdbpp/hdbpp-cm-interface.rst @@ -66,35 +66,35 @@ Commands The available commands are summarized in commands-table. -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ArchiverAdd | add a new archiver instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running; as per release adding a device to an existing instance is not supported | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ArchiverRemove | remove an archiver from the list; neither the device instance nor the attributes configured are removed from the database | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeAdd | add an attribute to archiving | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeAssign | assign attribute to an archiver | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeGetArchiver | return the archiver in charge of attribute | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributePause | pause archiving specified attribute | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeSearch | return list of attributes containing input pattern | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStart | start archiving an attribute | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStatus | read attribute archiving status | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeStop | stop archiving an attribute | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| AttributeUpdate | update context of an already archived attribute | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Context | set context to all managed archivers | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| ResetStatistics | reset statistics the configuration manager of and all archivers | -+------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ArchiverAdd | add a new archiver instance to the archivers list; the instance must have been already created and configured via jive/astor and the device shall be running | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ArchiverRemove | remove an archiver from the list; neither the device instance nor the attributes configured are removed from the database | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeAdd | add an attribute to archiving | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeAssign | assign attribute to an archiver | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeGetArchiver | return the archiver in charge of attribute | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributePause | pause archiving specified attribute | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeRemove | remove an attribute from archiving; the archived data and the attribute archive event configuration are left untouched | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeSearch | return list of attributes containing input pattern | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStart | start archiving an attribute | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStatus | read attribute archiving status | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeStop | stop archiving an attribute | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| AttributeUpdate | update context of an already archived attribute | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Context | set context to all managed archivers | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ +| ResetStatistics | reset statistics the configuration manager of and all archivers | ++------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Table 1: Configuration Manager Commands. diff --git a/source/administration/services/hdbpp/hdbpp-es-interface.rst b/source/administration/services/hdbpp/hdbpp-es-interface.rst index a49a6b73..1bb90e0b 100644 --- a/source/administration/services/hdbpp/hdbpp-es-interface.rst +++ b/source/administration/services/hdbpp/hdbpp-es-interface.rst @@ -108,8 +108,8 @@ Attributes Table 2: Event Subscriber Attributes. The class and device properties availabile for configuration are shown -in table. According to TANGO -device server design guidelines Device Properties, when defined, +in table 3. According to TANGO +device server design guidelines, Device Properties, when defined, override Class properties. Please note that class and device Properties have changed since release of the TANGO device server. From 69af2112687f63ea91112e360952be6fafb3e4e6 Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Fri, 20 Nov 2020 11:41:55 +0100 Subject: [PATCH 4/7] Fix grammar and missing words --- .../services/hdbpp/hdbpp-cm-interface.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/administration/services/hdbpp/hdbpp-cm-interface.rst b/source/administration/services/hdbpp/hdbpp-cm-interface.rst index d0a4d15d..c9311653 100644 --- a/source/administration/services/hdbpp/hdbpp-cm-interface.rst +++ b/source/administration/services/hdbpp/hdbpp-cm-interface.rst @@ -14,7 +14,7 @@ Configuration Manager interface In order to address large archiving systems the need to distribute the workload over a large number of event subscriber shows up. The configuration manager device server will assist in -the operations of adding, editing, moving, deleting an attribute the +the operations of adding, editing, moving, deleting an attribute from the archiving system. All the configuration parameters, such as polling period, variation thresholds etc., are kept in the database as properties of the archived attribute. In order to be managed by the @@ -34,7 +34,7 @@ the managed pool: - to the specified device server -#. move an attribute from an device server to another one +#. move an attribute from a device server to another one #. keep trace of which attribute is assigned to which @@ -45,10 +45,10 @@ the managed pool: The configuration shall be possible via the device server API as well as via a dedicated GUI interface; the GUI just use the provided API. -The may also expose a certain number of attributes to give the status of -what is going on: +The ConfigurationManager may also expose a certain number of attributes +to give the status of what is going on: -- total number of +- total number of Archivers - total number of working attributes From d81810449310a25cd6dcb207ef02b32f32a70a72 Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Fri, 20 Nov 2020 11:54:44 +0100 Subject: [PATCH 5/7] Add missing ref to elastic search and postgresql project, tag Cassandra as out for support --- source/tools-and-extensions/archiving/HDB++.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/tools-and-extensions/archiving/HDB++.rst b/source/tools-and-extensions/archiving/HDB++.rst index 20c5f986..262b35ee 100755 --- a/source/tools-and-extensions/archiving/HDB++.rst +++ b/source/tools-and-extensions/archiving/HDB++.rst @@ -41,7 +41,7 @@ Elements +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | HDB++ Diagnostic | Standalone JAVA application that visualizes both the status of all the archiver device servers and the overall archiving system | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra, PostgreSQL or Timescaledb. | +| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra (support has been dropped), PostgreSQL, ElasticSearch or Timescaledb. | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Tango Configuration DB | Tango database where every property and configuration of the Tango control framework is stored | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,7 +58,7 @@ Elements -HDB++ inherits the database structure from the existing Tango Historical Data Base (:ref:`hdb_archiving`) and introduces new storage architecture possibilities, better internal diagnostic capabilities and an optimized API. Different backends to store the data can be implemented through an unified interface, currently Timescaledb, MySQL and Apache Cassandra are supported. +HDB++ inherits the database structure from the existing Tango Historical Data Base (:ref:`hdb_archiving`) and introduces new storage architecture possibilities, better internal diagnostic capabilities and an optimized API. Different backends to store the data can be implemented through an unified interface, currently Timescaledb, MySQL, Postgresql, ElasticSearch and Apache Cassandra (support for Cassandra has been dropped) are supported. The HDB++ archiving system must fully comply to the Tango device server model, with two immediate benefits. First, all the required configuration parameters are stored to and retrieved from the Tango database; some of these parameters are, for user convenience, duplicated into a dedicated table of the HDB++ schema by a mechanism that guarantees the consistency of the copy. Second, the HDB++ archiving system inherits the Tango scaling capability: any number of EventSubscriber instances can be deployed according to the desired architecture and overall performance. @@ -82,6 +82,8 @@ Figure 4: HDB++ Device Servers design * **libhdb++mysql**: HDB++ schema support for MySQL back-end * **libhdb++cassandra**: Cassandra back-end implementation of libhdb++ * **libhdb++timescale**: Timescaledb back-end implementation of libhdb++ +* **libhdb++postgres**: Postgresql back-end implementation of libhdb++ +* **hdb++ELK**: ElasticSearch back-end implementation of libhdb++ These libraries allow reusing the EventSubscriber, the ConfigurationManager and the GUIs without changes. @@ -202,6 +204,7 @@ Source code The source code is available on GitHub in the following repositories: .. _hdbpp-timescale-project: https://github.com/tango-controls-hdbpp/hdbpp-timescale-project +.. _hdbpp-mysql-project: https://github.com/tango-controls-hdbpp/hdbpp-mysql-project .. _hdbpp-cm: https://github.com/tango-controls-hdbpp/hdbpp-cm .. _hdbpp-es: https://github.com/tango-controls-hdbpp/hdbpp-es .. _hdbpp-cm-es: https://github.com/tango-controls-hdbpp/hdbpp-cm-es @@ -210,6 +213,8 @@ The source code is available on GitHub in the following repositories: .. _libhdbpp-mysql-legacy: https://github.com/tango-controls-hdbpp/libhdbpp-mysql-legacy .. _libhdbpp-cassandra: https://github.com/tango-controls-hdbpp/libhdbpp-cassandra .. _libhdbpp-timescale: https://github.com/tango-controls-hdbpp/libhdbpp-timescale +.. _libhdbpp-postgresql: https://github.com/tango-controls-hdbpp/libhdbpp-postgresql +.. _libhdbpp-elk: https://github.com/tango-controls-hdbpp/libhdbpp-elk .. _CassandraMonitor: https://github.com/tango-controls-hdbpp/CassandraMonitor .. _hdbpp-configurator: https://github.com/tango-controls-hdbpp/hdbpp-configurator .. _hdbpp-viewer: https://github.com/tango-controls-hdbpp/hdbpp-viewer @@ -218,6 +223,7 @@ The source code is available on GitHub in the following repositories: .. _eGiga2m: https://github.com/luciozambon/eGiga2m * hdbpp-timescale-project_: A project to centralize and build all the needed components of a full HDB++ setup with the Timescaledb backend. +* hdbpp-mysql-project_: A project to centralize and build all the needed components of a full HDB++ setup with the Mysql backend. * hdbpp-cm_ : the HDB++ Configuration Manager device server * hdbpp-es_: the HDB++ Event Subscriber device server * hdbpp-cm-es_: Device server able to export HDB++ Event Subscriber and Configuration Manager devices in the same device server. It is a multiclass Tango device server capable of both CongigurationManager and EventSubscriber devices. Can be used in place of hdbpp-cm and hdbpp-es devices. @@ -226,6 +232,8 @@ The source code is available on GitHub in the following repositories: * libhdbpp-mysql-legacy_: the HDB++ insertion library for MySQL backend using the old Tango HDB database schema * libhdbpp-cassandra_: the HDB++ insertion library for Cassandra backend * libhdbpp-timescale_: the HDB++ insertion library for Timescaledb backend +* libhdbpp-postgresql_: the HDB++ insertion library for Postgrsql backend +* libhdbpp-elk_: the HDB++ insertion library for ElasticSearch backend * CassandraMonitor_: A Java client/server to monitor cassandra nodes using jmx calls. * hdbpp-configurator_: the HDB++ Configuration GUI (in Java). * hdbpp-viewer_: the HDB++ Viewer GUI (in Java) From ad8c8adb6f5166e775d203560712f2f3a29174a2 Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Fri, 20 Nov 2020 12:05:01 +0100 Subject: [PATCH 6/7] fix malformed table --- source/tools-and-extensions/archiving/HDB++.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tools-and-extensions/archiving/HDB++.rst b/source/tools-and-extensions/archiving/HDB++.rst index 262b35ee..780033e9 100755 --- a/source/tools-and-extensions/archiving/HDB++.rst +++ b/source/tools-and-extensions/archiving/HDB++.rst @@ -41,7 +41,7 @@ Elements +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | HDB++ Diagnostic | Standalone JAVA application that visualizes both the status of all the archiver device servers and the overall archiving system | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra (support has been dropped), PostgreSQL, ElasticSearch or Timescaledb. | +| Archiving DB | Specific Database devoted to storing attribute values. The currently supported backend are Mysql, Cassandra (support has been dropped), PostgreSQL, ElasticSearch or Timescaledb. | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Tango Configuration DB | Tango database where every property and configuration of the Tango control framework is stored | +--------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ From 169cd865bcd7446b8f37d9821137a416584fa1ce Mon Sep 17 00:00:00 2001 From: Damien Lacoste Date: Fri, 20 Nov 2020 14:30:59 +0100 Subject: [PATCH 7/7] Add hdbpp-benchmark project --- source/tools-and-extensions/archiving/HDB++.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/tools-and-extensions/archiving/HDB++.rst b/source/tools-and-extensions/archiving/HDB++.rst index 780033e9..0fc2f8b9 100755 --- a/source/tools-and-extensions/archiving/HDB++.rst +++ b/source/tools-and-extensions/archiving/HDB++.rst @@ -215,6 +215,7 @@ The source code is available on GitHub in the following repositories: .. _libhdbpp-timescale: https://github.com/tango-controls-hdbpp/libhdbpp-timescale .. _libhdbpp-postgresql: https://github.com/tango-controls-hdbpp/libhdbpp-postgresql .. _libhdbpp-elk: https://github.com/tango-controls-hdbpp/libhdbpp-elk +.. _hdbpp-benchmark: https://github.com/tango-controls-hdbpp/hdbpp-benchmark .. _CassandraMonitor: https://github.com/tango-controls-hdbpp/CassandraMonitor .. _hdbpp-configurator: https://github.com/tango-controls-hdbpp/hdbpp-configurator .. _hdbpp-viewer: https://github.com/tango-controls-hdbpp/hdbpp-viewer @@ -234,6 +235,7 @@ The source code is available on GitHub in the following repositories: * libhdbpp-timescale_: the HDB++ insertion library for Timescaledb backend * libhdbpp-postgresql_: the HDB++ insertion library for Postgrsql backend * libhdbpp-elk_: the HDB++ insertion library for ElasticSearch backend +* hdbpp-benchmark_: A project to compare performances of different HDB++ backends using docker images * CassandraMonitor_: A Java client/server to monitor cassandra nodes using jmx calls. * hdbpp-configurator_: the HDB++ Configuration GUI (in Java). * hdbpp-viewer_: the HDB++ Viewer GUI (in Java)