DirectL2capPeripheral

data class DirectL2capPeripheral(val uuid: UUID? = null, val psm: Int? = null, val peripheralAddress: BlePeripheralAddress? = null) : MdocConnectionMethod.Ble

mdoc direct BLE L2CAP peripheral mode (BleOptions key 2: DirectL2capPeripheral).

Constructors

Link copied to clipboard
constructor(uuid: UUID? = null, psm: Int? = null, peripheralAddress: BlePeripheralAddress? = null)

Properties

Link copied to clipboard

The L2CAP PSM if this is a DirectL2capPeripheral or DirectL2capCentral with a known PSM, or null.

Link copied to clipboard

Whether this mode uses direct BLE L2CAP for data transfer (DirectL2capPeripheral or DirectL2capCentral).

Link copied to clipboard

Whether this mode uses GATT for data transfer (GattPeripheral or GattCentral).

Link copied to clipboard

Whether the mdoc acts as BLE Central (and the mdoc reader acts as BLE Peripheral) in this mode.

Link copied to clipboard

Whether the mdoc acts as BLE Peripheral (and the mdoc reader acts as BLE Central) in this mode.

Link copied to clipboard

the mdoc's BLE peripheral device address, if known.

Link copied to clipboard
val psm: Int?

the L2CAP PSM of the mdoc's L2CAP server, if known.

Link copied to clipboard
open override val uuid: UUID?

the 128-bit BLE service UUID advertised by the mdoc, if known.

Functions

Link copied to clipboard
fun toDeviceEngagement(engagementType: MdocEngagementType = MdocEngagementType.DEVICE_QR): ByteArray

Encodes this single connection method as DeviceRetrievalMethod CBOR.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns a copy of this Ble connection method with its uuid replaced by uuid.