Platforms to show: All Mac Windows Linux Cross-Platform
CBCharacteristicMBS class
Super class: CBAttributeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Bluetooth | MBS Bluetooth Plugin | 18.1 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
CBCharacteristic and its subclass CBMutableCharacteristic represent further information about a peripheral’s service. CBCharacteristic objects in particular represent the characteristics of a remote peripheral’s service (remote peripheral devices are represented by CBPeripheral objects). A characteristic contains a single value and any number of descriptors describing that value. The properties of a characteristic determine how the value of the characteristic can be used and how the descriptors can be accessed.
Subclass of the CBAttributeMBS class.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- 5 properties
- property isBroadcasted as Boolean
- property isNotifying as Boolean
- property properties as Integer
- property service as CBServiceMBS
- property value as MemoryBlock
- 2 methods
- method Constructor Private
- method descriptors as CBDescriptorMBS()
- 10 constants
Property Constants
Constant | Value | Description |
---|---|---|
kPropertyAuthenticatedSignedWrites | &h40 |
Signed writes of the characteristic’s value are permitted, without a response from the peripheral to indicate that the write was successful. |
kPropertyBroadcast | 1 |
The characteristic’s value can be broadcast using a characteristic configuration descriptor. |
kPropertyExtendedProperties | &h80 |
Additional characteristic properties are defined in the characteristic extended properties descriptor. |
kPropertyIndicate | &h20 |
Indications of the characteristic’s value are permitted, with a response from the central to indicate that the indication was received. |
kPropertyIndicateEncryptionRequired | &h200 |
Only trusted devices can enable indications of the characteristic’s value. |
kPropertyNotify | &h10 |
Notifications of the characteristic’s value are permitted, without a response from the central to indicate that the notification was received. |
kPropertyNotifyEncryptionRequired | &h100 |
Only trusted devices can enable notifications of the characteristic’s value. |
kPropertyRead | 2 |
The characteristic’s value can be read. |
kPropertyWrite | 8 |
The characteristic’s value can be written, with a response from the peripheral to indicate that the write was successful. |
kPropertyWriteWithoutResponse | 4 |
The characteristic’s value can be written, without a response from the peripheral to indicate that the write was successful. |
Super class CBAttributeMBS
- 2 properties
- method Constructor Private
- shared method Available as boolean
Sub classes:
Some methods using this class:
- CBMutableServiceMBS.setCharacteristics(characteristics() as CBCharacteristicMBS)
- CBPeripheralMBS.discoverDescriptorsForCharacteristic(Characteristic as CBCharacteristicMBS)
- CBPeripheralMBS.readValueForCharacteristic(Characteristic as CBCharacteristicMBS)
- CBPeripheralMBS.setNotifyValue(enabled as Boolean, Characteristic as CBCharacteristicMBS)
- CBPeripheralMBS.writeValue(data as MemoryBlock, Characteristic as CBCharacteristicMBS, Type as Integer)
- CBServiceMBS.characteristics as CBCharacteristicMBS()
Some properties using for this class:
- CBATTRequestMBS.characteristic as CBCharacteristicMBS
- CBDescriptorMBS.Characteristic as CBCharacteristicMBS
Some events using this class:
- CBPeripheralManagerMBS.DidSubscribeToCharacteristic(central as CBCentralMBS, characteristic as CBCharacteristicMBS)
- CBPeripheralManagerMBS.DidUnsubscribeFromCharacteristic(central as CBCentralMBS, characteristic as CBCharacteristicMBS)
- CBPeripheralMBS.DidDiscoverDescriptorsForCharacteristic(characteristic as CBCharacteristicMBS, error as NSErrorMBS)
- CBPeripheralMBS.DidUpdateNotificationStateForCharacteristic(characteristic as CBCharacteristicMBS, error as NSErrorMBS)
- CBPeripheralMBS.DidUpdateValueForCharacteristic(characteristic as CBCharacteristicMBS, error as NSErrorMBS)
- CBPeripheralMBS.DidWriteValueForCharacteristic(characteristic as CBCharacteristicMBS, error as NSErrorMBS)
Some examples using this class:
The items on this page are in the following plugins: MBS Bluetooth Plugin.
CBCentralMBS - CBDescriptorMBS