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 09:19] – [Commands] twconfig:remotecontrol:emberplus [2019/07/09 16:18] – external edit 127.0.0.1
Line 53: Line 53:
 ===== Scripting ===== ===== 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