From OpenSCADAWiki
Jump to: navigation, search

1 Primitives of the widgets

Any newly created widget is based on one of several primitives — end element of the visualization, by installing of the kinship as directly to the primitive, as well as through the several intermediate user widgets. Each of the primitives contains a mechanism of the data model. An instance of the widget stores the properties values of the primitive own configuration.

The tasks of the visualization interface include support and work with the data model of the widgets primitives. The widgets primitives should be thoroughly worked out and unified, in order to capture as many opportunities as possible in a smaller number of poorly linked, with the purpose, primitives.

Table. Library of the primitives of the widgets — basic elements of the visualization.

Identifier Name Function
ElFigure Elementary graphical figure

The primitive is the basis for drawing elementary graphical shapes with their possible combinations in a single object. The support of the following elementary figures is provided:

  • Line.
  • Arc.
  • Bézier curve.
  • Fill of the enclosed space.

For all the figures, contained in the widget, set the common properties of thickness, color, etc., provides the possibility to specify the above-mentioned attributes for each figure separately and their dynamization.

FormEl Element of the form

Includes support for the standard form components:

  • Line edit.
  • Text edit.
  • Check box.
  • Button.
  • Combo box.
  • List.
  • Tree.
  • Table.
  • Slider.
  • Scroll bar.
Text Text Text element-label. Characterized by the font type, color, orientation and alignment. Support for arguments is provided.
Media Media Element of the visualization of raster and vector images of various formats, playback of the animated images, playback of the audio fragments and view of the video fragments.
Diagram Diagram Element of the diagram with the support of the visualization in the real-time for the flow of several: trends (time charts), spectrum, XY diagrams.
Protocol Protocol Element of the protocol — visualizer of the program messages, with support of the multiple operating modes.
Document Document Element of the generating reports, journals and other documentation on the basis of available data.
Box Container Contains the mechanism for other widgets placement-including with the purpose of creation of new, more complex, widgets and pages of the end visualization.
Function, in plane Function of API of the object model of OpenSCADA Not visual widget, on the runtime side, which allows to include a computing function of the object model of OpenSCADA in the VCA.

Table. The common set of properties/attributes in the widget

Identifier Name Number Value
id Identifier - Identifier of the element. The attribute is read-only, designed to provide information on the ID of the element.
path Path - Path to the widget. The attribute is read-only and designed to provide full information about the element location.
parent Parent - Path to the parent widget. The attribute is read-only and designed to provide information about the ancestor location which the widget is inherited from.
owner Owner - The widget owner and group in the view "{owner}:{group[,group1,groupN]}", by default the "root:UI".
perm Permission -

Permission to the widget in the view "{user}{group}{other}" plus the inheritance flag, enables the inheritance for owner and its permissions from the upper widget.
Where "user", "group" and "other" is:

  • "__" — no access;
  • "R_" — read-only;
  • "RW" — read and write.

By default the 01000 — inheritance.

root Root 1 Identifier of the widget-primitive (basic element) which underlies the widget visualization shape.
name Name - Name of the element. Accessible to modification the element name.
dscr Description - Description of the element. Text field of the brief description.
en Enabled 5 The state "Enabled" of the element. Disabled element is not shown in the execution mode.
active Active 6 The state "Active" of the element. Active element may receive focus in the execution mode, and thus receive keyboard and other events with their subsequent processing.
geomX Geometry: x 7 Geometry, coordinate 'x' of the element position.
geomY Geometry: y 8 Geometry, coordinate 'y' of the element position.
geomW Geometry: width 9 Geometry, the width of the element.
geomH Geometry: height 10 Geometry, the height of the element.
geomXsc Geometry: x scale 13 Horizontally scale of the element.
geomYsc Geometry: y scale 14 Vertical scale of the element.
geomZ Geometry: z 11 Geometry, coordinate 'z' (level) of the element on the frame. Defines also the order to transfer the focus through active elements.
geomMargin Geometry: margin 12 Geometry, the margins of the element.
tipTool Tip: tool 15 Text of a brief help or tip on this element. Realized usually as a tool tip, while keeping your mouse cursor over the element.
tipStatus Tip: status 16

Text information on the status of the element or the guide to action over the element. Implemented usually in the form of a message in the status bar while keeping your mouse cursor over the element.

* Modification the attribute from session of the root page will record the message in the status bar of the visualization window of the session.
contextMenu Context menu 17

Context menu in the strings list view: "{ItName}:{Signal}".
Where:

  • "ItName" — name of the item;
  • "Signal" — name of the signal, which forming at the selecting: "usr_{Signal}".
evProc Events processing -

Attribute for storing of the script of the events processing for direct control of the user interface. Script is a list of commands to the visualization interface, generated at the event receipt (attribute event). Direct events processing to manage pages, in the view: "{event}:{evSrc}:{com}:{prm}". Where:

  • "event" — waiting event;
  • "evSrc" — event source;
  • "com" — command of the session: open, next, prev;
  • "prm" — command parameter, where used:
    • pg_so — direct name of the desired page, with the prefix;
    • 1 — name of the new page in a general way, without a prefix;
    • * — the page is taken from the previous page name;
    • $ — indicates the place relative to which the page opens.

Examples:

  • ws_BtPress:/prev:prev:/pg_so/*/*/$
  • ws_BtPress:/next:next:/pg_so/*/*/$
  • ws_BtPress:/go_mn:open:/pg_so/*/mn/*
  • ws_BtPress:/go_graph:open:/pg_so/*/ggraph
Additional attributes for items, placed into the project in the role of a page.
pgOpen Page: opened -

Sign "The page is opened".

* Modification from the session provides an immediate opening/closing the page, but for the pages type "Link" you must prefer of the user API function uiCmd() using to the pages managing.
pgNoOpenProc Page: process not opened - Sign "Execute the page, even if it is closed".
pgOpenSrc Page: source of the opening 3

Full address of the page which has opened this one.

* Writing/clearing the widget address, of the opening initiation, performs an immediate opening/closing the page. In the case of writing the address and on certain conditions, the dynamic linking of the current widget to the initiator performs. But for the pages type "Link" you must prefer of the user API function uiCmd() using to the pages managing.
pgGrp Page: group 4 Group of the pages. EMPTY and the "main" group is meant of using this page as the Root-main page, so such ones will replace other Root-main pages; the "fl" group is meant of using in the "fly" windows which are suitable for multiple open and must not be traced for doubles; all other are meant for including to the containers-boxes or single opening, so they forced in checking for doubles when the last one will be opened and the previous ones be closed.
Additional attributes of the execution mode — by the session.
(Virtual attributes are not available in the widget procedure)
event Events - Special attribute of the collection of events of the widget in the list, which is divided by the new line. Access to the attribute is protected by a critical section in order to avoid loss of the events. The attribute is always available in the widget procedure.
load Load -1 Virtual command of the group data download.
focus Focus -2 Special attribute of the indicating the fact of receiving the focus by an active widget. Attribute of the widget and of the included widgets is available in the widgets procedures.
perm Permission -3 Virtual attribute of the rights of the active user to view and control the widget.
* — Special function of the widget attribute which executing in the project session at any user's modification.

The engine of the visualization environment provides activation of the visualizer specific attributes. The activation process performs at opening a session of the project and means for the project: creation of the specific attribute with the specified properties, at case it lack, and activation for tracing its modification by the engine of the visualization environment, like to the attributes of forming primitive's shapes. To direct specifying such attribute you can also use the prefix "vs_" to the attribute identifiers, what is mach faster and excludes of the activation stage. For the specific attributes list of the visualizer you can see the documentation of the proper visualizer.

1.1 Elementary graphical figure (ElFigure)

The primitive is the basis for drawing basic graphical shapes with their possible combinations in a single object. Taking in the account the wide range of various shapes, which must be maintained by the primitive, and at the same time the primitive must be simple enough for using and, if possible, for implementation, it was decided to limit the list of the basic figures used for the construction of the resulting graphics to these figures: line, arc, Bézier curve and fill of the enclosed spaces. Based at these basic figures, it is possible to construct derived figures by combining the basic. In the context of the primitive, there is a possibility to set the transparency of the color in the range [0...255], where '0' — complete transparency.

Table. List of additional properties/attributes of the primitive "Elementary figure (ElFigure)"

Identifier Name Number Value
lineWdth Line:width 20 Line width.
lineClr Line: color 21 Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
lineStyle Line: style 22 Line style: solid, dashed, dotted.
bordWdth Border: width 23 Border width of the line. Zero width indicates the absence of the border.
bordClr Border: color 24 Border color (details in attribute 21).
fillColor Fill: color 25 Fill color (details in attribute 21).
fillImg Fill: image 26 Image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
orient Orientation angle 28 Rotation angle of the widget content.
mirror Mirroring 29 Mirroring the widget content, limited currently.
elLst Elements list 27 List of the graphic elements in the format:
  • Line. General form of the entry in the list, for static and dynamic parameters (may be mixed):
"line:({x}|{y}):({x}|{y})[:{width}[:{color}[:{bord_w}[:{bord_clr}[:{line_stl}]]]]]"
"line:{p1}:{p2}[:w{n}[:c{n}[:w{n}[:c{n}[:s{n}]]]]]"
  • Arc. General form of the entry in the list, for static and dynamic parameters (may be mixed):
"arc:({x}|{y}):({x}|{y}):({x}|{y}):({x}|{y}):({x}|{y})[:{width}[:{color}[:{bord_w}[:{bord_clr}[:{line_stl}]]]]]"
"arc:{p1}:{p2}:{p3}:{p4}:{p5}[:w{n}[:c{n}[:w{n}[:c{n}[:s{n}]]]]]"
VCA arc.png
p1, p2 — start and end points of the elliptic arc, respectively;
p3 — center of the arc;
p4 — first radius;
p5 — second radius.
  • Bézier curve. General form of the entry in the list, for static and dynamic parameters (may be mixed):
"bezier:({x}|{y}):({x}|{y}):({x}|{y}):({x}|{y})[:{width}[:{color}[:{bord_w}[:{bord_clr}[:{line_stl}]]]]]"
"bezier:{p1}:{p2}:{p3}:{p4}[:w{n}[:c{n}[:w{n}[:c{n}[:s{n}]]]]]"
  • Fill. General form of the entry in the list, for static and dynamic parameters (may be mixed):
"fill:({x}|{y}):({x}|{y}):...:({x}|{y})[:{fill_clr}[:{fill_img}]]"
"fill:{p1}:{p2}:...:{pN}[:c{n}[:i{n}]]"

Where:

x, y — direct point (x,y), coordinates in pixels with floating point;
p1 ... pN — dynamic point 1...N;
width, bord_w — direct width of the line and border in pixels with floating point;
w{n} — dynamic width 'n';
color, bord_clr, fill_clr — direct color of the line, border and fill in name or 32bit code with alpha: {name}[-{AAA}], #RRGGBB-AAA;
c{n} — dynamic color 'n';
line_stl — direct line style: 0-Solid, 1-Dashed, 2-Dotted;
s{n} — dynamic style 'n';
fill_img — direct fill image in the view "[{src}%3A]{name}", where:
"src" — source of the image:
file — directly from local file by the path;
res — from the resources table of DB.
"name" — file path or identifier of the resource.
i{n} — dynamic fill image 'n'.

For example:

  • line:(50|25):(90.5|25):2:yellow:3:green:2
  • arc:(25|50):(25|50):1:4:(25|50)::#000000-0
  • fill:(25|50):(25|50):c2:i2
  • fill:(50|25):(90.5|25):(90|50):(50|50):#d3d3d3:h_31
Attributes of each point from the graphic figures list elLst
p{n}x Point {n}:x 30+n*6 Coordinate 'x' of the point n.
p{n}y Point {n}:y 30+n*6+1 Coordinate 'y' of the point n.
w{n} Width {n} 30+n*6+2 Width n.
с{n} Color {n} 30+n*6+3 Color n (details in attribute 21).
i{n} Image {n} 30+n*6+4 Image n (details in attribute 26).
s{n} Style {n} 30+n*6+5 Style n.

1.2 Element of the form (FormEl)

A primitive, designed to provide the user with standard elements of the form. The general attribute list depends on the element type.

Table. List of additional properties/attributes of the primitive "Element of the form (FormEl)"

Identifier Name Number Value
elType Element type 20 Type of the element, from which depends the list of additional attributes:
  • Line edit (0)
  • Text edit (1)
  • Check Box (2)
  • Button (3)
  • Combo box (4)
  • List (5)
  • Tree (8)
  • Table (9)
  • Slider (6)
  • Scroll bar (7)
Line edit:
value Value 21 Contents of the line.
view View 22 View of the editing line:
  • Text (0)
  • Combo Box (1)
  • Integer (2)
  • Real (3)
  • Time (4)
  • Date (5)
  • Date and Time (6)
  • Password (7)
cfg Configuration 23 Configuration of the line. Format of the value of the field for different views of the lines:
Text — configuration of the formatted input at the template with the parameters (supported only by Qt in UI.Vision):
A — ASCII alphabetic character required, [A-Za-z].
a — ASCII alphabetic character permitted but not required.
N — ASCII alphanumeric character required, [A-Za-z0-9].
n — ASCII alphanumeric character permitted but not required.
X — Any character required.
x — Any character permitted but not required.
9 — ASCII digit required, [0-9].
0 — ASCII digit permitted but not required.
D — ASCII digit required, [1-9].
d — ASCII digit permitted but not required.
# — ASCII digit or plus/minus sign permitted but not required.
H — Hexadecimal character required, [A-Fa-f0-9].
h — Hexadecimal character permitted but not required.
B — Binary character required, [0-1].
b — Binary character permitted but not required.
> — All following alphabetic characters are uppercased.
< — All following alphabetic characters are lowercased.
! — Switch off case conversion.
\\ — Use to shield the special characters listed above to use them as separators.
Combobox — list of values the editable combobox by lines.
Integer — integer value in the form: "{Min}:{Max}:{ChangeStep}:{Prefix}:{Suffix}".
Real — real value in the form: "{Min}:{Max}:{ChangeStep}:{Prefix}:{Suffix}:{SignsAfterDot}".
Time, Date, Date and time — to form the date following the template with the parameters:
d — number of the day (1-31);
dd — number of the day (01-31);
ddd — acronym of the day ("Mon" ... "Sun");
dddd — full name of the day ("Monday" ... "Sunday");
M — number of the month (1-12);
MM — number of the month (01-12);
MMM — acronym of the month ("Jan" ... "Dec");
MMMM — full name of the month ("January" ... "December");
yy — last two digits of the year;
yyyy — full year;
h — hour (0-23);
hh — hour (00-23);
m — minutes (0-59);
mm — minutes (00-59);
s — seconds (0-59);
ss — seconds (00-59);
AP,ap — to display AM/PM or am/pm.
confirm Confirm 24 Enable the confirming mode.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
Text edit:
value Value 21 Content of the editor.
wordWrap Word wrap 22 Automatically wrap text by words.
confirm Confirm 24 Enable the confirming mode.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
Check box:
name Name 26 Name/label of the checkbox.
value Value 21 Value of the checkbox.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
Button:
name Name 26 Name-inscription on the button. Allowed symbols '\n' for multiple line names.
value Value 21 The value, different for modes:
  • "Standard" — repeating parameters of events on holding {delay}-{interval}, time in milliseconds;
  • "Checkable" — toggle value;
  • "Menu" — list of addresses of the menu elements like to /grp1/grp2/item1;
  • "Load" — description line {FilesTemplate}|{Header}|{FileByDefaultAndLoaded}|{FileMime} and loaded file content. The files template like to "Images (*.png *.xpm *.jpg);;CSV-file (*.csv)".
  • "Save" — description line {FilesTemplate}|{Header}|{FileByDefault}|{FileMime} and saving file content. The files template like to before one.
img Image 22 Image on the button. Image name in the view [{src}:]{name}, where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
color Color 23 Color of the button. Color name form "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
colorText Color:text 27 Color of the text (details above).
mode Mode 24 Operation mode of the button:
  • "Standard" — normal button which allows repeating events on it hold, the parameters in "value";
  • "Checkable" — check button, values in "value";
  • "Menu" — opens menu on press, items list in "value";
  • "Load" — provides for loading of the user-space small files through the visual interface; on the mode the button press will open the selection file dialog for loading and the file content next saving to the attribute "value";
  • "Save" — provides for saving of the user-space small files through the visual interface; on the file content writing to the attribute "value" for user will: open the selecting/setting file dialog, save the attribute "value" content to the file, after the selecting, and set clean the attribute "value".
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
List:
value Value 21 Current value of the list.
items Items 22 Entries of the list.
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
mult Multiple selection 23 Allow for multiple entries selection of the list.
Combo box, Tree:
value Value 21 Current value of the list.
items Items 22 Entries of the list or hierarchical items list of the tree in path "/{DIR}/{DIR}/{ITEM}".
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (details above).
Table:
set Setting value 23 Value of edition of a cell of the table which address in the event "ws_TableEdit_{colN}_{rowN}".
value Value 21 Address of the selected item. It changing follows by the event "ws_TableChangeSel". The address format depends from the table's selection mode:
  • "Cell" — cell address in the format "{row}:{col}".
  • "Row", "Column" — row-column number or cell content of the row-column key, which sets by the attribute "keyID".
items Elements 22

The table structure and content in the XML view:

<tbl>
<h><s>{Header1}</s><s>{Header2}</s></h>
<r><s>{Row1Column1String}</s><i>{Row1Column1Integer}</i></r>
<r><b>{Row2Column1Logical}</b><r>{Row2Column2Real}</r></r>
</tbl>

The tags:

"tbl" — Table, the properties at all:
  • "sel" — selection mode of the table items: "row" — by rows, "col" — by columns, "cell" — by cells (by default);
  • "keyID" — row-column number of the key, for the selection value get;
  • "colsWdthFit" — fits the columns size, in the unfixed size, to fill the full width of the table;
  • "hHdrVis", "vHdrVis" — visibility of the headers, for horizontal and vertical;
  • "sortEn" — enables sorting directly by the columns.
"h" — Row of the headers. Possible attributes of the header cell tag for the column as a whole:
  • "width" — column width, in pixels or percents (10%);
  • "edit" — allowing to the cells of the row edition (0 or 1), by default — no (0);
  • "color" — column color as a whole in the color name or code;
  • "colorText" — color of the column text as a whole in the color name or code;
  • "font" — font of the column text in the typical OpenSCADA string;
  • "prec" — value precision of the real type cells in the column;
  • "sort" — sorting by the column [0 - Ascending-default; 1 - Descending];
  • "align" — alignment the column for: "left", "right" and "center".
"r" — Row of the values. Possible attributes of the row cell tag for the row as a whole:
  • "color" — row color as a whole in the color name or code;
  • "colorText" — color of the row text as a whole in the color name or code;
  • "font" — font of the cell text in the typical OpenSCADA string;
  • "prec" — value precision of the real type cells in the row.
"s", "t", "i", "r", "b" — cells of the data types "String", "Text", "Integer", "Real" and "Logical". Possible attributes:
  • "color" — cell color;
  • "colorText" — color of the cell text in the color name or code;
  • "font" — font of the cell text in the typical OpenSCADA string;
  • "prec" — value precision of the real type cell;
  • "img" — image of the cell in the form "[{src}:]{name}", the details above;
  • "edit" — allowing the cell edition (0 or 1), by default - no (0);
  • "align" — alignment the cell for: "left", "right" and "center".
font Font 25 Font name in the form "{family} {size} {bold} {italic} {underline} {strike}" (the details above).
Slider and Scroll Bar:
value Value 21 Slider position.
cfg Configuration 22 Configuration of the slider in the format: "{VertOrient}:{Min}:{Max}:{SinglStep}:{PageStep}".

Where:

  • "VertOrient" — sign (0 or 1) of the vertical orientation, the default is the horizontal orientation;
  • "Min" — minimum value;
  • "Max" — maximum value;
  • "SinglStep" — size of a single step;
  • "PageStep" — size of a page step.

1.3 Text element (Text)

This primitive is intended for outputting plain and HTML text used as labels and different signatures. In order to create decorations, primitive supports the surrounding of the text by frame.

Table. List of additional properties/attributes of the primitive "Text element (Text)"

Identifier Name Number Value
backColor Background: color 20 Background color. Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
backImg Background: image 21 Background image. The image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
bordWidth Border: width 22 Border width.
bordColor Border: color 23 Border color (details in attribute 20).
bordStyle Border: style 24 Border style: "None" (0), "Dotted" (1), "Dashed" (2), "Solid" (3), "Double" (4), "Groove" (5), "Ridge" (6), "Inset" (7), "Outset" (8).
font Font 25 Font name in the view "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
color Color 26 Text color (details in attribute 20).
orient Orientation angle 27 Orientation of the text, the angle of rotation.
wordWrap Word wrap 28 Automatically wrap text by words.
alignment Alignment 29 Alignment of the text: "Top left" (0), "Top right" (1), "Top center" (2), "Top justify" (3), "Bottom left" (4), "Bottom right" (5), "Bottom center" (6), "Bottom justify" (7), "V center left" (8), "V center right" (9), "Center" (10), "V center justify" (11).
inHtml In HTML 31 Displays and supports the content of the argument text in HTML.
text Text 30 Text value. Use "%{x}" to place the value of the argument 'x' (from 1).
numbArg Arguments number 40 Arguments number.
Attributes of the arguments
arg{x}val Argument {x}: value 50+10*x Argument x value.
arg{x}tp Argument {x}: type 50+10*x+1 Argument x type: "Integer" (0), "Real" (1), "String" (2).
arg{x}cfg Argument {x}: config 50+10*x+2 Argument x configuration:
  • "String": {len} — string length;
  • "Real": {wdth};{form};{prec} — width, form ('g', 'e', 'f') and precision of the value;
  • "Integer": {len} — value length.

1.4 Element of visualization of media-materials (Media)

This primitive is intended for playing various media materials, ranging from simple images to high-quality audio and video streams.

Table. List of additional properties/attributes of the primitive "Element of visualization of media-materials (Media)"

Identifier Name Number Value
backColor Background: color 20 Background color. Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
backImg Background: image 21 Background image. The image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
bordWidth Border: width 22 Border width.
bordColor Border: color 23 Border color (details in attribute 20).
bordStyle Border: style 24 Border style: "None", "Dotted", "Dashed", "Solid", "Double", "Groove", "Ridge", "Inset", "Outset".
src Source 25

Name of the Media source in the view "[{src}:]{name}", where:

  • "src" — source:
    • file — directly from the local file, visualizer and engine, by the path;
    • res — from the resources table of DB;
    • data — directly data in the form "data:{mime}\n{base64}";
    • stream — stream URL for playback video and audio.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:workMedia" — from the resources table of DB for the identifier "workMedia";
  • "workMedia" — like to previous;
  • "file:/var/tmp/workMedia.mng" — from the local file by the path "/var/tmp/workMedia.mng";
  • "stream:http://localhost.localhost:5050" — playback for video and audio stream from the URL.
type Type 27

Media type:

  • "Image" — raster or vector (can not support) image, like to: PNG, JPEG, GIF, SVG;
  • "Animation" — simple animation image, like to: GIF, MNG;
  • "Video" — full video or stream, like to: OGM, AVI, MKV, MPG, MP4;
  • "Audio" — just audio or stream, like to: OGG, MP3, WAV.
areas Map areas 28 Number of the active areas.
Attributes of the image (Image)
fit Fit to the widget size 26 Sign "Coordinate the contents with the widget size".
Attributes of the animation-video (Animation)
fit Fit to the widget size 26 Sign "Coordinate the contents with the widget size".
speed Play speed 29 Speed of playback, as a percentage from the original speed. If the value is less or even than 1%, the playback stops.
Attributes of the full video (Full video)
play Play 29 Video/audio — "Play".
roll Roll play 30 Roll play on the finish.
pause Pause 31 Playing pause.
size Size 32 Total video size, in milliseconds.
seek Seek 33 Seek video playing, in milliseconds.
volume Volume 34 Sound volume [0...100].
Active areas
area{x}shp Area {x}: shape 40+3*x Type of the area x: "Rect", "Poly", "Circle".
area{x}coord Area {x}: coordinates 40+3*x+1 Coordinates of the area x, are separated by commas: "x1,y1,x2,y2,xN,yN".
area{x}title Area {x}: title 40+3*x+2 Title of the area x.

1.5 Element of constructing diagrams (Diagram)

This primitive targeted to construct various diagrams in the time, including graphs-trends showing ongoing process and the archive data. Following types of the diagrams are implemented:

  • "Graph-trend" — builds a graph of the parameter values in the time.
  • "Spectrum" — builds the frequency spectrum of the parameter values. Window of the data of the frequency spectrum is formed on the basis of the horizontally size of the widget, in pixels, and the available data of the parameters imposed on the grid of the horizontal size. Due to this, the minimum allocated frequency is determined by the value of the attribute "tSize" — "1/tSize", and the maximum one is determined by half-width of the graph in pixels multiplied by the minimum frequency "width/(2*tSize)".
  • "XY" — builds the two-dimensional graph of the parameters values, by pairs to one graphic, where paired by axis Y (0,2,4...) and unpaired by axis X (1,3,5...). Specified data time range is used in the received values of the parameters of the X and Y axis, with the subsequent imaging.

For all the diagram types possible to set, as the data source:

  • parameter of the subsystem "DAQ";
  • value archive;
  • direct data block from the user.

The tracking mode is supported for current values and values from the archive, and it is possible to construct graphs of parameters that do not have a value archive by accumulating the current values in the buffer of the diagram and only at the moment of active display of this diagram.

Process of access to archival data is optimized by introducing an intermediate buffer of displaying, as well as the packaging of data traffic upon request, by bringing the data to a quality sufficient to display.

Table. List of additional properties/attributes of the primitive "Element of constructing diagrams (Diagram)"

Identifier Name Number Value
backColor Background: color 20 Background color. Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
backImg Background: image 21 Background image. The image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
bordWidth Border: width 22 Border width.
bordColor Border: color 23 Border color (details in attribute 20).
bordStyle Border: style 24 Border style: "None", "Dotted", "Dashed", "Solid", "Double", "Groove", "Ridge", "Inset", "Outset".
trcPer Tracing period, seconds 25 Mode and periodicity of the tracing.
type Type 26 Diagram type: "Trend", "Spectrum", "XY".
General attributes for all the types
tSek Time: seconds 27 Current time, seconds.
tUSek Time: microseconds 28 Current time, microseconds.
tSize Size, seconds 29 Size of the data, seconds.
curSek Cursor: seconds 30 Cursor position, seconds.
curUSek Cursor: microseconds 31 Cursor position, microseconds.
curColor Cursor: color 32 Cursor color.
sclColor Scale: color 33 Color of the scale-grid (details in attribute 20).
sclHor Scale: horizontal 34 Horizontal mode of the scale-grid: "No draw", "Grid", "Markers", "Grid and markers", "Grid (log)", "Markers (log)", "Grid and markers (log)".
sclHorScl Scale: horizontal scale (%) 44 Horizontal scale of the graphic in percents, exclusively for the type "XY".
sclHorSclOff Scale: horizontal scale offset (%) 45 Offset of the horizontal scale of the graphic in percents, exclusively for type "XY".
sclVer Scale: vertical 35 Vertical mode of the scale-grid: "No draw", "Grid", "Markers", "Grid and markers", "Grid (log)", "Markers (log)", "Grid and markers (log)".
sclVerScl Scale: vertical scale (%) 40 Vertical scale of the graphic in percents.
sclVerSclOff Scale: vertical scale offset (%) 41 Offset of the vertical scale of the graphic in percents.
sclMarkColor Scale: Markers: color 36 Color of the markers of the scale-grid (details in attribute 20).
sclMarkFont Scale: Markers: font 37 Font of the markers of the scale-grid. Font name in the view "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
valArch Value archiver 38 Value archiver in the view "{ArchMod}.{ArchivatorId}".
valsForPix Values per pixel 42 Number of values per pixel. Increase to enhance the accuracy of export at the large time intervals.
parNum Parameters number 39 Number of parameters that can be displayed on the one trend.
Attributes for type: "Graph"
sclHorPer Scale: horizontal grid size, seconds 43 Fixed period of the horizontal scale grid — disables automatic calculation of the grid period. Activates if the number of periods for a total size greater than two and a size of one period is at least 15 pixels.
Individual attributes of the parameters
prm{X}addr Parameter {X}: address 50+10*{X} Full address to a DAQ attribute of the parameter X or to an archive.

Direct data set by the prefixes is supported:

  • "data:{XMLNodeData}" — drawing from the direct set data;
  • "line:{value}" — drawing the horizontal line by a value, no sense have for the type "XY".

Example:

  • "/DAQ/System/AutoDA/MemInfo/use" — address to the attribute "use" of the parameter "MemInfo" of the controller "AutoDA" of the DAQ module "System";
  • "/Archive/va_CPULoad_load" — address to the archive "CPULoad_load".
  • "data:<d s="1" aprox="1" tm="1369465209" tm_grnd="1369465200" per="1">
0 3.14
1 3.141
5 3.1415</d>" — data for 10 seconds and period 1 second from "25.05.2013 10:00:00"; at pass "tm" and "tm_grnd" it will takes the values from the diagram range, and also by set the attribute "s" it will allows the time setting in seconds; "aprox" — approximate the transition from one point to another instead of the previous value to all the periodicity points from the packaging;
  • "line:3.14159265" — horizontal line at the value "3.14159265".
prm{X}bordL Parametr {X}: view border: lower 50+10*{X}+1 Lower limit of the parameter X.
prm{X}bordU Parametr {X}: view border: upper 50+10*{X}+2 Upper limit of the parameter X.
prm{X}color Parametr {X}: color 50+10*{X}+3 Color for display the chart of the parameter X (details in attribute 20).
prm{X}width Parametr {X}: width 50+10*{X}+6 Line width for display the chart of the parameter X, in pixels.
prm{X}scl Parametr {X}: scale 50+10*{X}+5 Separated vertical scale mode of the parameter X: "Global", "Markers", "Grid and markers", "Markers (log)", "Grid and markers (log)".
prm{X}val Parametr {X}: value 50+10*{X}+4 Value of the parameter X under the cursor.
prm{X}prop Parametr {X}: properties 50+10*{X}+7 Real archive properties in the view "{BegArh}:{EndArh}:{DataPeriod}", where "BegArh", "EndArh", "DataPeriod" — begin, end and period of the archive's data, in seconds, in real up to microseconds (1e-6).

1.6 Element of building the protocols based on the message archives (Protocol)

This primitive is designed to visualize the data of the message archive through the formation of protocols with different ways of visualization, starting from a static scanning view and finishing with dynamic tracing.

Table. List of additional properties/attributes of the primitive "Element of building the protocols based on the message archives (Protocol)"

Identifier Name Number Value
backColor Background: color 20 Background color. Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
backImg Background: image 21 Background image. The image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
font Font 22 Font name in the view "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
headVis Header visible 23 Visibility for header of the table.
time Time, seconds 24 Current time, seconds.
tSize Size, seconds 25 Query data size, seconds. Set value to '0' for get all alarms, for "lev" < 0.
trcPer Tracing period, seconds 26 Mode and periodicity of the tracing.
arch Archiver 27 Message archiver in the view "{ArchMod}.{ArchivatorId}".
tmpl Template 28 Category template or regular expression "/{re}/". For the template the special symbols are reserved:
  • '*' — any multiply, symbols group;
  • '?' — any, one symbol;
  • '\\' — use for shielding the special symbols.
lev Level 29 Level of the messages. Set value to < 0 for get the current alarms.
viewOrd View order 30 View order: "By time", "By level", "By category", "By messages", "By time (reverse)", "By level (reverse)", "By category (reverse)", "By messages (reverse)".
col Show columns 31 List of the visible and order of the columns separated by the symbol ';'. The columns are provided:
  • "pos" — row number;
  • "tm" — date and time of the message;
  • "utm" — microseconds part of the message time;
  • "lev" — level of the message;
  • "cat" — category of the message;
  • "mess" — text of the message.
itProp Item properties 32 Number of the item properties.
Individual attributes of the item properties
it{X}lev Item {X}: level 40+5*{X} Criterion: level of the element X, more or equal for the pointed.
it{X}tmpl Item {X}: template 40+5*{X}+1 Criterion: category template of the element X (details in attribute 28).
it{X}fnt Item {X}: font 40+5*{X}+2 Font of the element X (details in attribute 22).
it{X}сolor Item {X}: color 40+5*{X}+3 Color of the element X (details in attribute 20).

1.7 Element of formation of the documentation (Document)

The primitive is intended for the formation of reporting, operational and other documentation based on document templates.

Table. List of additional properties/attributes of the primitive "Element of formation of the documentation (Document)"

Identifier Name Number Value
style CSS 20 CSS rules in lines like to "body { background-color:#818181; }".
tmpl Template 21 Template of the document in XHTML, starts from the tag "body" and includes the procedure parts:
<body docProcLang="JavaLikeCalc.JavaScript">
  <h1>Value<?dp return wCod+1.314;?></h1>
</body>
doc Document 22 Final document in XHTML, starts from the tag "body".
font Font 26 Basic font of the text. Font name in the view "{family} {size} {bold} {italic} {underline} {strike}", where:
  • "family" — font family, for spaces use symbol '_', like: "Arial", "Courier", "Times_New_Roman";
  • "size" — font size in pixels;
  • "bold" — font bold (0 or 1);
  • "italic" — font italic (0 or 1);
  • "underline" — font underlined (0 or 1);
  • "strike" — font struck (0 or 1).

Examples:

  • "Arial 10 1 0 0 0" — Arial font size 10 pixels and bold.
bTime Time: begin 24 Start time of the document, seconds.
time Time: current 23 Time of the document generation, seconds. Write the time for the document generation from that point or zero for regeneration.
process In the process 27 Indication of the process of forming a document in a separate thread.
n Archive size 25 Number of the documents or the depth of the archive.
Attributes of the enabled archival mode
aCur Archive: cursor: current - Position of the current document in the archive. Record of the value <0 produces the archiving of this document.
vCur Archive: cursor: view -

Current visual document of the archive. Writing a value of:

  • -1 — selecting the next document;
  • -2 — selecting the previous document.
aDoc Archive: current document - Current archive document in XHTML, starts from the tag "body".
aSize Archive: size - Real size of the archive document.

Features of the primitive "Document":

  • Flexible formation of document structure based on HyperText Markup Language, which provides support for a wide range of features in the documents formatting.
  • Formation of the documents at a command or a schedule, which necessary for creation of reports to the archive and then reviewing the archive.
  • Formation of the documents in real time, to provide them completely dynamically and on the basis of archives at the specified time.
  • Using the widget attributes for transmission to the document of values and addresses to the archives, which allows you to use the document widget as a template when generating reports with other input data.

The basis of any document is the XHTML template. The XHTML-template is the tag "body" of the WEB-page which contains the document's static in the standard XHTML 1.0 and elements of the executable instructions in the user programming language of OpenSCADA in the view <?dp {procedure} ?>. The resulting document is formed by the procedures execution and insertion of their result into the document.

The source for values of the executable instructions are the widget attributes of the primitive, as well as all the mechanisms of the user programming language OpenSCADA. Attributes may be added by the user and they can be linked to the actual attributes or parameters or they can be autonomous, values of which will be formed in the widget procedure. In the case of linked attributes the values can be extracted from the archive-history.

The figure shows the structure of the widget of the primitive "Document". According to this structure, "Document" contains: XHTML template, results documents and data processing procedure. Data source of the procedure and output documents is attributes of the widget.

Figure. Block diagram of the primitive "Document".

Working in two modes is provided: "Dynamic" and "Archive". Difference between archive mode is the availability of the archive of the specified depth and attributes which allow you to control the process of archiving and viewing of the document in the archive.

Generation of the document is always performed at the time of setting of the attribute time relative to the earlier set begin time of the document in the attribute bTime. With the archive turned off the resulting document is placed directly in the attribute doc. When the archive is turned on the resulting document is placed in the cell under the cursor, the attribute aCur, as well as in doc if value of the archive cursor aCur and the visualized document cursor vCur match. Attributes of the archival cursors provide several command values:

  • "aCur < 0" — moves the archiver cursor to the following position, thereby leaving the previous document in the archive and clearing the document under the cursor, at short the circle archive.
  • "vCur == -1" — selecting the next document to be displayed, the selected document is copied to the attribute doc.
  • "vCur == -2" — selecting the previous document to be displayed, the selected document is copied to the attribute doc.

As mentioned above, the dynamics of the document template is determined by inserts of executable instructions of the view "<?dp {procedure} ?>". The procedures may use the same attributes of the widget and functions of the user programming interface of OpenSCADA. In addition to widget attributes, special attributes are reserved, see the table.

Table 3.8.7.a. Special and reserved elements of the template.

Name Assignment
Attributes
rez Attribute of the result of the procedure, the contents of which is placed in the document tree.
lTime Last formation time. If the document is formed for the first time, lTime is equal to the bTime.
rTime Contains the time of look through values, seconds, defined within tags with the attribute docRept.
rTimeU Contains the time of look through values, microseconds, defined within tags with the attribute docRept.
rPer Contains the period of look through values, the attribute "docRept".
mTime, mTimeU, mLev, mCat, mVal Defined inside tags with the attribute "docAMess" when parsing messages of the message archive:
mTime — time of the message, seconds;
mTimeU — time of the message, microseconds;
mLev — level of the message;
mCat — category of the message;
mVal — value of the message.
Special tags
Special attributes of the standard tags
body.docProcLang Language of the executable procedures of the document, by defaults it is "JavaLikeCalc.JavaScript".
*.docRept="1s" Tag with the specified attribute multiplies, during the formation, by shifting the time in the attribute "rTime" to the value specified in this attribute.
*.docAMess="1:PLC*" Indicates the need for multiplication a tag with the attribute, by messages from the message archive for the specified time interval, according to the level "1" and the query template "PLC*", by the message category. In the query template, regular expressions can be specified "/{re}/". For this tag, in the process of multiplication, the following attributes are defined: mTime, mTimeU, mLev, mCat and mVal.
*.docAMessArchs="ArchMod0.Archivator0[;ArchModN.ArchivatorN]" Appends the attribute "*.docAMess" by the list of archivers for reading messages.
*.docRevers="1" Indicates the inverting of the multiplication order — the last one above.
*.docAppend="1" Indication of the need to add the result of the procedure to the procedure tag. Otherwise, the result will replace the tag content.
body.docTime Time of formation of the document. Used to set the attribute lTime in the time of the next formation of the document. It is not set by the user!
table.export="1" Enable the ability to export the contents of the specified table to a CSV-file or other spreadsheet formats.

1.8 Container (Box)

The container primitive is used to build composite widgets and/or the pages of the user interface.

Table. List of additional properties/attributes of the primitive "Container (Box)"

Identifier Name Number Value
pgOpenSrc Page: source of the opening 3 Full address of the page, included inside of the container.
pgGrp Page: group 4 Group of the container of the included pages. Only pages in such group will be included to that box as a container.
backColor Background: color 20 Background color. Color name in the view "{color}[-{alpha}]", where:
  • "color" — standard color name or its numeric representation of three hexadecimal numbers of individual colors "#RRGGBB";
  • "alpha" — level of the alpha [0...255], where 0 — completely transparent.

Examples:

  • "red" — solid red color;
  • "#FF0000" — solid red color by the digital code;
  • "red-127" — half transparent red color.
backImg Background: image 21 Background image. The image name in the view "[{src}:]{name}", where:
  • "src" — source of the image:
    • file — directly from the local file by the path;
    • res — from the resources table of DB.
  • "name" — file path or identifier of the resource.

Examples:

  • "res:backLogo" — from the resources table of DB for the identifier "backLogo";
  • "backLogo" — like toe the previous;
  • "file:/var/tmp/backLogo.png" — from local file by the path "/var/tmp/backLogo.png".
bordWidth Border: width 22 Border width.
bordColor Border: color 23 Border color (details in attribute 20).
bordStyle Border: style 24 Border style: "None", "Dotted", "Dashed", "Solid", "Double", "Groove", "Ridge", "Inset", "Outset".