MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / onDiscovered

Method onDiscovered

examples/network/ble/scanner/main.js:23–30  ·  view source on GitHub ↗
(device)

Source from the content-addressed store, hash-verified

21 this.startScanning({});
22 }
23 onDiscovered(device) {
24 const address = device.address.toString();
25 if (this.addresses.has(address))
26 return;
27 this.addresses.add(address);
28
29 trace(`${address} ${device.scanResponse.completeName ?? device.scanResponse.shortName ?? ""}\n`);
30 }
31}
32
33let scanner = new Scanner;

Callers

nothing calls this directly

Calls 3

addMethod · 0.65
toStringMethod · 0.45
hasMethod · 0.45

Tested by

no test coverage detected