Command from and to duet
erwinm
Junior Member
Hi,
Just a quick question about using duet modules. I'm pretty new at AMX programming and want to use the duet modules with SNAPI as intended.
I learned to implement modules by using SEND_COMMMAND to control the devices through virtual devices, and use SEND_STRING in the modules for feedback.
But... for Duet modules SEND_COMMAND are used for controlling, but i also get COMMANDS back from the duet modules. How do i know (or how do my modules know) where the command originated? Is it from my code or is it coming form the Duet module? I guess my DATA_EVENT will fire in both situations. Or am i wrong?
Greetz,
Erwin van Maasakkers
Just a quick question about using duet modules. I'm pretty new at AMX programming and want to use the duet modules with SNAPI as intended.
I learned to implement modules by using SEND_COMMMAND to control the devices through virtual devices, and use SEND_STRING in the modules for feedback.
But... for Duet modules SEND_COMMAND are used for controlling, but i also get COMMANDS back from the duet modules. How do i know (or how do my modules know) where the command originated? Is it from my code or is it coming form the Duet module? I guess my DATA_EVENT will fire in both situations. Or am i wrong?
Greetz,
Erwin van Maasakkers
Comments
-
Hi,
Just a quick question about using duet modules. I'm pretty new at AMX programming and want to use the duet modules with SNAPI as intended.
I learned to implement modules by using SEND_COMMMAND to control the devices through virtual devices, and use SEND_STRING in the modules for feedback.
But... for Duet modules SEND_COMMAND are used for controlling, but i also get COMMANDS back from the duet modules. How do i know (or how do my modules know) where the command originated? Is it from my code or is it coming form the Duet module? I guess my DATA_EVENT will fire in both situations. Or am i wrong?
Greetz,
Erwin van Maasakkers
DUET is different, your send commands will not trigger your data event. Only messages from the DUET module will. -
DUET is different, your send commands will not trigger your data event. Only messages from the DUET module will.
I still don't quite understand...
lets say i have a real device and a virtual device, of that real device.
Then i have a module, define_module 'mdlAcmeLcdDisplay' modLcd(vdvCD, dvCD) <-this would be the jar file)
and a UI module, define_module 'mdlLcdDisp_UI' modLcd_UI(vdvCD,dvCD)
When i do a SEND_COMMAND from the modLcd_UI, let's say "ASPECT=NORMAL", a response from the DUET would be a COMMAND "ASPECT=NORMAL". If i catch this response with a DATA_EVENT COMMAND:, wouldn't my command that i did send in the first place trip that same catch?
(i'm dutch, excuse me for my poor english)
Erwin -
One of the key differences between a NetLinx virtual device and a Duet virtual device is a NetLinx virtual will echo any commands or strings that you send it. Using both commands (for incoming data) and string events (outgoing data) in a NetLinx module allows you identify the source of the event and ensure you don't double up on any event parsing. In Duet modules however this is not required - all of you interaction with them will be via commands and channels. When a command is sent to a duet virtual device it is not echoed so if you are seeing a command come from it, you can be sure that it originated from within the module.
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