From OpenSCADAWiki
Jump to: navigation, search
Other languages:
Constr.png The translation checking and actualizing
Module Name Version License Source Languages Platforms Type Author Description
SelfSystem Self protocol of OpenSCADA 1.2 GPL2 prot_SelfSystem.so en,uk,ru,de x86,x86_64,ARM Protocol Roman Savochenko
Maxim Lysenko (2012) — the page translation
Provides self OpenSCADA protocol based at XML and one's control interface.

The module of the transport protocol SelfSystem is designed to reflect the interface management of OpenSCADA system to the network, to provide an opportunity to the external systems to interact with the OpenSCADA system, as well as for the interaction of the stations constructed on the basis of OpenSCADA among themselves.

The first experience of using the functions of this module was the support of remote configuration of one OpenSCADA station from another through the network, by means of the module of configuration QTCfg.

1 The syntax of the protocol

The protocol is built on the mechanism of request-response. Requests and their structure are summarized in Table 1.

Table 1 Structure of the request.

Requests

REQ: "SES_OPEN {user} {password}\n"
REZ OK: "REZ 0 {ses_id}\n"
REZ ERR: "REZ 1 Auth error. User or password error.\n"
The request for the opening of the session on behalf of the user user with the password password. In case of success it will be received the session identifier, 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{control interface command}"
REQ 2: "REQDIR {user} {password} {req_size}\n{control interface command}"
REZ OK: "REZ 0 {rez_size}\n{control interface command result}"
REZ ERR: "REZ 1 Auth error. Session is not valid.\n"
REZ ERR: "REZ 2 {control interface err}"
The main requests: the session and the direct are implemented by sending the standard command of OpenSCADA control interface to the field control interface command. As the result will it be received an answer from the management interface control interface command result or one of the errors.

REQ: "ERR REQUEST"
REZ ERR: "REZ 3 Command format error.\n"
Any invalid request.

Protocol supports the package of traffic. Only the data of the management interface is to be packed control interface command and control interface command result. The fact of the arrival of packaged request or response is determined by the negative value of the size of the request req_size or response rez_size.

To control the parameters of the package the module provides the configuration form (Fig. 1).

Fig.1. Form of the configuration of the module parameters.

On this form, you can:

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

2 The internal structure of an outgoing protocol

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

rqDir — sign of the sending the message passing the procedure of the opening the session (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 tree of XML language of the management interface of OpenSCADA.