BleCsRangingParams.Builder
public
static
final
class
BleCsRangingParams.Builder
extends Object
java.lang.Object | |
↳ | android.ranging.ble.cs.BleCsRangingParams.Builder |
Builder class to create BleCsRangingParams
instances.
Summary
Public constructors | |
---|---|
Builder(String peerBluetoothAddress)
Constructs a new |
Public methods | |
---|---|
BleCsRangingParams
|
build()
Builds and returns a |
BleCsRangingParams.Builder
|
setLocationType(int locationType)
Sets the location type for the ranging session. |
BleCsRangingParams.Builder
|
setRangingUpdateRate(int updateRate)
Sets the update rate for the CS ranging session. |
BleCsRangingParams.Builder
|
setSecurityLevel(int securityLevel)
Sets the security level for the ranging session. |
BleCsRangingParams.Builder
|
setSightType(int sightType)
Sets the sight type for the ranging session. |
Inherited methods | |
---|---|
Public constructors
Builder
public Builder (String peerBluetoothAddress)
Constructs a new Builder
for creating a channel sounding ranging session.
Valid Bluetooth hardware addresses must be upper case, in big endian byte order, and
in a format such as "00:11:22:33:AA:BB". The helper
BluetoothAdapter.checkBluetoothAddress(String)
is available to validate
a Bluetooth address.
Parameters | |
---|---|
peerBluetoothAddress |
String : The address of the peer device must be non-null Bluetooth
address. |
Throws | |
---|---|
IllegalArgumentException |
if peerBluetoothAddress is null or does not
conform to "00:11:22:33:AA:BB" format. |
See also:
Public methods
build
public BleCsRangingParams build ()
Builds and returns a BleCsRangingParams
instance.
Returns | |
---|---|
BleCsRangingParams |
a new BleCsRangingParams .
This value cannot be null . |
setLocationType
public BleCsRangingParams.Builder setLocationType (int locationType)
Sets the location type for the ranging session.
Defaults to BleCsRangingParams.LOCATION_TYPE_UNKNOWN
Parameters | |
---|---|
locationType |
int : the location type.
Value is BleCsRangingParams.LOCATION_TYPE_UNKNOWN , BleCsRangingParams.LOCATION_TYPE_INDOOR , or BleCsRangingParams.LOCATION_TYPE_OUTDOOR |
Returns | |
---|---|
BleCsRangingParams.Builder |
this Builder instance.
This value cannot be null . |
setRangingUpdateRate
public BleCsRangingParams.Builder setRangingUpdateRate (int updateRate)
Sets the update rate for the CS ranging session.
Parameters | |
---|---|
updateRate |
int : the reporting frequency.
Value is RawRangingDevice.UPDATE_RATE_NORMAL , RawRangingDevice.UPDATE_RATE_INFREQUENT , or RawRangingDevice.UPDATE_RATE_FREQUENT |
Returns | |
---|---|
BleCsRangingParams.Builder |
this Builder instance.
This value cannot be null . |
setSecurityLevel
public BleCsRangingParams.Builder setSecurityLevel (int securityLevel)
Sets the security level for the ranging session.
Defaults to BleCsRangingCapabilities.CS_SECURITY_LEVEL_ONE
Parameters | |
---|---|
securityLevel |
int : the security level.
Value is BleCsRangingCapabilities.CS_SECURITY_LEVEL_ONE , or BleCsRangingCapabilities.CS_SECURITY_LEVEL_FOUR |
Returns | |
---|---|
BleCsRangingParams.Builder |
this Builder instance.
This value cannot be null . |
setSightType
public BleCsRangingParams.Builder setSightType (int sightType)
Sets the sight type for the ranging session.
Defaults to BleCsRangingParams.SIGHT_TYPE_UNKNOWN
Parameters | |
---|---|
sightType |
int : the sight type.
Value is BleCsRangingParams.SIGHT_TYPE_UNKNOWN , BleCsRangingParams.SIGHT_TYPE_LINE_OF_SIGHT , or BleCsRangingParams.SIGHT_TYPE_NON_LINE_OF_SIGHT |
Returns | |
---|---|
BleCsRangingParams.Builder |
this Builder instance.
This value cannot be null . |