package safeluck.drive.evaluation.platformMessage;
|
|
import com.anyun.im_lib.util.ByteUtil;
|
|
/**
|
* 服务端通用应答
|
*/
|
public class ServerCommonRsp extends ServerProtocol {
|
|
/**
|
* 80
|
* 80 01
|
* 00 05
|
* 00 08 61 85 13 02 12 45
|
* 30 AF
|
* FF
|
*
|
* 00 02
|
* 01 01
|
* 00
|
*
|
* CC
|
*
|
* 出去头尾标识位0x7e后的 通用服务器应答消息
|
*/
|
private short result;
|
private int currPos=0;
|
|
private short msgId;//对应客户端的消息ID;
|
|
private short msg_serial_num;//对应客户端给的消息流水号
|
/**
|
* 除了头尾标示位0x7e的消息
|
* @param message
|
*/
|
public ServerCommonRsp(byte[] message) {
|
super(message);
|
}
|
|
@Override
|
protected void parseMsgBody(byte[] msgbodyData) {
|
byte[] msg_serial_numBytes = ByteUtil.subArray(msgbodyData,currPos,2);
|
currPos += 2;
|
byte[] msgIdBytes = ByteUtil.subArray(msgbodyData,currPos,2);
|
currPos += 2;
|
result = ByteUtil.getShort(ByteUtil.subArray(msgbodyData,currPos,1));
|
}
|
|
public short getResult() {
|
return result;
|
}
|
|
public short getMsgId() {
|
return msgId;
|
}
|
|
public short getMsg_serial_num() {
|
return msg_serial_num;
|
}
|
}
|