You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
842 B
40 lines
842 B
// |
|
// BlueToothItem.m |
|
// BluetoothDemo |
|
// |
|
// Created by mac on 17/3/10. |
|
// Copyright © 2017年 . All rights reserved. |
|
// |
|
|
|
#import "BlueToothItem.h" |
|
#import "BlueToothEume.h" |
|
|
|
@implementation BlueToothItem |
|
|
|
|
|
/** |
|
* 构建一个蓝牙请求体 |
|
* |
|
* @param byteBuffer 数据 |
|
* @param sid 外设的返回值 |
|
* @param cmd 类型 |
|
* @param dataSource 代理 |
|
*/ |
|
- (instancetype)initWithbyteBuffer:(NSMutableData *)byteBuffer |
|
sid:(NSInteger)sid |
|
cmd:(BleCMD)cmd |
|
dataSource:(id<BluetoothDataSource>)dataSource { |
|
self = [super init]; |
|
|
|
if (self) { |
|
|
|
_byteBuffer = byteBuffer; |
|
self.sid = sid; |
|
self.cmd = cmd; |
|
self.dataSource = dataSource; |
|
self.requestCount = 0; |
|
} |
|
return self; |
|
} |
|
|
|
@end
|
|
|