Pass a STRUCTURE into a module?
Comments
-
Joe: nice job on the testMod! I use the saveToXML in my mods instead of the non-existing persistent variables.Joe Hebert wrote:Sure it will. As AMXJeff stated earlier:
It works perfectly! Here?s an example where the main program or the module can alter the data and they will both stay in sync.
What I've been trying to say is: you can't use the variable in real time, you have to request their values everytime. Think about this, I want to create a module for a security system that needs to check if a TP is viewing that section, so everytime a zone trips I loop all the TPs, if one is on the security zone page, I update that touchpanel. I would have to request the VARIABLE_TO_STRING everytime a zone trips even if no TPs were viewing that section. -
GSLogic wrote:
Since you're problably handling page & pop up flips in and out of the security section somewhere in your main code outside of the security module I would think a better way would be to send a string to the module at the same time as the send_command for the page flip stating what TP just flipped in or out of the security section. Parse the string in the module and convert the string D:P:S to a D:P:S and use Daves combine/uncombine devArray function which he posted a while back to handle feeback to panels that are actively on a security page.so everytime a zone trips I loop all the TPs,
Of course right now I just send it to every TP regardless but then again I'm not working on any mega TP jobs like you but if I were or if I had more time to do things right some thing like this would be very appropriate. -
I understand what you are saying and it is a good idea but, I also track many other things the TPs are viewing. I can look in my TP structure and see what section, menu, group, source, location and other preferences each TP holds. I use one TP design for all my TPs and use the prefs to change what each TP can view. I used to use the combine method years ago and changed to the DEV array approach since the panels can be more independent.vining wrote:GSLogic wrote:Since you're problably handling page & pop up flips in and out of the security section somewhere in your main code outside of the security module I would think a better way would be to send a string to the module at the same time as the send_command for the page flip stating what TP just flipped in or out of the security section. Parse the string in the module and convert the string D:P:S to a D:P:S and use Daves combine/uncombine devArray function which he posted a while back to handle feeback to panels that are actively on a security page.
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
