| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- //
- // SocketMsgModel.h
- // OneCable
- //
- // Created by KaRam Kim on 2017. 4. 20..
- // Copyright © 2017년 ntels. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "JDJSONModel.h"
- #define MSG_TYPE_LOGIN @"auth"
- #define MSG_TYPE_DEVICE_ALIVE @"device.alive"
- #define MSG_TYPE_AUTO_LOGIN @"auth.auto"
- #define MSG_TYPE_DEVICE_COMMAND @"device.command"
- #define MSG_TYPE_DEVICE_COMMAND_RES @"device.command.result"
- #define MSG_TYPE_NODE_COMMAND @"node.command"
- #define MSG_TYPE_NODE_COMMAND_RES @"node.command.result"
- #define MSG_TYPE_NODE_DELETE @"node.delete"
- #define MSG_TYPE_NODE_DELETE_RES @"node.delete.result"
- #define MSG_TYPE_NODE_REGIST_RES @"node.register.result"
- #define MSG_TYPE_NODE_PROFILE_UPDATE @"node.profile.update"
- #define MSG_TYPE_NODE_PROFILE_UPDATE_RES @"node.profile.update.result"
- #define MSG_TYPE_DEVICE_CONTENT @"device.content"
- #define MSG_TYPE_NODE_CONTENT @"node.content"
- #define MSG_TYPE_DEVICE_CONN @"device.conn"
- #define MSG_TYPE_FIRMWARE_UPGRADE @"firmware.upgrade"
- #define MSG_TYPE_FIRMWARE_UPGRADE_RESULT @"firmware.upgrade.result"
- #define MSG_TYPE_SOFTWARE_UPGRADE @"software.upgrade"
- #define MSG_TYPE_SOFTWARE_UPGRADE_RESULT @"software.upgrade.result"
- #define MSG_TYPE_NODES_RELOAD @"nodes.reload"
- #define CMD_TYPE_PAIRING_START @"pairing_start"
- #define CMD_TYPE_PAIRING_STOP @"pairing_stop"
- #define CMD_TYPE_UNPAIRING_START @"unpairing_start"
- #define CMD_TYPE_UNPAIRING_STOP @"pairing_stop"
- #define CMD_TYPE_FORCE_NODE_DEL @"unpairing_node"
- #define CMD_TYPE_CONTROL @"control"
- #define CMD_TYPE_STATE @"state"
- #define CONT_TYPE_PERIODIC @"periodic_data"
- #define CONT_TYPE_NONPERIODIC @"nonperiodic_data"
- #define CONT_TYPE_FAULT @"fault_data"
- #define CONT_TYPE_FAULT_CLEAR @"fault_clear_data"
- #define CONT_TYPE_LOB @"lob"
- #define CONT_TYPE_META @"meta"
- @interface SocketRequestModel : SocketModel
- @property (copy, nonatomic) NSDictionary *requestMsg;
- //-(void)setRequestId:(int)requestId;
- -(NSString *)getSendMessage;
- -(id)initWithMsgType:(NSString *)msgType;
- @end
- @interface SocketReponseModel : SocketModel
- @property (copy, nonatomic) NSString *commandId;
- @property (copy, nonatomic) NSString *commandStatus;
- @property (copy, nonatomic) NSString *commandType;
- @property (copy, nonatomic) NSString *requestTime;
- @property (copy, nonatomic) NSString *responseTime;
- @end
- @protocol CommandTyepModel;
- @interface CommandTypeModel : JDJSONModel
- @property (copy, nonatomic) NSString *commandclassId;
- @property (copy, nonatomic) NSString *value;
- @end
- @interface CommandModel : SocketReponseModel
- @property (copy, nonatomic) CommandTypeModel *responseValue;
- @property (copy, nonatomic) NSString *commandMessage;
- @end
- @protocol SoKDeviceModel;
- @interface SoKDeviceModel : SocketReponseModel
- @property (copy, nonatomic) NSString *deviceId;
- @property (copy, nonatomic) NSString *deviceManufacturer;
- @property (copy, nonatomic) NSString *deviceModelNumber;
- @property (copy, nonatomic) NSString *deviceSerialNumber;
- @property (copy, nonatomic) NSString *deviceProfileVersion;
- @property (copy, nonatomic) NSString *devicePassword;
- @property (copy, nonatomic) NSString *deviceKey;
- @end
- @protocol SoKDeviceWorkModel;
- @interface SoKDeviceWorkModel : SocketReponseModel
- @property (copy, nonatomic) NSString *work_type;
- @property (copy, nonatomic) NSString *work_result;
- @end
- @protocol SoKNodeModel;
- @interface SoKNodeModel : SoKDeviceModel
- @property (copy, nonatomic) NSString *nodeManufacturer;
- @property (copy, nonatomic) NSString *nodeModelNumber;
- @property (copy, nonatomic) NSString *nodeProfileVersion;
- @property (copy, nonatomic) NSString *nodeSerialNumber;
- @property (copy, nonatomic) NSString *nodeName;
- @property (copy, nonatomic) NSString *nodeId;
- @property (copy, nonatomic) NSString *prdName;
- @property (copy, nonatomic) NSString *prdUserName;
- @property (copy, nonatomic) NSString *delYn;
- @end
- @interface ContentModel : SoKNodeModel
- @property (copy, nonatomic) NSString *contentId;
- @property (copy, nonatomic) NSString *contentType ;
- @property (copy, nonatomic) NSString *contentValue;
- @property (copy, nonatomic) NSString *createTime;
- @property (copy, nonatomic) NSString *collectTime;
- @end
- @interface ContentDeviceModel : SocketModel
- @property (copy, nonatomic) NSString *deviceId;
- @property (copy, nonatomic) NSString *contentId;
- @property (copy, nonatomic) NSString *contentType;
- @property (copy, nonatomic) NSDictionary *contentValue;
- @property (copy, nonatomic) NSString *createTime;
- @property (copy, nonatomic) NSString *messageType;
- @property (copy, nonatomic) NSString *collectionTime;
- @end
- @interface DeviceConnectionModel : SocketModel
- @property (copy, nonatomic) NSString *deviceId;
- @property (copy, nonatomic) NSString *messageType;
- @property (copy, nonatomic) NSString *deviceConn;
- @property (copy, nonatomic) NSString *deviceConnLastDatetime;
- @end
|