User Tools

Site Tools


config:remotecontrol:emberplus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
config:remotecontrol:emberplus [2016/09/06 07:09] – [Parameter tree] twconfig:remotecontrol:emberplus [2019/07/09 16:18] – external edit 127.0.0.1
Line 32: Line 32:
 ==== Commands ==== ==== Commands ====
  
-On the //Commands// tab, the+On the //Commands// tab, you assign [[reference:remote_control_commands|remote control commands]] to Ember+ parameter changes.
  
-{{ :config:remotecontrol:pasted:20160906-090831.png }}+{{ :config:remotecontrol:pasted:20160906-090831.png?400 }}
  
 +Parameter names are specified in a path-like manner, using the ''/'' sign as a separator. The easiest way to assign a command to a parameter is to double-click a parameter in the monitor or parameter tree view, but you may also add one manually.
  
 +For numeric parameters, various conditions (equal, greater than, greater or equal, ...) can be used to match the received value.
 +
 +In the //Value// field, just enter the parameter value that should trigger the command, which you must select from the dropdown list or type manually.
 +
 +Please note that boolean parameters use the values ''true'' and ''false'' (in lower case letters).
 ==== Parameter tree ==== ==== Parameter tree ====
 +
 +When the monitor function is enabled on the //Connection// tab, mAirList will propagate the parameter tree which is display on the last tab of the configuration dialog:
  
 {{ :config:remotecontrol:pasted:20160906-090918.png?400 }} {{ :config:remotecontrol:pasted:20160906-090918.png?400 }}
 +
 +Parameter updates received from the provider will be displayed in real time, and you can also double-click any parameter in order to assign a remote control command to it (see above).
 +
 +===== Scripting =====
 +
 +The Ember+ remote control provides a script extension that can be used to send parameter updates to the Ember+ provider from a script.
 +
 +The remotes are accessed by the following function:
 +
 +  function EmberPlusConsumerRemote(iIndex: integer): IEmberPlusConsumerRemote;
 +
 +Remotes are 0-based, so ''EmberPlusConsumerRemote(0)'' returns the first Ember+ remote in the system, as a reference to an ''IEmberPlusConsumerRemote'' interface. That interface provides a method for parameter updates:
 +
 +  procedure SetParameterValue(iIDPath: string; iValue: string);
 +
 +''IDPath'' is the path to the parameter in the tree, using the ''/'' sign as the delimiter (the same notation as used in the remote control command assignments, see above).
 +
 +Example:
 +
 +  EmberPlusConsumerRemote(0).SetParameterValue('/Device/SomeLabel', 'foobar');
 +
 +Note that the value is always given as a string, mAirList will automatically convert it to the correct type. Use '''true''' and '''false''' for boolean parameters.
 +
 +Important notice: mAirList fetches the entire parameter tree from the provider. This is an asynchronous operation, and depending on the size of the tree, it can take a few seconds until the entire tree is known to mAirList. If you try to set a parameter that has not been fetched yet (e.g. in an ''OnLoad'' procedure that is executed during startup), you wil see an //Unknown parameter// error message. In this case, try to defer the call for a bit, using a ''sleep(...)'' operation.
config/remotecontrol/emberplus.txt · Last modified: 2020/02/27 10:25 by tw

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki