TransportDiscoveryData
class TransportDiscoveryData : Parcelable
kotlin.Any | |
↳ | android.bluetooth.le.TransportDiscoveryData |
Wrapper for Transport Discovery Data AD Type. This class contains the Transport Discovery Data AD Type Code as well as a list of potential Transport Blocks.
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
TransportDiscoveryData(transportDataType: Int, transportBlocks: MutableList<TransportBlock!>) Creates a TransportDiscoveryData instance. |
|
TransportDiscoveryData(transportDiscoveryData: ByteArray) Creates a TransportDiscoveryData instance from byte arrays. |
Public methods | |
---|---|
MutableList<TransportBlock!> | |
Int |
Gets the transport data type. |
ByteArray? |
Converts this TransportDiscoveryData to byte array |
String |
toString() |
Int | |
Unit |
writeToParcel(dest: Parcel, flags: Int) Flatten this object in to a Parcel. |
Properties | |
---|---|
static Parcelable.Creator<TransportDiscoveryData!> |
Public constructors
TransportDiscoveryData
TransportDiscoveryData(
transportDataType: Int,
transportBlocks: MutableList<TransportBlock!>)
Creates a TransportDiscoveryData instance.
Parameters | |
---|---|
transportDataType |
Int: the Transport Discovery Data AD Type |
transportBlocks |
MutableList<TransportBlock!>: the list of Transport Blocks This value cannot be null . |
TransportDiscoveryData
TransportDiscoveryData(transportDiscoveryData: ByteArray)
Creates a TransportDiscoveryData instance from byte arrays.
Uses the transport discovery data bytes and parses them into an usable class.
Parameters | |
---|---|
transportDiscoveryData |
ByteArray: the raw discovery data This value cannot be null . |
Public methods
getTransportBlocks
fun getTransportBlocks(): MutableList<TransportBlock!>
Return | |
---|---|
MutableList<TransportBlock!> |
the list of TransportBlock in this TransportDiscoveryData or an empty list if there are no Transport Blocks This value cannot be null . |
getTransportDataType
fun getTransportDataType(): Int
Gets the transport data type.
toByteArray
fun toByteArray(): ByteArray?
Converts this TransportDiscoveryData to byte array
Return | |
---|---|
ByteArray? |
byte array representation of this Transport Discovery Data or null if the conversion failed |
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
totalBytes
fun totalBytes(): Int
Return | |
---|---|
Int |
total byte count of this TransportDataDiscovery |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Parameters | |
---|---|
dest |
Parcel: This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |