DX NetOps

  • 1.  Event variable is octet string, is it possible to check it as integer?

    Posted Dec 14, 2015 08:08 AM

    Hi everyone,

     

    I've configured an Event Condition for an event that has a variable which is an octet string. The value of this string is a number such as 873 or 12309. Is it possible to check if that variable is equal to, greater than or smaller than an integer/real number?


    For example I'd like the event condition to read:

    {v 1} < {S 100}

     

    or something equivalent.

     

    I can't get this to work. I'm running Spectrum 9.4.2.1.

     

    Thanks for the help!



  • 2.  Re: Event variable is octet string, is it possible to check it as integer?
    Best Answer

    Posted Dec 14, 2015 10:45 AM

    The problem is the event rules do not have any functionality to convert an octet string to an integer. OneClick does when viewing an octet string in a subview by specifying a renderer in the xml file which converts the octet string into readable text. However, that functionality does not exist within an event rule.



  • 3.  Re: Event variable is octet string, is it possible to check it as integer?

    Posted Dec 15, 2015 10:25 AM

    I see, thanks Joseph.

     

    At the moment my workaround is to use regex to limit values. This works well although is harder to manage and understand.



  • 4.  Re: Event variable is octet string, is it possible to check it as integer?

    Posted Dec 22, 2015 01:49 PM

    and compare it with another octet string is posible ? lower than, equal than, etc.

    or maybe.. the event rule save it on an attribute and then check it with a watch. im not sure.

     

    Good luck !

    Diego MP



  • 5.  Re: Event variable is octet string, is it possible to check it as integer?

    Posted Dec 23, 2015 07:43 AM

    I resolved this by creating an event procedure (eg. event 0xfffddd0) which set an event variable for a different event (eg. event 0xfffddd1) by casting the octet string to unsigned integer via ToUInteger(). Then I used an event rule on that new event, works like a charm.