//
//  EZIoTPeripheral+MsgPackage.h
//  EZIoTBluetoothSDK
//
//  Created by yuqian on 2023/7/13.
//

#import <EZIoTBluetoothSDK/EZIoTBluetoothSDK.h>

NS_ASSUME_NONNULL_BEGIN

@interface EZIoTPeripheral (MsgPackage)

- (NSData *)packageMsgEncryptedData:(NSData *)bizData;
- (NSData *)packageMsgData:(NSData *)bizData encryptPayload:(BOOL)encryptPayload;
- (NSData *)packageSplitMsgData:(NSData *)bizData totalNum:(NSUInteger)totalNum seqNum:(NSUInteger)seqNum encryptPayload:(BOOL)encryptPayload;

- (void)resolveNormalData:(NSData *)normalData callBack:(void(^)(NSData *__nullable payloadData, NSDictionary *__nullable packageInfo, NSUInteger seqNum, NSError *__nullable error))callBack;
- (void)resolveTlvData:(NSData *)tlvData callBack:(void(^)(NSUInteger type, NSData *content, NSDictionary *__nullable packageInfo, BOOL isFinish, NSError *error))callBack;

@end

NS_ASSUME_NONNULL_END
