wjc
2025-04-24 8a249407f9a91b696b88d74eea0fbf789d0ee6a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.hdl.sdk.link.core.bean;
 
import android.text.TextUtils;
 
import androidx.annotation.NonNull;
 
import com.hdl.sdk.link.common.utils.gson.GsonConvert;
 
import java.io.Serializable;
 
/**
 * Created by Tong on 2021/9/27.
 * 包括link数据及透传的bus、modbus、zigbee等数据
 */
public class LinkResponse implements Serializable {
 
    private String topic;
    private String data;
    private byte []byteData;
    private int code;
    private int msg;
 
    public String getTopic() {
        return topic;
    }
 
    public void setTopic(String topic) {
        this.topic = topic;
    }
 
    public String getData() {
        return data;
    }
 
    public void setByteData(byte []data) {
        this.byteData = data;
    }
 
    public byte []getByteData() {
        return byteData;
    }
 
    public void setData(String data) {
        this.data = data;
    }
 
    @NonNull
    @Override
    public String toString() {
        return GsonConvert.getGson().toJson(this);
    }
 
    /**
     * 响应状态码
     * @return
     */
    public int getCode() {
        return code;
    }
 
    public void setCode(int code) {
        this.code = code;
    }
 
    /**
     * 响应消息
     * @return
     */
    public int getMsg() {
        return msg;
    }
 
    public void setMsg(int msg) {
        this.msg = msg;
    }
}