mesh: Check app model settings of pub/sub support
authorInga Stotland <inga.stotland@intel.com>
Tue, 30 Jun 2020 18:56:15 +0000 (11:56 -0700)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Mon, 28 Dec 2020 06:20:04 +0000 (11:50 +0530)
commitf1cf1cb251ca1fa2e3dd2c9b6b357e4217d8391e
tree0bb3f49a4ab7346e41961d2a7434e134467deab9
parent7837c134d67b8d83cdb197e4fa1d94a1cba3e90a
mesh: Check app model settings of pub/sub support

This adds handling of new options dictionary included with
"Models" and "VendorModels" properties on org.bluez.mesh.Element1
interface.

Supported (optional) dictionary entries:
"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.

If a config message related to subscription state is received for a model
that does not support subscription mechanism, an error code 0x08,
("Not A Subscribe Model") is sent in response.

If a config message related to publication state is received for a model
that does not support publication mechanism, an error code 0x07
("Invalid Publish Parameters") is sent in response.

Change-Id: I6365ee91c74bf79cd4950e000ef865c543224136
Signed-off-by: anuj.bhumiya <anuj.bhumiya@samsung.com>
mesh/mesh-config-json.c
mesh/mesh-config.h
mesh/model.c
mesh/model.h
mesh/node.c