[pb10][Bag包管理2.1]添加录包管理2.1
This commit is contained in:
@@ -113,6 +113,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.Chassis;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import io.netty.channel.Channel;
|
||||
@@ -1025,6 +1026,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
DataDistribution.getInstance().addData(base);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager) {
|
||||
|
||||
}
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
AdasOptions options;
|
||||
|
||||
@@ -64,6 +64,7 @@ import java.util.Locale;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
@@ -544,6 +545,11 @@ public class MainActivity extends BaseActivity implements OnAdasListener, OnAdas
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager) {
|
||||
|
||||
}
|
||||
|
||||
private void initAdas() {
|
||||
CupidLogUtils.e(TAG, "--->初始化");
|
||||
AdasOptions options;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.eagle.core.function.autopilot.adapter
|
||||
|
||||
import bag_manager.BagManagerOuterClass
|
||||
import chassis.VehicleStateOuterClass
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
@@ -453,6 +454,15 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
CallerObuDcCombineListenerManager.invokeObuDcData(obuWarningData)
|
||||
}
|
||||
|
||||
/**
|
||||
* Bag管理应答
|
||||
*
|
||||
* @param header 头
|
||||
* @param bagManager 数据
|
||||
*/
|
||||
override fun onBagManagerCmd(header: MessagePad.Header?, bagManager: BagManagerOuterClass.BagManager?) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否可以启动自动驾驶
|
||||
* 使用方法查看:app_ipc_monitoring/uiMainActivity/onAutopilotAbility
|
||||
|
||||
69
libraries/mogo-adas-data/src/main/proto/bag_manager.proto
Normal file
69
libraries/mogo-adas-data/src/main/proto/bag_manager.proto
Normal file
@@ -0,0 +1,69 @@
|
||||
syntax = "proto2";
|
||||
package bag_manager;
|
||||
|
||||
enum BagStat{
|
||||
SUCCEED = 0;
|
||||
EXECUTING = 1;
|
||||
EXECUTEERROR = 2;
|
||||
COPYERROR = 3;
|
||||
MERGEERROR = 4;
|
||||
UPLOADCOSERROR = 5;
|
||||
}
|
||||
|
||||
// 上传cos桶状态
|
||||
message UploadCosStat{
|
||||
required uint64 key = 1;
|
||||
required uint32 stat = 2; // 0-成功 1-执行中 2-copy过程失败 3-合并过程失败 4-上传过程失败
|
||||
optional string message = 3; // 失败时的具体描述
|
||||
}
|
||||
|
||||
//空间使用情况
|
||||
message SpaceInfo{
|
||||
optional string directory = 1; // 路径名,为空表示总空间,否则表示对应的/home/mogo/data/bags下的子目录
|
||||
optional uint64 total = 2; // 总空间
|
||||
optional uint64 free = 3; // 可用空间
|
||||
optional uint64 used = 4; // 已用空间
|
||||
}
|
||||
// bag目录空间使用情况
|
||||
message BagSpaceInfo{
|
||||
optional string host = 1; // 主机名
|
||||
optional SpaceInfo diskSpaceInfo = 2; // 硬盘空间信息
|
||||
repeated SpaceInfo BagDirsSpaceInfo = 3; // /home/mogo/data/bags下各子空间信息
|
||||
}
|
||||
|
||||
// bag附加信息(录音,备注,接管信息)
|
||||
message BagDescription{
|
||||
optional string description = 1; // bag接管描述或重命名信息
|
||||
optional bool hasAudio = 2; // 此bag是否具有录音文件
|
||||
optional string audioUrl = 3; // bag附加录音文件的文件名
|
||||
optional bool reportBI = 4; //上报BI状态
|
||||
}
|
||||
|
||||
// 各主机上报的包信息
|
||||
message SubBag {
|
||||
required uint64 key = 1; // bag key值
|
||||
required string host = 2; // 主机名
|
||||
optional uint64 size = 3; // 此子包的大小
|
||||
}
|
||||
|
||||
// 单个key值对应的包信息
|
||||
message BagInfo{
|
||||
required uint64 key = 1; // bag key值
|
||||
optional uint64 totalSize = 2; // 所有子包或合并后的包的总大小
|
||||
optional string timestamp = 3; // 时间戳
|
||||
optional string bagPath = 4; // bag所在路径
|
||||
optional bool mergeStat = 5; // 合并状态
|
||||
optional bool uploadStat = 6; // 上传cos桶状态
|
||||
optional BagDescription description = 7; // 包描述信息
|
||||
repeated SubBag subBags = 8; // 子包信息
|
||||
}
|
||||
|
||||
// 包管理请求
|
||||
message BagManager{
|
||||
required uint32 reqType = 1; // 请求类型:0-invalid 1-获取空间使用信息 2-遍历所有bag 3-上传cos 4-删除bag 5-为bag添加附加信息
|
||||
optional uint64 keyReq = 2; // 要操作的包的key值,发送请求且reqType=(3,4,5)时有效
|
||||
optional BagDescription descReq = 3; // 更新包附加信息,发送请求且reqType=5时有效
|
||||
repeated BagSpaceInfo spaceInfoResp = 4; // 空间使用信息,获取响应且reqType=1时有效
|
||||
repeated BagInfo bagsInfoResp = 5; // 包信息列表,获取响应且reqType=2时有效
|
||||
optional UploadCosStat uploadCosResp = 6; //反馈上传cos桶结果,获取响应且reqType=3时有效
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import "geometry.proto";
|
||||
enum ProtocolVersion
|
||||
{
|
||||
Defaultver = 0;
|
||||
CurrentVersion = 9; //每次修改proto文件增加1
|
||||
CurrentVersion = 10; //每次修改proto文件增加1
|
||||
}
|
||||
|
||||
enum MessageType
|
||||
@@ -58,6 +58,8 @@ enum MessageType
|
||||
MsgTypeSpecialVehicleTaskCmd = 0x10118; //特种车辆命令
|
||||
MsgTypeSetParamReq = 0x10119; //设置参数命令
|
||||
MsgTypeTripInfoEvent = 0x1011a; //行程信息
|
||||
MsgTypeBagManagerCmd = 0x1011b; //bag管理
|
||||
MsgTypePlanningCmd = 0x1011c; //给planning的指令
|
||||
}
|
||||
|
||||
message Header
|
||||
@@ -455,11 +457,30 @@ enum DrivingState
|
||||
START_UP = 9; //起步状态: driving_action:1 表示正常启动;driving_action:2 表示择机起步
|
||||
PULL_OVER = 10; //靠边停车状态: driving_action:1 表示正常靠边停车;driving_action:2 表示择机靠边停车
|
||||
UN_PROTECTED_INTERSECTION = 11; //路口预测响应状态: driving_action:1 表示触发了预测响应
|
||||
|
||||
AUTO_LANE_CHANGE_LEFT_V2N = 12; //V2N主动向左变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
AUTO_LANE_CHANGE_RIGHT_V2N = 13; //V2N主动向右变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
LANE_AVOID_LEFT_V2N = 14; //V2N主动向左绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
LANE_AVOID_RIGHT_V2N = 15; //V2N主动向右绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
WAITING_V2N = 16; //V2N正在等待变道避让施工场景/静止障碍物: driving_action:1 表示正在等待;driving_action:2 表示等待超时请求平行驾驶;
|
||||
|
||||
AUTO_LANE_CHANGE_LEFT_RSI = 17; //V2N RSI主动向左变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
AUTO_LANE_CHANGE_RIGHT_RSI = 18; //V2N RSI主动向右变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
LANE_AVOID_LEFT_RSI = 19; //V2N RSI主动向左绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
LANE_AVOID_RIGHT_RSI = 20; //V2N RSI主动向右绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
WAITING_RSI = 21; //V2N RSI正在等待变道避让施工场景/静止障碍物: driving_action:1 表示正在等待;driving_action:2 表示等待超时请求平行驾驶;
|
||||
|
||||
AUTO_LANE_CHANGE_LEFT_RSM = 22; //V2N RSM主动向左变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
AUTO_LANE_CHANGE_RIGHT_RSM = 23; //V2N RSM主动向右变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
LANE_AVOID_LEFT_RSM = 24; //V2N RSM主动向左绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
LANE_AVOID_RIGHT_RSM = 25; //V2N RSM主动向右绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
WAITING_RSM = 26; //V2N RSM正在等待变道避让施工场景/静止障碍物: driving_action:1 表示正在等待;driving_action:2 表示等待超时请求平行驾驶;
|
||||
|
||||
AUTO_LANE_CHANGE_LEFT_RSI_TRIANGLE = 27; //V2N 三角锥主动向左变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
AUTO_LANE_CHANGE_RIGHT_RSI_TRIANGLE = 28; //V2N 三角锥主动向右变道状态: driving_action:1 表示触发变道;driving_action:2 表示执行变道;driving_action:3 表示变道取消;driving_action:4 表示变道完成
|
||||
LANE_AVOID_LEFT_RSI_TRIANGLE = 29; //V2N 三角锥主动向左绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
LANE_AVOID_RIGHT_RSI_TRIANGLE = 30; //V2N 三角锥主动向右绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
WAITING_RSI_TRIANGLE = 31; //V2N 三角锥正在等待变道避让施工场景/静止障碍物: driving_action:1 表示正在等待;driving_action:2 表示等待超时请求平行驾驶
|
||||
}
|
||||
|
||||
enum DrivingAction
|
||||
@@ -469,6 +490,11 @@ enum DrivingAction
|
||||
DRIVING_ACTION_STATE_TWO = 2;
|
||||
DRIVING_ACTION_STATE_THREE = 3;
|
||||
DRIVING_ACTION_STATE_FOUR = 4;
|
||||
DRIVING_ACTION_STATE_FIVE = 5;
|
||||
DRIVING_ACTION_STATE_SIX = 6;
|
||||
DRIVING_ACTION_STATE_SEVEN = 7;
|
||||
DRIVING_ACTION_STATE_EIGHT = 8;
|
||||
DRIVING_ACTION_STATE_NINE = 9;
|
||||
}
|
||||
|
||||
message DrivingActionMsg
|
||||
@@ -477,10 +503,36 @@ message DrivingActionMsg
|
||||
DrivingAction driving_action = 2;
|
||||
}
|
||||
|
||||
enum ParkScenarioDrivingState
|
||||
{
|
||||
PARK_SENARIO_NO_AUTODRIVING = 0; //不在自动驾驶状态
|
||||
PARK_SENARIO_LANKE_KEEP = 1; //车道保持状态
|
||||
PARK_SENARIO_LANE_AVOID_LEFT = 2; //主动向左绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
PARK_SENARIO_LANE_AVOID_RIGHT = 3; //主动向右绕行状态: driving_action:1 表示触发绕行;driving_action:2 表示执行绕行;driving_action:3 表示绕行取消;driving_action:4 表示绕行完成
|
||||
PARK_SENARIO_START_UP = 4; //起步状态: driving_action:1 表示正常启动;driving_action:2 表示择机起步;
|
||||
PARK_SENARIO_PULL_OVER = 5; //站点停车状态: driving_action:1 表示正常站点停车;driving_action:2 表示择机站点停车;
|
||||
PARK_SENARIO_FORCE_PULL_OVER_ON = 6; //响应触发靠边停车状态: driving_action:1 表示开始靠边停车;driving_action:2 表示靠边停车成功;3:靠边停车失败;
|
||||
PARK_SENARIO_FORCE_PULL_OVER_OFF = 7; //不响应触发靠边停车状态: driving_action:1 表示距离前方站点100m;driving_action:2 表示距离路口100m;3: 正在变道 。。。
|
||||
}
|
||||
|
||||
message ParkScenarioDrivingAction
|
||||
{
|
||||
ParkScenarioDrivingState driving_state = 1; //决策场景
|
||||
DrivingAction driving_action = 2; //决策场景状态
|
||||
}
|
||||
|
||||
message ParkScenarioPlanningAction
|
||||
{
|
||||
ParkScenarioDrivingAction action_msg = 1; //决策场景(包含场景以及响应状态)
|
||||
double destination_acc = 2; //驾驶的意图(规划期望的加速或者减速值)
|
||||
}
|
||||
|
||||
message PlanningActionMsg
|
||||
{
|
||||
DrivingActionMsg action_msg = 1;
|
||||
double destination_acc = 2; //驾驶的意图(规划期望的加速或者减速值)
|
||||
|
||||
ParkScenarioPlanningAction park_scenario_action = 3;
|
||||
}
|
||||
|
||||
//message definition for MsgTypeSpecialVehicleTaskCmd
|
||||
@@ -520,4 +572,18 @@ message TripInfoEvent
|
||||
//message definition for MsgTypeObuWarningData
|
||||
//refer to obu_warning_event.proto for details
|
||||
|
||||
//message definition for MsgTypeBagManagerCmd
|
||||
//refer to bag_manager.proto for details
|
||||
|
||||
//message definition for MsgTypePlanningCmd
|
||||
message PullOverCmd
|
||||
{
|
||||
uint32 cmd = 1; //0: default 1: 靠边停车 2:重新起步
|
||||
}
|
||||
|
||||
message PlanningCmd
|
||||
{
|
||||
PullOverCmd pullOverCmd = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -112,6 +112,6 @@ message ObuWarningData{
|
||||
RsiWarningData rsiEvent = 3;
|
||||
RsmWarningData rsmEvent = 4;
|
||||
SpatWarningData spatEvent = 5;
|
||||
MapMatchData mapMatchData = 6;
|
||||
MapMatchData mapMatchData = 6;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,8 @@ message RoboSweeperTaskIndex {
|
||||
double ref_edge_point_lon = 10; // 投影边沿点经度
|
||||
double ref_edge_point_lat = 11; // 投影边沿点纬度
|
||||
double dist_to_ref_edge_point = 12; // 自车到投影边沿点的距离 正值为在投影边沿点的右边 ,负值为在投影边沿点的右边
|
||||
}
|
||||
|
||||
uint32 clean_mode = 13; // 清扫作业模式 1–纯扫 2--洗扫, 3--纯洗, 4--纯吸
|
||||
uint32 clean_direction = 14; // 清扫方向 1--两侧, 2--左侧, 3--右侧
|
||||
uint32 clean_intensity= 15; // 作业强度 1–标准 2--强力
|
||||
}
|
||||
|
||||
@@ -24,8 +24,26 @@ message RoboVanSkywellTaskCmd {
|
||||
optional uint32 horn_cmd = 2 [default = 0]; //1:开始鸣笛 2:停止鸣笛
|
||||
}
|
||||
|
||||
message RoboBusJinlvM1Cmd {
|
||||
optional uint32 air_conditioner_cmd = 1; //0: default, 1: 开启空调, 2: 关闭空调
|
||||
optional uint32 air_conditioner_mode_cmd = 2; //模式 0: default, 1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
optional uint32 air_conditioner_wind_speed_cmd = 3; //风速 0: default, 1: 1档,2: 2档,3:3档
|
||||
optional uint32 air_conditioner_temperature_cmd = 4; //温度 0: default, 16-26: 温度
|
||||
|
||||
optional uint32 header_cmd = 5; //0: default, 1: 开启暖风机, 2: 关闭暖风机
|
||||
optional uint32 header_wind_speed_cmd = 6; //风速 0: default, 1: 1档,2: 2档
|
||||
|
||||
optional uint32 main_lamp1_cmd = 7; //0: default, 1: 开启顶灯1, 2: 关闭顶灯1
|
||||
optional uint32 main_lamp2_cmd = 8; //0: default, 1: 开启顶灯2, 2: 关闭顶灯2
|
||||
optional uint32 small_lamp_cmd = 9; //0: default, 1: 开启小灯(氛围灯), 2: 关闭小灯(氛围灯)
|
||||
|
||||
optional uint32 front_door_cmd = 10; //0: default, 1: 开启车门, 2: 关闭车门
|
||||
}
|
||||
|
||||
|
||||
message SpecialVehicleTaskCmd {
|
||||
optional common.Header header = 1;
|
||||
optional RoboSweeperFuTianTaskCmd robo_sweeper_futian_task_cmd = 2; // 福田清扫车业务指令
|
||||
optional RoboVanSkywellTaskCmd robo_van_skywell_task_cmd = 3; // 开沃小巴业务指令
|
||||
optional RoboBusJinlvM1Cmd robo_bus_jinlv_m1_cmd = 4; //金旅定制车m1指令
|
||||
}
|
||||
|
||||
@@ -49,6 +49,45 @@ message SweeperFuTianCleanSystemState {
|
||||
optional float secu_sweepdisk_speed = 41 [default = 0]; // 扫盘转速
|
||||
}
|
||||
|
||||
message RoboTaxiState {
|
||||
optional bool veh_rta_recover = 1 [default = false]; // 车辆可进入自动驾驶标志位,不可进入时一定时间内恢复可自动进入
|
||||
optional bool veh_rta_no_recover = 2 [default = false]; // 车辆可进入自动驾驶标志位,不可进入时恢复无法自动进入
|
||||
}
|
||||
|
||||
message RoboBusState {
|
||||
optional bool reserved = 1; // 预留
|
||||
}
|
||||
|
||||
message AirConditionerState {
|
||||
optional bool is_on = 1; //是否开启
|
||||
optional uint32 mode = 2; //模式, 1: 自动模式, 2: 制冷模式, 3: 通风模式(仅送风,无温度)
|
||||
optional uint32 temperature = 3; //温度
|
||||
optional uint32 wind_speed = 4; //风速, 1-3: 1-3档
|
||||
}
|
||||
|
||||
message HeaterState {
|
||||
optional bool is_on = 1; //是否开启
|
||||
optional uint32 wind_speed = 2; //风速, 1-2: 1-2档
|
||||
}
|
||||
|
||||
message DoorState {
|
||||
optional bool is_on = 1; //是否开启
|
||||
}
|
||||
|
||||
message LightState {
|
||||
optional bool is_on = 1; //是否开启
|
||||
optional uint32 color = 2; //颜色
|
||||
}
|
||||
|
||||
message RoboBusJinlvM1State {
|
||||
optional AirConditionerState air_conditioner_state = 1; //空调
|
||||
optional HeaterState heater_state = 2; //暖风机
|
||||
optional DoorState front_door_state = 3; //车门
|
||||
optional LightState main_lamp1_state = 4; //顶灯1
|
||||
optional LightState main_lamp2_state = 5; //顶灯2
|
||||
optional LightState small_lamp_state = 6; //小灯(氛围灯)
|
||||
}
|
||||
|
||||
message VehicleState {
|
||||
optional common.Header header = 1;
|
||||
optional chassis.PilotMode pilot_mode = 2 [default = MODE_MANUAL];
|
||||
@@ -90,14 +129,15 @@ message VehicleState {
|
||||
optional float rightFrontWheelAngle = 34 [default = 0]; //右前轮角度(deg),左负右正
|
||||
|
||||
optional chassis.EPBWorkStatus epb = 35 [default = EPBSTATUS_NONE]; // EPB工作状态
|
||||
|
||||
optional chassis.VehicleTakeOverStatus vehicletakeoverstatus = 36 [default = None_TakeOver]; // 车辆人工接管状态
|
||||
optional bool Emergency_Stop_Switch = 37 [default = false]; // 急停开关状态
|
||||
optional chassis.VehicleFaultLevel vehiclefaultlevel = 38 [default = None_Fault]; // 整车故障状态
|
||||
|
||||
optional float bms_soc = 40 [default = 0]; // 电量百分比范围 0~100
|
||||
|
||||
reserved 41 to 199;
|
||||
optional float fuel_value = 41 [default = 0]; // 油车剩余油量
|
||||
|
||||
optional SweeperFuTianCleanSystemState sweeper_futian_clean_system_state = 200; // 福田清扫车上装状态信息
|
||||
optional RoboTaxiState robo_taxi_state = 201; // taxi状态
|
||||
optional RoboBusState robo_bus_state = 202; // bus状态
|
||||
optional RoboBusJinlvM1State robo_bus_jinlv_m1_state = 203; //金旅定制车m1状态
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass;
|
||||
import common.HeaderOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
@@ -1375,5 +1376,17 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return sendPBMessage(MessageType.TYPE_SEND_TRIP_INFO_REQ.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送包管理请求
|
||||
*
|
||||
* @param bagManager 包管理参数
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendBagManagerCmd(BagManagerOuterClass.BagManager bagManager) {
|
||||
return sendPBMessage(MessageType.TYPE_SEND_BAG_MANAGER_CMD.typeCode, bagManager.toByteArray());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
@@ -706,6 +707,17 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.sendTripInfoReq(type, lineName, departureStopName, arrivalStopName, isLastStop);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送包管理请求
|
||||
*
|
||||
* @param bagManager 包管理参数
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendBagManagerCmd(BagManagerOuterClass.BagManager bagManager) {
|
||||
return mChannel != null && mChannel.sendBagManagerCmd(bagManager);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工控机固定IP列表
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.zhidao.support.adas.high.common.MessageType;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.SpecialVehicleTaskCmdOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
@@ -420,6 +421,13 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean sendTripInfoReq(int type, String lineName, String departureStopName, String arrivalStopName, boolean isLastStop);
|
||||
|
||||
/**
|
||||
* 发送包管理请求
|
||||
*
|
||||
* @param bagManager 包管理参数
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendBagManagerCmd(BagManagerOuterClass.BagManager bagManager);
|
||||
|
||||
// TODO 需求暂停 待讨论
|
||||
// boolean getRoutes();
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.zhidao.support.adas.high.bean.AutopilotAbility;
|
||||
import com.zhidao.support.adas.high.bean.AutopilotStatistics;
|
||||
import com.zhidao.support.adas.high.common.ProtocolStatus;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
import chassis.VehicleStateOuterClass;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
import mogo.v2x.ObuWarningEvent;
|
||||
@@ -189,6 +190,14 @@ public interface OnAdasListener {
|
||||
*/
|
||||
void onObuWarningData(MessagePad.Header header, ObuWarningEvent.ObuWarningData obuWarningData);
|
||||
|
||||
/**
|
||||
* Bag管理应答
|
||||
*
|
||||
* @param header 头
|
||||
* @param bagManager 数据
|
||||
*/
|
||||
void onBagManagerCmd(MessagePad.Header header, BagManagerOuterClass.BagManager bagManager);
|
||||
|
||||
/**
|
||||
* 是否有能力启动自动驾驶
|
||||
*
|
||||
|
||||
@@ -16,13 +16,15 @@ public enum MessageType {
|
||||
TYPE_RECEIVE_TRAJECTORY(MessagePad.MessageType.MsgTypeTrajectory, "车前引导线"),
|
||||
TYPE_RECEIVE_TRACKED_OBJECTS(MessagePad.MessageType.MsgTypeTrackedObjects, "障碍物信息"),
|
||||
TYPE_RECEIVE_GNSS_INFO(MessagePad.MessageType.MsgTypeGnssInfo, "惯导信息"),
|
||||
TYPE_RECEIVE_VEHICLE_STATE(MessagePad.MessageType.MsgTypeVehicleState, "底盘信息"),
|
||||
TYPE_RECEIVE_VEHICLE_STATE(MessagePad.MessageType.MsgTypeVehicleState, "老底盘状态"),
|
||||
TYPE_RECEIVE_AUTOPILOT_STATE(MessagePad.MessageType.MsgTypeAutopilotState, "自动驾驶状态"),
|
||||
TYPE_RECEIVE_REPORT_MESSAGE(MessagePad.MessageType.MsgTypeReportMessage, "监控事件报告"),
|
||||
TYPE_RECEIVE_PERCEPTION_TRAFFIC_LIGHT(MessagePad.MessageType.MsgTypePerceptionTrafficLight, "感知红绿灯"),
|
||||
TYPE_RECEIVE_PREDICTION_OBSTACLE_TRAJECTORY(MessagePad.MessageType.MsgTypePredictionObstacleTrajectory, "他车轨迹预测"),
|
||||
TYPE_RECEIVE_POINT_CLOUD(MessagePad.MessageType.MsgTypePointCloud, "点云透传"),
|
||||
TYPE_RECEIVE_PLANNING_OBJECTS(MessagePad.MessageType.MsgTypePlanningObjects, "Planning障碍物"),
|
||||
TYPE_RECEIVE_CHASSIS_STATES(MessagePad.MessageType.MsgTypeChassisStates, "底盘状态"),
|
||||
TYPE_RECEIVE_FUNCTION_STATES(MessagePad.MessageType.MsgTypeFunctionStates, "重构后功能状态"),
|
||||
|
||||
TYPE_RECEIVE_BASIC_INFO_REQ(MessagePad.MessageType.MsgTypeBasicInfoReq, "自动驾驶设备基础信息请求"),
|
||||
TYPE_SEND_BASIC_INFO_RESP(MessagePad.MessageType.MsgTypeBasicInfoResp, "自动驾驶设备基础信息应答"),
|
||||
@@ -36,6 +38,7 @@ public enum MessageType {
|
||||
TYPE_SEND_SET_AUTOPILOT_SPEED_REQ(MessagePad.MessageType.MsgTypeSetAutopilotSpeedReq, "设置自动驾驶最大速度"),
|
||||
TYPE_SEND_GLOBAL_PATH_REQ(MessagePad.MessageType.MsgTypeGlobalPathReq, "自动驾驶路径请求"),
|
||||
TYPE_RECEIVE_GLOBAL_PATH_RESP(MessagePad.MessageType.MsgTypeGlobalPathResp, "自动驾驶路径应答"),
|
||||
@Deprecated//MAP290开始此接口弃用
|
||||
TYPE_SEND_TRAFFIC_LIGHT_DATA(MessagePad.MessageType.MsgTypeTrafficLightData, "发送红绿灯数据到工控机"),
|
||||
@Deprecated
|
||||
TYPE_RECEIVE_WARN(MessagePad.MessageType.MsgTypeWarn, "预警数据"),
|
||||
@@ -45,16 +48,21 @@ public enum MessageType {
|
||||
TYPE_SEND_STATUS_QUERY_REQ(MessagePad.MessageType.MsgTypeStatusQueryReq, "状态查询请求"),
|
||||
TYPE_RECEIVE_STATUS_QUERY_RESP(MessagePad.MessageType.MsgTypeStatusQueryResp, "状态查询应答"),
|
||||
TYPE_SEND_SET_RAIN_MODE_REQ(MessagePad.MessageType.MsgTypeSetRainModeReq, "设置雨天模式"),
|
||||
TYPE_SEND_OPERATOR_CMD_REQ(MessagePad.MessageType.MsgTypeOperatorCmdReq, "操控指令"),
|
||||
TYPE_SEND_RECORD_DATA_CONFIG_REQ(MessagePad.MessageType.MsgTypeRecordDataConfigReq, "数据采集配置查询"),
|
||||
TYPE_RECEIVE_RECORD_DATA_CONFIG_RESP(MessagePad.MessageType.MsgTypeRecordDataConfigResp, "数据采集配置"),
|
||||
TYPE_SEND_OPERATOR_CMD_REQ(MessagePad.MessageType.MsgTypeOperatorCmdReq, "操控指令"),
|
||||
TYPE_SEND_SUBSCRIBE_DATA_REQ(MessagePad.MessageType.MsgTypeSubscribeDataReq, "数据订阅、取消订阅请求"),
|
||||
TYPE_SEND_SPECIAL_VEHICLE_TASK_CMD(MessagePad.MessageType.MsgTypeSpecialVehicleTaskCmd, "特种车辆命令"),
|
||||
TYPE_SEND_SET_PARAM_REQ(MessagePad.MessageType.MsgTypeSetParamReq, "设置参数命令"),
|
||||
TYPE_SEND_TRIP_INFO_REQ(MessagePad.MessageType.MsgTypeTripInfoEvent, "行程信息"),
|
||||
TYPE_SEND_SPECIAL_VEHICLE_TASK_CMD(MessagePad.MessageType.MsgTypeSpecialVehicleTaskCmd, "特种车辆命令"),
|
||||
//透传 原始pb文件中不存在以下type。由于Java中无法强转所以在mogo-adas-data message_pad.proto中放开注释
|
||||
TYPE_SEND_BAG_MANAGER_CMD(MessagePad.MessageType.MsgTypeBagManagerCmd, "Bag管理请求"),
|
||||
TYPE_RECEIVE_BAG_MANAGER_CMD(MessagePad.MessageType.MsgTypeBagManagerCmd, "Bag管理应答"),
|
||||
TYPE_SEND_PLANNING_CMD(MessagePad.MessageType.MsgTypePlanningCmd, "给Planning指令"),
|
||||
//TODO 透传原始pb文件中不存在以下type。由于Java中无法强转,所以在mogo-adas-data/message_pad.proto中放开注释
|
||||
TYPE_RECEIVE_PLANNING_DECISION_STATE(MessagePad.MessageType.MsgTypePlanningDecisionState, "Planning决策状态"),
|
||||
TYPE_RECEIVE_OBU_WARNING_DATA(MessagePad.MessageType.MsgTypeObuWarningData, "OBU预警事件");
|
||||
TYPE_RECEIVE_SWEEPER_TASK_INDEX_DATA(MessagePad.MessageType.MsgTypeSweeperTaskIndexData, "清扫车指标数据"),
|
||||
TYPE_RECEIVE_OBU_WARNING_DATA(MessagePad.MessageType.MsgTypeObuWarningData, "OBU预警事件"),
|
||||
;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.zhidao.support.adas.high.msg;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.google.protobuf.InvalidProtocolBufferException;
|
||||
import com.zhidao.support.adas.high.AdasChannel;
|
||||
import com.zhidao.support.adas.high.OnAdasListener;
|
||||
import com.zhidao.support.adas.high.common.CupidLogUtils;
|
||||
import com.zhidao.support.adas.high.protocol.RawData;
|
||||
|
||||
import bag_manager.BagManagerOuterClass;
|
||||
|
||||
/**
|
||||
* Bag管理应答
|
||||
*/
|
||||
public class BagManagerMessage extends MyAbstractMessageHandler {
|
||||
|
||||
public BagManagerMessage() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerMsg(RawData raw, OnAdasListener adasListener) throws InvalidProtocolBufferException {
|
||||
BagManagerOuterClass.BagManager bagManager = BagManagerOuterClass.BagManager.parser().parseFrom(raw.originalData.toByteArray(), raw.getOffsetValue(), raw.getPackageLengthValue() - raw.getOffsetValue());
|
||||
AdasChannel.calculateTimeConsumingOnDispatchRaw("Bag管理应答", raw.receiveTime);
|
||||
long nowTime = 0;
|
||||
if (CupidLogUtils.isEnableLog())
|
||||
nowTime = SystemClock.elapsedRealtime();
|
||||
if (adasListener != null) {
|
||||
adasListener.onBagManagerCmd(raw.getHeader(), bagManager);
|
||||
}
|
||||
AdasChannel.calculateTimeConsumingBusiness("Bag管理应答", nowTime);
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,7 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
private IMsg recordDataConfigRespMessage;//数据采集配置应答
|
||||
private IMsg planningDecisionStateMessage;//planning决策状态
|
||||
private IMsg obuWarningDataMessage;//工控机透传OBU V2I数据
|
||||
private IMsg bagManagerMessage;//Bag管理应答
|
||||
|
||||
private final AutopilotReview autopilotReview;
|
||||
|
||||
@@ -155,6 +156,12 @@ public class MyMessageFactory implements IMyMessageFactory {
|
||||
obuWarningDataMessage = new ObuWarningDataMessage();
|
||||
}
|
||||
return obuWarningDataMessage;
|
||||
} else if (messageType == MessageType.TYPE_RECEIVE_BAG_MANAGER_CMD.typeCode) {
|
||||
//Bag管理应答
|
||||
if (bagManagerMessage == null) {
|
||||
bagManagerMessage = new BagManagerMessage();
|
||||
}
|
||||
return bagManagerMessage;
|
||||
} else {
|
||||
//MessageType.TYPE_DEFAULT.typeCode
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user