Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
en:mervis-ide:65-webpanel:webpanel-api [2017/06/21 13:29]
m.chlupac [Response]
en:mervis-ide:65-webpanel:webpanel-api [2019/05/21 09:45]
m.chlupac [Request]
Line 7: Line 7:
 ==== Request ==== ==== Request ====
  
-Data 
 <code js>{ <code js>{
   ver : 1,//version   ver : 1,//version
Line 28: Line 27:
 ==== Request ==== ==== Request ====
  
-Data+**URL:** ''http://[ip-address-of-the-plc]/values.cgi'' 
 <code js>{ <code js>{
   ver : 1,//version   ver : 1,//version
Line 41: Line 41:
   * variable ID is unique string - in future, may be different for different platforms/protocol versions (uPLC - int?, SharkRT - string)   * variable ID is unique string - in future, may be different for different platforms/protocol versions (uPLC - int?, SharkRT - string)
  
-=== Variable specification for RT2 ===+=== Variable specification for Mervis RT ===
  
   * svc - protocol   * svc - protocol
Line 51: Line 51:
 the POST body can be: the POST body can be:
  
-  - JSON string (AngularJS default behaviour): +  - JSON string (AngularJS default behaviour): <code js>{"ver":1,"c":{"u":"karel","p":"x"},"v":["svc://defaultConnection/myVarId1","svc://otherConnection/xxxYYYYDDD"]}</code> 
-<code js>{"ver":1,"c":{"u":"karel","p":"x"},"v":["svc://defaultConnection/myVarId1","svc://otherConnection/xxxYYYYDDD"]}</code> +  - converted into POST parameters (jQuery default behaviour):<code>ver=1&c%5Bu%5D=karel&c%5Bp%5D=x&v%5B%5D=svc%3A%2F%2FdefaultConnection%2FmyVarId1&v%5B%5D=svc%3A%2F%2FotherConnection%2FxxxYYYYDDD</code>
-  - converted into POST parameters (jQuery default behaviour): +
-<code>ver=1&c%5Bu%5D=karel&c%5Bp%5D=x&v%5B%5D=svc%3A%2F%2FdefaultConnection%2FmyVarId1&v%5B%5D=svc%3A%2F%2FotherConnection%2FxxxYYYYDDD</code>+
  
-The best solution would be to support both versions. Easier is now the JSON string. 
  
 ==== Response ==== ==== Response ====
Line 75: Line 72:
 === Encoding of values - version 1 === === Encoding of values - version 1 ===
  
-Ea  Unordered List Itemch value is transmitted as a big endian binary representation of the specified variable (and its offset and length).+  Each value is transmitted as a big endian binary representation of the specified variable (and its offset and length).
  
 ===== Command Request ===== ===== Command Request =====
Line 129: Line 126:
  
 <code js>{ <code js>{
- ver : 1,//version +  ver : 1,//version 
-platform: “uPLC”, +  platform: “uPLC”, 
-maxVariablesInRequest: 5, +  maxVariablesInRequest: 5, 
-maxRequestSize: 1500, //http body size in bytes +  maxRequestSize: 1500, //http body size in bytes 
-preferedLanguage: “en-US”+  preferedLanguage: “en-US”
 }</code> }</code>
  
  • © Energocentrum Plus, s.r.o. 2017 - 2024