Confused: TP Buffers
jjames
Posts: 2,908
Okay, so I had page tracking on an 8400, and uploaded the same pages to a 12in, and then combined the two devices. Now, page tracking isn't working for either of them. When I combine two devices, can't you get page tracking? If you can, how so?
0
Comments
DATA_EVENT[Panel]
{
STRING:
{
DATA.TEXT
}
}
Will work with combined devices for the specific device, too (ONLINE/OFFLINE does).
Create a virtual device. Make the virtual the first device in the combine statement, then the physical devices to be combined after, or combine an array of physical devices with he virtual.
Done like that, the STRING handler for the DATA_EVENT on the virtual contains all your message from all the panels combined with it. Likewise all references to the virtual will act on and get feedback from any and all of the physical devices combined with it.
However, a great deal of COMBINE functionality can be done without actually combining anything. Just make an array of all your physical devices, and actions performed with the array name will act on all the devices, and you can also get feedback exactly as if they were combined. The advantage of doing it this way is that you can still act on individual devices by referencing the device directly, it's only references to the array that act on all of them. Also, a single DATA_EVENT block on the array can handle all your responses as a group, and if you need to handle something slightly differently for various devices, you can use GET_LAST on the array name to see precisely which device triggered the event. I am moving more and more towards using arrays rather than combines, and find few situations where it doesn't work better for me.
Setup your TP devices in a DEV array
DEFINE_DEVICE
dvTP1 = 10001:1:0
dvTP2 = 10002:1:0
dvTP3 = 10003:1:0
DEFINE_VARIABLE
DEV dMAIN[] = { dvTP1, dvTP2, dvTP3 }
Now if you want to talk to all of them:
SEND_COMMAND to dMAIN,
If you only want to talk to the third panel:
SEND_COMMAND to dMIAN[3]
If you setup an array to hold locations of your panels, you can use FOR loops to see which panels are viewing what sections of your code (security, lights, ect.).
ex:
([tp1,1]..[tp1,5])
([tp2,1]..[tp2,5])
([tp3,1]..[tp3,5])
this works just fine. Thanks for everyone's help.
Also, I would try to stay away from using ''mutually exculsive" and do your feedback in the Define_Program.
And lastly, instead of always using
Index = GET_LAST(TPS)
OFF[TPS[Index],899]
you can use
OFF[Button.Input.Device,899]