@@ -30,12 +30,13 @@ Checkout [examples](examples).
3030
3131### Device Telemetry and Properties
3232
33- Every method of ` enapter.vucm.Device ` subclass with a name that starts with
34- ` task_ ` prefix is considered a _ device task_ . When such a device is started,
35- all of its tasks are started as well. Device tasks are started in random order
36- and are being executed concurrently in the background. If a device task returns
37- or raises an exception, device routine is terminated. A typical use of the task
38- is to run a periodic job to send device telemetry and properties.
33+ Every method of ` enapter.vucm.Device ` subclass decorated with
34+ ` enapter.vucm.device_task ` decorator is considered a _ device task_ . When such a
35+ device is started, all of its tasks are started as well. Device tasks are
36+ started in random order and are being executed concurrently in the background.
37+ If a device task returns or raises an exception, device routine is terminated.
38+ A typical use of the task is to run a periodic job to send device telemetry and
39+ properties.
3940
4041In order to send telemetry and properties define two corresponding device
4142tasks. It is advised (but is not obligatory) to send telemetry every ** 1
@@ -45,12 +46,12 @@ Examples:
4546
4647- [ wttr-in] ( examples/vucm/wttr-in )
4748
48- ### Device Commands
49+ ### Device Command Handlers
4950
50- Every method of ` enapter.vucm.Device ` subclass with a name that starts with
51- ` cmd_ ` prefix is considered a _ device command handler_ . Device command handlers
52- receive the same arguments as described in device Blueprint manifest and can
53- optionally return a payload as ` dict ` .
51+ Every method of ` enapter.vucm.Device ` subclass decorated with
52+ ` enapter.vucm.device_command ` is considered a _ device command handler_ . Device
53+ command handlers receive the same arguments as described in device Blueprint
54+ manifest and can optionally return a payload as ` enapter.types.JSON ` .
5455
5556In order to handle device commands define corresponding device command
5657handlers.
0 commit comments