[Fix]解决局域网内多个pad注册同名service导致连接不上的问题
This commit is contained in:
@@ -57,5 +57,5 @@ dependencies {
|
||||
// api "com.zhidao.support.adas:high:1.2.1.2_bate21"
|
||||
implementation 'org.greenrobot:eventbus:3.2.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.52'
|
||||
implementation 'com.mogo.cloud:telematic:1.3.53-beta'
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_ADAS_IMPL
|
||||
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
|
||||
import com.mogo.eagle.core.data.trafficlight.toTrafficLightDetail
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotProvider
|
||||
import com.mogo.eagle.core.function.api.map.collect.IMoGoMapDataCollectProvider
|
||||
import com.mogo.eagle.core.function.autopilot.adapter.MoGoAdasListenerImpl
|
||||
@@ -21,17 +22,16 @@ import com.mogo.eagle.core.function.autopilot.adapter.MoGoAdasMsgConnectStatusLi
|
||||
import com.mogo.eagle.core.function.autopilot.adapter.MoGoHandAdasMsgManager
|
||||
import com.mogo.eagle.core.function.autopilot.server.AsyncDataToAutopilotServer
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.telematic.MogoProtocolMsg
|
||||
import com.mogo.telematic.MogoProtocolMsg.*
|
||||
import com.mogo.telematic.NSDNettyManager
|
||||
import com.mogo.telematic.client.listener.MessageStateListener
|
||||
import com.mogo.telematic.client.listener.NettyClientListener
|
||||
import com.mogo.telematic.client.status.ConnectState
|
||||
import com.mogo.telematic.server.netty.NettyServerListener
|
||||
@@ -44,6 +44,7 @@ import com.zhidao.support.adas.high.common.Constants.IPC_CONNECTION_STATUS
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils
|
||||
import com.zhidao.support.adas.high.common.MogoReport
|
||||
import io.netty.channel.Channel
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
|
||||
@@ -54,7 +55,8 @@ import java.util.concurrent.TimeUnit
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_AUTO_PILOT)
|
||||
class MoGoAutopilotProvider :
|
||||
IMoGoAutopilotProvider, IMoGoMapDataCollectProvider.OnMapCollectCmdListener {
|
||||
IMoGoAutopilotProvider, IMoGoMapDataCollectProvider.OnMapCollectCmdListener,
|
||||
IMoGoAutopilotCarConfigListener {
|
||||
private val TAG = "MoGoAutoPilotProvider"
|
||||
private var mContext: Context? = null
|
||||
|
||||
@@ -178,6 +180,8 @@ class MoGoAutopilotProvider :
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "司机端Server未启动!")
|
||||
}
|
||||
}
|
||||
} else {// 乘客屏监听工控机基础信息回调
|
||||
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
CallerLogger.i("$M_ADAS_IMPL$TAG", "initServer……")
|
||||
@@ -451,8 +455,6 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
REQ_CAR_NUMBER -> {
|
||||
AppConfigInfo.plateNumber = String(msg.body)
|
||||
ToastUtils.showShort(AppConfigInfo.plateNumber)
|
||||
// TODO:("获取到车牌号")
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
@@ -467,6 +469,7 @@ class MoGoAutopilotProvider :
|
||||
when (statusCode) {
|
||||
ConnectState.STATUS_CONNECT_SUCCESS -> {
|
||||
CallerLogger.d("$M_ADAS_IMPL$TAG", "乘客端连接司机端服务成功! sign is:${sign}")
|
||||
// 连接成功后,乘客屏没拿到车牌号就像司机屏请求
|
||||
if (AppConfigInfo.plateNumber.isNullOrEmpty()) {
|
||||
var byteArray = byteArrayOf(0)
|
||||
NSDNettyManager.getInstance().sendMogoProtocolMsgToServer(
|
||||
@@ -485,4 +488,9 @@ class MoGoAutopilotProvider :
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAutopilotCarConfig(carConfigResp: MessagePad.CarConfigResp) {
|
||||
// 乘客屏才监听
|
||||
AppConfigInfo.plateNumber = carConfigResp.plateNumber
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,7 @@ object AppConfigInfo {
|
||||
var mogoSN: String? = null
|
||||
|
||||
//车牌号
|
||||
@Volatile
|
||||
var plateNumber: String? = null
|
||||
//工控机MAC地址
|
||||
var iPCMacAddress: String? = null
|
||||
|
||||
@@ -23,7 +23,7 @@ kotlin.parallel.tasks.in.project=true
|
||||
#优化kapt
|
||||
#并行运行kapt1.2.60版本以上支持
|
||||
kapt.use.worker.api=true
|
||||
#增量编译 kapt1.3.52版本以上支持
|
||||
#增量编译 kapt1.3.53版本以上支持
|
||||
kapt.incremental.apt=true
|
||||
#kapt avoiding 如果用kapt依赖的内容没有变化,会完全重用编译内容,省掉app:kaptGenerateStubsDebugKotlin的时间
|
||||
kapt.include.compile.classpath=false
|
||||
@@ -63,23 +63,23 @@ SERVICE_CHAIN_VERSION=1.1.0
|
||||
LOGLIB_VERSION=1.2.30
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 网络请求LOGLIB_VERSION
|
||||
MOGO_NETWORK_VERSION=1.3.52
|
||||
MOGO_NETWORK_VERSION=1.3.53
|
||||
# 鉴权
|
||||
MOGO_PASSPORT_VERSION=1.3.52
|
||||
MOGO_PASSPORT_VERSION=1.3.53
|
||||
# 常链接
|
||||
MOGO_SOCKET_VERSION=1.3.52
|
||||
MOGO_SOCKET_VERSION=1.3.53
|
||||
# 数据采集
|
||||
MOGO_REALTIME_VERSION=1.3.52
|
||||
MOGO_REALTIME_VERSION=1.3.53
|
||||
# 探路,道路事件发布,获取
|
||||
MOGO_TANLU_VERSION=1.3.52
|
||||
MOGO_TANLU_VERSION=1.3.53
|
||||
# 直播推流
|
||||
MOGO_LIVE_VERSION=1.3.52
|
||||
MOGO_LIVE_VERSION=1.3.53
|
||||
# 直播拉流
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.52
|
||||
MOGO_TRAFFICLIVE_VERSION=1.3.53
|
||||
# 定位服务
|
||||
MOGO_LOCATION_VERSION=1.3.52
|
||||
MOGO_LOCATION_VERSION=1.3.53
|
||||
# 远程通讯模块
|
||||
MOGO_TELEMATIC_VERSION=1.3.52
|
||||
MOGO_TELEMATIC_VERSION=1.3.53
|
||||
######## MogoAiCloudSDK Version ########
|
||||
# 自研地图
|
||||
MAP_SDK_VERSION=2.1.0.5
|
||||
@@ -155,5 +155,5 @@ MOGO_OCH_TAXI_VERSION=2.0.66
|
||||
# mogoAiCloud sdk services
|
||||
MOGO_AICLOUD_SERVICES_SDK_VERSION=2.1.16.10
|
||||
# v2x-sdk
|
||||
MOGO_V2X_SDK_VERSION=1.3.52
|
||||
MOGO_V2X_SDK_VERSION=1.3.53
|
||||
################# 旧版本架构模块版本 #################
|
||||
|
||||
Reference in New Issue
Block a user