From OpenSCADAWiki
Jump to: navigation, search

For the direct processing procedure, and the required or optional ones to create in the template, the following exchange attributes with the HTTP-protocol are predetermined:

  • Result (rez) <String> — processing result, by defaults — "200 OK"; in the DAQ-Template mode you must write thither directly, not by the operator "return"; to prevent sending a HTTP-wrapped response, put an empty string here, that is, send the response directly via SYS.Transport["Modul"]["in_Transp"].writeTo();
  • HTTP request (HTTPreq) <String> — the HTTP request method like to GET, POST, ...;
  • URL (url) <String> — URI of the request;
  • WWW-page (page) <String> — content of the Get/Post page for the request and respond as well;
  • Sender (sender) <String> — request sender;
  • User (user) <String> — authenticated user;
  • HTTP variables (HTTPvars) <Object> — HTTP variables; changed and appended variables (besides "Date", "Server", "Accept-Ranges" and "Content-Length") will be placed to the response package;
  • URL's parameters (URLprms) <Object> — URL parameters;
  • Content items (cnts) <Object::Array<XMLNodeObj>> — content items for POST;
  • This object (this) <Object> — pointer to this page's object;
  • Protocol's object (prt) <Object> — pointer to the input part object of the HTTP protocol;
  • Transport's object (tr) <Object> — pointer to the input transport to the input part object of the HTTP protocol;
  • Scheduling the next service call (schedCall) <Integer> — write here the time value in seconds for scheduling the procedure context execution in a service call; At.png the service calls are performed in the periodicity 10 seconds usually, so you can schedule the calls not often than at 10 seconds.