Coverage for src/bluetooth_sig/types/device_types.py: 100%
13 statements
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 00:10 +0000
« prev ^ index » next coverage.py v7.11.0, created at 2025-10-30 00:10 +0000
1"""Device-related data types for BLE device management."""
3from __future__ import annotations
5import msgspec
7from ..gatt.services.base import BaseGattService
8from .protocols import CharacteristicDataProtocol
11class DeviceService(msgspec.Struct, kw_only=True):
12 """Represents a service on a device with its characteristics."""
14 service: BaseGattService
15 characteristics: dict[str, CharacteristicDataProtocol] = msgspec.field(default_factory=dict)
18class DeviceEncryption(msgspec.Struct, kw_only=True):
19 """Encryption requirements and status for the device."""
21 requires_authentication: bool = False
22 requires_encryption: bool = False
23 encryption_level: str = ""
24 security_mode: int = 0
25 key_size: int = 0