whyclj
2019-11-11 dd4d4e91cdfb9806155d7dedca8907ef4fb67ae7
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
package com.fgkj.action;
 
import android.os.Handler;
import android.util.Log;
 
import java.io.Serializable;
 
public class ServiceModel implements Serializable {
    public Integer code = 0;                    //返回到前台的消息命令码   0:成功        1:失败
    public int cmd;                             //寄存器地址
    public int cmd_type;                        //操作类型   0x03  读            0x10 写
    public String msg;
    public Object data;
    public Handler mhandler;
 
    @Override
    public String toString() {
        return "ServiceModel{" +
                "code=" + code +
                ", cmd=" + cmd +
                ", cmd_type=" + cmd_type +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                ", mhandler=" + mhandler +
                '}';
    }
 
    public ServiceModel clone(){
        ServiceModel model = new ServiceModel();
        model.cmd = this.cmd;
        model.cmd_type = this.cmd_type;
        model.msg = this.msg;
        model.mhandler = this.mhandler;
        model.data = this.data;
        return model;
    }
    //    public static void main(String[] args) {
//        System.out.println("$$$$$$$$$$$$$");
//    }
}