Browse Source

Merge branch 'master' of http://111.33.136.149:3000/adc_pilot/modularization

yuchuli 3 years ago
parent
commit
1fc79af9fd

+ 75 - 0
src/driver/driver_cloud_grpc_client_BS/VehicleControl.proto

@@ -0,0 +1,75 @@
+syntax = "proto3";
+
+package org.jeecg.defsControl.grpc;
+
+option java_multiple_files = true;
+option java_package = "org.jeecg.defsControl.model";
+option java_outer_classname = "VehicleControl";
+
+
+enum CtrlMode{
+    CMD_AUTO = 0;
+    CMD_REMOTE = 1;
+    CMD_EMERGENCY_STOP = 2;
+    CMD_CLOUD_PLATFORM = 3; // 云平台控制模式
+}
+
+enum ShiftStatus{
+    SHIFT_UNKOWN = 0;
+    SHIFT_ERROR = 1;
+    SHIFT_INTERVAL = 2;
+    SHIFT_PARKING = 3;
+    SHIFT_REVERSE = 4;
+    SHIFT_NEUTRAL = 5;
+    SHIFT_DRIVE = 6;
+    SHIFT_SPORT = 7;
+
+    SHIFT_LOW = 10;
+    SHIFT_LEVEL1 = 11;
+    SHIFT_LEVEL2 = 12;
+    SHIFT_LEVEL3 = 13;
+    SHIFT_LEVEL4 = 14;
+    SHIFT_LEVEL5 = 15;
+    SHIFT_LEVEL6 = 16;
+    SHIFT_LEVEL7 = 17;
+    SHIFT_LEVEL8 = 18;
+    SHIFT_LEVEL9 = 19;
+    SHIFT_LEVEL10 = 20;
+}
+
+message GPSPoint{
+    double latitude = 1;
+    double longitude = 2;
+    double height = 3;
+}
+
+message ControlRequest {
+    string id = 1; // 车辆 SIM 码
+    ShiftStatus shiftCMD = 2;
+    double steeringWheelAngleCMD = 3;  //+/-540 degree
+    double throttleCMD = 4; // 0-100
+    double brakeCMD = 5;    // 0-100
+}
+
+message Empty {
+}
+
+message MapPoint{
+    int64 index = 1;
+    GPSPoint mapPoint = 2;
+}
+
+//服务端发送站点信息到小车
+message UploadMapRequest {
+    repeated MapPoint mapPoints = 1;
+}
+
+//小车发送路径所有的位置到服务端
+message UploadMapReply {
+    repeated MapPoint mapPoints = 1;
+}
+
+message CtrlRequest {
+    string id = 1; // 车辆 SIM 码
+    CtrlMode modeCMD = 2; //mode change command
+}

+ 19 - 0
src/driver/driver_cloud_grpc_client_BS/VehicleControl_service.proto

@@ -0,0 +1,19 @@
+syntax = "proto3";
+
+package org.jeecg.defsControl.grpc;
+
+option java_multiple_files = true;
+option java_package = "org.jeecg.defsControl.service";
+option java_outer_classname = "VehicleControlService";
+
+import "VehicleControl.proto";
+
+
+service VehicleControl {
+  // 车辆远程控制
+  rpc vehicleControl (ControlRequest) returns (Empty) {}
+  // 路径生成
+  rpc UploadMap(UploadMapRequest) returns(UploadMapReply) {}
+  // 控制模式改变
+  rpc changeCtrlMode(CtrlRequest) returns(Empty) {}
+}

+ 41 - 0
src/driver/driver_cloud_grpc_client_BS/VehiclePatrol.proto

@@ -0,0 +1,41 @@
+syntax = "proto3";
+
+package org.jeecg.defsPatrol.grpc;
+
+option java_multiple_files = true;
+option java_package = "org.jeecg.defsPatrol.model";
+option java_outer_classname = "VehiclePatrol";
+
+message GPSPoint{
+    double latitude = 1;
+    double longitude = 2;
+    double height = 3;
+}
+
+message PatrolRequest{
+    string id = 1;
+
+    bool isTVR = 2; //Traffic Violation Recognition
+    int32 violationStatus = 3; //0 no violation 1 overspeed 2 illegal parking 3 direction wrong 4 run the red light
+    string vehicleLicenseNumber = 4;
+    bytes violationImage = 5;
+    int64 violationTime = 6; //time when get violationImage
+    GPSPoint violationPosition = 7; //positon when get violationImage
+
+    bool isFSM = 8; //Fire and Smoke Monitor
+    int32 fireStatus = 9; //0 no fire 1 has fire
+    bytes fireImage = 10;
+    int64 fireTime = 11; //time when get fireImage
+    GPSPoint firePosition = 12; //positon when get fireImage
+
+    bool isTSGM = 13; //Turn Stile Gate Monitor
+    int32 gateStatus = 14; //0 no gate 1 gate close 2 gate open
+    bytes gateImage = 15;
+    int64 gateTime = 16; //time when get gateImage
+    GPSPoint gatePosition = 17; //positon when get gateImage
+
+    string plateNumber = 18;
+}
+
+message Empty{
+}

+ 13 - 0
src/driver/driver_cloud_grpc_client_BS/VehiclePatrol_service.proto

@@ -0,0 +1,13 @@
+syntax = "proto3";
+
+package org.jeecg.defsPatrol.grpc;
+
+option java_multiple_files = true;
+option java_package = "org.jeecg.defsPatrol.service";
+option java_outer_classname = "VehiclePatrolService";
+
+import "VehiclePatrol.proto";
+
+service VehiclePatrolException {
+  rpc uploadVehiclePatrolInfo (PatrolRequest) returns (Empty) {}
+}

+ 98 - 0
src/driver/driver_cloud_grpc_client_BS/VehicleUpload.proto

@@ -0,0 +1,98 @@
+syntax = "proto3";
+
+package org.jeecg.defsDetails.grpc;
+
+option java_multiple_files = true;
+option java_package = "org.jeecg.defsDetails.model";
+option java_outer_classname = "Vehicle";
+
+enum VehicleStatus{
+    STATUS_UNKOWN = 0;
+    STATUS_MANUAL = 1;
+    STATUS_AUTO = 2;
+    STATUS_REMOTE = 3;
+    STATUS_EMERGENCY_STOP = 4;
+    STATUS_ERROR = 5;
+}
+
+enum ShiftStatus{
+    SHIFT_UNKOWN = 0;
+    SHIFT_ERROR = 1;
+    SHIFT_INTERVAL = 2;
+    SHIFT_PARKING = 3;
+    SHIFT_REVERSE = 4;
+    SHIFT_NEUTRAL = 5;
+    SHIFT_DRIVE = 6;
+    SHIFT_SPORT = 7;
+
+    SHIFT_LOW = 10;
+    SHIFT_LEVEL1 = 11;
+    SHIFT_LEVEL2 = 12;
+    SHIFT_LEVEL3 = 13;
+    SHIFT_LEVEL4 = 14;
+    SHIFT_LEVEL5 = 15;
+    SHIFT_LEVEL6 = 16;
+    SHIFT_LEVEL7 = 17;
+    SHIFT_LEVEL8 = 18;
+    SHIFT_LEVEL9 = 19;
+    SHIFT_LEVEL10 = 20;
+}
+
+message GPSPoint{
+    double latitude = 1;
+    double longitude = 2;
+    double height = 3;
+}
+
+message UplinkRequest {
+    string id = 1;
+    int64 timeStamp = 2;
+    double SOC = 3; //0.0-100.0%
+    VehicleStatus statusFeedback = 4;
+    double mileage = 5; // kilometer
+    double speed = 6; // m/s
+    ShiftStatus shiftFeedback = 7;
+    double steeringWheelAngleFeedback = 8; //+/-540 degree
+    double throttleFeedback = 9;
+    double brakeFeedback = 10;
+    int32 GPSRTKStatus = 11; //GPS-RTK status 0-6 6 is best
+    GPSPoint positionFeedback = 12;
+    double pitch = 13;
+    double roll = 14;
+    double heading = 15;
+    bytes cameraImageFront = 16;
+    bytes cameraImageRear = 17;
+    bytes cameraImageLeft = 18;
+    bytes cameraImageRight = 19;
+
+    bool sensorStatusGPSIMU = 20; //0 GPS-IMU ok 1 GPS-IMU error
+    bool sensorStatusLidar = 21;
+    bool sensorStatusRadar = 22;
+    bool sensorStatusCamFront = 23;
+    bool sensorStatusCamRear = 24;
+    bool sensorStatusCamLeft = 25;
+    bool sensorStatusCamRight = 26;
+
+    int32 isArrived = 27; //0 no destination 1 not arrived 2 arrived
+
+    string plateNumber = 28;
+
+    CtrlMode modeFeedback = 29; //mode Feedback
+}
+
+enum CtrlMode{
+    CMD_AUTO = 0;
+    CMD_REMOTE = 1;
+    CMD_EMERGENCY_STOP = 2;
+    CMD_CLOUD_PLATFORM = 3; // 云平台控制模式? merge into remote mode
+}
+
+message ResponseMessage{
+  GPSPoint destinationPosition = 1; //in auto mode
+}
+
+message MapPoint{
+    int64 index = 1;
+    GPSPoint mapPoint = 2;
+}
+

+ 14 - 0
src/driver/driver_cloud_grpc_client_BS/VehicleUpload_service.proto

@@ -0,0 +1,14 @@
+
+syntax = "proto3";
+
+package org.jeecg.defsDetails.grpc;
+
+option java_multiple_files = true;
+option java_package = "org.jeecg.defsDetails.service";
+option java_outer_classname = "VehicleService";
+
+import "VehicleUpload.proto";
+
+service DataExchange {
+  rpc uploadVehicleOInfo (UplinkRequest) returns (ResponseMessage) {}
+}

+ 1 - 1
src/driver/driver_cloud_grpc_client_BS/driver_cloud_grpc_client_BS.proto → src/driver/driver_cloud_grpc_client_BS/driver_cloud_grpc_client_BS(abandoned).proto

@@ -65,7 +65,7 @@ message GPSPoint{
 }
 
 message UplinkRequest {
-    int32 id = 1;
+    string id = 1;
     int64 timeStamp = 2;
     double SOC = 3; //0.0-100.0%
     VechileStatus statusFeedback = 4;

+ 3 - 0
src/driver/driver_cloud_grpc_client_BS/proto_introduction.txt

@@ -0,0 +1,3 @@
+1.  VehicleUpload.proto ; VehicleUpload_service.proto 负责 车辆实时信息的传输。 服务器端口号设定为 10591
+2.  VehiclePatrol.proto; VehiclePatrol_service.proto 负责 车辆巡逻和异常监控信息的传输。 服务器端口号设定为 10592
+3. VehicleControl.proto; VehicleControl_service.proto 负责 车辆远程控制信息的传输。 服务器端口号设定为 20591