Virtual TouchPanels?
mpullin
Obvious Troll Account, Marked for Deletion
I'm exploring the possibility of creating a virtual device and having it function like a phantom touchpanel. For instance:
Here's the question: can I generate Button_Events on a virtual device?
For instance, if someone pushes 47 one of my real TPs, I want that to push 1 on my phantom TP, which will then cause the desired reaction from the UI Module, in this case the MAX's.
If so, how?
DEFINE_DEVICE vdvMEDIAPLAY = 35000:1:0 vdvPHANTOMTP = 35001:1:0 DEFINE_MODULE 'AMX_MAX4PLUS_UI' AMX_MAX4Plus_UI3 (vdvMEDIAPLAY,vdvPHANTOMTP,TP_BUTTONS,TP_FIELDS,nUI3_DEFAULT_ZONE,nUI3_DEF_ASPECT,nUI3_DEF_AUDIO,strIP_ADDRESS,UI3_LISTS)This would allow me to use other people's UI files without having to modify them so that the button definitions fit my interface, or having to change my interface if I need to swap modules. Also, no need to have multiple instances of the module in my code for each touchpanel I have.
Here's the question: can I generate Button_Events on a virtual device?
For instance, if someone pushes 47 one of my real TPs, I want that to push 1 on my phantom TP, which will then cause the desired reaction from the UI Module, in this case the MAX's.
If so, how?
Comments
-
Do it!
I have made this method work with great success.
Use the command DO_PUSH(vdvTP,button_channel)
ExampleBUTTON_EVENT[dvTP,47] { PUSH: { DO_PUSH(vdvPHANTOMTP,1) } }
You can also monitor sent text and page flips.
DATA_EVENT[vdvPHANTOMTP] { COMMAND: { IF(FIND_STRING(DATA.TEXT,'TEXT',1) OR FIND_STRING(DATA.TEXT,'PAGE',1)) SEND_COMMAND dvTP,DATA.TEXT } }
Of course you can always store the returned text in an array for later use.DATA_EVENT[vdvPHANTOMTP] { STACK_VAR nINDEX LOCAL_VAR cTEMP_TEXT[30][30] COMMAND: { IF(FIND_STRING(DATA.TEXT,'TEXT',1)) { REMOVE_STRING(DATA.TEXT,'TEXT',1) nINDEX = ATOI(REMOVE_STRING(DATA.TEXT,'-',1)) cTEMP_TEXT[nINDEX] = DATA.TEXT } } }
Enjoy! -
Yes, it should. My G3 panels allow me to monitor what is going on at the far end.
-
Awesome.
Thanks a lot.
EDIT: You think this would qualify as a tip or trick? -
Tip or trickmpullin wrote:Thanks a lot.
EDIT: You think this would qualify as a tip or trick?
Sure, but how do we get it moved? -
All done!!
-
Yet another example why Suzanne rocks.

P>S> yes I am sucking up, looking for one of those leather jackets or even one like Chip got.

-
What you cannot do, though, is transfer HOLD and RELEASE info. DO_PUSH is a timed thing.
You also cannot simulate online & offline, the way a wireless panel would behave.
Fred -
frthomas wrote:What you cannot do, though, is transfer HOLD and RELEASE info. DO_PUSH is a timed thing.
I've never tried it, but wouldn't DO_PUSH_TIMED and DO_RELEASE work for this? In theory, shouldn't the DO_PUSH_TIMED trigger the HOLD event, assuming that the timer for the DO_PUSH exceeds the timer for the HOLD event?
--D -
Do_Push - More to itfrthomas wrote:What you cannot do, though, is transfer HOLD and RELEASE info. DO_PUSH is a timed thing.
Fred
Right you are Dave!
Here are other options to the DO_PUSH statement.
DO_PUSH_TIMED
Similar to DO_PUSH except this one lets you specify the timeout. DO_PUSH defaults to a 0.5s push on a channel before issuing a DO_RELEASE for you (unless another DO_PUSH is executed for the same channel). DO_PUSH_TIMED lets you control the length of time that will pass before the automatic DO_RELEASE is generated. The syntax:DO_PUSH_TIMED(DEV Device, INTEGER Channel, LONG Timeout)
Parameters:
Device - the device to PUSH.
Channel - the channel to PUSH.
Timeout - the time (in 1/10ths of seconds) that the PUSH shall remain active. If zero is specified as the timeout then the timeout is 0.5s.
If DO_PUSH_TIMED_INFINITE is specified as the timeout then the push never times out. This will allow the simulation of a HOLD.
Make sure you generate a DO_RELEASE.
Leave a Comment
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
