lizhanwei
2020-02-18 1d05a7834361cfa6c4caec132363863974453f52
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
package safeluck.drive.evaluation.platformMessage;
 
import com.anyun.exam.lib.MyLog;
import com.anyun.im_lib.util.ByteUtil;
 
 
import safeluck.drive.evaluation.im.MessageProcessor;
 
public class RegisterResp extends ServerProtocol {
    private String hexpwd;
    private short result;
    private int currPos = 0;
 
    public RegisterResp(byte[] rspBytes) {
        super(rspBytes);
    }
 
    @Override
    protected void parseMsgBody(byte[] msgbodyData) {
        currPos += 2;
        result = ByteUtil.getShort(ByteUtil.subArray(msgbodyData,currPos,1));
        if (result == PlatFormConstant.SUCCESS){
            MyLog.i(PlatFormConstant.TAG,"设备注册成功");
        }else{
            MyLog.i(PlatFormConstant.TAG,"设备注册失败");
        }
    }
}