Decode api.cgi vars
-
Hi everybody,
I'm developping my own web without HMI because I want to use Javascript/DOJO.
Can you tell me how I can translate variables into readable values from api.cgi.
eg. {"i": "svc://DefaultConnection/16[0,1]", "v": "00", "q": "good", "t": 636319187330000000},
{"i": "svc://DefaultConnection/9178[0,4]", "v": "41B00000", "q": "good", "t": 636319187330000000}
16 or 9178 in the "i" is the variable reference
"q" is the quality I presume
"t" is the timestamp
but how to decode "v" in javascriptThanks in avance.
-
Hello @Giamba, I have put the file on our downloads site under SW-Mervis-Documentation-WebPanel-HMI-Fastcgi-dataexchangeformats.pdf
Hope it helps
-
Hi, thanks for the job.
I found functions in UserJS that do the job:- parseRealFromHex
- parseIntFromHex
- parseValueFromHash
...
Now I have to find how to provide the type to decode in the right way.
I have to look in html5_shark.xsl to modify it
Thanks