|
|
|
|
@@ -10,6 +10,16 @@ import com.zhidao.adas.client.bean.ObuRsi;
|
|
|
|
|
import com.zhidao.adas.client.bean.ObuRsm;
|
|
|
|
|
import com.zhidao.adas.client.bean.ObuSpat;
|
|
|
|
|
import com.zhidao.adas.client.bean.PerceptionTrafficLight;
|
|
|
|
|
import com.zhidao.adas.client.bean.PlanningDecisionState;
|
|
|
|
|
import com.zhidao.adas.client.bean.PlanningObjects;
|
|
|
|
|
import com.zhidao.adas.client.bean.PredictionObstacleTrajectory;
|
|
|
|
|
import com.zhidao.adas.client.bean.RecordDataConfig;
|
|
|
|
|
import com.zhidao.adas.client.bean.RecordPanel;
|
|
|
|
|
import com.zhidao.adas.client.bean.RoboSweeperTaskIndex;
|
|
|
|
|
import com.zhidao.adas.client.bean.StatusInfo;
|
|
|
|
|
import com.zhidao.adas.client.bean.TrackedObjects;
|
|
|
|
|
import com.zhidao.adas.client.bean.Trajectory;
|
|
|
|
|
import com.zhidao.adas.client.bean.Warn;
|
|
|
|
|
import com.zhidao.adas.client.log.LogSave;
|
|
|
|
|
import com.zhidao.adas.client.utils.Constants;
|
|
|
|
|
import com.zhidao.support.adas.high.common.ThreadPoolManager;
|
|
|
|
|
@@ -185,6 +195,227 @@ public class DataDistribution {
|
|
|
|
|
private String onTransmit(String time, BaseInfo data) {
|
|
|
|
|
String temp = data.toString();
|
|
|
|
|
String str = cutDown(temp);
|
|
|
|
|
if (data instanceof Trajectory) {
|
|
|
|
|
listTrajectory.add(0, new DataShow(listTrajectorySize++, time + str));
|
|
|
|
|
if (listTrajectory.size() > LIST_SIZE) {
|
|
|
|
|
listTrajectory.remove(listTrajectory.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_TRAJECTORY.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof TrackedObjects) {
|
|
|
|
|
listTrackedObjects.add(0, new DataShow(listTrackedObjectsSize++, time + str));
|
|
|
|
|
if (listTrackedObjects.size() > LIST_SIZE) {
|
|
|
|
|
listTrackedObjects.remove(listTrackedObjects.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_TRACKED_OBJECTS.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof OriginalPointCloudData) {
|
|
|
|
|
listOriginalPointCloud.add(0, new DataShow(listOriginalPointCloudSize++, time + str));
|
|
|
|
|
if (listOriginalPointCloud.size() > LIST_SIZE) {
|
|
|
|
|
listOriginalPointCloud.remove(listOriginalPointCloud.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_POINT_CLOUD_ORIGINAL.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof PlanningObjects) {
|
|
|
|
|
listPlanningObjects.add(0, new DataShow(listPlanningObjectsSize++, time + str));
|
|
|
|
|
if (listPlanningObjects.size() > LIST_SIZE) {
|
|
|
|
|
listPlanningObjects.remove(listPlanningObjects.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_OBJECTS.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof PlanningDecisionState) {
|
|
|
|
|
listPlanningDecisionState.add(0, new DataShow(listPlanningDecisionStateSize++, time + str));
|
|
|
|
|
if (listPlanningDecisionState.size() > LIST_SIZE) {
|
|
|
|
|
listPlanningDecisionState.remove(listPlanningDecisionState.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_PLANNING_DECISION_STATE.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ObuSpat) {
|
|
|
|
|
listObuSpat.add(0, new DataShow(listObuSpatSize++, time + str));
|
|
|
|
|
if (listObuSpat.size() > LIST_SIZE) {
|
|
|
|
|
listObuSpat.remove(listObuSpat.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_OBU_SPAT.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ObuRsi) {
|
|
|
|
|
listObuRsi.add(0, new DataShow(listObuRsiSize++, time + str));
|
|
|
|
|
if (listObuRsi.size() > LIST_SIZE) {
|
|
|
|
|
listObuRsi.remove(listObuRsi.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSI.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ObuRsm) {
|
|
|
|
|
listObuRsm.add(0, new DataShow(listObuRsmSize++, time + str));
|
|
|
|
|
if (listObuRsm.size() > LIST_SIZE) {
|
|
|
|
|
listObuRsm.remove(listObuRsm.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_OBU_RSM.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ObuMap) {
|
|
|
|
|
listObuMap.add(0, new DataShow(listObuMapSize++, time + str));
|
|
|
|
|
if (listObuMap.size() > LIST_SIZE) {
|
|
|
|
|
listObuMap.remove(listObuMap.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_OBU_MAP.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof GnssInfo) {
|
|
|
|
|
listGnssInfo.add(0, new DataShow(listGnssInfoSize++, time + str));
|
|
|
|
|
if (listGnssInfo.size() > LIST_SIZE) {
|
|
|
|
|
listGnssInfo.remove(listGnssInfo.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_GNSS_INFO.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof VehicleState) {
|
|
|
|
|
listVehicleState.add(0, new DataShow(listVehicleStateSize++, time + str));
|
|
|
|
|
if (listVehicleState.size() > LIST_SIZE) {
|
|
|
|
|
listVehicleState.remove(listVehicleState.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_VEHICLE_STATE.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ChassisStates) {
|
|
|
|
|
listChassisStates.add(0, new DataShow(listChassisStatesSize++, time + str));
|
|
|
|
|
if (listChassisStates.size() > LIST_SIZE) {
|
|
|
|
|
listChassisStates.remove(listChassisStates.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_CHASSIS_STATES.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof AutopilotState) {
|
|
|
|
|
listAutopilotState.add(0, new DataShow(listAutopilotStateSize++, time + str));
|
|
|
|
|
if (listAutopilotState.size() > LIST_SIZE) {
|
|
|
|
|
listAutopilotState.remove(listAutopilotState.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_AUTOPILOT_STATE.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof MogoReportMessage) {
|
|
|
|
|
listMogoReportMessage.add(0, new DataShow(listMogoReportMessageSize++, time + str));
|
|
|
|
|
if (listMogoReportMessage.size() > LIST_SIZE) {
|
|
|
|
|
listMogoReportMessage.remove(listMogoReportMessage.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_REPORT_MESSAGE.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof PerceptionTrafficLight) {
|
|
|
|
|
listPerceptionTrafficLight.add(0, new DataShow(listPerceptionTrafficLightSize++, time + str));
|
|
|
|
|
if (listPerceptionTrafficLight.size() > LIST_SIZE) {
|
|
|
|
|
listPerceptionTrafficLight.remove(listPerceptionTrafficLight.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_PERCEPTION_TRAFFIC_LIGHT.equals(listener.first)) {
|
|
|
|
|
listener.second.onPerceptionTrafficLight((PerceptionTrafficLight) data);
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof PredictionObstacleTrajectory) {
|
|
|
|
|
listPredictionObstacleTrajectory.add(0, new DataShow(listPredictionObstacleTrajectorySize++, time + str));
|
|
|
|
|
if (listPredictionObstacleTrajectory.size() > LIST_SIZE) {
|
|
|
|
|
listPredictionObstacleTrajectory.remove(listPredictionObstacleTrajectory.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof BasicInfoReq) {
|
|
|
|
|
|
|
|
|
|
} else if (data instanceof CarConfigResp) {
|
|
|
|
|
if (listener != null && Constants.TITLE.TITLE_CAR_CONFIG_RESP.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof RecordPanel) {
|
|
|
|
|
listRecordPanel.add(0, new DataShow(listRecordPanelSize++, time + str));
|
|
|
|
|
if (listRecordPanel.size() > LIST_SIZE) {
|
|
|
|
|
listRecordPanel.remove(listRecordPanel.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_RECORD_RESULT.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof BagManagerCmd) {
|
|
|
|
|
listBagManagerCmd.add(0, new DataShow(listBagManagerCmdSize++, time + str));
|
|
|
|
|
if (listBagManagerCmd.size() > LIST_SIZE) {
|
|
|
|
|
listBagManagerCmd.remove(listBagManagerCmd.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_BAG_MANAGER_CMD.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof GlobalPathResp) {
|
|
|
|
|
listGlobalPathResp.add(0, new DataShow(listGlobalPathRespSize++, time + str));
|
|
|
|
|
if (listGlobalPathResp.size() > LIST_SIZE) {
|
|
|
|
|
listGlobalPathResp.remove(listGlobalPathResp.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_GLOBAL_PATH_RESP.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof Warn) {
|
|
|
|
|
listWarn.add(0, new DataShow(listWarnSize++, time + str));
|
|
|
|
|
if (listWarn.size() > LIST_SIZE) {
|
|
|
|
|
listWarn.remove(listWarn.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_WARN.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ArrivalNotification) {
|
|
|
|
|
listArrivalNotification.add(0, new DataShow(listArrivalNotificationSize++, time + str));
|
|
|
|
|
if (listArrivalNotification.size() > LIST_SIZE) {
|
|
|
|
|
listArrivalNotification.remove(listArrivalNotification.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_ARRIVAL_NOTIFICATION.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof StatusInfo) {
|
|
|
|
|
listStatusInfo.add(0, new DataShow(listStatusInfoSize++, time + str));
|
|
|
|
|
if (listStatusInfo.size() > LIST_SIZE) {
|
|
|
|
|
listStatusInfo.remove(listStatusInfo.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_STATUS_QUERY_RESP.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof RecordDataConfig) {
|
|
|
|
|
listRecordDataConfig.add(0, new DataShow(listRecordDataConfigSize++, time + str));
|
|
|
|
|
if (listRecordDataConfig.size() > LIST_SIZE) {
|
|
|
|
|
listRecordDataConfig.remove(listRecordDataConfig.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_RECORD_DATA_CONFIG_RESP.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof RoboSweeperTaskIndex) {
|
|
|
|
|
listRoboSweeperTaskIndex.add(0, time + str);
|
|
|
|
|
if (listRoboSweeperTaskIndex.size() > LIST_SIZE) {
|
|
|
|
|
listRoboSweeperTaskIndex.remove(listRoboSweeperTaskIndex.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_SWEEPER_TASK_INDEX_DATA.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof RoboSweeperTaskIndex) {
|
|
|
|
|
listRoboSweeperTaskIndex.add(0, new DataShow(listRoboSweeperTaskIndexSize++, time + str));
|
|
|
|
|
if (listRoboSweeperTaskIndex.size() > LIST_SIZE) {
|
|
|
|
|
listRoboSweeperTaskIndex.remove(listRoboSweeperTaskIndex.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_SWEEPER_TASK_INDEX_DATA.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof FSMFunctionStates) {
|
|
|
|
|
listFSMFunctionStates.add(0, new DataShow(listFSMFunctionStatesSize++, time + str));
|
|
|
|
|
if (listFSMFunctionStates.size() > LIST_SIZE) {
|
|
|
|
|
listFSMFunctionStates.remove(listFSMFunctionStates.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_FUNCTION_STATES.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
}
|
|
|
|
|
} else if (data instanceof ErrorData) {
|
|
|
|
|
listErrorData.add(0, new DataShow(listErrorDataSize++, time + str));
|
|
|
|
|
if (listErrorData.size() > 100) {
|
|
|
|
|
listErrorData.remove(listErrorData.size() - 1);
|
|
|
|
|
}
|
|
|
|
|
if (listener != null && Constants.TITLE.RECEIVE_ERROR.equals(listener.first)) {
|
|
|
|
|
listener.second.onRefresh();
|
|
|
|
|
if (data.header == null) {
|
|
|
|
|
if (data instanceof ErrorData) {
|
|
|
|
|
listErrorData.add(0, new DataShow(listErrorDataSize++, time + str));
|
|
|
|
|
|