365 lines
9.1 KiB
Protocol Buffer
365 lines
9.1 KiB
Protocol Buffer
syntax = "proto3";
|
||
package phase_server;
|
||
|
||
service PhaseService {
|
||
//获取异常路口
|
||
rpc ExceptionPhaseCross (EmptyRequest) returns (ExceptionPhaseCrossResponse);
|
||
//异常路口详情列表
|
||
rpc ExceptionPhaseCrossInfo (ExceptionPhaseCrossInfoRequest) returns (ExceptionPhaseCrossInfoResponse);
|
||
//根据路口ID返回异常配时
|
||
rpc ExceptionPhaseByCrossIDs (ExceptionPhaseByCrossIDsRequest) returns (ExceptionPhaseByCrossIDsResponse);
|
||
//根据路口ID返回路口配时方案详情
|
||
rpc GetCrossPhaseDetailByCrossIDs (GetCrossPhaseDetailByCrossIDsRequest) returns (GetCrossPhaseDetailByCrossIDsResponse);
|
||
//获取有配时方案路口列表
|
||
rpc GetPhaseCrossID (EmptyRequest) returns (GetPhaseCrossIDResponse);
|
||
//获取配时方案协调/非协调方向绿灯时长比
|
||
rpc PhaseGreenRatio (PhaseGreenRatioRequest) returns (PhaseGreenRatioResponse);
|
||
//获取配时方案协调/非协调方向绿灯时长比
|
||
rpc CrossList (CrossListRequest) returns (CrossListResponse);
|
||
//依据日期,时刻查询多路口配时方案与相对相位差
|
||
rpc QueryCrossPhaseRelativeOffset (QueryCrossPhaseRelativeOffsetRequest) returns (QueryCrossPhaseRelativeOffsetResponse);
|
||
//单条绿波配时方案时段与路口配时方案时段校验
|
||
rpc GreenWaveCrossPhaseTpCheck (GreenWaveCrossPhaseTpCheckRequest) returns (GreenWaveCrossPhaseTpCheckResponse);
|
||
//路口运行中的配时方案
|
||
rpc CrossRunningPhase (CrossRunningPhaseRequest) returns (CrossRunningPhaseResponse);
|
||
//路口配时方案诊断列表
|
||
rpc CrossPhaseDiagnosis (CrossPhaseDiagnosisRequest) returns (CrossPhaseDiagnosisResponse);
|
||
//根据城市ID查询路口配时方案相关信息
|
||
rpc CrossPhaseByCity (CrossPhaseByCityRequest) returns (CrossPhaseByCityResponse);
|
||
//路口巡检城市配时方案统计
|
||
rpc CrossPhaseStatistics (CrossPhaseStatisticsRequest) returns (CrossPhaseStatisticsResponse);
|
||
}
|
||
|
||
message EmptyRequest {}
|
||
|
||
message ExceptionPhaseCrossResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 4;
|
||
message List {
|
||
int32 nodeid = 1;
|
||
string crossid = 2;
|
||
}
|
||
}
|
||
|
||
message ExceptionPhaseCrossInfoRequest {
|
||
repeated int32 citycode = 1;
|
||
}
|
||
|
||
message ExceptionPhaseCrossInfoResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
int32 total = 3;
|
||
int32 cross_total = 4;
|
||
repeated List data = 5;
|
||
message List {
|
||
int32 citycode = 1;
|
||
string crossid = 2;
|
||
int32 scheduleid = 3;
|
||
int32 planid = 4;
|
||
string plan_name = 5;
|
||
string tp_start = 6;
|
||
string days = 7;
|
||
string type = 8;
|
||
}
|
||
}
|
||
|
||
message ExceptionPhaseByCrossIDsRequest {
|
||
int32 citycode = 1;
|
||
repeated string crossid = 2;
|
||
}
|
||
|
||
message ExceptionPhaseByCrossIDsResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 5;
|
||
message List {
|
||
int32 citycode = 1;
|
||
string crossid = 2;
|
||
string cross_name = 3;
|
||
int32 scheduleid = 4;
|
||
int32 planid = 5;
|
||
string plan_name = 6;
|
||
string tp_start = 7;
|
||
string date = 8;
|
||
string week = 9;
|
||
string type = 10;
|
||
}
|
||
}
|
||
|
||
message GetCrossPhaseDetailByCrossIDsRequest {
|
||
int32 citycode = 1;
|
||
repeated string crossids = 2;
|
||
string gw_src_dir = 3;
|
||
string tp_start = 4;
|
||
string tp_end = 5;
|
||
string week = 6;
|
||
string wave_id = 7;
|
||
}
|
||
|
||
message GetCrossPhaseDetailByCrossIDsResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
int32 cycle = 3; //公共周期
|
||
repeated List data = 4;
|
||
message List {
|
||
string crossid = 1;
|
||
int32 green_forward = 2; //正向绿灯时长
|
||
int32 green_revers = 3; //逆向绿灯时长
|
||
int32 offset = 4; //正向相位差
|
||
int32 offset_r = 5; //正向相位差
|
||
int32 cycle = 6; //周期
|
||
int32 day = 7; //天
|
||
int32 month = 8; //月
|
||
int32 weekday = 9; //周
|
||
int32 scheduleid = 10; //计划号
|
||
int32 planid = 11; //方案号
|
||
string plan_name = 12; //方案名称
|
||
int32 coord_phaseid = 13; //协调相位号
|
||
string type = 14; //类型:weekday(周),date(特殊日),month(月)
|
||
}
|
||
}
|
||
|
||
message GetPhaseCrossIDResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 3;
|
||
message List {
|
||
int32 citycode = 1;
|
||
string crossid = 2;
|
||
}
|
||
}
|
||
|
||
message PhaseGreenRatioRequest {
|
||
int32 citycode = 1;
|
||
repeated string crossids = 2;
|
||
string gw_src_dir = 3;
|
||
string tp_start = 4;
|
||
string tp_end = 5;
|
||
string week = 6; //周
|
||
string wave_id = 7;
|
||
}
|
||
|
||
message PhaseGreenRatioResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 3;
|
||
message List {
|
||
string crossid = 1;
|
||
float s2l = 2; //协直/协左
|
||
string s2l_remark = 3;
|
||
int32 s2l_s_green = 4;
|
||
int32 s2l_l_green = 5;
|
||
float s2unl = 6; //协直/非协左
|
||
string s2unl_remark = 7;
|
||
int32 s2unl_s_green = 8;
|
||
int32 s2unl_unl_green = 9;
|
||
float s2uns = 10; //协直/非协直
|
||
string s2uns_remark = 11;
|
||
int32 s2uns_s_green = 12;
|
||
int32 s2uns_uns_green = 13;
|
||
float fwd2rev = 14; //协直正/反
|
||
string fwd2rev_remark = 15;
|
||
int32 fwd2rev_fwd_green = 16;
|
||
int32 fwd2rev_rev_green = 17;
|
||
int32 planid = 18; //方案号
|
||
int32 day = 19; //天
|
||
int32 month = 20; //月
|
||
int32 weekday = 21; //周
|
||
int32 scheduleid = 22; //计划号
|
||
string plan_name = 23; //方案名称
|
||
string type = 24; //类型:weekday(周),date(特殊日),month(月)
|
||
}
|
||
}
|
||
|
||
message CrossListRequest {
|
||
int32 nodeid = 1;
|
||
}
|
||
|
||
message CrossListResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 3;
|
||
message List {
|
||
string crossid = 1;
|
||
int32 type = 2;
|
||
string name = 3;
|
||
string location = 4;
|
||
repeated string src_dir = 5;
|
||
}
|
||
}
|
||
|
||
message QueryCrossPhaseRelativeOffsetRequest {
|
||
repeated string crossids = 1;
|
||
int32 citycode = 2;
|
||
string tp = 3;
|
||
string day = 4;
|
||
}
|
||
|
||
message QueryCrossPhaseRelativeOffsetResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 3;
|
||
message List {
|
||
string crossid = 1;
|
||
int32 day = 2; //天
|
||
int32 month = 3; //月
|
||
int32 weekday = 4; //周
|
||
int32 scheduleid = 5;
|
||
string tp_start = 6;
|
||
string control_mode = 7;
|
||
int32 planid = 8;
|
||
string plan_name = 9;
|
||
int32 cycle = 10;
|
||
int32 offset = 11;
|
||
int32 relative_offset = 12;
|
||
string type = 13;
|
||
int32 coord_phaseid = 14;
|
||
repeated stage_data stages = 15;
|
||
}
|
||
|
||
message stage_data {
|
||
int32 stageid = 1;
|
||
string stage_name = 2;
|
||
int32 stage_duration = 3;
|
||
int32 green = 4;
|
||
int32 yellow = 5;
|
||
int32 allred = 6;
|
||
int32 redyellow = 7;
|
||
string phaseids = 8;
|
||
string phaseid_names = 9;
|
||
}
|
||
}
|
||
|
||
message GreenWaveCrossPhaseTpCheckRequest {
|
||
string waveid = 1;
|
||
int32 citycode = 2;
|
||
}
|
||
|
||
message GreenWaveCrossPhaseTpCheckResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
}
|
||
|
||
message CrossRunningPhaseRequest {
|
||
int32 citycode = 1;
|
||
repeated string date_list = 2;
|
||
string tp = 3;
|
||
repeated string crossids = 4;
|
||
}
|
||
|
||
message CrossRunningPhaseResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated List data = 3;
|
||
message List {
|
||
int32 citycode = 1;
|
||
string crossid = 2;
|
||
string jj_crossid = 3;
|
||
int32 scheduleid = 4;
|
||
string schedule_week = 5;
|
||
string schedule_name = 6;
|
||
repeated tps_list tps = 7;
|
||
}
|
||
message tps_list {
|
||
string tp_start = 1;
|
||
string tp_end = 2;
|
||
int32 planid = 3;
|
||
string plan_name = 4;
|
||
string control_mode = 5;
|
||
int32 cycle = 6;
|
||
int32 coord_phaseid = 7;
|
||
int32 offset = 8;
|
||
repeated stages stage_list = 9;
|
||
}
|
||
message stages {
|
||
int32 stageid = 1;
|
||
int32 stage_duration = 2;
|
||
string stage_name = 3;
|
||
int32 green = 4;
|
||
int32 yellow = 5;
|
||
int32 allred = 6;
|
||
string phases = 7;
|
||
string phases_name = 8;
|
||
int32 min_green = 9;
|
||
int32 max_green = 10;
|
||
}
|
||
}
|
||
|
||
message CrossPhaseDiagnosisRequest {
|
||
int32 citycode = 1;
|
||
string crossid = 2;
|
||
int32 area_id = 4;
|
||
string tp = 5;
|
||
repeated string date_list = 6;
|
||
}
|
||
|
||
message CrossPhaseDiagnosisResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
List data = 3;
|
||
message List {
|
||
string item = 1;
|
||
repeated details values = 2;
|
||
}
|
||
|
||
message details {
|
||
string item = 1;
|
||
repeated item_detail detail = 2;
|
||
repeated item_suggestions suggestions = 3;
|
||
string reason = 4;
|
||
}
|
||
|
||
message item_detail {
|
||
string src_dir = 1;
|
||
repeated detail_value child_detail = 2;
|
||
}
|
||
|
||
message item_suggestions {
|
||
repeated detail_value child_detail = 1;
|
||
}
|
||
|
||
message detail_value {
|
||
string text = 1;
|
||
string color = 2;
|
||
int32 scheduleid = 3;
|
||
string crossid = 4;
|
||
string tp_start = 5;
|
||
string day = 6;
|
||
}
|
||
}
|
||
|
||
message CrossPhaseByCityRequest {
|
||
int32 citycode = 1;
|
||
}
|
||
|
||
message CrossPhaseByCityResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
repeated string data = 3;
|
||
}
|
||
|
||
message CrossPhaseStatisticsRequest {
|
||
int32 citycode = 1;
|
||
int32 area_id = 2;
|
||
string schedule_week = 3;
|
||
repeated string date_list = 4;
|
||
|
||
}
|
||
|
||
message CrossPhaseStatisticsResponse {
|
||
int32 code = 1;
|
||
string msg = 2;
|
||
List data = 3;
|
||
message List {
|
||
int32 cross_phase_num = 1; //有配时方案路口数
|
||
int32 cross_update_num = 2; //配时方案更新路口数量
|
||
float avg_tp_num = 3; //平均划分时段
|
||
repeated item_tps_list tp_num_detail = 4; //时段数量详情
|
||
}
|
||
|
||
message item_tps_list {
|
||
string range = 1; //时段数量范围
|
||
int32 value = 2; //日计划数量
|
||
}
|
||
} |