adv_monitor: Invoke DeviceFound/Lost on tracked monitors
authorManish Mandlik <mmandlik@google.com>
Sat, 20 Nov 2021 15:29:39 +0000 (07:29 -0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:38 +0000 (19:08 +0530)
commitc325c7b287e3649d9ec243c9c220836c71608744
treebd7ca43b807ac3594aebf1b9a2c54c643c8501cb
parent40c29f9b4ddcf3016fe55e0112241ce02c97f119
adv_monitor: Invoke DeviceFound/Lost on tracked monitors

This patch delivers DeviceFound/DeviceLost events to apps over D-Bus
whenever controller starts/stops tracking a device.

Tests performed:
- Add a monitor and verify that DeviceFound/DeviceLost events are
  received whenever controller starts/stops monitoring.
- Verify from logs that only one Adv Report is received from the
  controller when Sampling_Period is set to 0xFF and the
  DeviceFound/DeviceLost functionality still works as intended.
- Verify that DeviceFound/DeviceLost is reported appropriately even
  when the Active Scanning is in progress.
- Verify that the reconnection also works properly with and without
  any active Advertisement Monitor.

Reviewed-by: Miao-chen Chou <mcchou@google.com>
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/adv_monitor.c