Skip to main content

Module server

Module server 

Source
Expand description

NimBLE GATT server: the service table, its events, and server operations on the BleDriver.

Structs§

BleGattCharacteristic
A characteristic in a BleGattService — just its UUID and flags. Reads and writes are serviced by the single gatts_subscribe hook (dispatched by the value handle reported via BleGattRegister), so there is no per-characteristic closure and no per-characteristic allocation.
BleGattService
A GATT service definition.
BleGattServices
A GATT service table built at runtime (heap-allocated), as the raw NimBLE ble_gatt_svc_def tree, ready to hand to BleDriver::new_with_services. Implements AsRef<[ble_gatt_svc_def]>, so it is one valid S; a &'static table or a Box<[ble_gatt_svc_def]> are others. For a compile-time table (no heap), see the gatt_services! macro.
GattServices
A static (compile-time) GATT service table: a null-terminated ble_gatt_svc_def array wrapped so it can live in a static. Build one with the gatt_services! macro and pass &MY_SERVICES to new_with_services — it needs no heap and lands in flash. N (services + terminator) is inferred by the macro; you never write it.

Enums§

BleGattRegister
A GATT registration event (the payload of GattsEvent::Register). Capture the value handles you need (matching on uuid) here.
GattsEvent
A GATT-server event, delivered on the host task to the single gatts_subscribe hook.
SubscribeReason
Why a peer’s subscription state changed (the reason of GattsEvent::SubscriptionChanged).