MokoExplorerPlugin

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
class Device : ADevice

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

Functions

Link copied to clipboard
protected fun addDevice(device: MokoExplorerPlugin.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): MokoExplorerPlugin.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
open override fun explore(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 exploreData(btDevice: BluetoothDevice, rssi: Int, data: ByteArray)

Records a device recognized during the IExplorerPlugin.explore of a Bluetooth frame.

Link copied to clipboard
protected open override fun getExtras(device: MokoExplorerPlugin.Device): Map<String, String>

Gets the additional custom fields.

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 open fun onLost(device: MokoExplorerPlugin.Device)

A hook called when a device is deemed lost. This default implementation does nothing.

Link copied to clipboard

Called by the scan engine during the frame processing of standard processors to give the plugin the opportunity to enrich the analysis with additional custom fields.

Link copied to clipboard
protected fun refreshDevice(device: MokoExplorerPlugin.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: MokoExplorerPlugin.Device, data: ByteArray)

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