TransferState
The state of an upload or a download, as reported by the flow returned by the upload and download methods.
The flow is cold: the transfer starts when the flow is collected, and is cancelled when the collection is cancelled. The first emitted state is always Started. The flow completes after Completed or Cancelled, and fails with an McuMgrException if the transfer fails.
Type Parameters
R
The type of the result of the transfer: Unit for uploads and downloads to a stream, ByteArray for downloads.
Inheritors
Types
Link copied to clipboard
The transfer has been cancelled using the controller.
Link copied to clipboard
data class InProgress(val current: Int, val total: Int, val timestamp: Long) : TransferState<Nothing>
The progress of the transfer.
Link copied to clipboard
The transfer has been started.