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