Files
duooomi-ios-sdk/Sources/DuooomiBleSDK/Protocol/ProtocolFrame.swift

21 lines
661 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Foundation
/// BLE
/// : [head:1][type:1][subpageTotal:2][curPage:2][dataLen:2][data:N][checksum:1]
public struct ProtocolFrame: Sendable {
/// (0xC7 = APPDevice, 0xB0 = DeviceAPP)
public let head: UInt8
/// CommandType
public let type: UInt8
/// (0 = )
public let subpageTotal: UInt16
/// ( total-1 0)
public let curPage: UInt16
///
public let dataLen: UInt16
///
public let data: Data
///
public let checksum: UInt8
}