添加行程信息接口
This commit is contained in:
@@ -488,10 +488,10 @@ message SetParamReq
|
||||
//message definition for MsgTypeTripInfoEvent
|
||||
message TripInfoEvent
|
||||
{
|
||||
uint32 type = 1; //事件类型, 1:行程开始, 2:出站, 3:进站, 4:城市占道施工预警
|
||||
string lineName = 2; //路线名, for type 1
|
||||
string stopName = 3; //站点名, for type 2, 3
|
||||
bool isLastStop = 4; //是否最终站, for type 2, 3
|
||||
uint32 type = 1; //事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
|
||||
string lineName = 2; //路线名, for type 1, 2
|
||||
string stopName = 3; //站点名, for type 3, 4
|
||||
bool isLastStop = 4; //是否最终站, for type 3, 4
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1264,5 +1264,25 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
return sendSetParamReq(2, String.valueOf(speed));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type 事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
|
||||
* @param lineName 路线名, for type 1, 2
|
||||
* @param stopName 站点名, for type 3, 4
|
||||
* @param isLastStop
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTripInfoReq(int type, String lineName, String stopName, boolean isLastStop) {
|
||||
MessagePad.TripInfoEvent req = MessagePad.TripInfoEvent
|
||||
.newBuilder()
|
||||
.setType(type)
|
||||
.setLineName(lineName)
|
||||
.setStopName(stopName)
|
||||
.setIsLastStop(isLastStop)
|
||||
.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_TRIP_INFO_REQ.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -653,6 +653,19 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.sendDetouringSpeed(speed);
|
||||
}
|
||||
|
||||
/**
|
||||
* 行程信息
|
||||
* @param type 事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
|
||||
* @param lineName 路线名, for type 1, 2
|
||||
* @param stopName 站点名, for type 3, 4
|
||||
* @param isLastStop 是否终点站
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean sendTripInfoReq(int type, String lineName, String stopName, boolean isLastStop) {
|
||||
return mChannel != null && mChannel.sendTripInfoReq(type,lineName,stopName,isLastStop);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工控机固定IP列表
|
||||
*
|
||||
|
||||
@@ -379,6 +379,18 @@ public interface IAdasNetCommApi {
|
||||
* @return boolean
|
||||
*/
|
||||
boolean sendDetouringSpeed(double speed);
|
||||
|
||||
/**
|
||||
* 发生行程相关
|
||||
*
|
||||
* @param type 事件类型, 1:行程开始, 2:行程结束, 3:出站, 4:进站, 5:城市占道施工预警
|
||||
* @param lineName 路线名, for type 1, 2
|
||||
* @param stopName 站点名, for type 3, 4
|
||||
* @return boolean 是否最终站, for type 3, 4
|
||||
*/
|
||||
boolean sendTripInfoReq(int type, String lineName, String stopName, boolean isLastStop);
|
||||
|
||||
|
||||
// TODO 需求暂停 待讨论
|
||||
// boolean getRoutes();
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ public enum MessageType {
|
||||
TYPE_RECEIVE_RECORD_DATA_CONFIG_RESP(MessagePad.MessageType.MsgTypeRecordDataConfigResp, "数据采集配置"),
|
||||
TYPE_SEND_SUBSCRIBE_DATA_REQ(MessagePad.MessageType.MsgTypeSubscribeDataReq, "数据订阅、取消订阅请求"),
|
||||
TYPE_SEND_SET_PARAM_REQ(MessagePad.MessageType.MsgTypeSetParamReq, "设置参数命令"),
|
||||
TYPE_SEND_TRIP_INFO_REQ(MessagePad.MessageType.MsgTypeTripInfoEvent, "行程信息"),
|
||||
//透传 原始pb文件中不存在以下type。由于Java中无法强转所以在mogo-adas-data message_pad.proto中放开注释
|
||||
TYPE_RECEIVE_PLANNING_DECISION_STATE(MessagePad.MessageType.MsgTypePlanningDecisionState, "Planning决策状态");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user