OpenSCADAWiki: Doc/ Self System ...

Home | Index | Changes | Comments | Users | Registration | Login  Password:  
 
This is an old revision of Doc/SelfSystem from 2015-08-02 21:40:39..

Ìîäóëü ïîäñèñòåìû “Ïðîòîêîëû” <SelfSystem>

Ìîäóëü:SelfSystem
Èìÿ:Ñîáñòåííûé ïðîòîêîë ñèñòåìû OpenSCADA
Òèï:Ïðîòîêîë
Èñòî÷íèê:prot_SelfSystem.so
Âåðñèÿ:1.0.1
Àâòîð:Ðîìàí Ñàâî÷åíêî
Îïèñàíèå:Ïðåäîñòàâëÿåò cîáñòâåííûé ïðîòîêîë îñíîâàííûé íà XML è èíòåðôåéñå óïðàâëåíèÿ OpenSCADA.
Ëèöåíçèÿ:GPL

Contents

Ââåäåíèå

Ìîäóëü òðàíñïîðòíîãî ïðîòîêîëà SelfSystem ïðåäíàçíà÷åí äëÿ îòðàæåíèÿ èíòåðôåéñà óïðàâëåíèÿ ñèñòåìû OpenSCADA â ñåòü ñ öåëüþ ïðåäîñòàâëåíèÿ âîçìîæíîñòè âíåøíèì ñèñòåìàì âçàèìîäåéñòâîâàòü ñ ñèñòåìîé OpenSCADA, à òàêæå äëÿ âçàèìîäåéñòâèÿ ñòàíöèé, ïîñòðîåííûõ íà îñíîâå OpenSCADA ìåæäó ñîáîé.


Ïåðâûì îïûòîì èñïîëüçîâàíèÿ ôóíêöèé äàííîãî ìîäóëÿ ñòàëà ïîääåðæêà âîçìîæíîñòè óäàë¸ííîãî êîíôèãóðèðîâàíèÿ îäíîé OpenSCADA ñòàíöèè èç äðóãîé ÷åðåç ñåòü ïîñðåäñòâîì ìîäóëÿ êîíôèãóðèðîâàíèÿ QTCfg.

1. Ñèíòàêñèñ ïðîòîêîëà

Ïðîòîêîë ïîñòðîåí ïî ìåõàíèçìó çàïðîñ-îòâåò. Çàïðîñû è èõ ñòðóêòóðà ñâåäåíû â òàáëèöå 1.


Òàáëèöà 1 Ñòðóêòóðà çàïðîñà.

Çàïðîñû
REQ: "SES_OPEN {user} {password}\n"
REZ OK: "REZ 0 {ses_id}\n"
REZ ERR: "REZ 1 Auth error. User or password error.\n"
Çàïðîñ íà îòêðûòèå ñåññèè îò èìåíè ïîëüçîâàòåëÿ user ñ ïàðîëåì password.  ñëó÷àå óäà÷è áóäåò ïîëó÷åí èäåíòèôèêàòîð ñåññèè, èíà÷å — êîä è ñîîáùåíèå îá îøèáêå.
REQ: "SES_CLOSE {ses_id}\n"
REZ: "REZ 0\n"
Çàêðûòèå ñåññèè. Ðåçóëüòàò âñåãäà óäà÷åí.
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 no valid.\n"
REZ ERR: "REZ 2 {control interface err}"
Îñíîâíûå çàïðîñû: ñåàíñîâûé è ïðÿìîé. Ðåàëèçóþòñÿ ïóò¸ì îòïðàâêè ñòàíäàðòíîé êîìàíäû èíòåðôåéñà óïðàâëåíèÿ OpenSCADA â ïîëå control interface command.  ðåçóëüòàòå áóäåò ïîëó÷åí îòâåò èíòåðôåéñà óïðàâëåíèÿ control interface command result èëè îäíà èç îøèáîê.
REQ: "ERR REQUEST"
REZ ERR: "REZ 3 Command format error.\n"
Ëþáîé íåêîððåêòíûé çàïðîñ.

Ïðîòîêîëîì ïîääåðæèâàåòñÿ âîçìîæíîñòü óïàêîâêè òðàôèêà. Ïàêóþòñÿ òîëüêî äàííûå èíòåðôåéñà óïðàâëåíèÿ control interface command è control interface command result. Ôàêò ïðèõîäà óïàêîâàííîãî çàïðîñà èëè îòâåòà îïðåäåëÿåòñÿ îòðèöàòåëüíûì çíà÷åíèåì ðàçìåðà çàïðîñà req_size èëè îòâåòà rez_size.


Äëÿ óïðàâëåíèÿ ïàðàìåòðàìè óïàêîâêè ìîäóëåì ïðåäîñòàâëÿåòñÿ ôîðìà êîíôèãóðàöèè (ðèñ.1).


Ôîðìà êîíôèãóðàöèè ïàðàìåòðîâ ìîäóëÿ. (90 Kb)
Ðèñ.1. Ôîðìà êîíôèãóðàöèè ïàðàìåòðîâ ìîäóëÿ.

Íà äàííîé ôîðìå ìîæíî:

2. Âíóòðåííÿÿ ñòðóêòóðà èñõîäÿùåãî ïðîòîêîëà

Âíóòðåííÿÿ ñòðóêòóðà ôîðìèðóåòñÿ äåðåâîì XML çàïðîñîâ ÿçûêà èíòåðôåéñà óïðàâëåíèÿ OpenSCADA ñ ðåçåðâèðîâàíèåì äîïîëíèòåëüíûõ ñëóæåáíûõ àòðèáóòîâ ïðîòîêîëà â êîðíåâîì òåãå:

rqDir — ïðèçíàê îòïðàâêè ñîîáùåíèÿ, ìèíóÿ ïðîöåäóðó îòêðûòèÿ ñåàíñà (0-îòêðûâàòü ñåàíñ, 1-îòñûëàòü ñðàçó);
rqUser — ïîëüçîâàòåëü;
rqPass — ïàðîëü;
conTm — ïðèíóäèòåëüíûé òàéìàóò ïîäêëþ÷åíèÿ.

Ðåçóëüòàòîì çàïðîñà òàêæå ÿâëÿåòñÿ äåðåâî XML ÿçûêà èíòåðôåéñà óïðàâëåíèÿ OpenSCADA.

Ññûëêè

Referring pages: Doc
Doc/OpenSCADA060
Function
Using/PLC/firmware


 
There are no files on this page.[Display files/form]
There is no comment on this page. [Display comments/form]