• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Decode api.cgi vars

    Mervis
    2
    3
    1537
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      Giamba last edited by

      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 javascript

      Thanks in avance.

      T 1 Reply Last reply Reply Quote 0
      • T
        tomas_hora administrators @Giamba last edited by

        Hello @Giamba, I have put the file on our downloads site under SW-Mervis-Documentation-WebPanel-HMI-Fastcgi-dataexchangeformats.pdf

        Hope it helps

        1 Reply Last reply Reply Quote 0
        • G
          Giamba last edited by

          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

          1 Reply Last reply Reply Quote 1
          • First post
            Last post