Package org.sensorhub.api.comm
Interface IDeviceScanner
public interface IDeviceScanner
Interface for device scanning services.
Implementations of this interface are typically used by sensor drivers
to discover sensors connected via USB, bluetooth, zeroconf, etc.
- Since:
- Feb 6, 2016
-
Method Summary
Modifier and TypeMethodDescriptionboolean
void
startScan
(IDeviceScanCallback callback) Scans for any connected devicevoid
startScan
(IDeviceScanCallback callback, String idRegex) Scans for connected devices with device ID matching the given regex pattern
This will only generate events when the device ID matches the regex patternvoid
stopScan()
Stop the current scan
-
Method Details
-
startScan
Scans for any connected device- Parameters:
callback
- callback to which scan results are delivered
-
startScan
Scans for connected devices with device ID matching the given regex pattern
This will only generate events when the device ID matches the regex pattern- Parameters:
callback
- callback to which scan results are deliveredidRegex
- Regex pattern for filtering on the device ID
-
stopScan
void stopScan()Stop the current scan -
isScanning
boolean isScanning()- Returns:
- true if a scan is in process, false otherwise
-