add - broker设备接入校验
parent
a36ab5537e
commit
92b2a45cfd
@ -0,0 +1,32 @@
|
||||
package com.hw.mqtt.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 设备连接状态枚举
|
||||
* @author Wen JY
|
||||
* @description: TODO
|
||||
* @date 2023-09-13 13:42:37
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum ConnectStatus {
|
||||
|
||||
/**
|
||||
* 设备连接
|
||||
*/
|
||||
connct(1),
|
||||
|
||||
/**
|
||||
* 设备断开
|
||||
*/
|
||||
disconnect(0);
|
||||
|
||||
private final int key;
|
||||
|
||||
public int getKey(){
|
||||
return this.key;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.hw.mqtt.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* 设备类型枚举
|
||||
* @author Wen JY
|
||||
* @description: TODO
|
||||
* @date 2023-09-13 13:30:38
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public enum DeviceType {
|
||||
|
||||
/**
|
||||
* 网关/基站
|
||||
*/
|
||||
edge(1),
|
||||
|
||||
/**
|
||||
* 网关子设备/传感器
|
||||
*/
|
||||
sensor(2),
|
||||
|
||||
/**
|
||||
* 直连设备
|
||||
*/
|
||||
device(3);
|
||||
|
||||
private final int key;
|
||||
|
||||
public int getKey(){
|
||||
return this.key;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue