diff options
author | Manish Mandlik <mmandlik@google.com> | 2021-03-29 23:15:49 -0700 |
---|---|---|
committer | Ayush Garg <ayush.garg@samsung.com> | 2022-03-11 19:08:35 +0530 |
commit | b1caf2e71df398d09452d88545b9fc0a5c196a58 (patch) | |
tree | bd61bdcb88621e62996802de846877e99b3534e3 /test | |
parent | bf30e21a9970f4d3fbc1f84faf4c0ba8b3d62e92 (diff) | |
download | bluez-b1caf2e71df398d09452d88545b9fc0a5c196a58.tar.gz bluez-b1caf2e71df398d09452d88545b9fc0a5c196a58.tar.bz2 bluez-b1caf2e71df398d09452d88545b9fc0a5c196a58.zip |
test: Fix AdvMonitor RSSI filter properties
Update the creation of Advertisement Monitor object as per the
decoupled RSSIThresholdsAndTimers strucure.
More info: doc/advertisement-monitor-api.txt
Reviewed-by: apusaka@chromium.org
Reviewed-by: howardchung@chromium.org
Reviewed-by: mcchou@chromium.org
Signed-off-by: Manish Mandlik <mmandlik@google.com>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/example-adv-monitor | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/example-adv-monitor b/test/example-adv-monitor index 6fe8a305..a405fc7b 100644 --- a/test/example-adv-monitor +++ b/test/example-adv-monitor @@ -61,8 +61,10 @@ class AdvMonitor(dbus.service.Object): def get_properties(self): properties = dict() properties['Type'] = dbus.String(self.monitor_type) - properties['RSSIThresholdsAndTimers'] = dbus.Struct(self.rssi, - signature='nqnq') + properties['RSSIHighThreshold'] = dbus.Int16(self.rssi_h_thresh) + properties['RSSIHighTimeout'] = dbus.UInt16(self.rssi_h_timeout) + properties['RSSILowThreshold'] = dbus.Int16(self.rssi_l_thresh) + properties['RSSILowTimeout'] = dbus.UInt16(self.rssi_l_timeout) properties['Patterns'] = dbus.Array(self.patterns, signature='(yyay)') return {ADV_MONITOR_IFACE: properties} @@ -72,11 +74,10 @@ class AdvMonitor(dbus.service.Object): def _set_rssi(self, rssi): - h_thresh = dbus.Int16(rssi[self.RSSI_H_THRESH]) - h_timeout = dbus.UInt16(rssi[self.RSSI_H_TIMEOUT]) - l_thresh = dbus.Int16(rssi[self.RSSI_L_THRESH]) - l_timeout = dbus.UInt16(rssi[self.RSSI_L_TIMEOUT]) - self.rssi = (h_thresh, h_timeout, l_thresh, l_timeout) + self.rssi_h_thresh = rssi[self.RSSI_H_THRESH] + self.rssi_h_timeout = rssi[self.RSSI_H_TIMEOUT] + self.rssi_l_thresh = rssi[self.RSSI_L_THRESH] + self.rssi_l_timeout = rssi[self.RSSI_L_TIMEOUT] def _set_patterns(self, patterns): |