2020-06-16 12:28:14

by Michał Lowas-Rzechonek

[permalink] [raw]
Subject: [RFC BlueZ 1/2] mesh: Add documentation for AttachFD

From: Przemysław Fierek <[email protected]>

---
doc/mesh-api.txt | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)

diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt
index 6d905cf48..cd2ffd2a8 100644
--- a/doc/mesh-api.txt
+++ b/doc/mesh-api.txt
@@ -118,6 +118,46 @@ Methods:
org.bluez.mesh.Error.AlreadyExists,
org.bluez.mesh.Error.Failed

+ object node, array{byte, array{(uint16, dict)}} configuration, fd
+ AttachFD(object app_root, uint64 token)
+
+ This is an alternative version of the Attach() method. This method
+ acquires file descriptor for message reception.
+
+ Method behaviour and usage is similiar to the Attach() method.
+ The difference between those two method is that after call AttachFD()
+ all received messages will be passed via file descriptor,
+ instead of daemon calling MessageReceived() and
+ DevKeyMessageReceived() methods.
+
+
+ The data format used for the exchange:
+
+ Message types:
+ 0 - Device Key Message
+ 1 - Application Key Message
+
+ struct {
+ uint8_t element;
+ uint8_t src;
+
+ uint8_t type;
+ union {
+ struct {
+ uint8_t net_idx;
+ bool remote;
+ } dev; // only meaningful when type is 0
+
+ struct {
+ uint8_t app_idx;
+ uint16_t dst;
+ uint8_t label[16]; // only meaningful when dst is virtual
+ } app; // only meaningful when type is 1
+ }
+
+ uint8_t data[];
+ };
+
void Leave(uint64 token)

This removes the configuration information about the mesh node
--
2.20.1