[2.13.2-v2x] add new func of road event from telemetics
This commit is contained in:
@@ -15,4 +15,6 @@ interface Identify {
|
||||
}
|
||||
|
||||
fun clearOldMarker()
|
||||
|
||||
fun getIdentifyObj(uuid: String):TrackedObject?
|
||||
}
|
||||
@@ -61,5 +61,9 @@ class IdentifyBeautifyDataDrawer : Identify {
|
||||
TrackManager.getInstance().clearAll()
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return TrackManager.getInstance().getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -105,6 +105,10 @@ object IdentifyFactory : Identify, IMoGoObuStatusListener {
|
||||
mDrawerHandler.sendMessage(message)
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return identify?.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
override fun updateTrackerWarningInfo(trafficData: TrafficData) {
|
||||
super.updateTrackerWarningInfo(trafficData)
|
||||
val message = Message.obtain()
|
||||
|
||||
@@ -136,4 +136,8 @@ class IdentifyOriginDataDrawer : Identify {
|
||||
WarningHelper.clear()
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return mMarkersCaches[uuid]
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.mogo.eagle.core.function.business.identify
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths.PATH_IDENTIFY
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.api.map.marker.IMoGoIdentifyListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -14,7 +17,8 @@ import mogo.telematics.pad.MessagePad.TrackedObject
|
||||
*
|
||||
* @author donghongyu
|
||||
*/
|
||||
class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
@Route(path = PATH_IDENTIFY)
|
||||
class MapIdentifySubscriber private constructor() :IMoGoIdentifyListener, IMoGoSubscriber,
|
||||
IMoGoAutopilotIdentifyListener {
|
||||
|
||||
private val TAG = "MapIdentifySubscriber"
|
||||
@@ -67,4 +71,8 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
}
|
||||
}
|
||||
|
||||
override fun getIdentifyObj(uuid: String): TrackedObject? {
|
||||
return IdentifyFactory.getIdentifyObj(uuid)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -163,4 +163,13 @@ public class TrackManager {
|
||||
mMarkersCaches.forEach((uuid, trackObj) -> removeKey(uuid));
|
||||
}
|
||||
|
||||
public MessagePad.TrackedObject getIdentifyObj(String uuid) {
|
||||
TrackObj trackObj = mMarkersCaches.get(uuid);
|
||||
if (trackObj != null && trackObj.getCache() != null) {
|
||||
return trackObj.getCache();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user