From 64e48a0441eedd0b7bc926ca922b2fb58075467b Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 13 Nov 2024 17:57:10 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E5=AD=90=E5=9C=B0=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/electronicMap_graphic_data.proto | 194 +++++++++++++++++++++++++++ src/em_data.proto | 30 ----- src/picture.proto | 24 ---- 3 files changed, 194 insertions(+), 54 deletions(-) create mode 100644 src/electronicMap_graphic_data.proto delete mode 100644 src/em_data.proto delete mode 100644 src/picture.proto diff --git a/src/electronicMap_graphic_data.proto b/src/electronicMap_graphic_data.proto new file mode 100644 index 0000000..83742ac --- /dev/null +++ b/src/electronicMap_graphic_data.proto @@ -0,0 +1,194 @@ +syntax = "proto3"; + +import "common.proto"; +package electronicMapGraphicData; + +message ElectronicMapGraphicStorage { + common.Canvas canvas = 1; + repeated Station stations = 2; + repeated Platform Platforms = 3; + repeated ScreenDoor screenDoors = 4; + repeated Section section = 5; + repeated Turnout turnouts = 6; + repeated Signal signals = 7; + repeated AxleCounting axleCountings = 8; + GenerateAxleCountingConfig generateAxleCountingConfig = 9;//一键生成计轴的配置 +} + +message Station { + common.CommonInfo common = 1; + string code = 2;//车站站名 + bool concentrationStations = 3; //是否集中站 + KilometerSystem kilometerSystem = 4; //公里标 + string stationName = 5; //车站名 + string stationNameAcronym = 6; // 车站名拼音简写 + bool depots = 7; //是否车辆段 + repeated uint32 manageStations = 8; // 如果是集中站——管理的车站-id +} + +message Platform { + enum TypeOfPlatform { + Unknown = 0; + up = 1; + down = 2; + } + common.CommonInfo common = 1; + string code = 2; + string refEsbRelayCode = 3;//关联的紧急停车继电器的编号 + TypeOfPlatform type = 4; //站台的上下行 + uint32 refStationId = 5; //关联的车站的id + uint32 refSectionId = 6; //关联的物理区段id +} + +message ScreenDoor { + common.CommonInfo common = 1; + string code = 2; + uint32 refPlatformId = 3; //关联的站台 +} + +/** 物理区段(包含岔区和非岔区) */ +message Section { + enum SectionType { + Physical = 0; + TurnoutPhysical = 1; + } + + enum RunningDirection { + AtoB = 0; + BtoA = 1; + BOTH = 2; + } + + + common.CommonInfo common = 1; + string code = 2; // 编号 + repeated common.Point points = 3; // 点列表 + RelatedRef paRef = 4; // 区段A端关联的设备(非岔区)(后端不关注) + RelatedRef pbRef = 5; // 区段B端关联的设备(非岔区)(后端不关注) + SectionType sectionType = 6; // 区段类型 + bool isCurve = 7; // 是否曲线 + int32 segmentsCount = 8; // 曲线分段数 + RunningDirection normalRunningDirection = 9; //常规运行方向 + bool isTurnBackZone = 10; // 是否为折返区域 + Direction direction = 11; // 上下行 + repeated uint32 axleCountings = 12; // 区段对应的计轴 + uint32 trackSectionId = 13; // 下属轨道区段id + repeated uint32 centralizedStations = 14; // 集中站Id列表 +} + +message Turnout { + + enum SwitchMachineType { + Unknown = 0; + ZDJ9_Single = 1; + ZDJ9_Double = 2; + } + + common.CommonInfo common = 1; + string code = 2; + repeated common.Point pointA = 3; // A端坐标列表 + repeated common.Point pointB = 4; // B端坐标列表 + repeated common.Point pointC = 5; // C端坐标列表 + RelatedRef paRef = 6; // 道岔A端关联的设备 + RelatedRef pbRef = 7; // 道岔B端关联的设备 + RelatedRef pcRef = 8; // 道岔C端关联的设备 + repeated KilometerSystem kilometerSystem = 9; // 道岔公里标 + SwitchMachineType switchMachineType = 10; // 转辙机类型 + repeated uint32 centralizedStations = 11; // 集中站Id列表 + uint32 paTrackSectionId = 12; // A端轨道区段id + uint32 pbTrackSectionId = 13; // B端轨道区段id + uint32 pcTrackSectionId = 14; // C端轨道区段id +} + +message Signal { + common.CommonInfo common = 1; + string code = 2; + bool mirror = 3; + KilometerSystem kilometerSystem = 4; + RelatedRef refDev = 5; //关联设备(区段/道岔) + // 信号机模型类型枚举 + // 从左向右,最左边为靠近灯座的灯 + // 如果没有说明,默认不封灯,无引导 + // F-封 D-单 Y-有、带 Y-引导 + // H-红 L-绿 U-黄 A-蓝 B-白 + enum Model{ + HL = 0; //2XH-1 红绿 + HLU_FU = 1; //2XH-1 红绿黄,封黄灯,无引导 + HLU_DU_YY = 2; //3XH-1 红绿黄,不封灯,有单黄,带引导 + HLU_YY = 3; //3XH-2或JDXH 红绿黄,不封灯,无单黄,带引导 + HLU_FL_DU_YY = 4;//3XH-3 红绿黄,封绿灯,有单黄,带引导 + HLU_DU = 5; //3XH-4 红绿黄,不封灯,有单黄,无引导 + AB = 6; //DXCH 蓝白 + HBU_DU = 7; //JCKXH 红白黄,不封灯,有单黄,无引导 + } + // 信号机模型类型 + Model mt = 6; + Direction direction = 7; // 上下行 + repeated uint32 centralizedStations = 8; // 集中站Id列表 +} + +message AxleCounting { + enum TypeDetectionPoint { + AxleCounting = 0; + SectionBoundary = 1; + } + common.CommonInfo common = 1; + string code = 2; // 名称 + KilometerSystem kilometerSystem = 3; //公里标 + repeated RelatedRef axleCountingRef = 4; // 计轴关联的非岔区物理区段和道岔,设备id和端口 + TypeDetectionPoint type = 5; //检测点的类型:计轴、区段边界 + repeated uint32 centralizedStations = 6; // 集中站Id列表 +} + +/** 上下行(区段/信号机) */ +enum Direction { + UP = 0; + DOWN = 1; +} + +message KilometerSystem { + /** 左右行 **/ + enum Direction { + LEFT = 0; + RIGHT = 1; + } + int64 kilometer = 1; //公里标mm + string coordinateSystem = 2; //坐标系 + Direction direction = 3; //左右行 +} + +message SimpleRef { + enum DeviceType { + Turnout = 0; + AxleCounting = 1; + } + DeviceType deviceType = 1; + uint32 id = 2; +} + +//关联设备 +message RelatedRef { + enum DeviceType { + station = 0; + ScreenDoor = 1; + Section = 2; + Turnout = 3; + signal = 4; + AxleCounting = 5; + } + + enum DevicePort { + A = 0; + B = 1; + C = 2; + } + + DeviceType deviceType = 1; //关联的设备类型 + DevicePort devicePort = 2; //关联的设备端口 + uint32 id = 3; +} + +message GenerateAxleCountingConfig { + repeated uint32 bbConnect = 1; //需要在道岔bb连接处生成计轴的道岔id(填一个就行) + repeated uint32 noGenerateGroup = 2;//指定的道岔组不生成计轴 +} diff --git a/src/em_data.proto b/src/em_data.proto deleted file mode 100644 index 35de6ba..0000000 --- a/src/em_data.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package em_data; -import "common.proto"; - -// 电子地图数据 -message Em { - common.Canvas canvas = 1; - repeated Station stations = 2; -} - -// 公里标 -message KilometerMark { - // 公里标坐标系 - string coordinate = 1; - // 公里标数值 - int64 value = 2; -} - -// 车站数据 -message Station { - common.CommonInfo common = 1; - string name = 2; //车站名 - string zhanName = 3; //车站站名 - string namePinyin = 4; // 车站名拼音简写 - KilometerMark km = 6; // 公里标 - bool concentration = 10; // 是否集中站 - bool depots = 11; // 是否车辆段 - repeated uint32 manageStationIds = 13; // 集中站管理的车站-id -} diff --git a/src/picture.proto b/src/picture.proto deleted file mode 100644 index 01180dd..0000000 --- a/src/picture.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; - -enum PictureType { - /** 火灾报警 */ - FireAlarm = 0; - /** 机电 */ - Electromechanical = 1; - /** 广播 */ - Broadcast = 2; - /** 乘客信息 */ - PassengerInformation = 3; - /** 闭路电视 */ - CCTV = 4; - /** 屏蔽门 */ - PSD = 5; - /** 售检票 */ - TicketSalesAndChecking = 6; - /** 门禁 */ - AccessControl = 7; - /** 防淹门 */ - FloodGate = 8; - /** 网络状态 */ - NetworkStatus = 9; -}