UwbControllerSessionScope
interface UwbControllerSessionScope : UwbClientSessionScope
Interface for controller client session that is established between nearby UWB devices.
Summary
Public functions |
|
---|---|
suspend Unit |
addControlee(address: UwbAddress) Dynamically adds a controlee to an active ranging session. |
suspend Unit |
addControlee(address: UwbAddress, parameters: RangingControleeParameters) Dynamically adds a controlee to an active ranging session. |
suspend Unit |
reconfigureRangingInterval(intervalSkipCount: Int) Dynamically reconfigures ranging interval to an active ranging session. |
suspend Unit |
removeControlee(address: UwbAddress) Dynamically removes a controlee from an active ranging session. |
Public properties |
|
---|---|
UwbComplexChannel |
The local device's complex channel which can be used for ranging. |
Extension functions |
|
---|---|
Single<Unit> |
Returns a |
Single<Unit> |
Returns a |
Inherited functions |
||||
---|---|---|---|---|
|
Inherited properties |
||||
---|---|---|---|---|
|
Public functions
addControlee
suspend fun addControlee(address: UwbAddress): Unit
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
suspend fun addControlee(address: UwbAddress, parameters: RangingControleeParameters): Unit
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 |
reconfigureRangingInterval
suspend fun reconfigureRangingInterval(intervalSkipCount: Int): Unit
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
suspend fun removeControlee(address: UwbAddress): Unit
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 |
Public properties
uwbComplexChannel
val uwbComplexChannel: UwbComplexChannel
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.
Extension functions
addControleeSingle
fun UwbControllerSessionScope.addControleeSingle(address: UwbAddress): Single<Unit>
Returns a Single
that will run in a given block to add a controlee.
See also | |
---|---|
addControlee |
removeControleeSingle
fun UwbControllerSessionScope.removeControleeSingle(address: UwbAddress): Single<Unit>
Returns a Single
that will run in a given block to remove a controlee.
See also | |
---|---|
removeControlee |