User programming API is the tree of the OpenSCADA objects (Fig.1), every object of which can provide own list of properties and functions. Properties and functions of the objects can be used by the user in procedures on the languages of the user programming of OpenSCADA.

Currently OpenSCADA provides only one language of the text programming — JavaLikeCalc then you must learn it also before the starting! The entry point for access to the objects of OpenSCADA (Fig.1) from the user programming language JavaLikeCalc is the reserved word "SYS" of the root OpenSCADA object. For example, to access the function of output transport you should write: SYS.Transport.Serial.out_ModBus.messIO(mess);.

API of the objects provided by the modules is described in the own documentation of the modules and here links to their are provided.

1.2 Operations of the language

The operations supported by the language are presented in the table below. Priority of the operations is reduced from top to bottom. Operations with the same priority are in the same color group.

Symbol

Description

()

Call of function.

{}

Program blocks.

++

Increment (post and pre).

--

Decrement (post and pre).

-

Unary minus.

!

Logical negation.

~

Bitwise negation.

*

Multiplication.

/

Division.

%

Remainder of integer division.

+

Addition

-

Subtraction

<<

Bitwise shift left

>>

Bitwise shift right

>

Greater

>=

Greater than or equal to

<

Less

<=

Less than or equal to

==

Equals

!=

Unequal

|

Bitwise "OR"

&

Bitwise "AND"

^

Bitwise "Exclusive OR"

&&

Boolean "AND"

||

Boolean "OR"

?:

Conditional operation "i=(i<0)?0:i;"

=

Assignment.

+=

Assignment with addition.

-=

Assignment with subtraction.

*=

Assignment with multiplication.

/=

Assignment with division.

1.3 Embedded functions of the language

The virtual machine of the language provides the following set of built-in functions general-purpose:

double max(double x, double x1) — maximum value of x and x1;

double min(double x, double x1) — minimum value of x and x1;

string typeof(ElTp vl) — type of the value vl;

string tr(string base) — translation to the base message.

To provide high speed work in mathematical calculations, the module provides built-in mathematical functions that are called at the level of the commands of the virtual machine:

double sin(double x) — sine x;

double cos(double x) — cosine x;

double tan(double x) — tangent x;

double sinh(double x) — hyperbolic sine of x;

double cosh(double x) — hyperbolic cosine of x;

double tanh(double x) — hyperbolic tangent of x;

double asin(double x) — arcsine of x;

double acos(double x) — arc cosine of x;

double atan(double x) — arctangent of x;

double rand(double x) — random number from 0 to x;

double lg(double x) — decimal logarithm of x;

double ln(double x) — natural logarithm of x;

double exp(double x) — exponent of x;

double pow(double x, double x1) — erection of x to the power x1;

double sqrt(double x) — the square root of x;

double abs(double x) — absolute value of x;

double sign(double x) — sign of x;

double ceil(double x) — rounding the number x to a greater integer;

double floor(double x) — rounding the number x to a smaller integer.

1.4 Operators of the language

The total list of the operators of the language:

var — operator of initialization of a variable; specifying a variable without assigning a value sets it to EVAL, which allows for one-time initialization of complex data types, such as an object, through an "isEVal ()" check;

if — operator "IF" of the condition;

else — operator "ELSE" of the condition;

while — definition of the "WHILE" loop;

for — definition of the "FOR" loop;

in — separator of the "FOR" cycle for object's properties scan;

break — interruption of the cycle;

continue — continue the cycle from the beginning;

function — definition of the internal function;

using — allows you to set the visibility space of the external functions of the often used libraries (using Special.FLibSYS;) for the next access only by the name of the function, has no effect for object access;

return — interrupt function and return the result that is copied to an attribute marked as return one (return 123;); in the middle of the internal function it is completed with a definite result;

delete — delete/free of an object or its properties, while: internal variables are set in EVAL, external ones are replaced by an empty object, and the properties of the object are cleared.

1.4.1 Conditional operators

The language supports two types of conditions. First — this is the operation of condition for use within the expression, second — a global, based on the conditional operators.

The condition inside an expression is based on the operations '?' and ':'. As an example we'll write the following practical expression st_open = (pos>=100) ?

true : false;, which reads as: "If the variable pos greater than or equal to 100, the variable st_open is set to true, otherwise — to false".

The global condition is based on the conditional operators "if" and "else". As an example, we can show the same expression, but recorded in another way if(pos>100) st_open = true; else st_open = false;.

1.4.2 Loops

Two types of the loops are supported: while, for and for-in. The syntax of the loops corresponds to the programming languages: C++, Java and JavaScript.

Loop while is written generally as follows: while({condition}) {body of the loop};
Loop for is written as follows: for({pre-initialization};{condition};{post-calculation}) {body of the loop};
Loop for-in is written as follows: for({variable} in {object}) {body of the loop};
Where:

{condition} — expression, determining the condition;

{body of the loop} — the body of the loop of multiple execution;

{pre-initialization} — expression of pre-initialization of variables of the loop;

{post-calculation} — expression of modification of parameters of the loop after next iteration;

{variable} — variable, which will contain object's properties name at scan;

{object} — object for which the properties are scanned.

1.4.3 Internal functions

The language supports definition and call of internal functions. To determine the internal function, the keyword "function" is used and in general, the definition has a syntax: function {fName} ({var1}, {var2}, ... {varN}) { {the function body} }. Defining an internal function inside another is not allowed but it is allowed to call a previously defined one.

Calling an internal function is done in a typical way as a procedure {fName}({var1}, {var2}, ... {varN}); or as a function {vRez} = {fName}({var1}, {var2}, ... {varN});. The call of internal functions is valid only after their declaration is higher!

All defined variables into the main body inaccessible into the internal function and can be pass in only as two way arguments of the internal function call. All defined variables into the internal function have itself namespace and inaccessible from the main body or any other internal function and can be pass out to the main body only as two way arguments or return of the internal function call. Since the definition of variables-registers in this language is static and takes place during compilation, they are in fact the same for each function call, and therefore their recursive calling does not make sense here!

Operator "return" into the internal function makes controllable finishing of the function execution and places a pointed variable or an expression result as the internal function call result.

An example of the internal function declaration and using in typical way shown bottom:

1.4.4 Special characters of the string variables

The language supports the following special characters of the string variables:

"\n" — line feed;

"\t" — tabulation symbol;

"\b" — culling;

"\f" — page feed;

"\r" — carriage return;

"\\" — the character itself '\'.

"\041" — the '!' character, written in an octal number;

"\x21" — the '!' character, written in a hex number.

2 System-wide user objects

JavaLikeCalc provides support of the data type "Object". The data type "Object" is an associated container of properties and functions. The properties can support data of fourth basic types and other objects. Access to object properties can be done through the record of property names to the object obj.prop, through a dot, and also through the inclusion of the property name in square brackets obj["prop"]. It is obvious that the first mechanism is static, while the second lets you to specify the name of the property through a variable. The name of the property through the dot must not start with a digit and contain operations symbols; otherwise, for the first digit, the object prefix should be used — SYS.BD.SQLite.db_1s, or write in square brackets — SYS.BD.SQLite["1+s"], for operations symbols in the name. Object's properties removing you can perform by the operator "delete". Reading of an undefined property will return EVAL. Creating an object is carried by the keyword new: varO = new Object(). The basic definition of the object does not contain functions. Copying of an object is actually makes the reference to the original object. When you delete an object is carried out the reducing of the reference count, and when the count is set to zero then the object is removed physically.

Different components of OpenSCADA can define the basic object with special properties and functions. The standard extension of the object is an array "Array", which is created by the command varO = new Array(prm1,prm2,prm3,...,prmN). Comma-separated parameters are placed in the array in the original order. If the parameter is the only one the array is initiated by the specified number of empty elements. Peculiarity of the array is that it works with the properties as the indexes and the main mechanism of addressing is placing the index into square brackets arr[1] is accessible. Array stores the properties in its own container of the one-dimensional array. Digital properties of the array are used to access directly to the array, and the characters work as the object properties. For more details about the properties and functions of the array can be read here.

The object of regular expression "RegExp" is created by command varO = new RegExp(pat, flg), where pat — pattern of the regular expression, and flg — match flags. The object for work with regular expressions, based on the library "PCRE". In the global search set object attribute "lastIndex", which allows you to continue searching for the next function call. In the case of an unsuccessful search for the attribute "lastIndex" reset to zero. For more details about the properties and functions of the regular expression object can be read here.

For random access to the arguments of functions provided the arguments object, which you can refer to by the symbol "arguments". This object contains the property "length" with a number of arguments in the function and allows you to access to a value of the argument by its number or ID. Consider the enumeration of the arguments on the cycle:

The basic types have the partial properties of the object. Properties and functions of the basic types are listed below:

NULL type, functions:

bool isEVal(); — returns "true".

Logical type, functions:

bool isEVal(); — checks value to "EVAL".

string toString(); — performs the value as the string "true" or "false".

real toReal(); — reads this Boolean as a real number.

int toInt(); — reads this Boolean as an integer number.

Integer and real number:

Properties:

MAX_VALUE — maximum value;

MIN_VALUE — minimum value;

NaN — error value.

Functions:

bool isEVal(); — checks value to "EVAL".

string toExponential( int numbs = -1 ); — returns the string of the number, formatted in the exponential notation, and with the number of significant digits numbs. If numbs is missing the number of digits will have as much as needed.

string toFixed( int numbs = 0, int len = 0, bool sign = false ); — returns the string of the number, formatted in the notation of fixed-point, and with the number of significant digits after the decimal point numbs, for minimum length len and compulsion to the presence of a sign. If numbs is missing, the number of digits after the decimal point is equal to zero.

string toPrecision( int prec = -1 ); — returns the string of the number, formatted with the number of significant digits prec.

string toString( int base = 10, int len = -1, bool sign = false ); — returns the string of the number of the integer type, formatted with the following representation base (2-36), for minimum length len and compulsion to the presence of a sign.

string concat( string val1, string val2, ... ); — returns a new string formed by joining the values val1 etc. to the original one.

int indexOf( string substr, int start ); — returns the position of the required string substr in the original row from the position start. If the initial position is not specified then the search starts from the beginning. If the search string is not found then "-1" is returned.

int lastIndexOf( string substr, int start ); — returns the position of the search string substr in the original one beginning from the position of start when searching from the end. If the initial position is not specified then the search begins from the end. If the search string is not found then "-1" is returned.

int search( string pat, string flg = "" ); — searches into the string by the pattern pat and pattern's flags flg. Returns found substring position or "-1" for else.

var rez = "Java123Script".search("script","i"); // rez = 7

int search( RegExp pat ); — searches into the string by the "RegExp" pattern pat. Returns found substring position or "-1" for else.

string slice( int beg, int end ); string substring( int beg, int end ); — returns the string extracted from the original one starting from the beg position and ending before the end (not included), numbering from zero. If the begin or end is negative, then the count is conducted from the end of the line. If the end is not specified, then the end is the end of the line. For example, the construction substring(-2) return two last symbols of the string.

Array split( string sep, int limit ); — returns the array of strings separated by sep with the limit of the number of elements.

Array split( RegExp pat, int limit ); — returns the array of strings separated by the RegExp pattern pat with the limit of the number of elements.

int toInt( int base = 0 ); — converts this string to an integer number in accordance with base (from 2 to 36). If the base is 0, then the prefix will be considered a prefix for determining the base (123-decimal; 0123-octal; 0x123-hex).

string parse( int pos, string sep = ".", int off = 0 ); — gets a token with the number pos from the string when separated by sep and from the offset off. Result offset is returned back to off.

string parseLine( int pos, int off = 0 ); — gets a line with the number pos from the string and from the offset off. Result offset is returned back to off.

string parsePath( int pos, int off = 0 ); — gets a path token with the number pos from the string and from the offset off. Result offset is returned back to off.

string trim( string cfg = " \n\t\r" ); — trims the string at the begin and the end for the symbols cfg.

2.1Array object

Peculiarity of the array is that it works with the properties like with the indexes, and complete their naming if senseless, and hence the mechanism of addressing is available only by the conclusion of the index in square brackets "arr[1]". Array stores the properties in its own container of one-dimensional array. Digital properties of the array are used to access directly to the array, and the character ones work as the object properties.

Array provides the special property "length" to get the array size "var = arr.length;". Also array provides the following functions:

Array concat( Array arr ); — adds to the initial array the elements of the arr array. Returns the initial array with changes.

int push( ElTp var, ... ); — places the element(s) var to the end of the array, as to the stack. Returns the new array size.

ElTp pop( ); — deletes of the last element of the array and returns of its value, as from the stack.

Array reverse( ); — changes the order of the elements of the array. Returns the initial array with the changes.

ElTp shift( ); — shifts of the array to the top. The first element is removed and its value is returned.

int unshift( ElTp var, ... ); — shifts element(s) var to the array. The first element to the 0, second to the 1 and so on.

Array slice( int beg, int end ); — returns an array fragment from beg to end (exclude). If the value of beginning or end is negative, then the count is made from the end of the array. If the end is not specified, then the end is the end of the array.

Array splice( int beg, int remN, ElTp val1, ElTp val2, ... ); — inserts, deletes or replaces the elements of the array. Returns the removed elements array. Firstly it is made the removing of elements from the position beg and in the quantity of remN, and then the values val1 are inserted and so on, beginning from the position beg.

Array sort( ); — sorts array elements in the lexicographical order.

2.2RegExp object

Object of work with the regular expressions, based on the library PCRE. In the global search sets object attribute "lastIndex", which allows you to continue the searching at the next function call. In the case of an unsuccessful search the attribute "lastIndex" resets to zero.

As arguments for creating the object, a string with regular expression text and a flags box in the form of a character string is passed:

'g' — global match mode;

'i' — case insensitive match mode;

'm' — multi-line match mode;

'u' — compulsion for UTF-8 characters resolution, for other locales;

'p' — testing the expression by the usual template rule with the key characters: '?', '*' and '\'.

Object properties:

source — original pattern of the regular expression, read-only.

global — flag of the global matching, read-only.

ignoreCase — flag of disabling of the case sensitivity, read-only.

multiline — flag of the multiline searching, read-only.

UTF8 — flag of using UTF-8 characters, read-only.

lastIndex — index of a character of the substring from the last search. Used in the global mode to continue the match, at next call.

Object functions:

Array exec( string val ); — calls match for string val. Returns found sub-string (0) and sub-expressions (>0) in the array. Sets attribute "index" of the array to the matched substring position. Sets the attribute "input" of the array to the source string.

XMLNodeObj clear( bool full = false ) — clears the node for the childs, removes the text and attributes for full.

int childSize( ) — quantity of the included nodes.

XMLNodeObj childAdd( ElTp no = XMLNodeObj ); XMLNodeObj childAdd( string no ) — addition of the object no as the included one. no may be the direct object-result of the function "SYS.XMLNode()", and the string with the name of a new tag. Returns the included node.

XMLNodeObj childIns( int id, ElTp no = XMLNodeObj ); XMLNodeObj childIns( int id, string no ) — insert of the object no as the included one to the position id. no may be the direct object-result of the function "SYS.XMLNode()", and the string with the name of a new tag. Returns the embedded node.

XMLNodeObj childDel( int id ) — deletes the included node from the position id. Returns the current node.

XMLNodeObj childGet( int id ) — gets the included node in the position id.

XMLNodeObj childGet( string name, int num = 0 ) — gets the included node with the tag name and the position number num.

3Program-system (SYS)

Object functions:

{string|int} system( string cmd, bool noPipe = false ); — calls the console commands cmd of the OS returning the result by the channel. If noPipe is set then the callback code is returned and program can be started in the background ("sleep 5 &"). The function provides OpenSCADA with a wide range of capabilities by calling any system programs, utilities, and scripts, as well as by providing them with access to a huge amount of system data. For example the command "ls-l" returns the detailed content of the working directory.

string cntrReq( XMLNodeObj req, string stat = "" ); — sends of the control interface request to the program-system via XML. The usual request is written as <get path="/OPath/%2felem"/>. If the station stat is indicated into the request then the request will be send to this external station. The address into the attribute "path" you can obtain into an OpenSCADA configurator, that is into the status line where the address appear at the mouse cursor point to a field of configuration or information. Examples of common queries:

int sleep( real tm, int ntm = 0 ); — puts the execution thread to sleep on the tm seconds (precised up to nanoseconds) and ntm nanoseconds. The sleeping time you can set up to STD_INTERF_TM (5 seconds).

int time( int usec ); — returns the absolute time in seconds from the epoch of 1/1/1970 and the microseconds part into usec if specified.

int utime( ); int mtime( ); — returns the absolute time in microseconds and milliseconds from the epoch of 1/1/1970.

int {localtime|gmtime}( int fullsec, int sec, int min, int hour, int mday, int month, int year, int wday, int yday, int isdst ); — returns the full date in seconds (sec), minutes (min), hours (hour), days of the month (mday), months (month), years (year), days in the week (wday), days in the year (yday) and sign of the summer time (isdst), based on the absolute time in seconds fullsec from the epoch 1/1/1970. gmtime returns time in GMT(UTC).

int {mktime|timegm}( int sec, int min, int hour, int mday, int month, int year, int wday, int yday, int isdst ); — forms the time since Epoch 1/1/1970 from separated seconds, minutes, hours, days, month etc. The values for separated time items can be set out from this typical range, which allows you to use this function during checking, and as a result, units of time will be fixed and rotated in the normal range. timegm runs in time at GMT(UTC).

string {strftime|strftimegm}( int sec, string form = "%Y-%m-%d %H:%M:%S" ); — converts an absolute time sec to the string of the desired format form. Record of the format corresponds to the POSIX-function strftime. strftimegm returns time into GMT(UTC).

int {strptime|strptimegm}( string str, string form = "%Y-%m-%d %H:%M:%S" ); — returns the time in seconds from the epoch of 1/1/1970, based on the string record of time str, in accordance with the specified template form. For example the template "%Y-%m-%d %H:%M:%S" corresponds with the time "2006-08-08 11:21:55". Description of the template format can be obtained from the documentation on POSIX-function strptime. strptimegm works into GMT(UTC) time.

int cron( string cronreq, int base = 0 ); — returns the time, planned in the format of the standard Cron, cronreq, beginning from the basic time base or current, if the basic is not specified.

4Any object (TCntrNode) of OpenSCADA objects tree (SYS.*)

TCntrNodeObj nodeAt( string path, string sep="" ); — Attach to node path into OpenSCADA objects tree. If a separator set into sep then path process as separated string. For missed and invalid nodes the function will return "false" when a correct node in it conversion to BOOLEAN will return "true".

TCntrNodeObj nodePrev( ); — Get previous, parent, node.

string nodePath( string sep = "", bool from_root = true ); — Getting the path of the current node in the object tree OpenSCADA. One separator character is specified in sep to get the path through the separator, for example, "DAQ.ModBus.PLC1.P1.var", otherwise "/DAQ/ModBus/PLC1/P1/var". from_root indicates a need to form a path from the root, and without the Station ID.

int messSys( int level, string mess ) — Formation of the system message mess with the level with the node path as a category and with the human readable path before the message.

5 Subsystem "Security" (SYS.Security)

Functions of the subsystem object (SYS.Security):

int access( string user, int mode, string owner, string group, int access ) — checks for access of the user to resource which owned by the owner and group and for the access and mode:

user — user of the access checking;

mode — access mode (4-R, 2-W, 1-X);

owner — owner of the resource;

group — group of the resource;

access — access mode of the resource (RWXRWXRWX — 0777).

Functions of the object "User" (SYS.Security["usr_{User}"]):

ElTp cfg( string nm ) — gets the value of the configuration field nm of the object.

bool cfgSet( string nm, ElTp val ) — sets the configuration field nm of the object to the value val.

Array groups( ) — returns the groups list of the user

Functions of the object "Users group" (SYS.Security["grp_{Group}"]):

ElTp cfg( string nm ) — gets the value of the configuration field nm of the object.

bool cfgSet( string nm, ElTp val ) — sets the configuration field nm of the object to the value val.

6Subsystem "DB" (SYS.BD)

ElTp cfg( string nm ) — gets the value of the configuration field nm of the object.

bool cfgSet( string nm, ElTp val ) — sets the configuration field nm of the object to the value val.

Array SQLReq( string req, bool tr = EVAL ); — performs the SQL-request req to the DB, inside (tr=true), outside (tr=false) or no matter (tr=EVAL) to the transaction. Returns an array of rows of the result table with the fields both per indexes and column names. At an error the result property "err" sets to the error value.

7Subsystem "DAQ" (SYS.DAQ)

Functions of the subsystem object (SYS.DAQ):

bool funcCall( string progLang, TVarObj args, string prog, string fixId = "" ); — executes the function text prog with the arguments args on the program language progLang and with the function fixing identifier fixId (automatic if it is empty). Returns "true" when it is executed correctly. The fixed function differ from the automatic one by it does not remove after execution and uses repeatedly by an address into fixId, which replaces that original identifier in first call. To recreate the function, you must change the program or clear the fixId in its original id.

Functions of the attribute object of the parameter of the controller (SYS.DAQ["Modul"]["Controller"]["Parameter"]["Attribute"]):

ElTp get( int tm = 0, int utm = 0, bool sys = false ); — gets the attribute value at the time tm.utm and system access flag sys. The time attributes tm.utm is outputs also then real time of the gotten value also places here if their are variables.

ElTp {funcID}(ElTp prm1, ...) — calls the function "funcID" of the library "Lfunc" with the parameters prm{N}. Returns result of the called function. The prefix "lib_" before the library identifier is required!

ElTp call(ElTp prm1, ...) — calls the function "func" of the library "Lfunc" with the parameters prm{N}. Returns result of the called function. The prefix "lib_" before the library identifier is required!

bool attrAdd( string id, string name, string tp = "real", string selValsNms = "" ) [for enabled parameter of the logical type] — adds the attribute id with the name name and the type tp. If the attribute is already present, the properties will be applied that can be changed on the go: name, selection mode and selection options.

string messIO(string pdu) — sends pdu through the transport of the controller object by means of the ModBus protocol. PDU query result is placed instead of the query pdu, and the error returned by the function.

The object "Parameter" [this]

bool attrAdd( string id, string name, string tp = "real", string selValsNms = "" ) [for enabled parameter of the logical type] — adds the attribute id with the name name and the type tp. If the attribute is already present, the properties will be applied that can be changed on the go: name, selection mode and selection options.

8 Subsystem "Archives-History" (SYS.Archive)

Functions of the subsystem object:

Array messGet( int btm, int etm, string cat = "", int lev = 0, string arch = "", int upTm = 0 ); — requests of the program messages or alarms for the time from btm to etm for the category cat, level lev (-7...7) and archivers arch (separated by the symbol ';'; "" — buffer and archivers; "<buffer>" — buffer; "{ArhMod}.{Arh}" — concrete archiver of the module). upTm sets the operation continuance limit to time; a negative value used as relative time; less to STD_INTERF_TM (5). Returns time of stopping of the reading (attribute "tm" of the array) and an array of the message objects with the preset attributes:

string messIO( string mess, real timeOut = 0, int inBufLen = -1 ); — sends the message mess via the transport with the waiting time of the response timeOut (in seconds) and reads an response (Buffer) in inBufLen byte. In the case of a zero timeout, this time is taken from the settings of the output transport. The timeOut in negative (< -1e-3) disables the transport request/respond mode and allows for independent reading/writing to a buffer IO, with the reading timeout timeOut in absolute. For negative inBufLen the buffer size sets to STR_BUF_LEN(10000) and "0" disables the reading at all. If your transport means getting data in parts for a request then for several devices on single bus-transport, use the function into single thread but there is not a way to lock the transport into the user API. Single thread that is any object of controller of DAQ and the module "User protocol" locks the transport internally before self user procedures execution.

rez = SYS.Transport.Serial.out_ttyUSB0.messIO(SYS.strFromCharCode(0x4B,0x00,0x37,0x40),0.2);
//Wait for all the message tail by timeout and empty result
while((trez=SYS.Transport.Serial.out_ttyUSB0.messIO("")).length) rez += trez;

string messIO( XMLNodeObj req, string prt ); — sends the requests req to the protocol prt to perform a communication session through the transport and in assistance of the protocol.

rcode — HTTP result code, like to "200 OK"; empty value there disables addition of the HTTP header;

httpattrs — additional HTTP-attributes, mostly this is "Content-Type" which by default sets to "text/html;charset={SYS}"; only for "Content-Type: text/html" will do wrapping to internal/service or force forceTmplFile HTML-template;

TCntrNodeObj wdgAt( string wid, bool byPath = false ) — attach to child or global, by byPath, widget. In the case of global connection, you can use absolute or relative path to the widget. For starting point of the absolute address acts the root object of the module "VCAEngine", which means the first element of the absolute address is session identifier, which is omitted. The relative address takes the countdown from the current widget. Special element of the relative address is an element of parent node "..".

TCntrNodeObj attrSet( string attr, ElTp vl, bool toSess = false ) — value of the attribute attr of the widget setting to vl, or to the session toSess. The object is returned for the function concatenation.

string link( string attr, bool prm = false ) — the link return for the widget's attribute attr. At set prm requests the link for the attributes block (parameter), represented by the attribute.

string linkSet( string attr, string vl, bool prm = false ) — the link set for the widget's attribute attr. At set prm makes the link set for the attributes block (parameter), represented by the attribute.

string mime( string addr, string type = "" ) — the "mime" object by the address addr (the direct link to the resource or the widget's attribute contained the link) getting with the type to type, from the session table or the source. It is designed for the "mime" objects edition and that substitution to this session's context, for example, images SVG.

ElTp {funcID}(ElTp prm1, ...) — call the library function {funcID}. Return result of the called function.

The object "User function" (SYS.Special.FLibComplex1["funcID"])

ElTp call(ElTp prm1, ...) — call the function with parameters <prm{N}>. Return result of the called function.

13 Libraries of the user functions

Currently, OpenSCADA has libraries of the user functions written using this API user. Some of them are designed for exclusive use with this API. All user libraries are presented in the following table: