Table of Contents

Interface IDeviceScanner

Namespace
NixUniversalSDK
Assembly
NixUniversalSDK.dll

Interface implemented by the DeviceScanner

public interface IDeviceScanner : IDeviceScannerEvents
Inherited Members

Properties

State

Current state of the IDeviceScanner

DeviceScannerState State { get; }

Property Value

DeviceScannerState

Methods

InitializeAsync()

Initializes the IDeviceScanner and verifies Bluetooth adapter state in the host PC

Task<DeviceScannerState> InitializeAsync()

Returns

Task<DeviceScannerState>

DeviceScannerState of the IDeviceScanner after initialization

ListUsbDevicesAsync()

Lists USB attached IDeviceCompat instances without running a Bluetooth search

Task<IEnumerable<IDeviceCompat>> ListUsbDevicesAsync()

Returns

Task<IEnumerable<IDeviceCompat>>

Task with resulting list of USB attached devices

SearchForIdAsync(string, long)

Searches for a specific Nix device via USB and Bluetooth. The search will run until the specified device is found, or until the specified time interval elapses, whichever is shorter. If no time interval is specified, the search will run for DefaultSingleDevicePeriodMs.

Task<IDeviceCompat> SearchForIdAsync(string id, long scanPeriodMs = 10000)

Parameters

id string

Nix device ID used to filter search results

scanPeriodMs long

Period to run the search in milliseconds. Must be positive

Returns

Task<IDeviceCompat>

Nix device instance, or null if no device is found

Start(long)

Starts a search for nearby Nix devices using Bluetooth for a selected time interval. If no timeout interval is specified, the search will run for DefaultGeneralScanPeriodMs

void Start(long scanPeriodMs = 20000)

Parameters

scanPeriodMs long

Period to run the search in milliseconds. Set to a negative value for continuous search

Stop()

Stops a Bluetooth search if one is currently running.

void Stop()