• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

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

    [ANSWERED] Retrieving Hex values from a TCP in

    How To... ?
    2
    6
    947
    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.
    • M
      madido last edited by DusX

      Hello,

      if I use TCP In Watcher -Text to retrieve a TCP message from a camera I cannot obtain the Hex data, but the Ascii.

      I see in monitor the Hex string but I cannot have it as text in TCP Watcher.

      I'm using parsing command msg:string={ 00-FF }

      Any suggestion?

      Thank you

      Stefano

      DusX 1 Reply Last reply Reply Quote 0
      • DusX
        DusX Tech Staff @madido last edited by

        @madido

        Can you please stake a screen capture of your Montior window, showing the incoming values?

        Troikatronix Technical Support

        • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
        • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
        • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

        Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

        M 1 Reply Last reply Reply Quote 0
        • M
          madido @DusX last edited by

          @dusx

          Hi,

          here it is, I would like to parse the hex command (in this case 90 50 0000 00 0C FF), I will use this to obtain parameters from a PTZ camera. (Visca protocol)

          Thank you

          Stefano

          DusX 1 Reply Last reply Reply Quote 0
          • DusX
            DusX Tech Staff @madido last edited by DusX

            @madido

            This is a little tricky.. I am not well versed in the Serial parsing syntax.
            The best I could come up with is:

            val1:int=1 bytes
            val2:int=1 bytes
            val3:int=1 bytes
            val4:int=1 bytes
            val5:int=1 bytes
            val6:int=1 bytes
            val7:int=1 bytes
            val8:int=1 bytes

            This will give you a decimal output for the first 8 hex values.

            Then you can feed the Decimal into a Javascript actor and convert it to HEX.

            function main()
            {
            hex = arguments[0].toString(16);
            if (hex.length > 1) {
            val = hex;
            }else{
            val = "0" + hex;
            }
            return [val,hex.length];
            }
            

            The output didn't include the leading zero by default, so I added the quick IF test to insert a '0'.

            Troikatronix Technical Support

            • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
            • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

            Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

            M 1 Reply Last reply Reply Quote 0
            • M
              madido @DusX last edited by

              @dusx

              That syntax in TCP In Watcher (val1:int=1 bytes...) doesn't work for me the msg rcv doesn't react and all parameters remain 0...

              Sorry, but I'm not very good with this...

              Thank you

              Stefano

              DusX 1 Reply Last reply Reply Quote 0
              • DusX
                DusX Tech Staff @madido last edited by

                @madido

                Please try running the attached file.

                This file works for me.. and I don't see why the incoming data would be managed any differently in your case.

                let me know if this file works for you

                Troikatronix Technical Support

                • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

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