Initial commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// BackmassegeModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
//亮灯一泵返回状态信息99字节三控 陈工
|
||||
@interface BackmassegeModel : baseModel
|
||||
@property(nonatomic)BOOL ofOn;
|
||||
@property(nonatomic)BOOL manual;
|
||||
@property(nonatomic,copy)NSString*yunxingmoshi;
|
||||
@property(nonatomic,copy)NSString*light1;
|
||||
@property(nonatomic,copy)NSString*light2;
|
||||
@property(nonatomic,copy)NSString*pump;
|
||||
@property(nonatomic,copy)NSString*timer1;
|
||||
@property(nonatomic,copy)NSString*timer2;
|
||||
@property(nonatomic,copy)NSString*timer3;
|
||||
@property(nonatomic,copy)NSString*timer4;
|
||||
@property(nonatomic,copy)NSString*timer5;
|
||||
@property(nonatomic,copy)NSString*timer6;
|
||||
@property(nonatomic,copy)NSString*timer7;
|
||||
@property(nonatomic,copy)NSString*timer8;
|
||||
@property(nonatomic,copy)NSString*timer9;
|
||||
@property(nonatomic,copy)NSString*timer10;
|
||||
@property(nonatomic,copy)NSString*wendu;
|
||||
@property(nonatomic,copy)NSString*Ph;
|
||||
// 湿度两字节 已废弃
|
||||
@property(nonatomic,copy)NSString*shidu;
|
||||
//背光灯亮度
|
||||
@property(nonatomic,copy)NSString*brightness;
|
||||
//柜灯开关
|
||||
@property(nonatomic,copy)NSString*tankLight;
|
||||
|
||||
@property(nonatomic,copy)NSString*baojingSwitch;
|
||||
@property(nonatomic,copy)NSString*miniTp;
|
||||
@property(nonatomic,copy)NSString*maxTp;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,67 @@
|
||||
//
|
||||
// BackmassegeModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BackmassegeModel.h"
|
||||
|
||||
@implementation BackmassegeModel
|
||||
// 归档时调用 三控
|
||||
-(void)encodeWithCoder:(NSCoder*)aCoder{
|
||||
[aCoder encodeObject:self forKey:@"yunxingmoshi"];
|
||||
[aCoder encodeObject:self forKey:@"light1"];
|
||||
[aCoder encodeObject:self forKey:@"light2"];
|
||||
[aCoder encodeObject:self forKey:@"pump"];
|
||||
[aCoder encodeObject:self forKey:@"timer1"];
|
||||
[aCoder encodeObject:self forKey:@"timer2"];
|
||||
[aCoder encodeObject:self forKey:@"timer3"];
|
||||
[aCoder encodeObject:self forKey:@"timer4"];
|
||||
[aCoder encodeObject:self forKey:@"timer5"];
|
||||
[aCoder encodeObject:self forKey:@"timer6"];
|
||||
[aCoder encodeObject:self forKey:@"timer7"];
|
||||
[aCoder encodeObject:self forKey:@"timer8"];
|
||||
[aCoder encodeObject:self forKey:@"timer9"];
|
||||
[aCoder encodeObject:self forKey:@"timer10"];
|
||||
[aCoder encodeObject:self forKey:@"wendu"];
|
||||
[aCoder encodeObject:self forKey:@"brightness"];
|
||||
[aCoder encodeObject:self forKey:@"tankLight"];
|
||||
|
||||
[aCoder encodeObject:self forKey:@"Ph"];
|
||||
[aCoder encodeObject:self forKey:@"baojingSwitch"];
|
||||
[aCoder encodeObject:self forKey:@"miniTp"];
|
||||
[aCoder encodeObject:self forKey:@"maxTp"];
|
||||
}
|
||||
//解挡时调用
|
||||
-(id)initWithCoder:(NSCoder*)aDecoder{
|
||||
if (self=[super init]) {
|
||||
self.yunxingmoshi=[aDecoder decodeObjectForKey:@"yunxingmoshi"];
|
||||
self.light1=[aDecoder decodeObjectForKey:@"light1"];
|
||||
self.light2=[aDecoder decodeObjectForKey:@"light2"];
|
||||
self.pump=[aDecoder decodeObjectForKey:@"pump"];
|
||||
self.timer1=[aDecoder decodeObjectForKey:@"timer1"];
|
||||
self.timer2=[aDecoder decodeObjectForKey:@"timer2"];
|
||||
self.timer3=[aDecoder decodeObjectForKey:@"timer3"];
|
||||
self.timer4=[aDecoder decodeObjectForKey:@"timer4"];
|
||||
self.timer5=[aDecoder decodeObjectForKey:@"timer5"];
|
||||
self.timer6=[aDecoder decodeObjectForKey:@"timer6"];
|
||||
self.timer7=[aDecoder decodeObjectForKey:@"timer7"];
|
||||
self.timer8=[aDecoder decodeObjectForKey:@"timer8"];
|
||||
self.timer9=[aDecoder decodeObjectForKey:@"timer9"];
|
||||
self.timer10=[aDecoder decodeObjectForKey:@"timer10"];
|
||||
self.wendu=[aDecoder decodeObjectForKey:@"wendu"];
|
||||
|
||||
self.brightness=[aDecoder decodeObjectForKey:@"brightness"];
|
||||
self.tankLight=[aDecoder decodeObjectForKey:@"tankLight"];
|
||||
|
||||
self.Ph=[aDecoder decodeObjectForKey:@"Ph"];
|
||||
self.baojingSwitch=[aDecoder decodeObjectForKey:@"baojingSwitch"];
|
||||
self.miniTp=[aDecoder decodeObjectForKey:@"miniTp"];
|
||||
self.maxTp=[aDecoder decodeObjectForKey:@"maxTp"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// brightnessModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/3/15.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
|
||||
@interface BrightnessModel : baseModel
|
||||
@property(nonatomic,copy)NSString*liangdu;
|
||||
@property(nonatomic,copy)NSString*crc16Code;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// brightnessModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/3/15.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BrightnessModel.h"
|
||||
//背光亮度
|
||||
@implementation BrightnessModel
|
||||
-(NSString*)description{
|
||||
self.massagelegth=@"12";
|
||||
self.messagetype=@"00";
|
||||
self.functionCode=@"0c";
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// DeviceOnlineModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 配置设备入网指令
|
||||
@interface DeviceOnlineModel : baseModel
|
||||
@property(nonatomic,copy)NSString*wifiNumber;
|
||||
@property(nonatomic,copy)NSString*wifiPassword;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// DeviceOnlineModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DeviceOnlineModel.h"
|
||||
//设备入网指令
|
||||
|
||||
@implementation DeviceOnlineModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// GuidengKaiGuanModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/3/15.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
|
||||
@interface GuidengKaiGuanModel : baseModel
|
||||
// 开关状态
|
||||
@property(nonatomic,copy)NSString*onOff;
|
||||
//crc16 验证码
|
||||
@property(nonatomic,copy)NSString*crc16Str;
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// GuidengKaiGuanModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/3/15.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GuidengKaiGuanModel.h"
|
||||
//柜光灯开关
|
||||
@implementation GuidengKaiGuanModel
|
||||
-(NSString*)description{
|
||||
self.messagetype=@"00";
|
||||
self.functionCode=@"0d";//13
|
||||
|
||||
self.crc16Str=@"0000";
|
||||
self.massagelegth=@"12";
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@", self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
|
||||
|
||||
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// ServerBackDeviceLogInModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
|
||||
@interface ServerBackDeviceLogInModel : baseModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// ServerBackDeviceLogInModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ServerBackDeviceLogInModel.h"
|
||||
|
||||
@implementation ServerBackDeviceLogInModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// SetSelectorTime.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 设置定时器 时间
|
||||
|
||||
@interface SetSelectorTime : baseModel
|
||||
@property(nonatomic,copy)NSString*selectorNumber;
|
||||
@property(nonatomic,copy)NSString*selectorTime;
|
||||
|
||||
@property(nonatomic,copy)NSString*timer1;
|
||||
@property(nonatomic,copy)NSString*timer2;
|
||||
@property(nonatomic,copy)NSString*timer3;
|
||||
@property(nonatomic,copy)NSString*timer4;
|
||||
@property(nonatomic,copy)NSString*timer5;
|
||||
@property(nonatomic,copy)NSString*timer6;
|
||||
@property(nonatomic,copy)NSString*timer7;
|
||||
@property(nonatomic,copy)NSString*timer8;
|
||||
@property(nonatomic,copy)NSString*timer9;
|
||||
|
||||
@property(nonatomic,copy)NSString*crc16str;
|
||||
@property(nonatomic,copy)NSString*isOn;//时间定时器开关状态
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// SetSelectorTime.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SetSelectorTime.h"
|
||||
|
||||
@implementation SetSelectorTime
|
||||
- (NSString *)description
|
||||
{
|
||||
self.messagetype=@"00";
|
||||
self.massagelegth=@"16";
|
||||
self.functionCode=@"04";
|
||||
// self.selectorNumber=@"01";//1-9 定时器编号
|
||||
// self.selectorTime=@"";
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
|
||||
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// ThreeControlBackbackmsgModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/2/26.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
//77 字节 张工
|
||||
@interface ThreeControlBackbackmsgModel : baseModel
|
||||
@property(nonatomic)BOOL ofOn;
|
||||
@property(nonatomic)BOOL manual;
|
||||
@property(nonatomic,copy)NSString*yunxingmoshi;
|
||||
@property(nonatomic,copy)NSString*light1;
|
||||
@property(nonatomic,copy)NSString*light2;
|
||||
@property(nonatomic,copy)NSString*pump;
|
||||
@property(nonatomic,copy)NSString*timer1;
|
||||
@property(nonatomic,copy)NSString*timer2;
|
||||
@property(nonatomic,copy)NSString*timer3;
|
||||
@property(nonatomic,copy)NSString*timer4;
|
||||
@property(nonatomic,copy)NSString*timer5;
|
||||
@property(nonatomic,copy)NSString*timer6;
|
||||
@property(nonatomic,copy)NSString*timer7;
|
||||
@property(nonatomic,copy)NSString*timer8;
|
||||
@property(nonatomic,copy)NSString*timer9;
|
||||
@property(nonatomic,copy)NSString*timer10;
|
||||
@property(nonatomic,copy)NSString*wendu;
|
||||
@property(nonatomic,copy)NSString*Ph;
|
||||
|
||||
@property(nonatomic,copy)NSString*shidu;
|
||||
//背光灯亮度
|
||||
@property(nonatomic,copy)NSString*brightness;
|
||||
//柜灯开关
|
||||
@property(nonatomic,copy)NSString*tankLight;
|
||||
|
||||
@property(nonatomic,copy)NSString*baojingSwitch;
|
||||
@property(nonatomic,copy)NSString*miniTp;
|
||||
@property(nonatomic,copy)NSString*maxTp;
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// ThreeControlBackbackmsgModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/2/26.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ThreeControlBackbackmsgModel.h"
|
||||
|
||||
@implementation ThreeControlBackbackmsgModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// TimerSateModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/11/25.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
//开关定时器指令
|
||||
#import "baseModel.h"
|
||||
@interface TimerSateModel :baseModel
|
||||
@property(nonatomic,copy)NSString*timerNumber;
|
||||
@property(nonatomic,copy)NSString*timerState;// 开01;关00
|
||||
@property(nonatomic,copy)NSString*crc16String;
|
||||
@end
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// TimerSateModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/11/25.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TimerSateModel.h"
|
||||
|
||||
@implementation TimerSateModel
|
||||
- (NSString *)description
|
||||
{
|
||||
self.messagetype=@"00";
|
||||
self.functionCode=@"0a";//10
|
||||
self.massagelegth=@"13";
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// TwoControlBackmsgmodel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/2/18.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "baseModel.h"
|
||||
//两控(一灯一泵)返回信息模型
|
||||
@interface TwoControlBackmsgmodel : baseModel
|
||||
@property(nonatomic)BOOL ofOn;
|
||||
@property(nonatomic)BOOL manual;
|
||||
@property(nonatomic,copy)NSString*yunxingmoshi;
|
||||
@property(nonatomic,copy)NSString*light;
|
||||
@property(nonatomic,copy)NSString*pump;
|
||||
@property(nonatomic,copy)NSString*timer1;
|
||||
@property(nonatomic,copy)NSString*timer2;
|
||||
@property(nonatomic,copy)NSString*timer3;
|
||||
@property(nonatomic,copy)NSString*timer4;
|
||||
|
||||
@property(nonatomic,copy)NSString*wendu;
|
||||
@property(nonatomic,copy)NSString*Ph;
|
||||
|
||||
@property(nonatomic,copy)NSString*shidu;
|
||||
//背光灯亮度
|
||||
@property(nonatomic,copy)NSString*brightness;
|
||||
//柜灯开关
|
||||
@property(nonatomic,copy)NSString*tankLight;
|
||||
|
||||
@property(nonatomic,copy)NSString*baojingSwitch;
|
||||
@property(nonatomic,copy)NSString*miniTp;
|
||||
@property(nonatomic,copy)NSString*maxTp;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// TwoControlBackmsgmodel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/2/18.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "TwoControlBackmsgmodel.h"
|
||||
|
||||
@implementation TwoControlBackmsgmodel
|
||||
-(void)encodeWithCoder:(NSCoder*)aCoder{
|
||||
[aCoder encodeObject:self forKey:@"yunxingmoshi"];
|
||||
[aCoder encodeObject:self forKey:@"light1"];
|
||||
[aCoder encodeObject:self forKey:@"light2"];
|
||||
[aCoder encodeObject:self forKey:@"pump"];
|
||||
[aCoder encodeObject:self forKey:@"timer1"];
|
||||
[aCoder encodeObject:self forKey:@"timer2"];
|
||||
[aCoder encodeObject:self forKey:@"timer3"];
|
||||
[aCoder encodeObject:self forKey:@"timer4"];
|
||||
[aCoder encodeObject:self forKey:@"timer5"];
|
||||
[aCoder encodeObject:self forKey:@"timer6"];
|
||||
[aCoder encodeObject:self forKey:@"timer7"];
|
||||
[aCoder encodeObject:self forKey:@"timer8"];
|
||||
[aCoder encodeObject:self forKey:@"timer9"];
|
||||
[aCoder encodeObject:self forKey:@"timer10"];
|
||||
[aCoder encodeObject:self forKey:@"wendu"];
|
||||
[aCoder encodeObject:self forKey:@"Ph"];
|
||||
|
||||
[aCoder encodeObject:self forKey:@"brightness"];
|
||||
[aCoder encodeObject:self forKey:@"tankLight"];
|
||||
|
||||
[aCoder encodeObject:self forKey:@"baojingSwitch"];
|
||||
[aCoder encodeObject:self forKey:@"miniTp"];
|
||||
[aCoder encodeObject:self forKey:@"maxTp"];
|
||||
}
|
||||
//解挡时调用
|
||||
-(id)initWithCoder:(NSCoder*)aDecoder{
|
||||
if (self=[super init]) {
|
||||
self.yunxingmoshi=[aDecoder decodeObjectForKey:@"yunxingmoshi"];
|
||||
self.light=[aDecoder decodeObjectForKey:@"light"];
|
||||
|
||||
self.pump=[aDecoder decodeObjectForKey:@"pump"];
|
||||
self.timer1=[aDecoder decodeObjectForKey:@"timer1"];
|
||||
self.timer2=[aDecoder decodeObjectForKey:@"timer2"];
|
||||
self.timer3=[aDecoder decodeObjectForKey:@"timer3"];
|
||||
self.timer4=[aDecoder decodeObjectForKey:@"timer4"];
|
||||
|
||||
self.wendu=[aDecoder decodeObjectForKey:@"wendu"];
|
||||
self.Ph=[aDecoder decodeObjectForKey:@"Ph"];
|
||||
|
||||
self.brightness=[aDecoder decodeObjectForKey:@"brightness"];
|
||||
self.tankLight=[aDecoder decodeObjectForKey:@"tankLight"];
|
||||
|
||||
|
||||
self.baojingSwitch=[aDecoder decodeObjectForKey:@"baojingSwitch"];
|
||||
self.miniTp=[aDecoder decodeObjectForKey:@"miniTp"];
|
||||
self.maxTp=[aDecoder decodeObjectForKey:@"maxTp"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// ZeroControlBackmsgModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/2/24.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 无控设备返回信息 模型 返回28 字节
|
||||
@interface ZeroControlBackmsgModel : baseModel
|
||||
//温度
|
||||
@property(nonatomic,copy)NSString*wendu;
|
||||
//PH值
|
||||
@property(nonatomic,copy)NSString*Ph;
|
||||
// 湿度
|
||||
@property(nonatomic,copy)NSString*shidu;
|
||||
|
||||
//背光灯亮度
|
||||
@property(nonatomic,copy)NSString*brightness;
|
||||
//柜灯开关
|
||||
@property(nonatomic,copy)NSString*tankLight;
|
||||
|
||||
// 报警开关
|
||||
@property(nonatomic,copy)NSString*baojingSwitch;
|
||||
//最低温
|
||||
@property(nonatomic,copy)NSString*miniTp;
|
||||
// 最高温
|
||||
@property(nonatomic,copy)NSString*maxTp;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// ZeroControlBackmsgModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 16/2/24.
|
||||
// Copyright © 2016年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ZeroControlBackmsgModel.h"
|
||||
|
||||
@implementation ZeroControlBackmsgModel
|
||||
-(void)encodeWithCoder:(NSCoder*)aCoder{
|
||||
|
||||
[aCoder encodeObject:self forKey:@"wendu"];
|
||||
[aCoder encodeObject:self forKey:@"Ph"];
|
||||
|
||||
[aCoder encodeObject:self forKey:@"brightness"];
|
||||
[aCoder encodeObject:self forKey:@"tankLight"];
|
||||
|
||||
[aCoder encodeObject:self forKey:@"baojingSwitch"];
|
||||
[aCoder encodeObject:self forKey:@"miniTp"];
|
||||
[aCoder encodeObject:self forKey:@"maxTp"];
|
||||
}
|
||||
//解挡时调用
|
||||
-(id)initWithCoder:(NSCoder*)aDecoder{
|
||||
if (self=[super init]) {
|
||||
|
||||
self.wendu=[aDecoder decodeObjectForKey:@"wendu"];
|
||||
self.Ph=[aDecoder decodeObjectForKey:@"Ph"];
|
||||
|
||||
self.brightness=[aDecoder decodeObjectForKey:@"brightness"];
|
||||
self.tankLight=[aDecoder decodeObjectForKey:@"tankLight"];
|
||||
|
||||
self.baojingSwitch=[aDecoder decodeObjectForKey:@"baojingSwitch"];
|
||||
self.miniTp=[aDecoder decodeObjectForKey:@"miniTp"];
|
||||
self.maxTp=[aDecoder decodeObjectForKey:@"maxTp"];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// appLogin.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/13.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
|
||||
@interface appLogin : baseModel
|
||||
@property(nonatomic,copy)NSString*dateString;
|
||||
@property(nonatomic,copy)NSString*crc16String;
|
||||
@end
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// appLogin.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/13.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "appLogin.h"
|
||||
#include "dataContorl.h"
|
||||
@implementation appLogin
|
||||
- (NSString *)description
|
||||
{
|
||||
|
||||
NSDate * senddate=[NSDate date];
|
||||
NSCalendar*cal=[NSCalendar currentCalendar];
|
||||
NSUInteger unitFlages=NSDayCalendarUnit|NSMonthCalendarUnit|NSYearCalendarUnit;
|
||||
NSDateComponents*conpnent=[cal components:
|
||||
unitFlages fromDate:senddate];
|
||||
NSInteger year=[conpnent year];
|
||||
NSInteger month=[conpnent month];
|
||||
NSInteger day=[conpnent day];
|
||||
// 小于十时 day 或小于十月 前加零
|
||||
if (day<10) {
|
||||
if (month<10) {
|
||||
self.dateString=[NSString stringWithFormat:@"%ld0%ld0%ld",(long)year,(long)month,(long)day];
|
||||
}else{
|
||||
self.dateString=[NSString stringWithFormat:@"%ld%ld0%ld",(long)year,(long)month,(long)day];
|
||||
}
|
||||
|
||||
}else{
|
||||
// 当 day 大于等于十时
|
||||
if (month<10) {
|
||||
self.dateString=[NSString stringWithFormat:@"%ld0%ld%ld",(long)year,(long)month,(long)day];
|
||||
}else{
|
||||
self.dateString=[NSString stringWithFormat:@"%ld%ld%ld",(long)year,(long)month,(long)day];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 转十六进制
|
||||
NSString*hextring=[dataContorl hexStringFromString:self.dateString];
|
||||
|
||||
|
||||
|
||||
self.messagetype=@"00";
|
||||
self.functionCode=@"00";
|
||||
self.crc16String=@"0000";// CRC16校验码
|
||||
self.massagelegth=@"19";
|
||||
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@%@%@",self.messagetype,self.functionCode, self.sendmacId,self.resavemacId,self.massagelegth,hextring,self.crc16String];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// backAppLoginModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/13.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
|
||||
@interface backAppLoginModel : baseModel
|
||||
@property(nonatomic,copy)NSString* reuslt;
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// backAppLoginModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/13.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "backAppLoginModel.h"
|
||||
|
||||
@implementation backAppLoginModel
|
||||
-(instancetype)init{
|
||||
|
||||
self=[super init];
|
||||
if (self) {
|
||||
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// deviceLoginModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 设备登录服务器指令
|
||||
@interface deviceLoginModel : baseModel
|
||||
@property(nonatomic,copy)NSString*changshang;
|
||||
@property(nonatomic,copy)NSString*yingjianxinghao;
|
||||
@property(nonatomic,copy)NSString*banben;
|
||||
@property(nonatomic,copy)NSString*dengluIP;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// deviceLoginModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "deviceLoginModel.h"
|
||||
|
||||
@implementation deviceLoginModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// heartModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
|
||||
@interface heartModel : baseModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// heartModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "heartModel.h"
|
||||
//心跳包
|
||||
@implementation heartModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// huifushebeiruwnagModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 回复设备入网
|
||||
@interface huifushebeiruwnagModel : baseModel
|
||||
@property(nonatomic,copy)NSString*resault;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// huifushebeiruwnagModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "huifushebeiruwnagModel.h"
|
||||
|
||||
@implementation huifushebeiruwnagModel
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// manulswitchMSModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 手动模式下 开关指令
|
||||
@interface manulswitchMSModel : baseModel
|
||||
|
||||
@property(nonatomic,copy)NSString*lightNumber;
|
||||
@property(nonatomic,copy)NSString*switchBtn;
|
||||
@property(nonatomic,copy)NSString*crc16Str;
|
||||
@property(nonatomic)BOOL isOn;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// manulswitchMSModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "manulswitchMSModel.h"
|
||||
|
||||
@implementation manulswitchMSModel
|
||||
- (NSString *)description
|
||||
{
|
||||
self.messagetype=@"00";
|
||||
self.massagelegth=@"13";
|
||||
self.functionCode=@"03";
|
||||
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@", self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
|
||||
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// searchDeviceModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 查询设备信息
|
||||
@interface searchDeviceModel : baseModel
|
||||
//全填充为00
|
||||
@property(nonatomic,copy)NSString*crc16String;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// searchDeviceModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "searchDeviceModel.h"
|
||||
|
||||
@implementation searchDeviceModel
|
||||
- (NSString *)description
|
||||
{
|
||||
// if (self.isSend==NO) {
|
||||
// self.messagetype=@"01";
|
||||
// }else if(self.isSend==YES){
|
||||
self.messagetype=@"00";
|
||||
// }
|
||||
self.massagelegth=@"11";
|
||||
self.functionCode=@"06";
|
||||
self.crc16String=@"0000";
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth,self.crc16String];
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// setWaringTpModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 设置报警温度指令
|
||||
@interface setWaringTpModel : baseModel
|
||||
@property(nonatomic) BOOL IsOn;
|
||||
@property(nonatomic,copy)NSString*closeOn;
|
||||
@property(nonatomic,copy)NSString*catgry;
|
||||
@property(nonatomic)BOOL isHeigh;
|
||||
@property(nonatomic,copy)NSString*miniwaterTp;//最低报警水温
|
||||
@property(nonatomic,copy)NSString*kaiguan;//开关
|
||||
//最高水温
|
||||
@property(nonatomic,copy)NSString*maxwaterTp;
|
||||
//填充0
|
||||
|
||||
@property(nonatomic,copy)NSString*crc16Ing;// 校验码
|
||||
@end
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
//
|
||||
// setWaringTpModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "setWaringTpModel.h"
|
||||
|
||||
@implementation setWaringTpModel
|
||||
- (NSString *)description
|
||||
{
|
||||
self.massagelegth=@"16";
|
||||
self.messagetype=@"00";
|
||||
//self.kaiguan=@"02";// 01 开 00 关 02设置温度
|
||||
self.functionCode=@"05";
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@", self.messagetype,self.functionCode,self.sendmacId,self.resavemacId
|
||||
,self.massagelegth];
|
||||
|
||||
}
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// workTypeModel.h
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "baseModel.h"
|
||||
// 切换工作模式指令
|
||||
@interface workTypeModel : baseModel
|
||||
@property(nonatomic,copy)NSString*workstyle;
|
||||
@property(nonatomic,copy)NSString*crc16String;
|
||||
@property(nonatomic)BOOL manual;
|
||||
@end
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// workTypeModel.m
|
||||
// Ifish
|
||||
//
|
||||
// Created by imac on 15/10/12.
|
||||
// Copyright © 2015年 imac. All rights reserved.
|
||||
//
|
||||
|
||||
#import "workTypeModel.h"
|
||||
|
||||
@implementation workTypeModel
|
||||
- (NSString *)description
|
||||
{
|
||||
self.messagetype=@"00";
|
||||
self.massagelegth=@"12";
|
||||
self.functionCode=@"02";
|
||||
// self.workstyle=@"01";//切换自动模式根据定时器设定的时间段响应灯的开和关 00手动模式
|
||||
return [NSString stringWithFormat:@"%@%@%@%@%@",self.messagetype,self.functionCode,self.sendmacId,self.resavemacId,self.massagelegth];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user