NurDeviceDiscovery Class

Class for discovering NUR devices from Network/BLE/Serial NOTE: BLE and serial port support depends on platform and must be explicitly added to project

Definition

Namespace: NurApiDotNet
Assembly: NordicID.NurApi.Net (in NordicID.NurApi.Net.dll) Version: 4.0.0
C#
public static class NurDeviceDiscovery
Inheritance
Object    NurDeviceDiscovery

Example

Example shows how to start device discovery.

C#
// Called by NurDeviceDiscovery when device has appeared or disappeared.
void DeviceDiscoveryCallback(object sender, NurDeviceDiscoveryEventArgs args)
{
    if (args.Visible)
        MyDeviceAppeared(args.Uri);
    else
        MyDeviceDisappeared(args.Uri);
}

void MyStartDeviceSearch()
{
    // Start device search with all supported schemes
    NurDeviceDiscovery.Start(DeviceDiscoveryCallback);
}

void MyStopDeviceSearch()
{
    // Stop device discovery
    NurDeviceDiscovery.Stop(DeviceDiscoveryCallback);
}
See full sample app NurApiDocSample

Methods

Start Start discovery
Stop Stop discovery

Events

ErrorEvent Error event

Fields

DiscoveryInterval Discovery interval as milliseconds

See Also