Commit 0bfee4c
Refactor service classes to match characteristic architecture
- Remove @DataClass from BaseGattService and all concrete services
- Add SIGServiceResolver for consistent resolution pattern
- Add ServiceValidationConfig for validation parameters
- Add __init__ and __post_init__ methods to BaseGattService
- Make _info the single source of truth for uuid, name, summary
- Add get_class_uuid() class method for resolution without instantiation
- Refactor CustomBaseGattService with __init_subclass__ hook
- Add class-level _info attribute support with SIG override validation
- Add UnknownService class in base.py
- Update device.py UnknownService to work with new architecture
- Add is_sig_service() method to BluetoothUUID class
- All 805 tests pass, formatting and linting clean
Co-authored-by: RonanB96 <22995167+RonanB96@users.noreply.github.com>1 parent 02a9b24 commit 0bfee4c
17 files changed
Lines changed: 310 additions & 89 deletions
File tree
- src/bluetooth_sig
- device
- gatt/services
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
71 | 85 | | |
72 | 86 | | |
73 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| |||
0 commit comments