BKDiscoveryData

open class BKDiscoveryData: NSObject, NSSecureCoding

Read only data object for emitted data of on BLE module.

BKDiscoveryData is a collection of BLE data that is scanned during one scan duration for one BLE module.

It contains the following values if it is provided by the module’s hardware and firmware

  • Device found date
  • RSSI value
  • blukii Hardware specific advertising data like firmware, blukii type, advertising interval, battery and txPower
  • Sensor data results of blukii sensor beacons. See BKBeaconSensorData
  • Key data of blukii SmartKeys. See BKKeyData
  • Eddystone protocol data values. See BKEddystoneData
  • iBeacon protocol data values. See BKiBeaconData

Note: If the scan scan duration (see BKDiscoverySettings.scanDuration) is longer than the advertising interval of the module than each value is read only once. The following data frames of the same type are ignored if the corresponding fields are already set in the BKDiscoveryData object. The discovery date (deviceFoundDate) is the timestamp of the first BLE frame that is scanned by the mobile device.

BKDiscoveryData is a part of BKOutputElement It will be set if the BKOutputElement is returned by the delegate function BKClientDiscoveryDelegate.onDiscoveryResult(discoveryResultList: [BKOutputElement]) after calling BKClient.initDiscovery(). For Other BKClient delegates BKDiscoveryData is nil.

  • Module Types

    See more

    Declaration

    Swift

    public enum BlukiiType: String
  • Housing Sizes

    See more

    Declaration

    Swift

    public enum BlukiiHousing: String
  • Gets the RSSI value of the first scanned BLE frame that is inside the relevant RSSI range (see setting BKDiscoverySettings.setRSSIThreshold()).

    This field is set for every scanned BLE module.

    Declaration

    Swift

    internal(set) open var rssi: Int?

    Return Value

    RSSI Value

  • Gets the Timestamp of the first scanned BLE frame that is inside the relevant RSSI range (see setting BKDiscoverySettings.setRSSIThreshold()).

    This field is set for every scanned BLE module.

    Declaration

    Swift

    internal(set) open var deviceFoundDate: Date?

    Return Value

    Timestamp in milliseconds

  • Gets the MacAdress of the BLE module

    Declaration

    Swift

    internal(set) open var macAddress: String?

    Return Value

    MAC-Adress of the BLE module

  • Gets the identifier of the BLE module

    This field is set for every scanned BLE module. This value is to prefer, if you want to have a uniqe identifier.

    Declaration

    Swift

    internal(set) open var identifier: UUID?

    Return Value

    CBPeripheral Identifier

  • Gets the Device Name of the BLE module.

    This field is set for every scanned BLE module.

    Declaration

    Swift

    internal(set) open var deviceName: String?

    Return Value

    Device Name

  • Gets the Bluetooth Device Object (CBPeripheral) of the BLE module.

    This field is set for every scanned BLE module

    Declaration

    Swift

    internal(set) open var device: CBPeripheral?

    Return Value

    CBPeripheral Object

  • Gets a data object of blukii sensor data.

    This field is only valid for blukii beacons that contain sensors.

    Declaration

    Swift

    internal(set) open var beaconSensorData: BKBeaconSensorData?

    Return Value

    BeaconSensorData object, nil if no blukii beacon sensors are available

  • Gets the firmware number of a blukii

    It is a 4-digit string that you have to inerpret as follows for blukii 2.0: Firmware = ABCD means firmware number A.B.C.D

    For blukii 3.0 you have to interpret as follow: Firmware = AAABBB menas firmware number AAA.BBB

    Declaration

    Swift

    internal(set) open var firmware: String?

    Return Value

    Firmware string, nil if it is not supported

  • Gets the Product ID of a blukii

    This field can be blukii 2.0 or blukii 3.0

    Declaration

    Swift

    internal(set) open var product: String?

    Return Value

    Product ID string, nil if it is not supported

  • Gets data object of Eddystone beacon data.

    This field is only valid for beacons that emit Eddystone UID, URL or TLM.

    Declaration

    Swift

    internal(set) open var eddystoneData: BKEddystoneData?

    Return Value

    BKEddystoneData Object, nil if it is not a Eddystone beacon

  • Gets a data object of iBeacon data.

    This field is only valid for beacons that emit iBeacon

    Declaration

    Swift

    internal(set) open var iBeaconData: BKiBeaconData?

    Return Value

    BKiBeaconData object, nil if it is not a iBeacon

  • Gets a data object of key data.

    this field is only valid for blukii SmartKeys.

    Declaration

    Swift

    internal(set) open var keyData: BKKeyData?

    Return Value

    KeyData object, nil if it is not a blukii Smart Key

  • Gets the module type

    Declaration

    Swift

    internal(set) open var type = BlukiiType.TYPE_NOBLUKII

    Return Value

    Modul Type as BlukiiType

  • Gets the advertising interval of a blukii.

    This field is only valid for Blukiis

    Declaration

    Swift

    internal(set) open var advInterval = 0

    Return Value

    advertising interval in milliseconds, 0 if is not a blukii

  • Gets the housing value (size) of a blukii.

    Declaration

    Swift

    internal(set) open var housing = BlukiiHousing.unknown

    Return Value

    Housing Value BlukiiHousing

  • Gets the battery level value of a blukii

    Declaration

    Swift

    internal(set) open var battery = Int.min

    Return Value

    Battery charge in percent, Int.min if it is not supported

  • Gets the txPower value of a blukii.

    It stands for the physical hardware setting of the BLE sender.

    This field is only valid for blukiis.

    Declaration

    Swift

    internal(set) open var txPower = Int16.min

    Return Value

    TxPower in dBm, Int16.min if it is not supported.