添加回调数据的解析过程

This commit is contained in:
xuemh
2018-08-06 22:51:30 +08:00
parent 1028ffa9ac
commit 5614a0a931
5 changed files with 61 additions and 4 deletions
@@ -0,0 +1,23 @@
//
// IFishUDPHelperBackMsgModel.m
// Ifish
//
// Created by Minghao Xue on 2018/8/6.
// Copyright © 2018年 lianlian. All rights reserved.
//
#import "IFishUDPHelperBackMsgModel.h"
@implementation IFishUDPHelperBackMsgModel
- (instancetype)initWithData:(NSData *)data {
if (self = [super init]) {
NSString*totalString=[dataContorl dataToHexString:data];
self.result = [totalString substringWithRange:NSMakeRange(30, 2)];
self.changshang = [totalString substringWithRange:NSMakeRange(32, 2)];
self.device = [totalString substringWithRange:NSMakeRange(34, 2)];
}
return self;
}
@end