0

Brightsign UDP String Manipulation

Hi all,

Wondering if anybody had written a plugin or come up with some other way of doing simple string manipulation on incoming UDP messages.

We are currently working on integrating with a predefined control system, which ends all messages with \x0D (<CR>) and need to recieve \x0D on the end of any messages sent back from the Brightsign.

Adding \x0D to outgoing messages is quite simple, but I was wondering if anybody had already looked how to strip this from a incoming message so I can map incoming messages straight to variables such as volume control without need for lots of conditional rules.

Regards,

Callum

1 comment

  • 0
    Avatar
    Adam

    Hi Callum

    i have something setup like that as part of a larger plugin

    where a incoming string matches a particular pattern it will strip out a particular part and put it in a variable

    BA supposedly does something similar with their wild card matching but it never worked well and relied on the sender to conform to BAs message format.

    from my notes (havent used it in a while) it worked like this

    ' if  var between <> exists  and matches string between <>  then put string between {} into the var between {} '
    '$#<SELECTED-UNITID>,STATUS-STATE={SELECTED-UNIT-STATUS-STATE}'

     

    you first add a match to the config for example

    '$#<SELECTED-UNITID>,STATUS-STATE={SELECTED-UNIT-STATUS-STATE}'

    then if the string below was received

    #MainUnit,STATUS-STATE=RUNNING

    and the value of variable SELECTED-UNITID equaled 'MainUnit'

    then the variable of  SELECTED-UNIT-STATUS-STATE would be set to 'RUNNING'

    is that close to what your looking for?

     

Please sign in to leave a comment.