WinRT (Windows)
The WinRT backend implements GATT services and advertising using Windows Runtime Bluetooth APIs.
- class bless.backends.winrt.service.BlessGATTServiceWinRT(*args: Any, **kwargs: Any)
GATT Characteristic implementation for the WinRT backend
- property description: str
Description of this service
- property handle: int
The integer handle of this service
- async init(server: BaseBlessServer)
Initialize the GattLocalService Object
- Parameters:
server (BlessServerWinRT) – The server to assign the service to
- property uuid: str
UUID for this service
- class bless.backends.winrt.characteristic.BlessGATTCharacteristicWinRT(*args: Any, **kwargs: Any)
WinRT implementation of the BlessGATTCharacteristic
- property description: str
Description of this characteristic
- property handle: int
The handle of this characteristic
- async init(service: BlessGATTService)
Initialize the WinRT GattLocalCharacteristic object
- Parameters:
service (BlessGATTServiceWinRT) – The service to assign the characteristic to
- static permissions_to_protection_level(permissions: GATTAttributePermissions, read: bool) bleak_winrt.windows.devices.bluetooth.genericattributeprofile.GattProtectionLevel
Convert the GATTAttributePermissions into a GattProtectionLevel GATTAttributePermissions currently only consider Encryption or Plain
- Parameters:
permissions (GATTAttributePermissions) – The permission flags for the characteristic
read (bool) – If True, processes the permissions for Reading, else process for Writing
- Returns:
The protection level equivalent
- Return type:
GattProtectionLevel
- property service_handle: int
The handle of the service this characteristic belongs to
- property service_uuid: str
The UUID of the service this characteristic belongs to
- property subscribed_centrals: Set[str]
Unique list of subscribed central IDs
- property uuid: str
The uuid of this characteristic
- property value: bytearray
Get the value of the characteristic
- class bless.backends.winrt.descriptor.BlessGATTDescriptorWinRT(*args: Any, **kwargs: Any)
WinRT implementation of a GATT Descriptor
- async init(characteristic: BlessGATTCharacteristic)
Initializes the backend-specific descriptor object and stores it in self.obj
- property value: bytearray
Get the value of the descriptor