package com.dy.common.mw.protocol.aepRtuStatus; 
 | 
  
 | 
import com.alibaba.fastjson2.JSON ; 
 | 
  
 | 
/** 
 | 
 * 上下线值对象 
 | 
 * 只有应用电信平台时有效 
 | 
 */ 
 | 
@SuppressWarnings("unused") 
 | 
public class OnOffLineVo { 
 | 
     
 | 
    public String rtuAddr; //:"862592059434970" 
 | 
    public String deviceId; //:"59a4d90bf7a04a4d3523fe15d6f3f", 
 | 
    public String productId; //:"15410798", 
 | 
    public String ipv4Address; //:"117.132.195.213", 
 | 
    public Boolean onTrueOffFalse ; 
 | 
     
 | 
    public String toString(){ 
 | 
        String s = "rtuAddr: " + rtuAddr  ; 
 | 
        s += "\ndeviceId:" + deviceId ; 
 | 
        s += "\nproductId:" + productId ; 
 | 
        s += "\nipv4Address:" + ipv4Address ; 
 | 
        s += "\nonTrueOffFalse:" + onTrueOffFalse ; 
 | 
        return s ; 
 | 
    } 
 | 
     
 | 
    /** 
 | 
     * 对象转成json 
 | 
     * @return json 
 | 
     * @throws Exception 异常 
 | 
     */ 
 | 
    public String toJson()throws Exception{ 
 | 
        try{ 
 | 
            return JSON.toJSONString(this) ; 
 | 
        }catch(Exception e){ 
 | 
            throw new Exception(e.getMessage() , e ) ; 
 | 
        } 
 | 
    } 
 | 
    /** 
 | 
     * json转成对象 
 | 
     * @param json json 
 | 
     * @return OnOffLineVo 
 | 
     * @throws Exception 异常 
 | 
     */ 
 | 
    public static OnOffLineVo jsonToObject(String json)throws Exception{ 
 | 
        try{ 
 | 
            return JSON.parseObject(json, OnOffLineVo.class) ; 
 | 
        }catch(Exception e){ 
 | 
            throw new Exception(e.getMessage() , e ) ; 
 | 
        } 
 | 
    } 
 | 
     
 | 
    public String getRtuAddr() { 
 | 
        return rtuAddr; 
 | 
    } 
 | 
    public void setRtuAddr(String rtuAddr) { 
 | 
        this.rtuAddr = rtuAddr; 
 | 
    } 
 | 
    public String getDeviceId() { 
 | 
        return deviceId; 
 | 
    } 
 | 
    public void setDeviceId(String deviceId) { 
 | 
        this.deviceId = deviceId; 
 | 
    } 
 | 
    public String getProductId() { 
 | 
        return productId; 
 | 
    } 
 | 
    public void setProductId(String productId) { 
 | 
        this.productId = productId; 
 | 
    } 
 | 
    @SuppressWarnings("unused") 
 | 
    public String getIpv4Address() { 
 | 
        return ipv4Address; 
 | 
    } 
 | 
    @SuppressWarnings("unused") 
 | 
    public void setIpv4Address(String ipv4Address) { 
 | 
        this.ipv4Address = ipv4Address; 
 | 
    } 
 | 
    @SuppressWarnings("unused") 
 | 
    public Boolean getOnTrueOffFalse() { 
 | 
        return onTrueOffFalse; 
 | 
    } 
 | 
    @SuppressWarnings("unused") 
 | 
    public void setOnTrueOffFalse(Boolean onTrueOffFalse) { 
 | 
        this.onTrueOffFalse = onTrueOffFalse; 
 | 
    } 
 | 
} 
 |