Stay organized with collections
Save and categorize content based on your preferences.
TransportHandle
interface TransportHandle : AutoCloseable
TransportHandle is used as the Out-Of-Band (OOB) transport mechanism by ranging module. In cases where module is used in a non-raw ranging mode, the user shall provide an implementation of the TransportHandle, allowing ranging module to do the necessary OOB communication with a peer device using the provided transport handle. Some examples of OOB transport between two peer devices are:
- BLE GATT connection
- Wi-Fi MDNS link
- Internet
Summary
Nested classes |
abstract |
TransportHandle callback.
|
Public methods |
abstract Unit |
Registers a callback to receive updates from the transport mechanism.
|
abstract Unit |
Send data to the peer device via the implemented OOB transport.
|
Inherited functions |
From class AutoCloseable
Unit |
close()
Closes this resource, relinquishing any underlying resources. This method is invoked automatically on objects managed by the try -with-resources statement.
|
|
Public methods
registerReceiveCallback
abstract fun registerReceiveCallback(
executor: Executor,
callback: TransportHandle.ReceiveCallback
): Unit
Registers a callback to receive updates from the transport mechanism.
The callback should be used to notify information about the peer device including the data received from the peer device.
Exceptions |
java.lang.IllegalArgumentException |
if either executor or callback is null. |
sendData
abstract fun sendData(data: ByteArray): Unit
Send data to the peer device via the implemented OOB transport.
Parameters |
data |
ByteArray: the data to be sent to the peer device. Must not be null. |
Exceptions |
java.lang.IllegalArgumentException |
if the provided data is null or invalid |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-01-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-23 UTC."],[],[]]