MinewProcessorPlugin

Plugin for 'Minew Technologies Co.' tags with sensor.

Parameters

sensorType

The type of sensor expected by this processor instance.

listener

The receiver of events about device lifecycle.

Constructors

Types

Link copied to clipboard
object Companion
Link copied to clipboard
inner class Device : ADevice

The model for the kind of device managed by this plugin.

Functions

Link copied to clipboard
protected fun addDevice(device: MinewProcessorPlugin.Device)

Adds a device to the managed collection.

Link copied to clipboard
protected open override 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 open override fun createDevice(btDevice: BluetoothDevice, rssi: Int, data: ByteArray): MinewProcessorPlugin.Device

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

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: MinewProcessorPlugin.Device)

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
open override fun process(btDevice: BluetoothDevice, rssi: Int, scanRecord: ScanRecord): Boolean

Called by the scan engine to propose a scan record for recognition and analysis.

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: MinewProcessorPlugin.Device, 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 open override fun updateDevice(device: MinewProcessorPlugin.Device, data: ByteArray)

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