Using Variables in M2M communication
myer0244
Posts: 34
Hello all,
Just wanted to know if it is possible to set a variable on one central controller and look at that same variable from another central controller using M2M communication? If so, how would you do it?
Thanks!
Just wanted to know if it is possible to set a variable on one central controller and look at that same variable from another central controller using M2M communication? If so, how would you do it?
Thanks!
0
Comments
Level on a virtual device.
Rather than relying on shooting raw info between the masters you may also want to look at your system architecture to see if you can encapsulate functionality and let things play nice between a group of modules using a set of defined API's (whether that be SNAPI, or one of your own design). This will allow you to request only the data you need when required through virtual devices - again if you are needing any complex data types they can be serialized.
If you're using duet then there a lot more sexy ways of handling this too...
For strings, you can pass messages among the virtual devices very easily as well, and you can use the virtual devices as an interface for one system to request action from another; a paradigm I use all the time when I have local theaters acting as zones on a multi-room audio system that has a separate master.
It's only when you have to share complex data, like structures or multi-level arrays that it gets hairy. But honestly, I try to design my systems so that never comes up.
I have a question along this same topic. In my building, there is one Master Master that all of the sub masters talk to. The Master Master controls a Pesa Cheetah 512 x 512 video matrix. Each sub master has an 8 x 8 Pesa video matrix in their rooms. I need to pass vairables from the Master Master to the sub-masters when they need it. For example, the 512 x 512 matrix has a DSS head end as poart of its inputs. So, if Room 1 wants to watch CNN here's what happens:
Room 1 asks for CNN.
Each room has multiple outputs from the 512 matrix, so the user is also asked what tie line they want to use for CNN.
For room 1, we'll say inputs 1 - 4 on the local matrix are tied to outputs 40 - 43 of the 512 x 512 matrix.
Once the user selects a tie line, room 1 sends a command to a virtual device.
SEND_COMMAND vdvDEVICE, 'ROUTE=DSS 1 PORT x' (Port x equals the input of the local matrix)
Room 1 sends a command to a virtual device on the Master Master that represents room 1.
The Master Master uses a DATA_EVENT to parse the data rx'd on the vdvDEVICE:
Now the Master Master knows which room asked for CNN and which port they are using. The fnDoRoute builds the string to send to the 512 x 512 matrix and now, room 1 is watching CNN.
I want to pass the feedback from the 512 x 512 matrix to the sub-master. The sub-master, via direct feedback, would then place the CNN logo on the appropriate button on the TP and that's what I am not quite sure how to do. If Room 1 has 4 outputs from the 512 x 512 matrix, I was thinking on the sub-master I need to create an array with each index representing individual tie lines. If the user wanted CNN on tie line 3, then everywhere they sent tie line 3, the CNN logo would display. How can I populate that array? Once I get the array populated, I'm good from there. I just need a push in the right direction. There are over 100 sub-masters communicating with the Master Master, so I was thinking each room's array needs to be updated only when that room makes a change vice all of the sub-masters trying to talk to the Master Master at once. Thanks.
Create a common inlcude file for the arrays or structures and pull it into every master so your arrays or structures are guaranteed idenctical across the entire system. If the file is ever changed you'll need to re-compile and update every master.
We have mostly completed a large residence with an NI-3100 master running the whole affair, several NI-2100s throughout the house, and 1 NI-900 controlling the client's young son's bedroom media system. We are using an RF remote and AxLink interface in the son's room and his entire project is running on the NI-900.
The client has asked us for a button on his Master Bedroom MVP-5200i that will allow him (Dad) to disable the son's system to enforce "no TV time". I can think of a couple of solutions if everything were running on one master, but with the son's system on a separate master, I'm stymied.
For the remotely located NI-2100s I simply loaded a blank file onto each so that they would be doing something and am only using them as remotely located RS232 and IR ports. The son's NI-900 is connected to the NI-3100 but the only feature we originally programmed was including this room in a single "whole house off" macro.
I think what I need is the correct syntax for a variable that can be set from the client's bedroom that will be checked by the son's master before executing any system on macros.
Any help is appreciated.
Shane