[630][adas] 添加收到回执确认的方法
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.zhjt.mogo.adas.data.bean;
|
||||
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -107,6 +109,20 @@ public class ReceivedAck {
|
||||
this.receivedAck = receivedAck;
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认是否收到回执
|
||||
*
|
||||
* @param msgId 下发的消息id
|
||||
* @return 是否收到回执
|
||||
*/
|
||||
public boolean isReceiptReceived(long msgId) {
|
||||
Log.i("ReceivedAck", "消息=" + msgId + " 结果=" + toString());
|
||||
if (status == Status.NORMAL) {
|
||||
return this.msgId == msgId;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "{" +
|
||||
|
||||
Reference in New Issue
Block a user