signals - Python-dbus extra param to add_signal_receiver -
i'd pass param add_signal_receiver or somehow path signal received from. it's defined that:
bus.add_signal_receiver(handle_signal, 'remotedevicefound', 'org.bluez.adapter', 'org.bluez', '/org/bluez/hci'+x) def handle_signal(address, cls, rssi): xxxx
i wan't have many signal receivers @ same time , able read 'x' inside handle_signal function.
the python dbus documenation has answer. provides following example pass sender handler function:
def handler(sender=none): print "got signal %r" % sender iface.connect_to_signal("hello", handler, sender_keyword='sender')
so, instead of using bus.add_signal_receiver
, create interface signal providing object first , connect signal in example.
Comments
Post a Comment