RangingParameters.Builder

  • RangingParameters.Builder is a class used to create instances of RangingParameters.

  • The builder allows setting various parameters for UWB ranging, including peer devices, channel configuration, session details, and update rates.

  • Key methods include addPeerDevice to specify the target for ranging and build to finalize the RangingParameters object.

  • You can disable angle of arrival measurement using setIsAoaDisabled and set configuration details like setUwbConfigId and setRangingUpdateRate.

public static class RangingParameters.Builder extends Object

Builder for creating RangingParameters.

Public Constructor Summary

Public Method Summary

RangingParameters.Builder
addPeerDevice(UwbDevice peerDevice)
Sets the peer that should be ranged against.
RangingParameters
build()
Builds a new instance of RangingParameters.
RangingParameters.Builder
setComplexChannel(UwbComplexChannel complexChannel)
Sets a complex channel.
RangingParameters.Builder
setIsAoaDisabled(boolean isAoaDisabled)
If true, disables angle of arrival measurement.
RangingParameters.Builder
setPrecisionFindingConfig(PrecisionFindingConfig precisionFindingConfig)
Sets the precision finding configuration.
RangingParameters.Builder
setRangingUpdateRate(int rangingUpdateRate)
Sets the update rate.
RangingParameters.Builder
setSessionId(int sessionId)
Sets the session ID.
RangingParameters.Builder
setSessionKeyInfo(byte[] sessionKeyInfo)
Sets the session key info.
RangingParameters.Builder
setSlotDuration(int slotDuration)
Sets the slot duration.
RangingParameters.Builder
setSubSessionId(int subSessionId)
Sets the sub-session ID.
RangingParameters.Builder
setSubSessionKeyInfo(byte[] subSessionKeyInfo)
Sets the sub-session key info.
RangingParameters.Builder
setUwbConfigId(int uwbConfigId)
Sets the config ID.
RangingParameters.Builder
setUwbRangeDataNtfConfig(UwbRangeDataNtfConfig uwbRangeDataNtfConfig)
Sets the UWB range data notification config.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public RangingParameters.Builder addPeerDevice (UwbDevice peerDevice)

Sets the peer that should be ranged against.

public RangingParameters build ()

Builds a new instance of RangingParameters.

public RangingParameters.Builder setComplexChannel (UwbComplexChannel complexChannel)

Sets a complex channel. This should be set if using ROLE_CONTROLLEE.

public RangingParameters.Builder setIsAoaDisabled (boolean isAoaDisabled)

If true, disables angle of arrival measurement.

If false and precision finding is enabled, hardware AoA takes precedence.

public RangingParameters.Builder setPrecisionFindingConfig (PrecisionFindingConfig precisionFindingConfig)

Sets the precision finding configuration. A null value disables precision finding.

If both precision finding and AoA are enabled, hardware AoA takes precedence and precision finding is used as a fallback if AoA is unavailable.

Only supported for the following RangingParameters.UwbConfigIds:

public RangingParameters.Builder setRangingUpdateRate (int rangingUpdateRate)

Sets the update rate. The default is RangingParameters.RangingUpdateRate.FREQUENT.

public RangingParameters.Builder setSessionId (int sessionId)

Sets the session ID.

public RangingParameters.Builder setSessionKeyInfo (byte[] sessionKeyInfo)

Sets the session key info.

public RangingParameters.Builder setSlotDuration (int slotDuration)

Sets the slot duration.

public RangingParameters.Builder setSubSessionId (int subSessionId)

Sets the sub-session ID.

public RangingParameters.Builder setSubSessionKeyInfo (byte[] subSessionKeyInfo)

Sets the sub-session key info.

public RangingParameters.Builder setUwbConfigId (int uwbConfigId)

Sets the config ID. This parameter must be explicitly set.

public RangingParameters.Builder setUwbRangeDataNtfConfig (UwbRangeDataNtfConfig uwbRangeDataNtfConfig)

Sets the UWB range data notification config.