UwbControllerSessionScope
public interface UwbControllerSessionScope extends UwbClientSessionScope
Interface for controller client session that is established between nearby UWB devices.
Summary
Public methods |
|
|---|---|
abstract void |
addControlee(@NonNull UwbAddress address)Dynamically adds a controlee to an active ranging session. |
abstract void |
addControlee(Dynamically adds a controlee to an active ranging session. |
abstract @NonNull UwbComplexChannel |
The local device's complex channel which can be used for ranging. |
abstract void |
reconfigureRangingInterval(int intervalSkipCount)Dynamically reconfigures ranging interval to an active ranging session. |
abstract void |
removeControlee(@NonNull UwbAddress address)Dynamically removes a controlee from an active ranging session. |
Extension functions |
|
|---|---|
default final @NonNull Single<Unit> |
UwbControllerSessionScopeRx.addControleeSingle(Returns a |
default final @NonNull Single<Unit> |
UwbControllerSessionScopeRx.removeControleeSingle(Returns a |
Inherited methods |
||||||||
|---|---|---|---|---|---|---|---|---|
|
Public methods
addControlee
abstract void addControlee(@NonNull UwbAddress address)
Dynamically adds a controlee to an active ranging session. The controlee to be added must be configured with the a set of parameters that can join the existing connection.
| Throws | |
|---|---|
kotlin.IllegalStateException |
if the ranging is inactive or if the ranging profile is that of a unicast profile. Otherwise, this method will return successfully, and clients are expected to handle either |
addControlee
abstract void addControlee(
@NonNull UwbAddress address,
@NonNull RangingControleeParameters parameters
)
Dynamically adds a controlee to an active ranging session. The controlee to be added must be configured with the a set of parameters that can join the existing connection.
| Throws | |
|---|---|
kotlin.IllegalStateException |
if the ranging is inactive or if the ranging profile is not the provisioned STS individual key case. Otherwise, this method will return successfully, and clients are expected to handle either |
getUwbComplexChannel
abstract @NonNull UwbComplexChannel getUwbComplexChannel()
The local device's complex channel which can be used for ranging.
A complex channel can only be used for a single ranging session. After the ranging session is ended, a new channel will be allocated.
Ranging session duration may also be limited to prevent channels from being used for too long. In this case, your ranging session would be suspended and clients would need to exchange the new channel with their peer before starting again.
reconfigureRangingInterval
abstract void reconfigureRangingInterval(int intervalSkipCount)
Dynamically reconfigures ranging interval to an active ranging session.
| Throws | |
|---|---|
kotlin.IllegalStateException |
if the ranging is inactive. Otherwise, this method will return successfully with the ranging session reconfigured to skip number of ranging intervals set in intervalSkipCount. If intervalSkipCount is set to 0, the ranging interval will be set to the interval used when startRanging was called. |
removeControlee
abstract void removeControlee(@NonNull UwbAddress address)
Dynamically removes a controlee from an active ranging session.
| Throws | |
|---|---|
kotlin.IllegalStateException |
if the ranging is inactive, if the ranging profile is that of a unicast profile, or if the requested device is not being ranged to. |
androidx.core.uwb.exceptions.UwbSystemCallbackException |
if the operation failed due to hardware or firmware issues. Otherwise, this method will return successfully, and clients are expected to handle |
Extension functions
UwbControllerSessionScopeRx.addControleeSingle
default final @NonNull Single<Unit> UwbControllerSessionScopeRx.addControleeSingle(
@NonNull UwbControllerSessionScope receiver,
@NonNull UwbAddress address
)
Returns a Single that will run in a given block to add a controlee.
| See also | |
|---|---|
addControlee |
UwbControllerSessionScopeRx.removeControleeSingle
default final @NonNull Single<Unit> UwbControllerSessionScopeRx.removeControleeSingle(
@NonNull UwbControllerSessionScope receiver,
@NonNull UwbAddress address
)
Returns a Single that will run in a given block to remove a controlee.
| See also | |
|---|---|
removeControlee |