The objectives of this phase are:
As the result of our work the modules of the data model (UI.VCAEngine) and visualization (UI.Vision) was created. At this stage, the modules implement the mechanisms of UI elements formation. At next stage these elements will be used to form the full-fledged visualization and control interfaces.
Lets consider the results of the each stage's implementation:
In accordance with the static class diagram (Fig.4.10.1) and general requirements there have been implemented the modules "UI.VCAEngine" and "UI.Vision" for the OpenSCADA system. The "UI.VCAEngine" module implements the VCA data model and is the source for subsequent presentation of these data by different mechanisms of visualization. The "UI.Vision" module provides the means of presentation(visualization), based on QT library of version 4 of the Trolltech company.
Connection between the modules of the data model and presentation(visualization) is organized by direct calls (strong links). This method of connection is selected for preliminary abstraction of features of interaction and for concentration on core problems of implementation. Later it is planned the unification and construction of these links through the control interface of OpenSCADA system (weak links). As the result it will be achieved the opportunity of separation the data model and presentation(visualization), with possibility of simultaneous maintenance of different presentation(visualization) mechanisms with the single VCA data model. In addition, it will be possible to estimate the influence of the connection's(link's) type on the performance of the VCA.
The module of the data model(engine) of the VCA contains the container of widgets/frames library. The module provides the predefined library of basic widgets (primitives) with the primary realization of their own properties and processing logic of these properties.
Storage of the widgets' data and widgets' libraries is implemented in the database available in the OpenSCADA system. The database is organized on data ownership to the library. Ie the separate library is stored in the separate group of tables of the one or different databases. The list of libraries of widgets is stored in the index table of the libraries with the name "VCALibs" and with the structure "Libs", of the DB section. A copy of this table is created in each database, which stores data of this module, with the list of libraries contained in the given database. The structure of the tables of the belonging to the library widgets includes:
To control the widget library and the individual widgets the configuration scripts were written on the language of control interface of ~OpenSCADA. Currently, these scripts are designed to perform only the functions of the central configuration of the VCA engine elements, but later there is plans to expand them and give them the functions of processing requests to the data model from the presentation(visualization) modules to organize the "weak links" between the "Data model" and "Prepresentation(visualization)".
The basis of virtually all elements of the engine has become an object of the abstract visualization element (VCA::Widget). At its, abstract, level the object has the following properties:
For the presentation of thelibrary of widgets the class (VCA::WdgLib) is implemented. Its main function is to maintain the library of widgets, storage and loading them from the database, providing an access to the resources(Mime-data), as well as the separation of access.
Especially for the inclusion in the library of widgets the class of the library widget (VCA::LWidget) was created, which is based on an abstract widget's class (VCA::Widget) and provides additional functions: storing the widget data in tables of the library, the redefinition of the access to the resources on the table with the mime-data of the library and storage of the embedded container widget (VCA::CWidget).
In its turn, the class of the container widget (VCA::CWidget) provides the following functions: the storage of the container widget's data in the tables of the library, the redefinition of the access to the resources on the table with the mime-data of the library and the forced mode of the simple link for all container widgets.
Íà îñíîâå êëàññà áèáëèîòå÷íîãî âèäæåòà (VCA::LWidget) áûë ñôîðìèðîâàí àáñòðàêòíûé êëàññ òåðìèíàëüíîãî âèäæåòà (VCA::PrWidget). À óæå íà åãî îñíîâå ñôîðìèðîâàíû ðåàëèçàöèè ïðèìèòèâîâ áàçîâûõ âèäæåòîâ, êîòîðûå è ñôîðìèðîâàëè áèáëèîòåêó áàçîâûõ âèäæåòîâ, ñîçäàâàåìóþ ìîäóëåì ïðè èíèöèàëèçàöèè. Çíà÷åíèÿ ñâîéñòâ áàçîâûõ âèäæåòîâ, òàêæå, ìîãóò ñîõðàíÿòüñÿ â ÁÄ (òàáëèöû áèáëèîòåêè âèäæåòîâ), ôîðìèðóÿ íóæíûå øàáëîíû. Êðîìå òîãî, áàçîâàÿ áèáëèîòåêà ïðèìèòèâîâ ìîæåò äîîïðåäåëÿòüñÿ ðàñøèðåííûìè ïðèìèòèâàìè èç ìîäóëåé èíòåðôåéñîâ ïðåäñòàâëåíèÿ, êîòîðûì áàçîâûõ íåäîñòàòî÷íî. Íî â ýòîì ñëó÷àå íóæíî ó÷èòûâàòü, ÷òî ïîäîáíûå äåéñòâèå - ïóòü ê íåñîâìåñòèìîñòè ìåæäó ìîäóëÿìè èíòåðôåéñîâ ïðåäñòàâëåíèÿ!
Èíòåðôåéñ ðàçðàáîòêè ïîëüçîâàòåëüñêèõ èíòåðôåéñîâ, ìîäóëÿ, îñíîâàí íà MDI(Multi Document Interface) èíòåðôåéñå. Äàííûé ïîäõîä ïîçâîëÿåò îäíîâðåìåííî ðåäàêòèðîâàòü íåñêîëüêî êàäðîâ ðàçëè÷íûõ ðàçìåðîâ. Èñïîëüçîâàíû ñëåäóþùèå ìåõàíèçìû óïðàâëåíèÿ ðàçðàáîòêîé: ïàíåëè èíñòðóìåíòîâ, ïóíêòû ìåíþ è êîíòåêñòíîå ìåíþ. Áîëüøèíñòâî äåéñòâèé äóáëèðóþòñÿ â ðàçíûõ ìåõàíèçìàõ, ÷òî ïîçâîëÿåò áûñòðî íàéòè èíñòðóìåíò ïðåäïî÷èòàåìûì ñïîñîáîì. Íàâèãàöèîííûå èíòåðôåéñû ðåàëèçîâàíû ïðèñîåäèíÿåìûìè îêíàìè. Êîíôèãóðàöèÿ ïàíåëåé èíñòðóìåíòîâ è ïðèñîåäèíÿåìûõ îêîí ñîõðàíÿåòñÿ ïðè âûõîäå è âîññòàíàâëèâàåòñÿ ïðè ñòàðòå, ÷òî ïîçâîëÿåò íàñòðàèâàòü èíòåðôåéñ ïîä ñåáÿ.
Îäíèì èç ýëåìåíòîì ïîëüçîâàòåëüñêîãî èíòåðôåéñà, ðåàëèçîâàííûì êàê ïðèñîåäèíÿåìîå îêíî, ÿâëÿåòñÿ íàâèãàòîð áèáëèîòåê âèäæåòîâ. Ñ ïîìîùüþ íàâèãàòîðà ìîæíî áûñòðî íàéòè íóæíûé âèäæåò èëè áèáëèîòåêó è ïðîäåëàòü íàä íèìè íåîáõîäèìûå îïåðàöèè. Ðåàëèçîâàíû îïåðàöèè: äîáàâëåíèÿ, óäàëåíèÿ, íàñòðîéêè âèäæåòîâ è áèáëèîòåê, à òàêæå âèçóàëüíîãî ðåäàêòèðîâàíèÿ âèäæåòîâ.
Äëÿ óäîáíîãî óïðàâëåíèÿ ñâîéñòâàìè âèäæåòîâ/êàäðîâ ðåàëèçîâàí èíñïåêòîð àòðèáóòîâ(ñâîéñòâ) âèäæåòîâ. Èíñïåêòîð àòðèáóòîâ ðåàëèçîâàí êàê ïðèñîåäèíÿåìîå îêíî, êîòîðîå àêòèâèðóåòñÿ ïðè âûáîðå êàäðà èëè âèäæåòà. Îêíî èíñïåêòîðà àòðèáóòîâ ìîæíî óäîáíî ðàñïîëîæèòü íà âèäó, ïðèøâàðòîâàâ ê îäíîé èç ñòîðîí ðàáî÷åãî îêíà. Èíñïåêòîðîì àòðèáóòîâ ðåàëèçîâàíà ïîääåðæêà ãðóïïîâîé êîíôèãóðàöèè íåñêîëüêèõ âèäæåòîâ, à òàêæå ãðóïïèðîâàíèå îäíîòèïíûõ ñâîéñòâ.
Äëÿ âèçóàëüíîãî ðåäàêòèðîâàíèÿ êàäðîâ ðåàëèçîâàíà ïåðâè÷íàÿ ïîääåðæêà ðåäàêòèðîâàíèÿ âèäæåòîâ è êàäðîâ. Óæå ñåé÷àñ ðåäàêòîð ïîçâîëÿåò ðåäàêòèðîâàòü êàäðû, îñíîâàííûå íà ïðèìèòèâå "Box" è ïîëíîöåííî îòîáðàæàòü ïðèìèòèâ òåêñòîâîãî ïîëÿ "Text".  ðåäàêòîðå êàäðîâ ðåàëèçîâàíû ôóíêöèè:
Âèä îêíà ðàçðàáîòêè ïðèâåä¸í íà ðèñ. 6.1.1. Íà ðèñóíêå ìîæíî âèäåòü: ïàíåëè èíñòðóìåíòîâ, íàâèãàòîð âèäæåòîâ, èíñïåêòîð àòðèáóòîâ, îêíî ðåäàêòèðîâàíèÿ êàäðà è ñòðîêà ñòàòóñà.
Äëÿ íàñòðîéêè îáúåêòîâ âèäæåòîâ è èõ áèáëèîòåê ðàçðàáîòàíû äâà äèàëîãà, äèàëîã íàñòðîéêè âèäæåòà (ðèñ.6.1.2) è äèàëîã íàñòðîéêè áèáëèîòåêè âèäæåòîâ (ðèñ.6.1.3). Äèàëîã íàñòðîéêè áèáëèîòåêè ïîçâîëÿåò óñòàíîâèòü îñíîâíûå ñâîéñòâà è ïîìåñòèòü mime-äàííûå â ÁÄ, äëÿ ïîñëåäóþùåãî èñïîëüçîâàíèÿ â âèäæåòàõ áèáëèîòåêè. Äèàëîã íàñòðîéêè âèäæåòà ïîçâîëÿåò óñòàíîâèòü: îñíîâíûå ñâîéñòâà âèäæåòà, èíäèâèäóàëüíî óñòàíîâèòü çíà÷åíèÿ àòðèáóòîâ è ñêîíôèãóðèðîâàòü âíóòðåííþþ ïðîöåäóðó âû÷èñëåíèé âèäæåòà ñ äîïîëíèòåëüíûìè (ïîëüçîâàòåëüñêèìè) ñâîéñòâàìè.