Check to see if TP is online
jcerecke
Posts: 40
At the moment I have a variable that changes itself to 1/0 on the online and offline data events from the TP. Is there a way to eliminate the need for this and do something like "if (dvTP = online)"?
0
Comments
If you are truly trying to set something to change on ONLINE or OFFLINE Events, then that's where you should place your variable.
--D
My reasoning is this:
I have a bargraph (or 6) on my TP which controls channels on an audio mixing desk via RS232. When the TP goes offline, it somehow generates a level event of 0 for all bargraphs, which then gets rid of all my audio.
So I want to check if the TP is online when the level event occurs and if it is to change the level else do nothing.
What about just doing if (level.value) then control my mixing desk. However I would use a virtualTP for level control because it does not go off line. Combine the VirtTP with the RealTP.
That is just an issue. When a panel goes offline it sends a level.event 0.
http://amxforums.com/showpost.php?p=22150&postcount=2
No actually, kbeattyAMX is correct. If you combine the physical device(s) level with a virtual device level you WON'T get the level event with value = 0 when the/a physical device goes offline. This is because the virtual device never goes offline and therefore the level is always tracked in memory.
It's possible to combine the levels using COMBINE_LEVELS or COMBINE_DEVICES. Using device arrays is generally better practice/more desirable than combining devices - as such COMBINE_LEVELS would be recommended.
I'm not sure of the context in which you're dealing with the incoming level events, but something along these lines would achieve what you're after:
The same can be achieved for devices which generate channel events when they go offline using COMBINE_CHANNELS.