BKInputElement

open class BKInputElement: NSObject, NSSecureCoding

Data Object that defines the input data for resolving requests to blukii Info Manager (https://manager.blukiiinfo.com).

It is used in two cases:

  • Delegate BKClientDiscoveryDelegate.onDiscoveryResult(discoveryResultList: [BKOutputElement]):

BKInputElement is part of every BKOutputElement. It contains input type BKInputSourceTpye.BLUKII and the device name of the discovered BLE module.

  • Function BKClient.resolveInputElement(BKInputElement):

BKInputElement is used as input property for a single recolving action. It has to be created by initializer BKInputElement(String, BKInputSourceType). If resolving is successful it will be unmodified part of BKOutputElement that is returned by delegate BKClientResolveDelegate.onResolveInputElementResult(outputElement: BKOutputElement)

  • Gets the tag id.

    Declaration

    Swift

    fileprivate(set) open var tagID: String

    Return Value

    formatted input string

  • Gets the input type of the tag id

    Declaration

    Swift

    fileprivate(set) open var inputType: BKInputSourceType

    Return Value

    input type

  • Initializer for creating an BKInputElement

    The format of parameter tagID depends on the inputType

    If an BKInputElement is port of a returned BKOutputElement property BKOutputElement.tagID return the tagId as conversion into a blukii number string.

    The following input types and formats are supported:

    • BKInputSourceType.BLUKII: tagId has to match a valid blukii number format: blukii [B|S|K]XXXXX [6x hex-number] E. g. blukii BXXXXX 01234567890AB

    • BKInputSourceType.NFC: tagId has to match a valid nfc id format: 14x hex-numbered string. E. g. 01234567890ABCD, will converted to blukii TCXX01 234567890ABCD.

    • BKInputSourceType.SCAN: tagId has to match one of the following formats. If it is a returned BKOutputElement property BKOutputElement.id contains a convertes blukii number string

      • EAN-8: 8-numbered string, e.g. 12345678, will be converted to blukii CHXXX8 XXXXX1234567
      • EAN-13: 13-numbered string, e.g. 1234567890123, will be converted to blukii CDXXX3 123456789012
      • UPC-A: 12-numbered string, e.g. 123456789012, will be converted to blukii CGXXX1 012345678901
      • PZN-7: 7-numbered string with a leading -, e.g. -1234567, will be converted to blukii CEXXX7 XXXXXX123456
      • PZN-8: 8-numbered string with a leading -, e.g. -12345678, will be converted to blukii CFXXX8 XXXXX1234567

    Declaration

    Swift

    public init(tagID: String, inputType: BKInputSourceType)

    Parameters

    tagID

    ID of the Element. Usually it is the EAN, UPC or QR code as a String

    inputType

    Source of the tagID, Optional