Descriptor

abstract fun Descriptor(uuid: Uuid, permissions: Set<Permission> = emptySet()): Int

Declares a descriptor with the given UUID.

Sample code:

val handle = Descriptor(
uuid = <Some UUID>,
permissions = Permission.READ and Permission.WRITE,
)

Return

The handle number of the descriptor.

Parameters

uuid

The UUID of the descriptor.

permissions

Set of permissions of the descriptor.


open fun Descriptor(shortUuid: Int, permissions: Set<Permission> = emptySet()): Int

Declares a descriptor with the given 16 or 32 bit short UUID.

Sample code:

val handle = Descriptor(
shortUuid = <16 or 32-bit UUID>,
permissions = Permission.READ and Permission.WRITE,
)

Return

The handle number of the descriptor.

Parameters

shortUuid

16 or 32-bit UUID of the descriptor.

permissions

Set of permissions of the descriptor.

See also


open fun Descriptor(uuid: Uuid, permission: Permission): Int

Declares a descriptor with the given UUID.

Sample code:

Descriptor(
uuid = <Some UUID>,
permission = Permission.READ,
)

Return

The handle number of the descriptor.

Parameters

uuid

The UUID of the descriptor.

permission

The permission of the descriptor.


open fun Descriptor(shortUuid: Int, permission: Permission): Int

Declares a descriptor with the given 16 or 32 bit short UUID.

Sample code:

Descriptor(
shortUuid = <16 or 32-bit UUID>,
permission = Permission.READ,
)

Return

The handle number of the descriptor.

Parameters

shortUuid

16 or 32-bit UUID of the descriptor.

permission

The permission of the descriptor.

See also