@@ -361,83 +361,78 @@ class BLEDevice
361
361
// void scanForAddress(String address); // Not include in baseline. Add here as feature for feature release.
362
362
363
363
/* *
364
- * @brief Start scanning for peripherals without filter
364
+ * @brief Start scanning for peripherals with the option of accepting all detectable
365
+ * Peripherals or just the newly detected.
365
366
*
366
- * @param none
367
- *
368
- * @return none
369
- *
370
- * @note none
371
- */
372
- void scan ();
373
-
374
- /* *
375
- * @brief Start scanning for peripherals with filter
376
- *
377
- * @param[in] withDuplicates true - with duplicate filter
378
- * false- without duplicate filter
379
- *
380
- * @return none
381
- *
382
- * @note option to filter out duplicate addresses for Arduino.
383
- * The current only support fileter duplicate mode.
384
- */
385
- void scan (bool withDuplicates);
386
-
387
- /* *
388
- * @brief Start scanning for peripherals and filter by device name in ADV
389
- *
390
- * @param name The device's local name.
367
+ * @param[in] withDuplicates true - return all detectable Peripherals.
368
+ * false- return a detected Peripheral only once.
391
369
*
392
370
* @return none
393
371
*
394
- * @note option to filter out duplicate addresses for Arduino.
395
- * The current only support fileter duplicate mode.
372
+ * @note When, withDuplicates = true, accept all detectable Peripherals.
373
+ * No Peripheral filtering process applied to the scan result.
374
+ * By default, withDuplicates = false, a detected Peripheral is
375
+ * reported once.
396
376
*/
397
- void scanForName (String name );
377
+ void scan ( bool withDuplicates = false );
398
378
399
379
/* *
400
- * @brief Start scanning for peripherals and filter by device name in ADV
380
+ * @brief Start scanning for peripherals and filter by device name in ADV and
381
+ * the option of accepting all detectable Peripherals or just the
382
+ * newly detected.
401
383
*
402
384
* @param[in] name The device's local name.
403
385
*
404
- * @param[in] withDuplicates true - with duplicate filter
405
- * false- without duplicate filter
386
+ * @param[in] withDuplicates true - return all detectable Peripherals.
387
+ * false- return a detected Peripheral only once.
406
388
*
407
389
* @return none
408
390
*
409
- * @note option to filter out duplicate addresses for Arduino.
410
- * The current only support fileter duplicate mode.
391
+ * @note When, withDuplicates = true, accept all detectable Peripherals.
392
+ * No Peripheral filtering process applied to the scan result.
393
+ * By default, withDuplicates = false, a detected Peripheral is
394
+ * reported once.
411
395
*/
412
- void scanForName (String name, bool withDuplicates);
396
+ void scanForName (String name, bool withDuplicates = false );
413
397
414
398
/* *
415
- * @brief Start scanning for peripherals and filter by service in ADV
399
+ * @brief Start scanning for peripherals and filter by service in ADV and
400
+ * the option of accepting all detectable Peripherals or just the
401
+ * newly detected.
416
402
*
417
- * @param service The service
403
+ * @param[in] service The service
404
+ *
405
+ * @param[in] withDuplicates true - return all detectable Peripherals.
406
+ * false- return a detected Peripheral only once.
418
407
*
419
408
* @return none
420
409
*
421
- * @note none
410
+ * @note When, withDuplicates = true, accept all detectable Peripherals.
411
+ * No Peripheral filtering process applied to the scan result.
412
+ * By default, withDuplicates = false, a detected Peripheral is
413
+ * reported once.
422
414
*/
423
- void scanForUuid (String uuid);
415
+ void scanForUuid (String uuid, bool withDuplicates = false );
424
416
425
417
/* *
426
- * @brief Start scanning for peripherals and filter by service in ADV
418
+ * @brief Start scanning for peripherals and filter by MAC address and
419
+ * the option of accepting all detectable Peripherals or just the
420
+ * newly detected.
427
421
*
428
- * @param[in] service The service
422
+ * @param[in] macaddr The Peripheral MAC address
429
423
*
430
- * @param[in] withDuplicates true - with duplicate filter
431
- * false- without duplicate filter
424
+ * @param[in] withDuplicates true - return all detectable Peripherals.
425
+ * false- return a detected Peripheral only once.
432
426
*
433
427
* @return none
434
428
*
435
- * @note option to filter out duplicate addresses for Arduino.
436
- * The current only support fileter duplicate mode.
429
+ * @note When, withDuplicates = true, accept all detectable Peripherals.
430
+ * No Peripheral filtering process applied to the scan result.
431
+ * By default, withDuplicates = false, a detected Peripheral is
432
+ * reported once.
437
433
*/
438
- void scanForUuid (String uuid, bool withDuplicates);
439
-
440
- void scanForAddress (String macaddr, bool withDuplicates = true );
434
+ void scanForAddress (String macaddr, bool withDuplicates = false );
435
+
441
436
/* *
442
437
* @brief Stop scanning for peripherals
443
438
*
@@ -679,15 +674,15 @@ class BLEDevice
679
674
void preCheckProfile ();
680
675
681
676
/* *
682
- * @brief Start scanning for peripherals with/without duplicate filter
677
+ * @brief Start scanning for peripherals with the option of accepting all
678
+ * detectable Peripherals or just the newly detected.
683
679
*
684
- * @param[in] withDuplicates true - with duplicate filter
685
- * false- without duplicate filter
680
+ * @param[in] withDuplicates true - return all detectable Peripherals.
681
+ * false- return a detected Peripheral only once.
686
682
*
687
683
* @return none
688
684
*
689
- * @note option to filter out duplicate addresses for Arduino.
690
- * The current only support fileter duplicate mode.
685
+ * @note When, withDuplicates = true, accept all detectable Peripherals.
691
686
*/
692
687
bool startScan (bool withDuplicates);
693
688
0 commit comments