PDA

View Full Version : Variable watch



Manser
September 5th, 2007, 11:42 PM
I'm wondering if there is something like "NetRemote.RegisterVariableWatch" in girder. I would like to monitoring a girder variable.

Rob H
September 6th, 2007, 01:37 AM
Unfortunately not. There may be another way to handle this though - what is setting the variable?

Manser
September 6th, 2007, 07:52 AM
I wanted to monitor Russound-zone and source for a master / slave matrix on the NR / Audioserver side. I do that now with a simple timer and send the var's to NR if they have changed. That's of course not the best way. Because of that, my question about the possibility of monitoring girder var's.

Rob H
September 6th, 2007, 08:28 AM
Well, using G5's Device Manager that can all be accomplished fairly easily (nay, automatically).

In Girder 4 you could use the same sort of approach that G5/DM takes which is that your Russound plugin would create a Publisher that would publish changes to variables. You'd then have a separate piece of code that subscribes to that publisher and forwards the changes to NR.

Manser
September 7th, 2007, 06:44 AM
Rob, that sounds good, but unfortunately I have no idea how I should do that. :confused:

How do I create a Publisher in the Russound plugin?
And how do I subscribe to that publisher?

Rob H
September 7th, 2007, 07:30 AM
Is this MikeC's Russound plugin?

If so then it probably already has a publisher.

You will probably have a variable called Russsound or RussSound (check the variable inspector).

This should have a Subscribe method, so try something like this :-


RussSound:Subscribe(function(...) print('EVENT:', unpack(arg)) end)