264 lines
6.3 KiB
Protocol Buffer
264 lines
6.3 KiB
Protocol Buffer
syntax = "proto3";
|
||
|
||
package graphicData;
|
||
option java_package = "club.joylink.xiannccda.dto.protos";
|
||
option java_outer_classname = "LayoutGraphicsProto";
|
||
|
||
message RtssGraphicStorage {
|
||
Canvas canvas = 1;
|
||
repeated Link links = 2;
|
||
repeated IscsFan iscsFans = 3;
|
||
repeated Platform Platforms = 4;
|
||
repeated Station stations = 5;
|
||
repeated Rect rects = 6;
|
||
repeated Train train = 7;
|
||
repeated Signal signals = 8;
|
||
repeated Turnout turnouts = 9;
|
||
repeated Section section = 10;
|
||
repeated StationLine stationLines = 11;
|
||
repeated RunLine runLines = 12;
|
||
repeated TrainLine trainLines = 13;
|
||
repeated PathLine pathLines = 14;
|
||
repeated Polygon polygons = 15;
|
||
repeated TrainWindow trainWindows = 16;
|
||
repeated AxleCounting axleCountings = 17;
|
||
repeated Separator separators = 18;
|
||
repeated LogicSection logicSections = 19;
|
||
}
|
||
|
||
message Canvas {
|
||
// 画布宽
|
||
int32 width = 1;
|
||
// 画布高
|
||
int32 height = 2;
|
||
// 背景色
|
||
string backgroundColor = 3;
|
||
// 视口变换
|
||
Transform viewportTransform = 4;
|
||
}
|
||
|
||
message Point {
|
||
// x坐标
|
||
float x = 1;
|
||
// y坐标
|
||
float y = 2;
|
||
}
|
||
|
||
//变换
|
||
message Transform {
|
||
// 位移
|
||
Point position = 1;
|
||
// 缩放
|
||
Point scale = 2;
|
||
// 旋转弧度
|
||
float rotation = 3;
|
||
// 歪斜
|
||
Point skew = 4;
|
||
}
|
||
|
||
//子元素变换
|
||
message ChildTransform {
|
||
// 子元素名称
|
||
string name = 1;
|
||
// 子元素变换
|
||
Transform transform = 2;
|
||
}
|
||
// 公共属性
|
||
message CommonInfo {
|
||
string id = 1;
|
||
string graphicType = 2;
|
||
Transform transform = 3;
|
||
repeated ChildTransform childTransforms = 4;
|
||
}
|
||
|
||
message Link {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
bool curve = 3; // 是否曲线
|
||
int32 segmentsCount = 4; // 曲线分段数
|
||
int32 lineWidth = 5; // 线宽
|
||
string lineColor = 6; // 线色
|
||
repeated Point points = 7; // 点坐标列表
|
||
}
|
||
|
||
message Rect {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
int32 lineWidth = 3; // 线宽
|
||
string lineColor = 4; // 线色
|
||
float width = 5; //宽度
|
||
float height = 6; //高度
|
||
int32 radius = 7; //圆角半径
|
||
Point point = 8; // 画第一个点的坐标
|
||
}
|
||
|
||
message Polygon {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
int32 lineWidth = 3; // 线宽
|
||
string lineColor = 4; // 线色
|
||
repeated Point points = 5; // 点坐标列表
|
||
}
|
||
|
||
message Platform {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
bool hasdoor = 3; // 是否有屏蔽门
|
||
string direction = 4; // 行驶方向--屏蔽门上下
|
||
//string upAndDown =5; //上下行--upLink表示上行,downLink表示下行
|
||
string refStation=6; //关联的车站
|
||
bool up = 7;//上下行--true表示上行,false表示下行
|
||
}
|
||
|
||
message Station {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
bool hasControl = 3; // 是否有控制
|
||
bool concentrationStations = 4; //是否集中站
|
||
// string kilometerCode = 5; //公里标
|
||
KilometerSystem kilometerSystem = 6; //公里标
|
||
string name = 7;
|
||
}
|
||
|
||
message StationLine {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
bool hasTransfer = 3; // 是否有换乘图标
|
||
bool hideName = 4;
|
||
}
|
||
|
||
message TrainWindow {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
repeated string refDeviceId = 3; //关联的逻辑区段的id或由道岔区段生成所关联的道岔id
|
||
}
|
||
|
||
message AxleCounting {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
KilometerSystem kilometerSystem = 3; //公里标
|
||
repeated RelatedRef axleCountingRef = 4; // 关联的设备
|
||
}
|
||
|
||
message Train {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
}
|
||
|
||
message TrainLine {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
}
|
||
|
||
message IscsFan {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
}
|
||
|
||
message Turnout {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
repeated Point pointA = 6; // A端坐标列表
|
||
repeated Point pointB = 7; // B端坐标列表
|
||
repeated Point pointC = 8; // C端坐标列表
|
||
RelatedRef paRef = 9; // 道岔A端关联的设备
|
||
RelatedRef pbRef = 10; // 道岔B端关联的设备
|
||
RelatedRef pcRef = 11; // 道岔C端关联的设备
|
||
// KilometerSystem kilometerSystem = 12; // 道岔公里标
|
||
repeated KilometerSystem kilometerSystem = 13; // 道岔公里标
|
||
}
|
||
|
||
message KilometerSystem {
|
||
int64 kilometer = 1;
|
||
string coordinateSystem = 2;
|
||
}
|
||
|
||
message Signal {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
bool mirror = 3;
|
||
// int64 kilometer = 4;
|
||
// string coordinateSystem = 5;
|
||
KilometerSystem kilometerSystem = 6;
|
||
}
|
||
|
||
message RunLine {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
repeated Point points = 3;
|
||
string nameColor = 4;
|
||
string nameBgColor = 5;
|
||
// string upPathLineId = 6;
|
||
// string downPathLineId = 7;
|
||
repeated string containSta = 8;
|
||
repeated string linkPathLines = 9;
|
||
string lineId = 10;
|
||
repeated int32 dashPointIndexs = 11; // 虚线段点序号
|
||
}
|
||
|
||
/** 物理区段 */
|
||
message Section {
|
||
enum SectionType {
|
||
Physical = 0; //物理区段
|
||
TurnoutPhysical = 2; //道岔物理区段
|
||
}
|
||
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
repeated Point points = 3;
|
||
RelatedRef paRef = 4; // 区段A端关联的物理区段或道岔(非岔区)
|
||
RelatedRef pbRef = 5; // 区段B端关联的物理区段或道岔(非岔区)
|
||
SectionType sectionType = 6; // 区段类型
|
||
repeated string axleCountings = 7; // 关联的计轴(岔区&&非岔区)
|
||
repeated string children = 8; // 下属逻辑区段id(非岔区)/下属道岔id(岔区)
|
||
string destinationCode = 9; // 目的地码
|
||
}
|
||
|
||
/** 逻辑区段 */
|
||
message LogicSection {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
repeated Point points = 3;
|
||
}
|
||
|
||
message KilometerPoint {
|
||
Point point = 1;
|
||
int64 kilometer = 2;
|
||
string stName = 3;
|
||
}
|
||
|
||
message PathLine {
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
repeated Point points = 3;
|
||
bool isUp = 4; // 是否上行
|
||
repeated KilometerPoint kilometerPoints = 5; // 车站对应的公里标以及坐标点
|
||
bool isKmIncrease = 6; // 运行方向是否公里标递增
|
||
}
|
||
|
||
//关联设备
|
||
message RelatedRef {
|
||
enum DeviceType {
|
||
Section = 0;
|
||
Turnout = 1;
|
||
TrainWindow = 2;
|
||
AxleCounting = 3;
|
||
}
|
||
|
||
enum DevicePort {
|
||
A = 0;
|
||
B = 1;
|
||
C = 2;
|
||
}
|
||
|
||
DeviceType deviceType = 1; //关联的设备类型
|
||
string id = 2; //关联的设备ID
|
||
DevicePort devicePort = 3; //关联的设备端口
|
||
}
|
||
|
||
message Separator { // 分隔符
|
||
CommonInfo common = 1;
|
||
string code = 2;
|
||
string separatorType = 3;
|
||
}
|