doc/mesh-api: Add dictionary to model properties
authorInga Stotland <inga.stotland@intel.com>
Tue, 30 Jun 2020 18:56:14 +0000 (11:56 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
This changes the signature of "Models" and "VendorModels" properties
on org.bluez.mesh.Element1 interface to contain a dictionary with
model options.

Models: signature change "aq" -> "a(qa{sv})"
VendorModels: signature change "a(qq)" -> "a(qqa{sv})"

Currently, the defined keywords for the options dictionary are
"Publish" - indicates whether the model supports publication mechanism.
            If not present, publication is enabled.
"Subscribe" - indicates whether the model supports subscription mechanism.
            If not present, subscriptions are enabled.

The dictionary allowed to be empty.

Change-Id: I7c4bd0f21c1a6c8c3d889b76433ec61ac6081598
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
doc/mesh-api.txt

index 4cf72dc..803d720 100644 (file)
@@ -899,15 +899,43 @@ Properties:
                Element index. It is required that the application follows
                sequential numbering scheme for the elements, starting with 0.
 
-       array{uint16} Models [read-only]
+       array{(uint16 id, dict caps)} Models [read-only]
 
-               An array of SIG Model Identifiers. The array may be empty.
+               An array of SIG Models:
 
-       array{(uint16, uint16)} VendorModels [read-only]
+                       id - SIG Model Identifier
 
-               An array of pairs (vendor, model ID): vendor is a 16-bit
-               Bluetooth-assigned Company ID as defined by Bluetooth SIG.
-               model ID is a 16-bit vendor-assigned Model Identifier
+                       options - a dictionary that may contain additional model
+                       info. The following keys are defined:
+
+                               boolean Publish - indicates whether the model
+                                       supports publication mechanism. If not
+                                       present, publication is enabled.
+
+                               boolean Subscribe - indicates whether the model
+                                       supports subscription mechanism. If not
+                                       present, subscriptons are enabled.
+
+               The array may be empty.
+
+
+       array{(uint16 vendor, uint16 id, dict options)} VendorModels [read-only]
+
+               An array of Vendor Models:
+
+                       vendor - a 16-bit Bluetooth-assigned Company ID as
+                       defined by Bluetooth SIG.
+
+                       id - a 16-bit vendor-assigned Model Identifier
+
+                       options - a dictionary that may contain additional model
+                       info. The following keys are defined:
+
+                               boolean Publish - indicates whether the model
+                                       supports publication mechanism
+
+                               boolean Subscribe - indicates whether the model
+                                       supports subscription mechanism
 
                The array may be empty.