From OpenSCADAWiki
Jump to: navigation, search

The overall scenario of the user's page request:

  • External network station generates an HTTP request with the following form of URI "/WebUser/{UserPage}" which falls on the OpenSCADA transport with the value of the configuration field "Protocol" equal to "HTTP".
  • Transport sends the request to the module of the transport protocol "Protocol.HTTP".
  • The transport protocol module, in accordance with the first element of the URI, sends the request to this module.
  • This module selects the object of the user's page which is specified in the second element of the URI.
  • Initialization of the HTTP-protocol variables for the page procedure is made:
    • HTTPreq — is set to value of the HTTP-Method (like to "GET", "POST"), depending on the request type;
    • url — address of the requested resource (URI);
    • page — the input single content and the sending page for the method "POST";
    • sender — address of sender of the request;
    • user — identifier of the authenticated user, if the authentication has occurred;
    • HTTPvars — parsed list of variables of the HTTP-protocol in the form of object's properties;
    • URLprms — parsed list of the URL parameters in the form of object's properties;
    • cnts — parsed content's items for POST, in the Array <XMLNodeObj>, with the elements content in the text and properties, in the XMLNodeObj attributes.
  • Calling the procedure for execution, which, having processed the request, forms the page content in the "page" and the request result in the "rez".
  • At the end, the answer is formed with the return code of the HTTP from "rez" and with the content from the "page", and also with changed and appended variables of the HTTP-protocol from "HTTPvars". For empty "rez" the answer is not generated!