diff options
author | MichaĆ Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com> | 2019-05-08 16:24:45 +0200 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2019-05-08 11:31:18 -0700 |
commit | 64670a4a31d53fe8b5b801ab1f8659e3d0ed2000 (patch) | |
tree | 6b402c828d0403e1a9935c147a8a221c54b80c3f /doc/mesh-api.txt | |
parent | 08c45ed6805c09e3d3e4aa3e61898a28460d8fa0 (diff) | |
download | bluez-64670a4a31d53fe8b5b801ab1f8659e3d0ed2000.tar.gz |
mesh: Use node uuids as storage directory names
Instead of keeping track of unique 16bit node identifiers, reuse their
UUIDs to create both storage directories and dbus objects.
Because of that:
- UUID is no longer stored in the JSON file, it's inferred from the
directory name instead
- Join(), CreateNetwork() and ImportLocalNode() APIs return an error if
given UUID already registered within the daemon
Diffstat (limited to 'doc/mesh-api.txt')
-rw-r--r-- | doc/mesh-api.txt | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 81d1a3288..112990a5d 100644 --- a/doc/mesh-api.txt +++ b/doc/mesh-api.txt @@ -24,10 +24,14 @@ Methods: DBus.ObjectManager interface must be available on the app_defined_root path. - The uuid parameter is a 16-byte array that contains Device UUID. + The uuid parameter is a 16-byte array that contains Device UUID. This + UUID must be unique (at least from the daemon perspective), therefore + attempting to call this function using already registered UUID results + in an error. PossibleErrors: org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists, void Cancel(void) @@ -127,7 +131,10 @@ Methods: interface. The standard DBus.ObjectManager interface must be available on the app_root path. - The uuid parameter is a 16-byte array that contains Device UUID. + The uuid parameter is a 16-byte array that contains Device UUID. This + UUID must be unique (at least from the daemon perspective), therefore + attempting to call this function using already registered UUID results + in an error. The returned token must be preserved by the application in order to authenticate itself to the mesh daemon and attach to @@ -142,6 +149,7 @@ Methods: PossibleErrors: org.bluez.mesh.Error.InvalidArguments + org.bluez.mesh.Error.AlreadyExists, uint64 token ImportLocalNode(string json_data) @@ -160,8 +168,12 @@ Methods: permanently remove the identity of the mesh node by calling Leave() method. + It is an error to attempt importing a node with already registered + Device UUID. + PossibleErrors: org.bluez.mesh.Error.InvalidArguments, + org.bluez.mesh.Error.AlreadyExists org.bluez.mesh.Error.NotFound, org.bluez.mesh.Error.Failed @@ -169,8 +181,9 @@ Mesh Node Hierarchy =================== Service org.bluez.mesh Interface org.bluez.mesh.Node1 -Object path /org/bluez/mesh/node<xxxx> - where xxxx is a 4-digit hexadecimal number generated by daemon +Object path /org/bluez/mesh/node<uuid> + where <uuid> is the Device UUID passed to Join(), CreateNetwork() or + ImportLocalNode() Methods: void Send(object element_path, uint16 destination, uint16 key_index, @@ -334,8 +347,9 @@ Mesh Provisioning Hierarchy ============================ Service org.bluez.mesh Interface org.bluez.mesh.Management1 -Object path /org/bluez/mesh/node<xxxx> - where xxxx is a 4-digit hexadecimal number generated by daemon +Object path /org/bluez/mesh/node<uuid> + where <uuid> is the Device UUID passed to Join(), CreateNetwork() or + ImportLocalNode() Methods: void UnprovisionedScan(uint16 seconds) |