blatann.services.battery package¶
- blatann.services.battery.add_battery_service(gatts_database, enable_notifications=False, security_level=SecurityLevel.OPEN)¶
Adds a battery service to the given GATT Server database
- Parameters
gatts_database (blatann.gatt.gatts.GattsDatabase) – The database to add the service to
enable_notifications – Whether or not the Battery Level characteristic allows notifications
security_level – The security level to use for the service
- Returns
The Battery service
- Return type
_BatteryServer
- blatann.services.battery.find_battery_service(gattc_database)¶
Finds a battery service in the given GATT client database
- Parameters
gattc_database (blatann.gatt.gattc.GattcDatabase) – the GATT client database to search
- Returns
The Battery service if found, None if not found
- Return type
_BatteryClient