Characteristic
Declares a characteristic with the given UUID.
Sample code:
val handle = Characteristic(
uuid = <Some UUID>,
properties = CharacteristicProperty.READ and CharacteristicProperty.WRITE,
permissions = Permission.READ and Permission.WRITE,
) {
CharacteristicUserDescriptionDescriptor("Some description")
}Return
The handle number of the characteristic.
Parameters
The UUID of the characteristic.
Set of properties of the characteristic.
The permissions of the characteristic.
Scope of the characteristic.
Declares a characteristic with the given 16 or 32 bit short UUID.
Sample code:
val handle = Characteristic(
shortUuid = <16 or 32-bit UUID>,
properties = CharacteristicProperty.READ and CharacteristicProperty.WRITE,
permissions = Permission.READ and Permission.WRITE,
)Return
The handle number of the characteristic.
Parameters
The 16 or 32 bit short UUID of the characteristic.
Set of properties of the characteristic.
The permissions of the characteristic.
Scope of the characteristic.
See also
Declares a characteristic with the given UUID.
Sample code:
val handle = Characteristic(
uuid = <Some UUID>,
properties = CharacteristicProperty.READ and CharacteristicProperty.NOTIFY,
permission = Permission.READ,
) {
// Note: Client Characteristic Configuration descriptor is added automatically.
CharacteristicUserDescriptionDescriptor("Some description")
}Return
The handle number of the characteristic.
Parameters
The UUID of the characteristic.
Set of properties of the characteristic.
The permission of the characteristic.
Scope of the characteristic.
Declares a characteristic with the given 16 or 32 bit short UUID.
Sample code:
val handle = Characteristic(
shortUuid = <16 pr 32-bit UUID>,
properties = CharacteristicProperty.READ and CharacteristicProperty.NOTIFY,
permission = Permission.READ,
) {
// Note: Client Characteristic Configuration descriptor is added automatically.
CharacteristicUserDescriptionDescriptor("Some description")
}Return
The handle number of the characteristic.
Parameters
The 16 or 32 bit short UUID of the characteristic.
Set of properties of the characteristic.
The permission of the characteristic.
Scope of the characteristic.
See also
Declares a characteristic with the given UUID.
Sample code:
val handle = Characteristic(
uuid = <Some UUID>,
property = CharacteristicProperty.READ,
permission = Permission.READ,
)Return
The handle number of the characteristic.
Parameters
The UUID of the characteristic.
Set of properties of the characteristic.
The permission of the characteristic.
Scope of the characteristic.
Declares a characteristic with the given 16 or 32 bit short UUID.
Sample code:
val handle = Characteristic(
shortUuid = <16 or 32-bit UUID>,
property = CharacteristicProperty.WRITE,
permission = Permission.WRITE_ENCRYPTED,
)Return
The handle number of the characteristic.
Parameters
The 16 or 32 bit short UUID of the characteristic.
Set of properties of the characteristic.
The permission of the characteristic.
Scope of the characteristic.
See also
Declares a characteristic with the given UUID without permission to read or write.
Sample code:
val handle = Characteristic(
uuid = <Some UUID>,
property = CharacteristicProperty.NOTIFY,
)Return
The handle number of the characteristic.
Parameters
The UUID of the characteristic.
Set of properties of the characteristic.
Scope of the characteristic.
Declares a characteristic with the given 16 or 32 bit short UUID without permission to read or write.
Sample code:
val handle = Characteristic(
shortUuid = <16 or 32-bit UUID>,
property = CharacteristicProperty.READ,
)Return
The handle number of the characteristic.
Parameters
The 16 or 32 bit short UUID of the characteristic.
Set of properties of the characteristic.
Scope of the characteristic.