Can DEVs be Included in DEVCHANs?
TurnipTruck
Junior Member
DEV dDSET[]={dvDEV1,dvDEV2}
DEVCHAN dcDCSET[]={{dDSET,1},{dDSET,2}}
....Or something to that effect?This is for the sake of generating feedback for groups of buttons on multiple UIs without combining so that I can still know from which device a PUSH came from.
Thank you.
Comments
-
No, you can?t stuff a DEV[] array into a DEVCHAN. It doesn?t fit. A DEVCHAN is a container (a data type/structure ? a block of memory) that only has enough room to hold one DEV and one INTEGER. You can have a DEVCHAN[] array (a bunch of these containers) but each item in the array has to be one DEV and one INTEGER (one DEVCHAN.)
I don?t use DEVCHANs myself (not that there is anything wrong with them) but instead I opt to keep the DEVs separate from the channels/buttons and do something like this.DEFINE_DEVICE dvTP1 = 10001:1:0 dvTP2 = 10002:1:0 DEFINE_CONSTANT INTEGER nButtons[] = {2,4,6} DEFINE_VARIABLE DEV dvTPs[] ={dvTP1,dvTP2} DEFINE_EVENT BUTTON_EVENT[dvTPs,nButtons] { PUSH: { //to find out which device generated the push you can use //BUTTON.INPUT.DEVICE //or to find out the index into the array of devices you can use //GET_LAST(dvTPs) //to find out which button was pushed you can use //BUTTON.INPUT.CHANNEL //or to find out the index into the array of buttons you can use //GET_LAST(nButtons) } }
HTH -
Nice! I like the method you are using.
Thanks for the info! It's well worth the cost of admission to these forums!
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums