Class SensorScanSettings
java.lang.Object
com.codename1.health.sensors.SensorScanSettings
Which sensors to look for and for how long.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddProfile(HealthSensorProfile profile) Looks for devices advertising this profile.The profiles being scanned for, empty meaning all of them.How long to scan before giving up, as a
.invalid reference
DurationintThe scan timeout in milliseconds.booleantruewhen a low-power scan was requested.setLowPower(boolean lowPower) Scans at a lower duty cycle, trading discovery latency for battery.setTimeout(Duration value) How long to scan before giving up.setTimeoutMillis(int timeoutMillis)
-
Constructor Details
-
SensorScanSettings
public SensorScanSettings()
-
-
Method Details
-
addProfile
Looks for devices advertising this profile. Add several to scan for more than one kind at once; adding none scans for every profile this framework understands. -
getProfiles
The profiles being scanned for, empty meaning all of them. -
setTimeout
How long to scan before giving up.
The
form ofinvalid reference
DurationsetTimeoutMillis(int), which is the type the rest ofthe framework speaks; the millis form stays for the ports and the wire format.
-
getTimeout
How long to scan before giving up, as a
.invalid reference
Duration -
setTimeoutMillis
-
getTimeoutMillis
public int getTimeoutMillis()The scan timeout in milliseconds. -
setLowPower
Scans at a lower duty cycle, trading discovery latency for battery. Worth setting when scanning in the background or for a long time. -
isLowPower
public boolean isLowPower()truewhen a low-power scan was requested.
-