wait to finish

This commit is contained in:
zhongchao
2022-11-10 10:54:57 +08:00
parent 7868bf626f
commit a836c31728
189 changed files with 780 additions and 4887 deletions

View File

@@ -0,0 +1,51 @@
package com.mogo.eagle.core.data.constants;
public
/**
* @author congtaowang
* @since 2020/10/28
*
* 描述
*/
class DataTypes {
/**
* 识别感知和云端感知数据全部标记为Marker融合数据
*/
public static final String TYPE_MARKER_MERGE = "TYPE_MARKER_MERGE";
/**
* adas识别数据Mock用
*/
public static final String TYPE_MARKER_ADAS = "TYPE_MARKER_ADAS";
/**
* 云端下发数据Mock用
*/
public static final String TYPE_MARKER_CLOUD_DATA = "TYPE_MARKER_CLOUD_DATA";
/**
* 云端下发识别目标物警告数据
*/
public static final String TYPE_MARKER_CLOUD_WARN_DATA = "TYPE_MARKER_CLOUD_WARN_DATA";
/**
* 云端下发停止线数据
*/
public static final String TYPE_MARKER_CLOUD_STOP_LINE_DATA = "TYPE_MARKER_CLOUD_STOP_LINE_DATA";
/**
* Push 事件场景 VR
*/
public static final String TYPE_MARKER_PUSH_DATA = "TYPE_MARKER_PUSH_DATA";
/**
*OBU 识别的交通元素
*/
public static final String TYPE_MARKER_OBU_DATA = "TYPE_MARKER_OBU_DATA";
/**
* 道路事件预警 水滴状道路事件类型替换为3D模型
*/
public static final String TYPE_MARKER_ROAD_WARNING_TYPE = "TYPE_MARKER_ROAD_WARNING_TYPE";
}

View File

@@ -0,0 +1,28 @@
package com.mogo.eagle.core.data.constants;
/**
* 通用接口请求host
*
* @author tong
*/
public class HostConst {
public static final String DEVA_HOST = "http://dzt-deva.zhidaozhixing.com";
public static final String LAUNCHER_SNAPSHOT_HOST = "http://dzt-launcherSnapshot.zhidaozhixing.com";
public static final String DATA_SERVICE_HOST = "http://dzt-dataService.zhidaozhixing.com";
public static final String REALTIME_LOCATION_HOST = "http://dzt-realtimeLocation.zhidaozhixing.com";
public static final String GEOFENCE_HOST = "http://dzt-geoFenceCarService.zhidaozhixing.com";
public static final String CARLIFE_HOST = "http://dzt-carlife.zhidaozhixing.com";
public static final String STRATEGY_PUSH_HOST = "http://dzt-strategyPush.zhidaozhixing.com";
public static final String CAMERA_STREAM_HOST = "http://dzt-smartTransportationAiCloud.zhidaozhixing.com";
public static final String OPEN_CAMERA_STREAM_HOST = "http://10.0.16.6:18080";
public static final String CITY_HOST = "http://dzt-city.zhidaozhixing.com";
public static final String SOCKET_CENTER_DOMAIN = "socketRegion";
// public static final String UPGRADE_APP_HOST_TEST = "http://10.0.200.12:32423?/";
public static final String UPGRADE_APP_HOST = "http://eagle-mis.zhidaozhixing.com/";
public static final String CMDB_HOST = "http://eagle-mis.zhidaozhixing.com/eagleEye-mis/cmdbapi/";
}

View File

@@ -0,0 +1,9 @@
package com.mogo.eagle.core.data.constants;
/**
* 数据库常量
*/
public class RoomConstants {
public static final String DB_NAME_V2X = "MoGoScenario.db";
public static final String TB_NAME_SCENARIO = "tb_travel_scenario";
}

View File

@@ -0,0 +1,842 @@
package com.mogo.eagle.core.data.enums
import com.mogo.module.common.R
import com.mogo.module.common.utils.CloudPoiManager
/**
* OBU、V2N事件类型枚举类
*/
enum class EventTypeEnum(
val poiType: String, val poiTypeStr: String = "",
val poiTypeStrVr: String = "",
val poiTypeSrcVr: Int = R.drawable.v2x_icon_live_logo,
val content: String = "", val tts: String = ""
) {
//交通检查
TRAFFIC_CHECK(
"10002", "交通检查", "前方交通检查",
R.drawable.v2x_icon_jiaotongjiancha_vr, "前方交通检查", "交通检查"
),
//封路
ROAD_CLOSED(
"10003", "封路", "前方封路", R.drawable.v2x_icon_fenglu_vr,
"前方封路", "道路封路"
),
//施工
FOURS_ROAD_WORK(
"10006", "道路施工", "道路施工", R.drawable.icon_warning_v2x_road_construction,
"道路施工", "道路施工"
),
//施工-AI云下发
AI_ROAD_WORK(
"100061", "道路施工", "道路施工", R.drawable.icon_warning_v2x_road_construction,
"道路施工", "道路施工"
),
//拥堵
FOURS_BLOCK_UP(
"10007", "道路拥堵", "前方拥堵", R.drawable.icon_warning_v2x_congestion,
"前方道路拥堵", "道路拥堵"
),
//积水
FOURS_PONDING(
"10008", "道路积水", "前方道路积水", R.drawable.v2x_icon_jishui_vr,
"前方道路积水", "道路积水"
),
//浓雾
FOURS_FOG(
"10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr,
"前方出现浓雾", "出现浓雾"
),
//结冰
FOURS_ICE(
"10011", "路面结冰", "路面结冰", R.drawable.v2x_icon_jiebing_vr,
"前方路面结冰", "路面结冰"
),
//事故
FOURS_ACCIDENT(
"10013", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
"前方交通事故", "交通事故"
),
//重大事故
FOURS_ACCIDENT_01(
"1001301", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
"前方交通事故", "交通事故"
),
//特大事故
FOURS_ACCIDENT_02(
"1001302", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
"前方交通事故", "交通事故"
),
//较大事故
FOURS_ACCIDENT_03(
"1001303", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
"前方交通事故", "交通事故"
),
//一般事故
FOURS_ACCIDENT_04(
"1001304", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
"前方交通事故", "交通事故"
),
//轻微事故
FOURS_ACCIDENT_05(
"1001305", "交通事故", "前方交通事故", R.drawable.v2x_icon_jiaotongshigu_vr,
"前方交通事故", "交通事故"
),
//实时路况
FOURS_LIVING("10015", "实时路况"),
//违章停车
ILLEGAL_PARK_LIVING("10016"),
//路面湿滑
ROAD_SLIPPERY("10021"),
//鬼探头类型
GHOST_PROBE("10024", "前方盲区行人预警", "前方盲区行人预警", R.drawable.icon_warning_v2x_pedestrian_crossing,
"前方盲区行人通行,请注意", "前方盲区即将有行人通过,请减速慢行"),
//接管
TAKE_OVER_EVENT(
"20000", "注意周围、立即接管", "注意周围、立即接管", R.drawable.icon_warning_take_over,
"注意周围、立即接管", "自动驾驶退出请立即接管"
),
// 前方静止or慢速车辆报警
ALERT_FRONT_CAR("99999"),
// 限行管理
ALERT_TRAFFIC_CONTROL("99998"),
// 红绿灯事件、是建议以多少速度驶过
ALERT_TRAFFIC_LIGHT_SUGGEST("99997"),
// 红绿灯事件、一种是绿灯不足3秒
ALERT_TRAFFIC_LIGHT_WARNING("99996"),
// 故障车辆
ALERT_CAR_TROUBLE_WARNING("20007"),
// 疲劳驾驶
ALERT_FATIGUE_DRIVING("99993"),
// 违章停车
ALERT_ILLEGAL_PARK("99992"),
TYPE_USECASE_ID_EBW(
ObuConstants.USE_CASE_ID.EBW.toString(),
"紧急制动预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_emergency_brake,
content = "前车急刹车",
tts = "前车急刹车"
),
TYPE_USECASE_ID_FCW(
ObuConstants.USE_CASE_ID.FCW.toString(),
"前向碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
content = "前车碰撞预警",
tts = "小心前车"
),
TYPE_USECASE_ID_ICW(
ObuConstants.USE_CASE_ID.ICW.toString(),
"交叉路口碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
content = "交叉路口碰撞预警",
tts = "注意交叉路口车辆"
),
TYPE_USECASE_ID_CLW(
ObuConstants.USE_CASE_ID.CLW.toString(),
"车辆失控预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_vehicle_control,
content = "前%s失控预警",
tts = "小心%s失控车辆"
),
TYPE_USECASE_ID_DNPW(
ObuConstants.USE_CASE_ID.DNPW.toString(),
"逆向超车预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking,
content = "逆向超车预警",
tts = "注意对向来车"
),
TYPE_USECASE_ID_AVW(
ObuConstants.USE_CASE_ID.AVW.toString(),
"异常车辆提醒",
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
content = "%s车异常",
tts = "小心%s异常车辆"
),
TYPE_USECASE_ID_BSW(
ObuConstants.USE_CASE_ID.BSW.toString(),
"盲区预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_blind_area_collision,
content = "%s后盲区预警",
tts = "注意%s后车辆"
),
TYPE_USECASE_ID_LCW(
ObuConstants.USE_CASE_ID.LCW.toString(),
"变道预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_reverse_overtaking,
content = "%s向变道预警",
tts = "注意%s后车辆"
),//注意左后车辆/注意右后车辆
TYPE_USECASE_ID_EVW(
ObuConstants.USE_CASE_ID.EVW.toString(),
"紧急车辆提醒",
poiTypeSrcVr = R.drawable.icon_warning_v2x_special_vehicle_access,
content = "注意特种车辆通行",
tts = "请避让特种车辆"
),
TYPE_USECASE_ID_VRUCW_PERSON(
0X2B0201.toString(),
"弱势交通参与者碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
content = "注意行人",
tts = "注意行人"
),//行人/摩托车碰撞预警
TYPE_USECASE_ID_VRUCW_MOTORBIKE(
0X2B0202.toString(),
"弱势交通参与者碰撞预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_motorcycle_collision,
content = "注意摩托车",
tts = "注意摩托车"
),//摩托车碰撞预警
TYPE_USECASE_ID_SLW(
ObuConstants.USE_CASE_ID.SLW.toString(),
"限速预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_over_speed,
content = "已超速",
tts = "已超速"
),
TYPE_USECASE_ID_LTA(
ObuConstants.USE_CASE_ID.LTA.toString(),
"左转辅助",
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
content = "左转碰撞预警",
tts = "注意路口对向来车"
),
TYPE_USECASE_ID_HLW(
ObuConstants.USE_CASE_ID.HLW.toString(),
"道路危险情况预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_road_dangerous,
content = "道路危险情况预警",
tts = "前方路况危险,小心行驶"
),//(如果能给出具体的类别,则播报具体危险类别)
TYPE_USECASE_OPTIMAL_LANE(
ObuConstants.USE_CASE_ID.HLW.toString(),
"最优车道",
poiTypeSrcVr = R.drawable.v2x_icon_live_logo,
content = "最优车道",
tts = "最优车道"
),
TYPE_USECASE_ID_IVS(
ObuConstants.USE_CASE_ID.IVS.toString(),
"车内标牌",
poiTypeSrcVr = R.drawable.icon_warning_v2x_road_construction,
content = "车内标牌",
tts = ""
),
TYPE_USECASE_ID_TJW(
ObuConstants.USE_CASE_ID.TJW.toString(),
"前方拥堵提醒",
poiTypeSrcVr = R.drawable.icon_warning_v2x_congestion,
content = "前方%d米道路拥堵",
tts = "前方拥堵,减速慢行"
),
TYPE_USECASE_ID_IVP(
ObuConstants.USE_CASE_ID.IVP.toString(),
"闯红灯预警",
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_red,
content = "路口红灯,禁止通行",
tts = "路口红灯,禁止通行"
),
TYPE_USECASE_ID_IVP_GREEN(
0x2B091.toString(),
"绿波通行",
poiTypeSrcVr = R.drawable.icon_warning_v2x_traffic_lights_green,
content = "建议车速 %s KM/H",
tts = "建议车速 %s KM/H"
),
TYPE_USECASE_ID_COC(
ObuConstants.USE_CASE_ID.COC.toString(),
"预留",
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
content = "路况预警",
tts = "路况预警"
),
TYPE_USECASE_ID_ROAD_TRAMCAR(
0x2C01.toString(),
"前方有轨电车提醒",
poiTypeSrcVr = R.drawable.icon_warning_v2x_tramcar,
content = "注意前方有轨电车",
tts = "注意前方有轨电车驶过"
),
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP(
0x2C02.toString(),
"前方左转急弯",
poiTypeSrcVr = R.drawable.icon_warning_v2x_turn_left_sharp,
content = "注意前方左转急弯",
tts = "前方路口左转急弯,减速慢行",
),
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP(
0x2C03.toString(),
"前方右转急弯",
poiTypeSrcVr = R.drawable.icon_warning_v2x_turn_right_sharp,
content = "注意前方右转急弯",
tts = "前方路口右转急弯,减速慢行"
),
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING(
0x2C04.toString(),
"人行横道",
poiTypeSrcVr = R.drawable.icon_warning_v2x_pedestrian_crossing,
content = "注意前方人行横道",
tts = "前方人行横道,减速慢行"
),
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL(
0x2C05.toString(),
"学校",
poiTypeSrcVr = R.drawable.icon_warning_v2x_school,
content = "注意前方学校",
tts = "前方学校,减速慢行"
),
TYPE_USECASE_ID_ROAD_COLLISION_WARNING(
0x2C06.toString(),
"事故易发路段",
poiTypeSrcVr = R.drawable.icon_warning_v2x_collision_warning,
content = "注意当前路段事故多发",
tts = "当前路段事故多发,请小心驾驶"
),
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG(
0x2C07.toString(),
"环岛行驶",
poiTypeSrcVr = R.drawable.icon_warning_v2x_roundaboutpng,
content = "注意前方驶入环岛",
tts = "即将驶入环岛,减速慢行"
),
TYPE_USECASE_ID_ROAD_TEST_SECTION(
0x2C08.toString(),
"驾校考试路段",
poiTypeSrcVr = R.drawable.icon_warning_v2x_test_section,
content = "注意前方驾校考试路段",
tts = "驾校考试路段,请小心驾驶"
),
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE(
0x2C09.toString(),
"驼峰桥",
poiTypeSrcVr = R.drawable.icon_warning_v2x_hump_bridge,
content = "注意前方驼峰桥",
tts = "注意即将驶入驼峰桥,请小心驾驶"
),
TYPE_USECASE_ID_ROAD_NO_PARKING(
0x2C10.toString(),
"禁止停车",
poiTypeSrcVr = R.drawable.icon_warning_v2x_no_parking,
content = "注意当前路段禁止停车",
tts = "当前路段,禁止停车"
),
TYPE_USECASE_ID_ROAD_GIVE_WAY(
0x2C11.toString(),
"减速慢行",
poiTypeSrcVr = R.drawable.icon_warning_v2x_give_way,
content = "注意路况复杂,减速慢行",
tts = "路况复杂,减速慢行"
),
TYPE_ERROR(
ObuConstants.USE_CASE_ID.ERROR.toString(),
"未知/错误/异常",
poiTypeSrcVr = R.drawable.icon_warning_v2x_abnormal_vehicle,
content = "",
tts = ""
),
TYPE_VIP_IDENTIFICATION("10022", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "VIP车辆优先通行", "已为您变灯,请优先通行"),
TYPE_VIP_ERROR_IDENTIFICATION("10023", "", "", R.drawable.icon_warning_v2x_vip_turn_light, "请求失败,", "请求失败,请稍后重试"),
TYPE_OPTIMAL_ROUTE_RECOMMEND("2000", "", "", R.drawable.icon_warning_v2x_optimal_route, "为您推荐最优路线", "已为您选择最优路线");
companion object {
@JvmStatic
fun getPoiTypeStr(poiType: String): String {
// 先获取网络配置的poi对应的名称
CloudPoiManager.getInstance().getWrapperByPoiType(poiType)?.let {
return it.title
}
// 如果获取不到,那么就用本地默认的
return when (poiType) {
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStr
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStr
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeStr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStr
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStr
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeStr
else -> "其它道路事件"
}
}
@JvmStatic
fun getPoiTypeStrVr(poiType: String): String {
return when (poiType) {
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeStrVr
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeStrVr
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeStrVr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeStrVr
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeStrVr
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeStrVr
else -> "其它道路事件"
}
}
@JvmStatic
fun getPoiTypeSrcVr(poiType: String): Int {
return when (poiType) {
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.poiTypeSrcVr
ROAD_CLOSED.poiType -> ROAD_CLOSED.poiTypeSrcVr
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.poiTypeSrcVr
FOURS_LIVING.poiType -> FOURS_LIVING.poiTypeSrcVr
else -> R.drawable.v2x_icon_live_logo
}
}
/**
* 获取道路事件的背景色
*/
@JvmStatic
fun getPoiTypeBg(poiType: String, isVrMode: Boolean): Int {
return when (poiType) {
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType-> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType,
FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
else -> {
if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
}
}
}
@JvmStatic
fun getPoiTypeBgForShareItem(poiType: String): Int {
return when (poiType) {
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType ->
R.drawable.bg_v2x_event_type_orange
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType, FOURS_PONDING.poiType,
FOURS_FOG.poiType, FOURS_ICE.poiType,
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
R.drawable.bg_v2x_event_type_read
else -> R.drawable.bg_v2x_event_type_read
}
}
/**
* 判断是否是道路预警事件
*/
@JvmStatic
fun isRoadEvent(poiType: String?): Boolean {
return when (poiType) {
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType,
FOURS_PONDING.poiType, FOURS_FOG.poiType,
FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType, AI_ROAD_WORK.poiType -> true
else -> false
}
}
/**
* 是否需要UGC预警
*/
@JvmStatic
fun isNeedRoadEventUgc(poiType: String?): Boolean {
return when (poiType) {
ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType, AI_ROAD_WORK.poiType,
FOURS_BLOCK_UP.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
FOURS_ACCIDENT_05.poiType, GHOST_PROBE.poiType -> true
else -> false
}
}
@JvmStatic
fun getTts(poiType: String?): String {
return when (poiType) {
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.tts
ROAD_CLOSED.poiType -> ROAD_CLOSED.tts
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts
FOURS_PONDING.poiType -> FOURS_PONDING.tts
FOURS_FOG.poiType -> FOURS_FOG.tts
FOURS_ICE.poiType -> FOURS_ICE.tts
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.tts
else -> "道路事件"
}
}
@JvmStatic
fun getTtsWithFeedback(poiType: String?): String {
return when (poiType) {
TRAFFIC_CHECK.poiType -> "交通检查"
ROAD_CLOSED.poiType -> "封路"
FOURS_ROAD_WORK.poiType -> "施工"
AI_ROAD_WORK.poiType -> "施工"
FOURS_BLOCK_UP.poiType -> "道路拥堵"
FOURS_PONDING.poiType -> "道路积水"
FOURS_FOG.poiType -> "出现浓雾"
FOURS_ICE.poiType -> "路面结冰"
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
else -> "道路事件"
}
}
@JvmStatic
fun getAlarmContent(poiType: String?): String {
return when (poiType) {
TRAFFIC_CHECK.poiType -> TRAFFIC_CHECK.content
ROAD_CLOSED.poiType -> ROAD_CLOSED.content
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content
FOURS_PONDING.poiType -> FOURS_PONDING.content
FOURS_FOG.poiType -> FOURS_FOG.content
FOURS_ICE.poiType -> FOURS_ICE.content
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
FOURS_ACCIDENT.content
GHOST_PROBE.poiType -> GHOST_PROBE.content
else -> "道路事件"
}
}
@JvmStatic
fun getTypeSmallRes(type: String): Int {
return when (type) {
TRAFFIC_CHECK.poiType ->
R.drawable.mogo_image_jiaotongjiancha_small
ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_small
FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small
AI_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_small
FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_small
FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_small
FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_small
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_small
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
R.drawable.mogo_image_accident_small
else -> R.drawable.mogo_image_shishilukuang_small
}
}
@JvmStatic
fun getTypeRes(type: String): Int {
return when (type) {
TRAFFIC_CHECK.poiType -> R.drawable.mogo_image_jiaotongjiancha_nor
ROAD_CLOSED.poiType -> R.drawable.mogo_image_fenglu_nor
FOURS_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor
AI_ROAD_WORK.poiType -> R.drawable.mogo_image_daolushigong_nor
FOURS_BLOCK_UP.poiType -> R.drawable.mogo_image_yongdu_nor
FOURS_PONDING.poiType -> R.drawable.mogo_image_jishui_nor
FOURS_ICE.poiType -> R.drawable.mogo_image_jiebing_nor
FOURS_FOG.poiType -> R.drawable.mogo_image_nongwu_nor
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
R.drawable.mogo_image_jiaotongshigu_nor
else -> R.drawable.mogo_image_shishlukuang_nor
}
}
@JvmStatic
fun getTypeName(type: String?): String {
return when (type) {
ROAD_CLOSED.poiType -> "封路"
FOURS_ICE.poiType -> "道路结冰"
FOURS_FOG.poiType -> "浓雾"
TRAFFIC_CHECK.poiType -> "交通检查"
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
FOURS_BLOCK_UP.poiType -> "拥堵"
FOURS_ROAD_WORK.poiType -> "施工"
AI_ROAD_WORK.poiType -> "施工"
FOURS_PONDING.poiType -> "道路积水"
else -> "实时路况"
}
}
@JvmStatic
fun getMarker3DRes(poiType: String?): Int {
return when (poiType) {
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
FOURS_ACCIDENT.poiType -> R.raw.v2x_shigu
FOURS_LIVING.poiType -> R.raw.v2x_shishilukuang
FOURS_FOG.poiType -> R.raw.v2x_nongwu
TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
AI_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
FOURS_PONDING.poiType -> R.raw.v2x_daolujishui
GHOST_PROBE.poiType -> R.raw.v2x_guzhangqiuzhu
else -> 0
}
}
@JvmStatic
fun getTypeNameTTS(type: String?): String {
return when (type) {
ROAD_CLOSED.poiType -> "封路"
FOURS_ICE.poiType -> "道路结冰"
FOURS_FOG.poiType -> "浓雾"
TRAFFIC_CHECK.poiType -> "交通检查"
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
FOURS_BLOCK_UP.poiType -> "拥堵"
FOURS_ROAD_WORK.poiType -> "施工"
AI_ROAD_WORK.poiType -> "施工"
FOURS_PONDING.poiType -> "道路积水"
else -> "实时路况"
}
}
@JvmStatic
fun getUpdateIconRes(poiType: String?): Int {
return when (poiType) {
//交通检查
TRAFFIC_CHECK.poiType -> {
R.drawable.v_to_x_marker_2
}
//封路
ROAD_CLOSED.poiType -> {
R.drawable.v_to_x_marker_16
}
//施工
FOURS_ROAD_WORK.poiType -> {
R.drawable.v_to_x_marker_11
}
//AI施工
AI_ROAD_WORK.poiType -> {
R.drawable.v_to_x_marker_11
}
//拥堵
FOURS_BLOCK_UP.poiType -> {
R.drawable.v_to_x_marker_5
}
//积水
FOURS_PONDING.poiType -> {
R.drawable.v_to_x_marker_6
}
//浓雾
FOURS_FOG.poiType -> {
R.drawable.v_to_x_marker_9
}
//结冰
FOURS_ICE.poiType -> {
R.drawable.v_to_x_marker_8
}
//事故
FOURS_ACCIDENT.poiType -> {
R.drawable.v_to_x_marker_7
}
//事故
FOURS_LIVING.poiType -> {
R.drawable.v_to_x_marker_1
}
//红绿灯数据
ALERT_TRAFFIC_LIGHT_SUGGEST.poiType -> {
R.drawable.v_to_x_marker_3
}
//红绿灯数据
ALERT_TRAFFIC_LIGHT_WARNING.poiType -> {
R.drawable.v_to_x_marker_3
}
//前方静止or慢速车辆报警
ALERT_FRONT_CAR.poiType -> {
R.drawable.v_to_x_warning_car_red
}
// 故障车辆
ALERT_CAR_TROUBLE_WARNING.poiType -> {
R.drawable.icon_car_red
}
else -> 0
}
}
//===================告警类事件===================
@JvmStatic
fun getWarningIcon(poiType: String?): Int {
return when (poiType) {
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.poiTypeSrcVr
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.poiTypeSrcVr
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.poiTypeSrcVr
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.poiTypeSrcVr
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.poiTypeSrcVr
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.poiTypeSrcVr
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.poiTypeSrcVr
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.poiTypeSrcVr
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.poiTypeSrcVr
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.poiTypeSrcVr
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiTypeSrcVr
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.poiTypeSrcVr
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.poiTypeSrcVr
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.poiTypeSrcVr
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.poiTypeSrcVr
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.poiTypeSrcVr
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.poiTypeSrcVr
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.poiTypeSrcVr
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.poiTypeSrcVr
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.poiTypeSrcVr
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.poiTypeSrcVr
TYPE_ERROR.poiType -> TYPE_ERROR.poiTypeSrcVr
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.poiTypeSrcVr
GHOST_PROBE.poiType -> GHOST_PROBE.poiTypeSrcVr
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.poiTypeSrcVr
else -> TYPE_ERROR.poiTypeSrcVr
}
}
@JvmStatic
fun getWarningContent(poiType: String?): String {
return when (poiType) {
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.content
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.content
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.content
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.content
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.content
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.content
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.content
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.content
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.content
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.content
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.content
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.content
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.content
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.content
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.content
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.content
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.content
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.content
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.content
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.content
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.content
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.content
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.content
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.content
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.content
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.content
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.content
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.content
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.content
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.content
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.content
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.content
TYPE_ERROR.poiType -> TYPE_ERROR.content
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.content
GHOST_PROBE.poiType -> GHOST_PROBE.content
else -> TYPE_ERROR.content
}
}
@JvmStatic
fun getWarningTts(poiType: String?): String {
return when (poiType) {
TYPE_USECASE_ID_EBW.poiType -> TYPE_USECASE_ID_EBW.tts
TYPE_USECASE_ID_FCW.poiType -> TYPE_USECASE_ID_FCW.tts
TYPE_USECASE_ID_ICW.poiType -> TYPE_USECASE_ID_ICW.tts
TYPE_USECASE_ID_CLW.poiType -> TYPE_USECASE_ID_CLW.tts
TYPE_USECASE_ID_DNPW.poiType -> TYPE_USECASE_ID_DNPW.tts
TYPE_USECASE_ID_AVW.poiType -> TYPE_USECASE_ID_AVW.tts
TYPE_USECASE_ID_BSW.poiType -> TYPE_USECASE_ID_BSW.tts
TYPE_USECASE_ID_LCW.poiType -> TYPE_USECASE_ID_LCW.tts
TYPE_USECASE_ID_EVW.poiType -> TYPE_USECASE_ID_EVW.tts
TYPE_USECASE_ID_VRUCW_PERSON.poiType -> TYPE_USECASE_ID_VRUCW_PERSON.tts
TYPE_USECASE_ID_VRUCW_MOTORBIKE.poiType -> TYPE_USECASE_ID_VRUCW_MOTORBIKE.tts
TYPE_USECASE_ID_SLW.poiType -> TYPE_USECASE_ID_SLW.tts
TYPE_USECASE_ID_LTA.poiType -> TYPE_USECASE_ID_LTA.tts
TYPE_USECASE_ID_HLW.poiType -> TYPE_USECASE_ID_HLW.tts
TYPE_USECASE_ID_IVS.poiType -> TYPE_USECASE_ID_IVS.tts
TYPE_USECASE_ID_TJW.poiType -> TYPE_USECASE_ID_TJW.tts
TYPE_USECASE_ID_IVP.poiType -> TYPE_USECASE_ID_IVP.tts
TYPE_USECASE_ID_IVP_GREEN.poiType -> TYPE_USECASE_ID_IVP_GREEN.tts
TYPE_USECASE_ID_COC.poiType -> TYPE_USECASE_ID_COC.tts
TYPE_USECASE_ID_ROAD_TRAMCAR.poiType -> TYPE_USECASE_ID_ROAD_TRAMCAR.tts
TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_LEFT_SHARP.tts
TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.poiType -> TYPE_USECASE_ID_ROAD_TURN_RIGHT_SHARP.tts
TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_CROSSING.tts
TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.poiType -> TYPE_USECASE_ID_ROAD_PEDESTRIAN_SCHOOL.tts
TYPE_USECASE_ID_ROAD_COLLISION_WARNING.poiType -> TYPE_USECASE_ID_ROAD_COLLISION_WARNING.tts
TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.poiType -> TYPE_USECASE_ID_ROAD_ROUNDABOUTPNG.tts
TYPE_USECASE_ID_ROAD_TEST_SECTION.poiType -> TYPE_USECASE_ID_ROAD_TEST_SECTION.tts
TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.poiType -> TYPE_USECASE_ID_ROAD_HUMP_BRIDGE.tts
TYPE_USECASE_ID_ROAD_NO_PARKING.poiType -> TYPE_USECASE_ID_ROAD_NO_PARKING.tts
TYPE_USECASE_ID_ROAD_GIVE_WAY.poiType -> TYPE_USECASE_ID_ROAD_GIVE_WAY.tts
TYPE_VIP_IDENTIFICATION.poiType -> TYPE_VIP_IDENTIFICATION.tts
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
AI_ROAD_WORK.poiType -> AI_ROAD_WORK.tts
TYPE_ERROR.poiType -> TYPE_ERROR.tts
TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> TYPE_OPTIMAL_ROUTE_RECOMMEND.tts
GHOST_PROBE.poiType -> GHOST_PROBE.tts
else -> TYPE_ERROR.tts
}
}
}
}

View File

@@ -0,0 +1,186 @@
package com.mogo.eagle.core.data.enums
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_AVW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_BSW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_CLW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_DNPW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_EBW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_FCW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_LCW
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_LTA
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_OPT_LINE
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VRU
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VRU_RI
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2N
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2V
import com.zhjt.service_biz.BizConfig
class EventTypeHelper {
companion object {
//变道预警
@BizConfig(V2V, "", BIZ_LCW)
fun getLCW(
appId: Int,
direction: WarningDirectionEnum,
data: ((alert: String, tts: String) -> Unit)
) {
when {
direction.isLeft() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + "")
)
}
direction.isRight() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + "")
)
}
else -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
)
}
}
}
//车辆失控预警
@BizConfig(V2V, "", BIZ_CLW)
fun getCLW(
appId: Int,
direction: WarningDirectionEnum,
data: ((alert: String, tts: String) -> Unit)
) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + direction.desc),
EventTypeEnum.getWarningContent(appId.toString() + direction.desc)
)
}
//左转辅助
@BizConfig(V2V, "", BIZ_LTA)
fun getLTA(appId: Int, data: ((alert: String, tts: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
)
}
//异常车辆提醒
@BizConfig(V2V, "", BIZ_AVW)
fun getAVW(
appId: Int,
direction: WarningDirectionEnum,
data: ((alert: String, tts: String) -> Unit)
) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + direction.desc),
EventTypeEnum.getWarningTts(appId.toString() + direction.desc)
)
}
//盲区预警
@BizConfig(V2V, "", BIZ_BSW)
fun getBSW(
appId: Int,
direction: WarningDirectionEnum,
data: ((alert: String, tts: String, visualAngle: Boolean) -> Unit)
) {
when {
direction.isLeft() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + ""),
true
)
}
direction.isRight() -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString() + ""),
EventTypeEnum.getWarningTts(appId.toString() + ""),
true
)
}
else -> {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString()),
false
)
}
}
}
//弱势交通碰撞预警
@BizConfig(V2N, "", BIZ_VRU)
fun getVRU(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt(),
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.tts,
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.content
)
}
//弱势交通逆行预警
@BizConfig(V2N, "", BIZ_VRU_RI)
fun getVRURI(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.TYPE_USECASE_ID_VRUCW_PERSON.poiType.toInt(),
"行人逆行预警",
"行人逆行预警"
)
}
//最优车道
@BizConfig(V2N, "", BIZ_OPT_LINE)
fun getOptLine(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.poiType.toInt(),
EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.tts,
EventTypeEnum.TYPE_USECASE_OPTIMAL_LANE.content
)
}
//前方道路拥堵预警
fun getTJW(data: ((appId: Int, tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.FOURS_BLOCK_UP.poiType.toInt(),
EventTypeEnum.FOURS_BLOCK_UP.tts,
EventTypeEnum.FOURS_BLOCK_UP.content
)
}
//前车急刹
@BizConfig(V2V, "", BIZ_EBW)
fun getEBW(appId: Int, data: ((tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
)
}
//前向碰撞预警
@BizConfig(V2V, "", BIZ_FCW)
fun getFCW(appId: Int, data: ((tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
)
}
//逆向超车预警
@BizConfig(V2V, "", BIZ_DNPW)
fun getDNPW(appId: Int, data: ((tts: String, content: String) -> Unit)) {
data.invoke(
EventTypeEnum.getWarningContent(appId.toString()),
EventTypeEnum.getWarningTts(appId.toString())
)
}
}
}

View File

@@ -28,7 +28,6 @@ public class MarkerShowEntity {
private Object bindObj;
//Marker 经纬度位置信息
private MarkerLocation markerLocation;
private IMogoMarker mMarker;
public boolean isChecked() {
return isChecked;
@@ -101,14 +100,6 @@ public class MarkerShowEntity {
Objects.equals(markerLocation, that.markerLocation);
}
public void setMarker( IMogoMarker marker ) {
this.mMarker = marker;
}
public IMogoMarker getMarker() {
return mMarker;
}
@Override
public int hashCode() {
return Objects.hash(iconUrl, textContent, markerType, bindObj, markerLocation);

View File

@@ -1,6 +1,6 @@
package com.mogo.eagle.core.data.map.entity;
import com.mogo.module.common.constants.RoomConstants;
import com.mogo.eagle.core.data.constants.RoomConstants;
import com.mogo.utils.sqlite.annotation.DbDatabase;
import com.mogo.utils.sqlite.annotation.DbField;
import com.mogo.utils.sqlite.annotation.DbTable;

View File

@@ -70,6 +70,10 @@ public class V2XRoadEventEntity implements Serializable {
isShowEventButton = showEventButton;
}
public String getAlarmContent(){ //todo 缺少
return alarmContent;
}
public void setAlarmContent(String alarmContent) {
this.alarmContent = alarmContent;
}