1 Star 0 Fork 0

DogWang/BlueToothMan

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
blueToothModel.swift 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
DogWang 提交于 2017-06-13 15:44 . 进一步的修改,V 1.0
//
// blueToothModel.swift
// 智慧魔盒
//
// Created by 梓简王 on 2017/4/4.
// Copyright © 2017年 DW. All rights reserved.
//
import Foundation
import CoreBluetooth
class blueToothModel {
//设备名字:(必填)
var perName:String?
//服务字段:(必填)
var serviceUUID:CBUUID?
//设备字段:(必填)
var peripheralUUID:CBUUID?
var scanUUIDS:[CBUUID]?
//notify字段:(必填)
var notifyCharacteristicUUID:String?
//writeable/readable字段唯一标识符
var chaUUIDS:[CBUUID]?
//读取状态标识
var isWrite:Bool?
//切入状态标识
var isRead:Bool?
//分包长度:(必填)
var bagLength:Int?
//申请一个中心管理设备
var centerManager: CBCentralManager?
//申请链接的periphere
var connectPer:CBPeripheral?
//申请链接的服务
var connectSer:CBService?
//链接状态记录
var isConnect:Bool?
//申请写入的Character
var targetCha:[CBCharacteristic]?
//申请notice的Character:
var noticCha:CBCharacteristic?
//收到的数据集合
var receiveResult:String?
//报文开头标记:(必填)
var messageHeaderFlag:String?
//报文结尾标记:(必填)
var messageTailFlag:String?
required init(){
perName = nil
serviceUUID = nil
peripheralUUID = nil
scanUUIDS = []
notifyCharacteristicUUID = ""
chaUUIDS = []
isWrite = false
isRead = false
bagLength = 20
centerManager = nil
connectPer = nil
isConnect = false
targetCha = nil
noticCha = nil
connectSer = nil
receiveResult = ""
messageHeaderFlag = ""
messageTailFlag = ""
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Swift
1
https://gitee.com/dogbro/bluetoothman.git
git@gitee.com:dogbro/bluetoothman.git
dogbro
bluetoothman
BlueToothMan
master

搜索帮助