M2M comms
vining
Posts: 4,368
Are all events and send_commands broadcast to all masters in the URL list?
My original thought was that is wasn't and that TP pushes let's say for a TP on system 1 would only be seen by master 1 but now I'm thinking that's not the case at all and I can put event handlers in any master I want to handle events on a button push from a TP with a DPS of any system. So I can have an event handler for dvTP (10001:1:1) in system 2 and it will run fine as long I have dvTP declared as 10001:1:1 in system 2.
Basically all events and send_commands are broadcast to all masters in the URL list and if there is code that applies to something defined in a master it will execute regardless of whether that defined device is defined as being part of that system.
Is this a correct assumption?
My original thought was that is wasn't and that TP pushes let's say for a TP on system 1 would only be seen by master 1 but now I'm thinking that's not the case at all and I can put event handlers in any master I want to handle events on a button push from a TP with a DPS of any system. So I can have an event handler for dvTP (10001:1:1) in system 2 and it will run fine as long I have dvTP declared as 10001:1:1 in system 2.
Basically all events and send_commands are broadcast to all masters in the URL list and if there is code that applies to something defined in a master it will execute regardless of whether that defined device is defined as being part of that system.
Is this a correct assumption?
0
Comments
That said, the rest of your assumptions are correct. You can have an event handler for dvTP (10001:1:1) in system 2 and it will run fine as long as you have dvTP declared as 10001:1:1 in system 2.
And if system 1 code tells button 1 to turn ON while system 2 code is telling button 1 to turn OFF, then you've got a real mess on your hands.
This confirmation does shatter all my preconceived expectation of how it works and thankfully the way it works is more to our favor.
Seeing how I'm too lazy to go back and read previous threads do you guys prefer tracking virtual channels, sending string/command to virtual devices or a combination of both depending on the situation to track variable across the entire system? And if there's another option not mentioned what is it?
Since I started this with my preconceived notions still in tact I set up all my TPs and KPs to live on Sys 1 cuz thats where the majority are equipment, control and code resides and since the other systems for the most part are just for local equipment and with only local TP/KP control I put the comm modules for the local equipment on the local master and then instantiated the UI modules for the local systems on the main system (Sys1). Because of my preconceived ideas I didn't expect this to work with out some further brain storming but much to my suprise and joy it worked perfectly which is what led to re-think what I thought.
I'm not one that typically like to track channels but I guess w/ M2M it's probably the most effiecient and easiest to implement.