mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-16 08:44:38 +08:00
test/example-gatt-client: Add more comments
This adds more comments what the example is doing.
This commit is contained in:
parent
9e097107c5
commit
24739efd35
@ -193,14 +193,17 @@ def main():
|
|||||||
om = dbus.Interface(bus.get_object(BLUEZ_SERVICE_NAME, '/'), DBUS_OM_IFACE)
|
om = dbus.Interface(bus.get_object(BLUEZ_SERVICE_NAME, '/'), DBUS_OM_IFACE)
|
||||||
om.connect_to_signal('InterfacesRemoved', interfaces_removed_cb)
|
om.connect_to_signal('InterfacesRemoved', interfaces_removed_cb)
|
||||||
|
|
||||||
|
print('Getting objects...')
|
||||||
objects = om.GetManagedObjects()
|
objects = om.GetManagedObjects()
|
||||||
chrcs = []
|
chrcs = []
|
||||||
|
|
||||||
|
# List characteristics found
|
||||||
for path, interfaces in objects.items():
|
for path, interfaces in objects.items():
|
||||||
if GATT_CHRC_IFACE not in interfaces.keys():
|
if GATT_CHRC_IFACE not in interfaces.keys():
|
||||||
continue
|
continue
|
||||||
chrcs.append(path)
|
chrcs.append(path)
|
||||||
|
|
||||||
|
# List sevices found
|
||||||
for path, interfaces in objects.items():
|
for path, interfaces in objects.items():
|
||||||
if GATT_SERVICE_IFACE not in interfaces.keys():
|
if GATT_SERVICE_IFACE not in interfaces.keys():
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user