Skip to content

Add options to Models and VendorModels

Inga Stotland linux-bluetooth 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 1 replyIn review
  2. v14 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4doc/mesh-api: Add dictionary to model propertiesdoc/mesh-api.txt+34 -60 replies
2/4mesh: Check app model settings of pub/sub supportmesh/mesh-config-json.c mesh/mesh-config.h mesh/model.c +2 more+309 -470 replies
3/4tools/mesh-cfgclient: Add options to "Models" propertytools/mesh-cfgclient.c+19 -60 replies
4/4test/test-mesh: Add options to "Models" propertytest/test-mesh+12 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH BlueZ v2 0/4] Add options to Models and VendorModels

v2:

Changes constaned to patch 0002:

- Fixed returned status in config pub/sub model calls
- Consistent use of pub_enabled & sub_enabled in the code

************
If a model does not support either subscription mechanism,
Config Server is supposed to return "Not a Subscribe Model" if a Config Client sends a subscription add/overwrite message.

Similarly, if a model does not support publication, "Invalid Publish Parameters" should be returned in response to Publication Set message.

Since config server is running even when an app is not attached, the only way to collect these model capabilities is on Attach, Join, Create, Import methods when the object manager collects app info.

To address this issue, signatures for properties "Models" and "VendorModels" on Element interface change to include "options" dictionary:

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

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.

Inga Stotland (4):
doc/mesh-api: Add dictionary to model properties
mesh: Check app model settings of pub/sub support tools/mesh-cfgclient: Add options to "Models" property test/test-mesh: Add options to "Models" property

 doc/mesh-api.txt        |  40 ++++++++--
 mesh/mesh-config-json.c |  76 +++++++++++++++++-
 mesh/mesh-config.h      |   8 ++
 mesh/model.c            |  98 +++++++++++++++++++----
 mesh/model.h            |   6 ++
 mesh/node.c             | 168 ++++++++++++++++++++++++++++++++--------
 test/test-mesh          |  21 ++---
 tools/mesh-cfgclient.c  |  25 ++++--
 8 files changed, 374 insertions(+), 68 deletions(-)
Signature · 1 line
2.26.2