feat: 增加发送和接收的通用处理和数据结构
parent
a486aa1668
commit
29623f1fc0
@ -0,0 +1,11 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Device {
|
||||
String deviceId;
|
||||
List<OneService> services;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceUploadImageDataEvent {
|
||||
Integer channelNumber;
|
||||
Integer presetPosition;
|
||||
String fileName;
|
||||
String fileFolder;
|
||||
Integer checkMode;
|
||||
String checkValue;
|
||||
Integer packageNumber;
|
||||
String time;
|
||||
Integer encodeMode;
|
||||
Integer dataLength;
|
||||
String data;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Data
|
||||
public class GeneralDataMessageUpload {
|
||||
DeviceUploadImageDataEvent deviceUploadImageDataEvent;
|
||||
HeartbeatMessageUpload heartbeatMessageUpload;
|
||||
PowerOnContactMessage powerOnContactMessage;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HeartbeatMessageUpload {
|
||||
String time;
|
||||
Integer signalIntensity;
|
||||
Integer batteryVoltage;
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MessageSend {
|
||||
Integer mid;
|
||||
String serviceId;
|
||||
String deviceId;
|
||||
String cmd;
|
||||
Paras paras;
|
||||
String msgType;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MessageUpload {
|
||||
List<Device> devices;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OneService {
|
||||
GeneralDataMessageUpload data;
|
||||
String serviceId;
|
||||
String eventTime;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ParamArray {
|
||||
Integer presetPosition;
|
||||
Integer hour;
|
||||
Integer minute;
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Data
|
||||
public class Paras {
|
||||
String fileFolder;
|
||||
String fileName;
|
||||
String password;
|
||||
Integer checkMode;
|
||||
String checkValue;
|
||||
Integer type;
|
||||
String url;
|
||||
String logFileStartTime;
|
||||
String logFileEndTime;
|
||||
String logFileName;
|
||||
String dataType;
|
||||
Integer amount;
|
||||
Integer channel;
|
||||
Integer channelNumber;
|
||||
Integer timingType;
|
||||
String time;
|
||||
Integer level;
|
||||
Integer precipitationAlarm;
|
||||
Integer interval;
|
||||
Integer windSpeedAlarm;
|
||||
Integer heartbeatInterval;
|
||||
Integer sampleInterval;
|
||||
Integer port;
|
||||
Integer onlineInterval;
|
||||
Integer httpPort;
|
||||
Integer sleepDuration;
|
||||
RestartTime restartTime;
|
||||
String ipAddr;
|
||||
String httpIp;
|
||||
List<ParamArray> paramArray;
|
||||
Integer groupNumber;
|
||||
Integer presetPosition;
|
||||
Integer sign;
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PowerOnContactMessage {
|
||||
String standardVersionNumber;
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.shxy.xymanager_common.model.mqtt;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RestartTime {
|
||||
Integer hour;
|
||||
Integer day;
|
||||
Integer minute;
|
||||
}
|
Loading…
Reference in New Issue