C# Класс SensorbergSDK.Internal.Scanner

Bluetooth LE advertisement scanner helper class with beacon list management.
Наследование: IBeaconScanner, IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
Dispose ( ) : void
FilterBeaconByUuid ( Beacon beacon ) : bool
NotifyBeaconEvent ( Beacon beacon ) : void

Notifies any listeners about the beacon event.

Scanner ( ) : System

Create new Scanner Object.

StartWatcher ( ushort manufacturerId, ushort beaconCode, ulong beaconExitTimeoutInMiliseconds, short rssiEnterThreshold = null, ulong enterDistanceThreshold = null ) : void

Starts the watcher and hooks its events to callbacks.

StopWatcher ( ) : void

Stops the watcher. The events are unhooked in the callback (OnWatcherStopped).

Приватные методы

Метод Описание
OnAdvertisementReceived ( BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementReceivedEventArgs args ) : void

Triggered when the watcher receives an advertisement. If the advertisement came from a beacon, a Beacon instance is created based on the received data. A new beacon is added to the list and an existing one is only updated.

OnNotifyStartedDelayTimeout ( object state ) : void

Sends a delayed notifications about watcher started event.

OnWatcherStopped ( BluetoothLEAdvertisementWatcher sender, BluetoothLEAdvertisementWatcherStoppedEventArgs args ) : void

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FilterBeaconByUuid() публичный Метод

public FilterBeaconByUuid ( Beacon beacon ) : bool
beacon Beacon
Результат bool

NotifyBeaconEvent() публичный Метод

Notifies any listeners about the beacon event.
public NotifyBeaconEvent ( Beacon beacon ) : void
beacon Beacon
Результат void

Scanner() публичный Метод

Create new Scanner Object.
public Scanner ( ) : System
Результат System

StartWatcher() публичный Метод

Starts the watcher and hooks its events to callbacks.
public StartWatcher ( ushort manufacturerId, ushort beaconCode, ulong beaconExitTimeoutInMiliseconds, short rssiEnterThreshold = null, ulong enterDistanceThreshold = null ) : void
manufacturerId ushort The manufacturer ID.
beaconCode ushort The beacon code.
beaconExitTimeoutInMiliseconds ulong Time in miliseconds after beacon will be trated as lost.
rssiEnterThreshold short Optional rssi threshold which will trigger beacon discover event. Value must be between -128 and 127.
enterDistanceThreshold ulong Optional minimal distance in meters that will trigger beacon discover event.
Результат void

StopWatcher() публичный Метод

Stops the watcher. The events are unhooked in the callback (OnWatcherStopped).
public StopWatcher ( ) : void
Результат void