Best Of
Re: Adding CE-COM2 to MU1300
What's the difference between "listen" and "watch"...???
Staying on the CE-COM2, having a look into its Descriptor file:
+- serial: Array [2] | +- 0: Component (14) | | +- baudRate: Parameter <enum> ro [0 - 6] [ 1200, 4800, 9600, 19200, 38400, 57600, 115200 ] | | +- dataBits: Parameter <integer> ro [7 - 8] | | +- mode: Parameter <enum> ro [0 - 2] [ 232, 422, 485 ] | | +- parity: Parameter <enum> ro [0 - 2] [ NONE, EVEN, ODD ] | | +- receive: Event (1) | | | +-- data <byte_array> | | +- send: Command (1) | | | +-- data <byte_array> | | +- setCommParams: Command (5) | | | +-- baudRate <enum> | | | | +- [ 1200, 4800, 9600, 19200, 38400, 57600, 115200 ] | | | +-- mode <enum> | | | | +- [ 232, 422, 485 ] | | | +-- stopBits <integer> | | | +-- parity <enum> | | | | +- [ NONE, EVEN, ODD ] | | | +-- dataBits <integer> | | +- setflowControl: Command (1) | | | +-- mode <enum> | | | +- [ NONE, HARDWARE ] | | +- status: Event (1) | | | +-- value <string> | | +- stopBits: Parameter <integer> ro [1 - 2]
An parameter that is shown in the descriptor as "Event" has to be "listen", where any other parameters are just to "watch".
Compared to NetLinx, on the "Event" parameters Muse will "listen" actively for any change (like a DATA_EVENT), where a "watch" only reacts on the moment (like a BUTTON_EVENT).
An Event type parameter could be referenced by "arguments", to pick individual values, where the other parameters only can be read by the parameter path directly.
This "arguments" thing is very helpful e.g. by responses from a Precis Duet Module. The module on a switch returns the changed route with the arguments{'outputs': '1', 'input': 2, 'sl': 'VIDEO'}
And so can referred by argument names
myOutputs = myData.arguments['outputs'] myInput = myData.arguments['input'] myLevel = myData.arguments['sl']