Kallisto Linux API
Library for interacting with Kallisto devices
BluetoothScannerConfiguration::Builder Class Reference

Public Member Functions

 Builder ()
 
 ~Builder ()
 
Buildercontinuous ()
 
Builderstop ()
 
BuilderwithDuration (std::chrono::seconds duration)
 
BuilderwithShortDuration ()
 
BuilderwithMediumDuration ()
 
BuilderwithLongDuration ()
 
BuilderwithCycle (std::chrono::seconds cycle_time)
 
BuilderwithResponsiveCycle ()
 
BuilderwithBalancedCycle ()
 
BuilderwithLowPowerCycle ()
 
BuilderwithLegacyDiscoveryFallback ()
 
BluetoothScannerConfiguration build ()
 
BluetoothScannerConfiguration buildDefault ()
 

Constructor & Destructor Documentation

◆ Builder()

Builder ( )

Builder constructor.

◆ ~Builder()

~Builder ( )

Builder destructor.

Member Function Documentation

◆ build()

Builds a new instance of a BluetoothScannerConfiguration using the configured parameters.

Returns
A valid BluetoothScannerConfiguration.

◆ buildDefault()

Builds a new instance of a BluetoothScannerConfiguration using the default parameters.

Equivalent to:

See also
BluetoothScannerConfiguration
Returns
A valid BluetoothScannerConfiguration.

◆ continuous()

Builder& continuous ( )

Set the scan to Continuous.

Will only be stopped with a Stop configuration.

Returns
This Builder instance.

◆ stop()

Builder& stop ( )

Set the scan to Stopped.

Will stop any running scan.

Returns
This Builder instance.

◆ withBalancedCycle()

Builder& withBalancedCycle ( )

Sets the duration time to BALANCED_SCANNER seconds.

Helper method that call withCycle(int).

Returns
This Builder instance.

◆ withCycle()

Builder& withCycle ( std::chrono::seconds  cycle_time)

Set the cycle duration time.

Represents the amount of time that the scanner waits after finishing a scan before starting a new scan.

Will set the mode to Cyclic if the configuration was not explicitly configured by continuous() or stop() calls. If duration is not set, will call withShortDuration().

Parameters
cycleTimeThe desired scan cycle duration, in seconds. Ignored if
<= 0
and truncated to MAX_CYCLE_DURATION.
Returns
This Builder instance.

◆ withDuration()

Builder& withDuration ( std::chrono::seconds  duration)

Set the scan duration time.

Will set the mode to One Shot if the configuration was not explicitly configured by continuous() or stop() calls and cycle time is not set.

Parameters
durationThe desired scan duration, in seconds. Ignored if
<= 0
and truncated to MAX_DURATION.
Returns
This Builder instance.

◆ withLegacyDiscoveryFallback()

Builder& withLegacyDiscoveryFallback ( )

Sets if legacy Kallisto device discovery is enabled.

If this is enabled, the scanner will connect to the device in order to discoverFeatures the device features, if the advertising data doesn't use the firmware SDK Advertising Manager.

Disabled by default.

Returns
true
if legacy discovery is enabled.

◆ withLongDuration()

Builder& withLongDuration ( )

Sets the duration time to LONG_SCAN seconds.

Helper method that call withDuration(int).

Returns
This Builder instance.

◆ withLowPowerCycle()

Builder& withLowPowerCycle ( )

Sets the duration time to LOW_POWER_SCANNER seconds.

Helper method that call withCycle(int).

Returns
This Builder instance.

◆ withMediumDuration()

Builder& withMediumDuration ( )

Sets the duration time to MEDIUM_SCAN seconds.

Helper method that call withDuration(int).

Returns
This Builder instance.

◆ withResponsiveCycle()

Builder& withResponsiveCycle ( )

Sets the duration time to RESPONSIVE_SCANNER seconds.

Helper method that call withCycle(int).

Returns
This Builder instance.

◆ withShortDuration()

Builder& withShortDuration ( )

Sets the duration time to SHORT_SCAN seconds.

Helper method that call withDuration().

Returns
This Builder instance.

The documentation for this class was generated from the following file: