RiValT_BluetoothRemotePacket

enum RiValT_BluetoothRemotePacket

The encrypted Bluetooth channel identifiers and message framing shared by iPad and Watch.

  • The Bluetooth service UUID advertised by RVT on iPad.

    Declaration

    Swift

    static let serviceID: CBUUID
  • The characteristic UUID for writes from the Watch and indications from the iPad.

    Declaration

    Swift

    static let channelID: CBUUID
  • The byte at the start of a packet fragment or a stand-alone control indication.

    See more

    Declaration

    Swift

    enum Code : UInt8
  • The maximum size in bytes of a serialized request or reply.

    Declaration

    Swift

    private static let maximumPacket: Int
  • The optional request key carrying the Watch’s display name.

    Declaration

    Swift

    static let watchNameKey: String
  • Serializes the message as a binary property list if it fits the packet size limit.

    Declaration

    Swift

    static func encode(_ message: [String : Any]) -> Data?
  • Splits a payload into Bluetooth writes or indications that fit the link’s byte limit.

    Each fragment carries a one-byte code and a four-byte request ID.

    Declaration

    Swift

    static func frames(_ data: Data, id: UInt32, mtu: Int) -> [Data]
  • Reassembles fragments of one request or response and validates the completed property list.

    See more

    Declaration

    Swift

    struct Assembly