Storage of widgets, widgets libraries and projects are implemented into the databases accessible in the OpenSCADA system. The DB is structured on the data belonging to the library-project. Ie a separate library-project stores in a separate group of tables of one or of the different databases. The list of libraries of widgets is stored in the index table of the libraries with the name "VCALibs", with the structure "Libs", and the list of projects in the index table "VCAPrjs", with the structure "Projs". A copy of this table is created in each database, which stores data of the module with the list of libraries which are hold in a given database. To the list of the tables belonging to the library of widgets and projects, are included:
- "{DB_TBL}" — table of widgets belonging to the library (structure "LibWigets"), or pages belonging to the project (structure "ProjPages");
- "{DB_TBL}_io" — table with the working properties of the widget in this library and of the embedded widgets of the container ones (structure "LibWidgetIO"), or the properties of the pages (structure "ProjPageIO");
- "{DB_TBL}_uio" — table with the user properties of the widgets of this library and the embedded widgets of container ones (structure "LibWidgetUserIO"), or the user properties of the pages (structure "ProjPageUserIO");
- "{DB_TBL}_incl" — table of included widgets into the widgets-containers of the library (structure "LibWidgetIncl") or the project (structure "ProjPageWIncl");
- "{DB_TBL}_mime" — table with the resources of the library and it's widgets (structure "LibWidgetMime") or the project and it's pages (structure "ProjMime");
- "{DB_TBL}_stl" — table for store values of the stiled properties of a project (structure "PrjStlIO");
- "{DB_TBL}_ses" — table for store data of project's run mode, session (structure "PrjSesIO").
Projections (structures) of basic tables are as follows:
- Libs(ID, NAME, DSCR, DB_TBL, ICO) — Libraries of widgets ID.
ID — identifier;
NAME — name;
DSCR — description;
DB_TBL — root of the tables of DB with the widgets;
ICO — encoded (Base64) image of the icon of the library.
- LibWigets(__ID__, ICO, PARENT, PROC, PROC_PER, ATTRS, TIMESTAMP) — Widgets ID of the library.
ID — identifier;
ICO — encoded (Base64) image of the icon of the widget.
PARENT — address of the basic widget /wlb_originals/wdg_Box;
PROC — internal script and the script language of the widget;
PROC_PER — frequency of the computation of the script of the widget;
ATTRS — list of attributes of the widget, modified by the user.
TIMESTAMP — time-stamp of the last modification.
- LibWidgetIO(__IDW__, ID, IDC, IO_VAL, SELF_FLG, CFG_TMPL, CFG_VAL) — Work attributes ID of the widget IDW.
IDW — identifier of the widget;
ID — identifier of the IO;
IDC — child widget identifier;
IO_VAL — value of the attribute;
SELF_FLG — internal flags of the IO;
CFG_TMPL — template of the configuration element based on this attribute;
CFG_VAL — value of the configuration element (link, constant ...).
- LibWidgetUserIO(__IDW__, ID, IDC, NAME, IO_TP, IO_VAL, SELF_FLG, CFG_TMPL, CFG_VAL) — User attributes ID of the widget IDW.
IDW — identifier of the widget;
ID — identifier of the IO;
IDC — child widget identifier;
NAME — name of the IO;
IO_TP — type and main flags of the IO;
IO_VAL — value of the IO;
SELF_FLG — internal flags of the IO;
CFG_TMPL — template of the configuration element based on this attribute;
CFG_VAL — value of the configuration element (link, constant ...).
- LibWidgetIncl(__IDW__, ID, PARENT, ATTRS) — Included into the container IDW widgets ID.
IDW — identifier of the widget;
ID — identifier of the copy of the included widget;
PARENT — address of the basic widget /wlb_originals/wdg_Box;
ATTRS — list of attributes of the widget, modified by the user.
- LibWidgetMime(__ID__, MIME, DATA) — Audio, video, media and other resources of widgets of the library.
ID — identifier of the resource.
MIME — Mime data type of the resource (in the format — "{mimeType};{Size}").
DATA — Resource data encoded with Base64.
- Projs(ID, NAME, DSCR, DB_TBL, ICO, USER, GRP, PERMIT, PER, FLGS, STYLE) — Projects of visualization interfaces ID.
ID — identifier of the project;
NAME — name of the project;
DSCR — description of the project;
DB_TBL — root of the tables of DB with the pages;
ICO — encoded (Base64) image of the icon of the project;
USER — owner of the project;
GRP — users group of the project;
PERMIT — rights of access to the project;
PER — frequency of the computation of the project;
FLGS — flags of the project;
STYLE — typical style of the project.
- ProjPages(__OWNER__, ID, ICO, PARENT, PROC, PROC_PER, FLGS, ATTRS, TIMESTAMP) — The pages ID which are hold in the project/page OWNER.
OWNER — project/page — owner of the page (in the format — "/AGLKS/so/1/gcadr")
ID — identifier of the page;
ICO — encoded (Base64) image of the icon of the page;
PARENT — address of the basic widget of the page in the format: /wlb_originals/wdg_Box;
PROC — internal script and the script language of the page;
PROC_PER — frequency of the computation of the script of the widget;
FLGS — flags of the page;
ATTRS — list of attributes of the widget, modified by the user;
TIMESTAMP — time-stamp of the last modification.
- ProjPageIO(__IDW__, ID, IDC, IO_VAL, SELF_FLG, CFG_TMPL, CFG_VAL) — Working attributes of the pages. The structure actually corresponds to the table LibWidgetIO.
- ProjPageUserIO(__IDW__, ID, IDC, NAME, IO_TP, IO_VAL, SELF_FLG, CFG_TMPL, CFG_VAL) — User attributes of the pages. The structure actually corresponds to the table LibWidgetUserIO.
- ProjPageWIncl(__IDW__, ID, PARENT, ATTRS) — Included widgets on the page. The structure actually corresponds to the table LibWidgetIncl.
- ProjMime(__ID__, MIME, DATA) — Audio, video, media and other resources of the pages of the project. The structure actually corresponds to the table "LibWidgetMime".
- PrjStl(__ID__, V_0, V_1, V_2, V_3, V_4, V_5, V_6, V_7, V_8, V_9) — Value of the style's field ID of the project.
ID — style's field identifier;
V_{N} — value of the style's field for the style N.
- ProjSess(__IDW__, ID, IO_VAL) — Project table IDW for data storage of the sessions, performing project.
IDW — the full path of the element of the project;
ID — attribute of the element;
IO_VAL — value of the element.