[660][adas][data-center] 添加节点检测功能,节点状态接口,移除节点超时接口
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package com.zhjt.mogo.adas.data.bean;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.zhjt.mogo.adas.data.AdasConstants;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class NodeStateInfo {
|
||||
private final AdasConstants.NodeName nodeName; //节点名称
|
||||
@NonNull
|
||||
private AdasConstants.NodeState nodeState;//节点主状态 包含:未知;存在;不存在;
|
||||
@Nullable
|
||||
private AdasConstants.NodeExistState existState;//节点存在时的状态 null表示未知
|
||||
|
||||
public NodeStateInfo(AdasConstants.NodeName nodeName, @NonNull AdasConstants.NodeState nodeState) {
|
||||
this.nodeName = nodeName;
|
||||
this.nodeState = nodeState;
|
||||
}
|
||||
|
||||
public AdasConstants.NodeName getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public AdasConstants.NodeState getNodeState() {
|
||||
return nodeState;
|
||||
}
|
||||
|
||||
public void setNodeState(@NonNull AdasConstants.NodeState nodeState) {
|
||||
this.nodeState = nodeState;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public AdasConstants.NodeExistState getExistState() {
|
||||
return existState;
|
||||
}
|
||||
|
||||
public void setExistState(@Nullable AdasConstants.NodeExistState existState) {
|
||||
this.existState = existState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
NodeStateInfo that = (NodeStateInfo) o;
|
||||
return nodeName == that.nodeName && nodeState == that.nodeState && existState == that.existState;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(nodeName, nodeState, existState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "NodeStateInfo{" +
|
||||
"nodeName=" + nodeName +
|
||||
", nodeState=" + nodeState +
|
||||
", existState=" + existState +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package mogo.telematics.pad;
|
||||
option java_package = "com.zhjt.mogo.adas.data";
|
||||
|
||||
import "message_pad.proto";
|
||||
import "personal/adas_constants.proto";
|
||||
|
||||
//发送的数据ID持久化,只保留最后一条的消息id,每天重新累计
|
||||
message LastMessage{
|
||||
@@ -16,10 +15,3 @@ message LastMessage{
|
||||
message MessageIdInfo{
|
||||
map<uint64, LastMessage> lastMessages = 1;// key:data(日期) value:数据
|
||||
}
|
||||
|
||||
//节点状态信息
|
||||
message NodeStateInfo{
|
||||
com.zhjt.mogo.adas.data.NodeName nodeName = 1;//节点名称
|
||||
com.zhjt.mogo.adas.data.NodeState nodeState = 2;//节点主状态 包含:未知;存在;不存在;
|
||||
com.zhjt.mogo.adas.data.NodeExistState existState = 3;//节点存在时的状态
|
||||
}
|
||||
|
||||
@@ -110,9 +110,8 @@ enum SubscribeType {
|
||||
* 节点名称
|
||||
*/
|
||||
enum NodeName{
|
||||
DEFAULT_NAME = 0;//无用
|
||||
SSM = 1;//SSM默认存在
|
||||
FSM2024 = 2;//FSM 2024版本的Topic名称
|
||||
SSM = 0;//SSM默认存在
|
||||
FSM2024 = 1;//FSM 2024版本的Topic名称
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user