package com.dy.common.mw.protocol4Mqtt; 
 | 
  
 | 
import lombok.AllArgsConstructor; 
 | 
import lombok.Data; 
 | 
import lombok.NoArgsConstructor; 
 | 
  
 | 
/** 
 | 
 * @Author: liurunyu 
 | 
 * @Date: 2025/6/10 9:47 
 | 
 * @Description 
 | 
 */ 
 | 
@Data 
 | 
@NoArgsConstructor 
 | 
@AllArgsConstructor 
 | 
public class MqttTopic { 
 | 
    public String orgTag ;//组织标识 
 | 
    public String protocol ;//协议名称 
 | 
    public String devId ;//设备(FBox)ID 
 | 
    public String type;//数据(命令)类型 
 | 
    public Integer no;//测站编号 
 | 
  
 | 
    public boolean isEmpty(){ 
 | 
        return orgTag == null || protocol == null || devId == null || type == null || no == null 
 | 
                || orgTag.trim().length() == 0 || protocol.trim().length() == 0 || devId.trim().length() == 0 || type.trim().length() == 0 || no <= 0 ; 
 | 
    } 
 | 
  
 | 
    public String shortName(){ 
 | 
        return type + "/" + no; 
 | 
    } 
 | 
  
 | 
    public String longName(){ 
 | 
        return orgTag + "/" + protocol + "/" + devId + "/" + type + "/" + no; 
 | 
    } 
 | 
} 
 |