pub enum GattcEvent<'a> {
Service {
conn_handle: ConnHandle,
status: u16,
service: Option<GattcService>,
},
Characteristic {
conn_handle: ConnHandle,
status: u16,
chr: Option<GattcChr>,
},
ReadComplete {
conn_handle: ConnHandle,
status: u16,
attr_handle: AttrHandle,
data: Mbuf<'a>,
},
WriteComplete {
conn_handle: ConnHandle,
status: u16,
attr_handle: AttrHandle,
},
Notify {
conn_handle: ConnHandle,
attr_handle: AttrHandle,
indication: bool,
data: Mbuf<'a>,
},
}Expand description
A GATT-client event, delivered on the host task to the single
gattc_subscribe hook.
The discovery variants fire once per discovered item and then once more with a None payload
to signal completion. status is the raw ATT/BLE_HS_* status (0 on success).
Variants§
Service
A service discovered by discover_services.
Characteristic
A characteristic discovered by
discover_characteristics.
ReadComplete
Completion of a read. On success data holds the value; check status
before reading it.
WriteComplete
Completion of a write.
Notify
A notification or indication pushed by the peer (after subscribing by writing its CCCD).