Simulate an Online Event?
Jeff
Junior Member
I can use do_push() to simulate a button event. Does anyone know if there's a way to simulate an online event?
J
J
Comments
-
I can use do_push() to simulate a button event. Does anyone know if there's a way to simulate an online event?
J
You could create a virtual device that has an online event. I think that's about all you can do though, as I don't believe there is a way to trigger a hardware online event without the hardware.
Paul -
The virtual device just has its online event when the system boots though, right? I can't make its online event happen any particular time . . .
-
I can use do_push() to simulate a button event. Does anyone know if there's a way to simulate an online event?
J
If this is just to test a section of code to see if the Online event does what it's supposed to, perhaps you could use some other device you do have handy and make it go on and offline. Perhaps you have a touch panel that could stand-in for the device. Once you've tested you could reset the device number.
I do that quite a bit. -
Naw, I'm actually working on writing a module for one of the iPhone touchpanel apps. I'm simulating button events quite well, but I'm trying to figure out how to do an online event.
It looks like i'll just have to do a command event when data.text equals "ONLINE", which isn't that big of a deal, but I'm trying to make programming for this panel as close to programming for the real thing as possible.
J -
Jeff, how is the connection between the iPhone and the control system made? Is it a direct Ethernet connection, or does it have to go through some kind of outboard service - running on a PC perhaps?
In the case of the former, I'm assuming you'd be using IP_SERVER_OPEN in your code. This should generate online/offline events when the iPhone app makes and breaks connections...
- Chip -
It does use IP_SERVER_OPEN, but it has to pass a password test in order to connect, something the default AMX panels don't do. This means that anything I do in the online event there would happen when it connects, not once it starts listening to commands.
It does send me an initialization message once it connects successfully, but I don't know what to do with that.
J
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