Module | Name | Version | License | Source | Languages | Platforms | Type | Author | Description |
---|---|---|---|---|---|---|---|---|---|
DBGate | DB gate
|
1.1 | GPL2 | bd_DBGate.so | en,uk | x86,x86_64,ARM | DB | Roman Savochenko | BD module. Allows to locate databases of the remote OpenSCADA stations to local ones.
|
Main function of this module is the data reflection of the subsystem "Databases" of the remote OpenSCADA stations on the local ones. In its work, the module uses the OpenSCADA self protocol and service functions of the subsystem "Databases". This module can be useful:
The module realizes following functions:
The operations of opening and closing of the database is supported only for the local DB object and without possibility of creating new database and deleting the existing ones at the close, on the remote station. In terms of the subsystem "DB" of OpenSCADA, opening of DB is its registration-connecting to the remote DB, for further using of the program. It also supports the operation of requesting the list of tables in the remote database.
The DB-object configuration page also reflects mostly properties of the remote DB, besides:
The DBGate database is addressed by specifying-selecting the DB name in the format "{RemoteStation}.{DBModule}.{DB}", where:
Supports transmitting to the remote station for operations of opening, closing tables, with the possibility of creating a new table when opening and removing an existing one when closed, as well as querying the structure of the table.
Transmitting to DB of the remote station for the table operations:
API of the subsystem "DB" suppose the access to the contents of the table on the value of key(s) fields. Thus, the operation of requesting of the record implies the preset of key columns of the object TConfig, which will do the request. Creating a new record (row) is performed by setting the record values that are missing.
The table dynamically structure change depends on the linked remote DB type only.
The module implements the mechanism of support the multilingual text variables indirectly in the core functions of working with the configuration file: TBDS::dataSeek(), TBDS::dataGet() and TBDS::dataSet().
Access rights to the end side database are determined by the rights specific to the remote DB type and by the rights of the remote station user accessing the subsystem DB in whole, for the rights described in the follow table:
Function/operation/service | Rights relatively to "root:BD:{other}" |
---|---|
Enabling DB | W:W:- |
Available tables list | R:R:R |
Creating table | W:W:- |
Deleting table | W:W:- |
SQL request (call:/serv/SQL) | W:W:- |
Field structure (call:/serv/fieldStruct) | R:R:R |
Field seek (call:/serv/fieldSeek) | R:R:R |
Field get (call:/serv/fieldGet) | R:R:R |
Field set (call:/serv/fieldSet) | W:W:- |
Field delete (call:/serv/fieldDel) | W:W:- |
Measurement of the performance of the database, more precisely the gate, is carried out by testing the "database" of the module "SystemTests", by performing operations on records by the structure "name char (20), descr char (50), val double (10.2), id int (7), stat bool, reqKey string, reqVal string" twice, first for the remote environment DB, and then to the same DB, but through the gateway — this module.
Operations for 1000 records, seconds | AMD A8-6500 <Ethernet> AMD Phenom II X4 [RAID1] <> SQLite | AMD A8-6500 <Ethernet> AMD Phenom II X4 [RAID1] <> MySQL |
---|---|---|
Creating: | 2.36 > 0.35 | 3.39 > 1.35 |
Updating: | 2.31 > 0.31 | 2.97 > 0.94 |
Getting: | 2.45 > 0.2 | 2.67 > 0.49 |
Seeking: | 2.22 > 0.13 | 3.59 > 1.48 |
Seeking in preload*: | 1.93 > 0.02 | 1.88 > 0.04 |
Deleting: | 1.85 > 0.051 | 2.14 > 0.27 |
* — this operation has no effect because preloading-caching is performed only on the remote station side.
Modules/DBGate/en - GFDL | December 2024 | OpenSCADA 1+r3000 |