TransportBlock
class TransportBlock : Parcelable
| kotlin.Any | |
| ↳ | android.bluetooth.le.TransportBlock | 
Wrapper for Transport Discovery Data Transport Blocks. This class represents a Transport Block from a Transport Discovery Data.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
| TransportBlock(orgId: Int, tdsFlags: Int, transportDataLength: Int, transportData: ByteArray?)Creates an instance of TransportBlock from raw data. | |
| Public methods | |
|---|---|
| Int | getOrgId()Gets the Organization ID of the Transport Block which corresponds to one of the Bluetooth SIG Assigned Numbers. | 
| Int | Gets the TDS flags of the Transport Block which represents the role of the device and information about its state and supported features. | 
| ByteArray? | Gets the Transport Data of the Transport Block which contains organization-specific data. | 
| Int | Gets the total number of octets in the Transport Data field in this Transport Block. | 
| ByteArray? | Converts this TransportBlock to byte array | 
| Int | |
| Unit | writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. | 
| Properties | |
|---|---|
| static Parcelable.Creator<TransportBlock!> | |
Public constructors
TransportBlock
TransportBlock(
orgId: Int,
tdsFlags: Int,
transportDataLength: Int,
transportData: ByteArray?)
Creates an instance of TransportBlock from raw data.
| Parameters | |
|---|---|
| orgId | Int: the Organization ID | 
| tdsFlags | Int: the TDS flags | 
| transportDataLength | Int: the total length of the Transport Data | 
| transportData | ByteArray?: the Transport Data This value may be null. | 
Public methods
getOrgId
fun getOrgId(): Int
Gets the Organization ID of the Transport Block which corresponds to one of the Bluetooth SIG Assigned Numbers.
getTdsFlags
fun getTdsFlags(): Int
Gets the TDS flags of the Transport Block which represents the role of the device and information about its state and supported features.
getTransportData
fun getTransportData(): ByteArray?
Gets the Transport Data of the Transport Block which contains organization-specific data.
| Return | |
|---|---|
| ByteArray? | This value may be null. | 
getTransportDataLength
fun getTransportDataLength(): Int
Gets the total number of octets in the Transport Data field in this Transport Block.
toByteArray
fun toByteArray(): ByteArray?
Converts this TransportBlock to byte array
| Return | |
|---|---|
| ByteArray? | byte array representation of this Transport Block or null if the conversion failed | 
totalBytes
fun totalBytes(): Int
| Return | |
|---|---|
| Int | total byte count of this TransportBlock | 
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 either0or a combination ofandroid.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES | 
