BleDecoder

fun interface BleDecoder<out T>

Decodes a ByteArray into a value of type T.

For zero-copy decoding of BleData from scanner advertisements or server write handlers, use BleDataDecoder instead.

Inheritors

Functions

Link copied to clipboard

Bridge a BleDecoder to work with BleData input.

Link copied to clipboard
abstract fun decode(data: ByteArray): T
Link copied to clipboard
fun <A, B> BleDecoder<A>.map(transform: (A) -> B): BleDecoder<B>

Transform the output of this decoder.