01-08-2020, 02:01 PM
Local variations are thrown away when the action dies (that means the action that started at the beginning, if it runs global actions they will share the originating action's locals.) That allows you to just create them and not worry about cleaning them up since they are tossed. For anyone familiar with programming languages, they would be 'local variables' that go away when the current function/method call exits.
Globals are around as long as the thing that created that global variable context exists. So the event server has one global variables context that lives until the event server cycles. Each IV has one. In the action trace you can see any global variables that have been created and not cleaned up. So, if you bring up the action trace in the IV, every time you run an action, it'll show all of the global variables for that IV that current exist (and hence could be used by the action being invoked.)
IVs and WebRIVA clients need their own globals because they know nothing of each other and shouldn't have to worry about another IV/WebRIVA client changing or deleting their global variables. They are used to store info for subsequent actions in that client. So a button may set a variable saying, I'm not operating on Zone 1, and all other audio zone actions will look at that and affect that zone, etc...
The same for trigger drivers. Each one assumes he exists alone, and shouldn't have to worry about other trigger drivers interfering with him. He just wants to be able to (if needed) store info for subsequent incoming triggers to use.
Globals are around as long as the thing that created that global variable context exists. So the event server has one global variables context that lives until the event server cycles. Each IV has one. In the action trace you can see any global variables that have been created and not cleaned up. So, if you bring up the action trace in the IV, every time you run an action, it'll show all of the global variables for that IV that current exist (and hence could be used by the action being invoked.)
IVs and WebRIVA clients need their own globals because they know nothing of each other and shouldn't have to worry about another IV/WebRIVA client changing or deleting their global variables. They are used to store info for subsequent actions in that client. So a button may set a variable saying, I'm not operating on Zone 1, and all other audio zone actions will look at that and affect that zone, etc...
The same for trigger drivers. Each one assumes he exists alone, and shouldn't have to worry about other trigger drivers interfering with him. He just wants to be able to (if needed) store info for subsequent incoming triggers to use.
Dean Roddey
Explorans limites defectum
Explorans limites defectum