From OpenSCADAWiki
Jump to: navigation, search
Other languages:
Module Name Version License Source Languages Platforms Type Author Description
SelfSystem Own protocol of OpenSCADA 1.2 GPL2 en,uk,ru,de x86,x86_64,ARM Protocol Roman Savochenko
Maxim Lysenko (2012) — the page translation
Provides own OpenSCADA protocol based at XML and the control interface of OpenSCADA.

The module is intended to reflect the OpenSCADA control interface to the network, in order to allow external systems to interact with OpenSCADA, as well as to interact with each other stations built on the basis of OpenSCADA.

The first experience with using this module's functionality was to support remote configuration of one OpenSCADA station from another, through the network and via the configuration module QTCfg.

1 The syntax of the protocol

The protocol is based on the "Request-Answer" method. The queries and their structure are given in Table 1.

Table 1 Structure of the request.


REQ: "SES_OPEN {user} {password}\n"
REZ OK: "REZ 0 {ses_id}\n"
REZ ERR: "REZ 1 Error authentication: wrong the user or password.\n"
Request to open a session from the username user with the password. In case of success, the session ID will be received, otherwise, the code and the error message.

REQ: "SES_CLOSE {ses_id}\n"
REZ: "REZ 0\n"
Closure of the session. The result is always successful.

REQ 1: "REQ {ses_id} {req_size}\n{command of the control interface}"
REQ 2: "REQDIR {user} {password} {req_size}\n{command of the control interface}"
REZ OK: "REZ 0 {rez_size}\n{result of the command of the control interface}"
REZ ERR: "REZ 1 Error authentication: session not valid.\n"
REZ ERR: "REZ 2 {error of the control interface}"
Basic queries: session and direct. Realized by sending a standard command of the OpenSCADA control interface in the command of the control interface field. The result will be the response of the control interface result of the command of the control interface or one of the errors.

REZ ERR: "REZ 3 Error the command format.\n"
Any invalid request.

The protocol supports the ability to pack traffic. Only the control interface data command of the control interface and result of the command of the control interface are packaged. The fact of receipt of a packed request or response is determined by the negative value of the req_size or the rez_size response. You can define the compression options on the configuration page of the module (Fig. 1).

Fig.1. Main tab of the configuration page of the module parameters.

On this tab, you can:

  • Familiarize the active authentication sessions.
  • Specify life time of the authentication sessions, in minutes.
  • Specify a connection limit for one user from one host.
  • Specify a compression level of the protocol, ranging from 0 to 9 (0-disable the compression, -1-optimal compression level in performance and quality);
  • Specify a lower compression border — threshold for the compression using, turns off the compression of small requests.

2 Internal structure of the output protocol

The internal structure is formed by the XML tree of the requests of the language OpenSCADA control interface with the reservation of the additional service attributes of the protocol in the root tag:

rqDir — sign of the message sending through passing the procedure of the session opening (0-open session, 1-send immediately);
rqUser — user;
rqPass — password;
rqAuthForce — force authentication update;
conTm — force connection timeout.

The result of the request is the XML tree of language of the OpenSCADA control interface.