Extends
Methods
executeNativeCapability(id, argsopt, callbackopt)
Start an arbitrary task.
Since not all types of IoT-tasks are available on all systems (e.g. a client without a camera can't take a photo) this function assumes that an availability check has been made prior to this call, thus this system is capable of performing the task.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
id |
string | The identifier for the native capability to be executed |
||
args |
array |
<optional> |
{} | The arguments to be passed to the task function as
|
callback |
function |
<optional> |
If a callback is provided it will be called each time the task triggers it. Use that if you expect multiple calls like e.g. the value from a temperature sensor every 5 seconds. Otherwise this function behaves like an async function and returns a Promise. |
(async) getAllCapabilities() → {Promise}
Get all capabilities available in the native side
Returns:
- Type
- Promise