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

Function test_read_static_value

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

Source from the content-addressed store, hash-verified

208// ── Read / Write ────────────────────────────────────────────────────
209
210pub async fn test_read_static_value() {
211 let peripheral = peripheral_finder::find_and_connect().await;
212 peripheral_finder::reset_peripheral(&peripheral).await;
213 let char = peripheral_finder::find_characteristic(&peripheral, gatt_uuids::STATIC_READ);
214 let value = peripheral.read(&char).await.unwrap();
215 assert_eq!(
216 value,
217 gatt_uuids::STATIC_READ_VALUE,
218 "Static read should return [0x01, 0x02, 0x03, 0x04]"
219 );
220 peripheral.disconnect().await.unwrap();
221}
222
223pub async fn test_read_counter_increments() {
224 let peripheral = peripheral_finder::find_and_connect().await;

Callers

nothing calls this directly

Calls 5

find_and_connectFunction · 0.85
reset_peripheralFunction · 0.85
find_characteristicFunction · 0.85
readMethod · 0.45
disconnectMethod · 0.45

Tested by

no test coverage detected