Expand description
NimBLE GATT server: the service table, its events, and server operations on the BleDriver.
Structs§
- BleGatt
Characteristic - A characteristic in a
BleGattService— just its UUID and flags. Reads and writes are serviced by the singlegatts_subscribehook (dispatched by the value handle reported viaBleGattRegister), so there is no per-characteristic closure and no per-characteristic allocation. - BleGatt
Service - A GATT service definition.
- BleGatt
Services - A GATT service table built at runtime (heap-allocated), as the raw NimBLE
ble_gatt_svc_deftree, ready to hand toBleDriver::new_with_services. ImplementsAsRef<[ble_gatt_svc_def]>, so it is one validS; a&'statictable or aBox<[ble_gatt_svc_def]>are others. For a compile-time table (no heap), see thegatt_services!macro. - Gatt
Services - A static (compile-time) GATT service table: a null-terminated
ble_gatt_svc_defarray wrapped so it can live in astatic. Build one with thegatt_services!macro and pass&MY_SERVICEStonew_with_services— it needs no heap and lands in flash.N(services + terminator) is inferred by the macro; you never write it.
Enums§
- BleGatt
Register - A GATT registration event (the payload of
GattsEvent::Register). Capture the value handles you need (matching onuuid) here. - Gatts
Event - A GATT-server event, delivered on the host task to the single
gatts_subscribehook. - Subscribe
Reason - Why a peer’s subscription state changed (the
reasonofGattsEvent::SubscriptionChanged).