ModelIdentifierType

public enum ModelIdentifierType : BluetoothEncodable
extension ModelIdentifierType: Encodable

BLE Mesh Model Identifier Type

Models may contain either a SIG Model ID or a Vendor Model ID

  • SIG Model Identifier

    Declaration

    Swift

    case sig(UInt16)
  • Vendor Model ID

    The Vendor Model ID is composed of two values: a 16-bit Bluetooth-assigned Company Identifier and a 16-bit vendor-assigned model identifier.

    Declaration

    Swift

    case vendor(CompanyIdentifier, id: UInt16)
  • Encodes into Data

    Declaration

    Swift

    public func encode() -> Result<Data, BluetoothEncodeError>

    Return Value

    Encoded Data Result

  • Undocumented

    Declaration

    Swift

    public var description: String { get }
  • CodingKeys

    See more

    Declaration

    Swift

    public enum CodingKeys : CodingKey
  • Encodes this value into the given encoder.

    If the value fails to encode anything, encoder will encode an empty keyed container in its place.

    This function throws an error if any values are invalid for the given encoder’s format.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.