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.
42 lines
1.1 KiB
42 lines
1.1 KiB
![]()
2 years ago
|
//
|
||
|
// ECellBLEItem.h
|
||
|
// ECellBluetooth_Example
|
||
|
//
|
||
|
// Created by lemo. on 2019/5/21.
|
||
|
// Copyright © 2019 chentingfeng. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import <Foundation/Foundation.h>
|
||
|
#import <ECellBluetooth/ECellBLEConst.h>
|
||
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
|
@interface ECellBLEItem : NSObject
|
||
|
|
||
|
/** 指令码 */
|
||
|
@property (nonatomic, assign) ECell_BLECMD cmd;
|
||
|
/** 指令KEY */
|
||
|
@property (nonatomic, assign) ECell_BLECMD_KEY cmdKey;
|
||
|
/** 序号 */
|
||
|
@property (nonatomic, assign) NSInteger sid;
|
||
|
/** 字节流数据 */
|
||
|
@property (nonatomic, strong) NSMutableData *byteBuffer;
|
||
|
/** 请求结果回调 */
|
||
|
@property (nonatomic, copy ) ResultBlock result;
|
||
|
|
||
|
/// 构建一个蓝牙请求体
|
||
|
/// @param byteBuffer 数据
|
||
|
/// @param cmd 指令码
|
||
|
/// @param cmdKey 指令KEY
|
||
|
/// @param sid 序号
|
||
|
/// @param result 回调结果
|
||
|
- (instancetype)initWithbyteBuffer:(nullable NSMutableData *)byteBuffer
|
||
|
cmd:(ECell_BLECMD)cmd
|
||
|
cmdKey:(ECell_BLECMD_KEY)cmdKey
|
||
|
sid:(NSInteger)sid
|
||
|
resultBlock:(nonnull ResultBlock)result;
|
||
|
|
||
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|