AProcessorPlugin

Constructors

Link copied to clipboard
protected constructor(listener: IPluginDeviceListener<D>)

Functions

Link copied to clipboard
protected fun addDevice(device: D)

Adds a device to the managed collection.

Link copied to clipboard
protected abstract fun addFilterCriteria(sfb: ScanFilter.Builder)

Called by the engine during the build of a fr.maxcom.beacon.configuration.ScanContext to give the plugin the opportunity to set its filter criteria, typically based on the Service Data or the Manufacturer Specific Data.

Link copied to clipboard
open fun clear()

Clears any cache or persisted data from a previous run.

Link copied to clipboard
protected abstract fun createDevice(btDevice: BluetoothDevice, rssi: Int, data: ByteArray): D

Creates a device from raw data.

Link copied to clipboard
open fun dismissLostDevices(scanContext: ScanContext, actionTimeMillis: Long)

Called by the scan engine at regular intervals to allow the plugin to take action about possible devices not seen since too long.

Link copied to clipboard
protected fun lookupDevice(btDevice: BluetoothDevice): D?

Lookups for a device in the managed collection.

Link copied to clipboard
protected fun mismatch(data: ByteArray?, minLength: Int, prefix: ByteArray): Boolean

Performs an evaluation for non validity about a frame pattern recognition.

Link copied to clipboard
protected override fun onLost(device: D)

A hook called when a device is deemed lost. The event is propagated to the method IPluginDeviceListener.onLost of the listener.

Link copied to clipboard
protected fun processData(btDevice: BluetoothDevice, rssi: Int, data: ByteArray)

Records a device recognized during the IProcessorPlugin.process of a Bluetooth frame.

Link copied to clipboard
protected fun refreshDevice(device: D, rssi: Int)

Refreshes the knowledge of a device already in the managed collection.

Link copied to clipboard
protected fun removeLostDevices(shiftedTimeMillis: Long)

Removes lost devices from the managed collection.

Link copied to clipboard
open fun setDeviceFilters(filters: List<DeviceFilter>)

Sets filters.

Link copied to clipboard
protected abstract fun updateDevice(device: D, data: ByteArray)

Refreshes the knowledge of a device already in the managed collection.