SensorDelegate
public protocol SensorDelegate
Sensor delegate for receiving sensor events.
-
sensor(_:
Default implementationdidDetect: ) Detection of a target with an ephemeral identifier, e.g. BLE central detecting a BLE peripheral.
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didDetect: TargetIdentifier)
-
sensor(_:
Default implementationdidRead: fromTarget: ) Read payload data from target, e.g. encrypted device identifier from BLE peripheral after successful connection.
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didRead: PayloadData, fromTarget: TargetIdentifier)
-
sensor(_:
Default implementationdidShare: fromTarget: ) Read payload data of other targets recently acquired by a target, e.g. Android peripheral sharing payload data acquired from nearby iOS peripherals.
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didShare: [PayloadData], fromTarget: TargetIdentifier)
-
sensor(_:
Default implementationdidReceive: fromTarget: ) Write signal requests - immediate send
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didReceive: Data, fromTarget: TargetIdentifier)
-
sensor(_:
Default implementationdidMeasure: fromTarget: ) Measure proximity to target, e.g. a sample of RSSI values from BLE peripheral.
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didMeasure: Proximity, fromTarget: TargetIdentifier)
-
sensor(_:
Default implementationdidVisit: ) Detection of time spent at location, e.g. at specific restaurant between 02/06/2020 19:00 and 02/06/2020 21:00
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didVisit: Location?)
-
sensor(_:
Default implementationdidMeasure: fromTarget: withPayload: ) Measure proximity to target with payload data. Combines didMeasure and didRead into a single convenient delegate method
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didMeasure: Proximity, fromTarget: TargetIdentifier, withPayload: PayloadData)
-
sensor(_:
Default implementationdidUpdateState: ) Sensor state update
Default Implementation
Declaration
Swift
func sensor(_ sensor: SensorType, didUpdateState: SensorState)