In process visualization, HMI and Scada you have to observe and control a lot of signals measured in the real world and signals that have been calculated. These signals are changing over time. Your visualization must be dynamic. It may include text and graphics. For feeding the real world signals in and out the computer you need appropriate interfaces (data aqusition systems, field busses, PLC's ...).
pvbrowser is an OpenSource attempt to this problem. The idea behind is to have something like an internet browser which can display dynamic content. Normally an internet browser displays almost static HTML pages. pvbrowser will display dynamic changing Qt widgets. What is displayed within the pvbrowser window and how interaction is done will be defined by the server program. This can be compared to an internet browser. Both connect to a server via TCP/IP by inputting a URL. What is displayed within the window is defined by the server. The server(s) may be changed at any time. The clients will automatically see the actual content.
pvbrowser uses ASCII text commands that are terminated by a NEWLINE. The server will send such commands to the browser. The browser will interpret these commands and execute them.
In the reverse direction the browser will also send ASCII commands. E.g. when a button is hit. Thus events are implemented.
|
The command
sets the text for object 0 to "pvsdemo". This is the text in the titlebar of the browser.
will set the geometry of your work area.
tells the browser that a new mask will be defined containing 3 objects.
The browser will allocate an array for holding 3 objects. The old mask will be destroyed.
will construct a new QLabel,
will set
the geometry of the label and
will set
as text.
will construct a QPushButton,
will set it's geometry and
will set
as text.
tells the browser that the definition of mask is finished and
that the mask can be shown.
The following commands set a text on object 1 in the mask.
The task of the user will be to write the server program. The layout of the masks can be defined in Qt Designer. Qt Designer stores the layout in an XML file (name.ui). This file can be converted to sourcecode using the converter ui2pvc. You get a running skeleton of your server in which you can insert your logic.