panlili2024
2024-11-12 69afac92a320033297d71e901e3c5b65e690f0b2
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
package com.hdl.sdk.ttl.HDLAppliances.HDLDoorMachine;
 
 
import com.hdl.sdk.ttl.HDLDeviceManger.Bean.AppliancesInfo;
 
import java.io.Serializable;
 
/**
 * Created by panlili on 2023-08-22
 * 附加数据:  门锁编号 + 随机密钥(8byte)
 */
public class DoorMachineFristBackInfo implements Serializable {
    private AppliancesInfo appliancesInfo;
 
    private int channelNum;//门锁编号
    private byte[] secretBytes = new byte[9];
 
    private byte[] curState;//控制回馈信息
 
    public DoorMachineFristBackInfo() {
 
    }
 
    public DoorMachineFristBackInfo(AppliancesInfo mAppliancesInfo) {
        this.appliancesInfo = mAppliancesInfo;
        this.curState = mAppliancesInfo.getArrCurState();
 
        if (this.curState == null) return;
 
        if (this.curState.length >= 9) {
            this.channelNum = this.curState[0] & 0xFF;
 
            for (int i = 0; i < this.curState.length; i++) {
                secretBytes[i] = (byte) (this.curState[i] & 0xFF);
            }
        }
 
    }
 
    public AppliancesInfo getAppliancesInfo() {
        return appliancesInfo;
    }
 
    public void setAppliancesInfo(AppliancesInfo appliancesInfo) {
        this.appliancesInfo = appliancesInfo;
    }
 
    public int getChannelNum() {
        return channelNum;
    }
 
    public void setChannelNum(int channelNum) {
        this.channelNum = channelNum;
    }
 
    public byte[] getCurState() {
        return curState;
    }
 
    public void setCurState(byte[] curState) {
        this.curState = curState;
    }
 
    public byte[] getSecretBytes() {
        return secretBytes;
    }
 
    public void setSecretBytes(byte[] secretBytes) {
        this.secretBytes = secretBytes;
    }
}