McuMgrTransport
interface McuMgrTransport
An McuMgrTransport is tasked with sending requests to, and receiving responses from a device. Transport implementations should conform to one of the McuMgrSchemes. Furthermore, the McuManager does not maintain the state of the transporter, and so the transport must set-up and tear-down connections on its own accord.
Types
Link copied to clipboard
interface ConnectionCallback
Receives callbacks from an explicit call to connect.
Link copied to clipboard
interface ConnectionObserver
Link copied to clipboard
interface ModeChangeCallback
Receives callbacks from an explicit call to changeMode.
Functions
Link copied to clipboard
Adds the connection observer.
Link copied to clipboard
abstract fun changeMode(@NotNull name: @NotNull String, @Nullable callback: @Nullable McuMgrTransport.ModeChangeCallback): Boolean
Changes the transport mode.
Link copied to clipboard
Connect the transporter to the remote device.
Link copied to clipboard
Gets the scheme for this transport (see McuMgrScheme).
Link copied to clipboard
Removes previously registered observer.
Link copied to clipboard
@NotNull
Send a synchronous Mcu Manager request.
abstract fun <T : McuMgrResponse?> send(payload: @NotNull Array<Byte>, timeout: Long, @NotNull responseType: @NotNull Class<T>, @NotNull callback: @NotNull McuMgrCallback<T>)
Send an asynchronous Mcu Manager request.