Lines Matching refs:evt

163   void OnGattConnected(const tBTA_GATTC_OPEN& evt) {  in OnGattConnected()  argument
164 log::info("{}, conn_id=0x{:04x}, transport:{}, status:{}", evt.remote_bda, in OnGattConnected()
165 evt.conn_id, bt_transport_text(evt.transport), in OnGattConnected()
166 gatt_status_text(evt.status)); in OnGattConnected()
168 if (evt.transport != BT_TRANSPORT_LE) { in OnGattConnected()
170 bt_transport_text(evt.transport)); in OnGattConnected()
171 BTA_GATTC_Close(evt.conn_id); in OnGattConnected()
175 auto tracker = FindTrackerByAddress(evt.remote_bda); in OnGattConnected()
177 log::warn("Skipping unknown device, address: {}", evt.remote_bda); in OnGattConnected()
178 BTA_GATTC_Close(evt.conn_id); in OnGattConnected()
182 if (evt.status != GATT_SUCCESS) { in OnGattConnected()
183 log::error("Failed to connect to server device {}", evt.remote_bda); in OnGattConnected()
186 tracker->conn_id_ = evt.conn_id; in OnGattConnected()
191 void OnGattServiceSearchComplete(const tBTA_GATTC_SEARCH_CMPL& evt) { in OnGattServiceSearchComplete() argument
192 auto tracker = FindTrackerByHandle(evt.conn_id); in OnGattServiceSearchComplete()
194 log::warn("Can't find tracker for conn_id:{}", evt.conn_id); in OnGattServiceSearchComplete()
201 BTA_GATTC_GetServices(evt.conn_id); in OnGattServiceSearchComplete()
258 void OnGattNotification(const tBTA_GATTC_NOTIFY& evt) { in OnGattNotification() argument
259 auto tracker = FindTrackerByHandle(evt.conn_id); in OnGattNotification()
261 log::warn("Can't find tracker for conn_id:{}", evt.conn_id); in OnGattNotification()
264 auto characteristic = tracker->FindCharacteristicByHandle(evt.handle); in OnGattNotification()
266 log::warn("Can't find characteristic for handle:{}", evt.handle); in OnGattNotification()
272 getUuidName(characteristic->uuid), evt.len); in OnGattNotification()
277 OnRemoteData(evt, tracker); in OnGattNotification()
281 OnControlPointEvent(evt, tracker); in OnGattNotification()
284 OnRangingDataReady(evt, tracker); in OnGattNotification()
291 void OnRemoteData(const tBTA_GATTC_NOTIFY& evt, in OnRemoteData() argument
294 data.resize(evt.len); in OnRemoteData()
295 std::copy(evt.value, evt.value + evt.len, data.begin()); in OnRemoteData()
299 void OnControlPointEvent(const tBTA_GATTC_NOTIFY& evt, in OnControlPointEvent() argument
301 switch (evt.value[0]) { in OnControlPointEvent()
303 uint16_t ranging_counter = evt.value[1]; in OnControlPointEvent()
304 ranging_counter |= (evt.value[2] << 8); in OnControlPointEvent()
312 log::debug("Received response code 0x{:02x}", evt.value[1]); in OnControlPointEvent()
315 log::warn("Unexpected event code 0x{:02x}", evt.value[0]); in OnControlPointEvent()
319 void OnRangingDataReady(const tBTA_GATTC_NOTIFY& evt, in OnRangingDataReady() argument
321 if (evt.len != kRingingCounterSize) { in OnRangingDataReady()
325 uint16_t ranging_counter = evt.value[0]; in OnRangingDataReady()
326 ranging_counter |= (evt.value[1] << 8); in OnRangingDataReady()