MCPcopy Create free account
hub / github.com/deviceplug/btleplug / test_discover_characteristics

Function test_discover_characteristics

tests/common/test_cases.rs:60–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58}
59
60pub async fn test_discover_characteristics() {
61 let peripheral = peripheral_finder::find_and_connect().await;
62 let chars = peripheral.characteristics();
63 let char_uuids: Vec<_> = chars.iter().map(|c| c.uuid).collect();
64 assert!(char_uuids.contains(&gatt_uuids::CONTROL_POINT));
65 assert!(char_uuids.contains(&gatt_uuids::STATIC_READ));
66 assert!(char_uuids.contains(&gatt_uuids::NOTIFY_CHAR));
67 assert!(char_uuids.contains(&gatt_uuids::DESCRIPTOR_TEST_CHAR));
68 peripheral.disconnect().await.unwrap();
69}
70
71pub async fn test_scan_filter_by_service_uuid() {
72 use btleplug::api::{Central, ScanFilter};

Callers

nothing calls this directly

Calls 4

find_and_connectFunction · 0.85
iterMethod · 0.80
characteristicsMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected