lizhanwei
2020-02-13 f4af8ca307ea8b01a465ff09b595d75ddc3d7394
app/src/main/java/safeluck/drive/evaluation/bean/DriveExamProtocol.java
@@ -2,7 +2,10 @@
import android.util.Log;
import com.anyun.exam.lib.MyLog;
import com.anyun.im_lib.util.ByteUtil;
import safeluck.drive.evaluation.util.Utils;
/**
 * MyApplication2
@@ -117,16 +120,17 @@
        pos+=messageBodyBytes.length;
        //校验码
        // TODO: 2019/12/18 校验码需要计算   还有转义需要处理
        checkCode =   Utils.calCheckCode(ByteUtil.subArray(desBytes,1,pos-1));
        desBytes[pos] = checkCode;
        pos++;
        //末尾结束标识位
        desBytes[pos] = MESSAGE_TAIL;
        Log.i(TAG, "包长度="+(pos+1));
        Log.i(TAG, "包内容: "+ByteUtil.byte2HexStr(desBytes));
        return desBytes;
        MyLog.i(TAG, "原始包长度="+(pos+1));
        MyLog.i(TAG, "原始包内容: "+ByteUtil.byte2HexStr(desBytes));
        byte[] tranferbytes = Utils.transferMeaning(desBytes);
        MyLog.i(TAG,"转义后的包内容:"+ByteUtil.byte2HexStr(tranferbytes));
        return tranferbytes;
    }
}