This commit is contained in:
xzb 2023-08-28 13:51:28 +08:00
commit 31c7f00175

View File

@ -5,74 +5,70 @@ package model;
option go_package = "./model/proto";
message Repository {
repeated Turnout turnouts = 1;
repeated Signal Signals = 2;
repeated Section sections = 3;
repeated AxleCounter axleCounters = 4;
repeated Responder responders = 5;
repeated Slope slopes = 6;
repeated Curve curves = 7;
string id = 1;
string version = 2;
repeated PhysicalSection physicalSections = 3;
repeated CheckPoint checkPoints = 4;
repeated Turnout turnouts = 5;
repeated Signal signals = 6;
repeated Responder responders = 7;
repeated Slope slopes = 8;
repeated Curve curves = 9;
}
message Turnout {
Id id = 1;
//
message PhysicalSection {
string id = 1;
}
//
message CheckPoint{
string id = 1;
Kilometer kilometer = 2;
Id axleCounterA = 3; //A端关联的计轴
Id axleCounterB = 4;
Id axleCounterC = 5;
repeated DevicePort relDevicePorts = 3; //
}
//
message Responder {
string id = 1;
Kilometer kilometer = 2;
}
//
message Turnout {
string id = 1;
Kilometer kilometer = 2;
}
//
message Signal {
Id id = 1;
string id = 1;
Kilometer kilometer = 2;
DevicePort relDevice = 3; //
}
message Section {
Id id = 1;
Id axleCounterA = 2; //A端关联的计轴
Id axleCounterB = 3; //B端关联的计轴
Id turnout = 4; //
}
message AxleCounter{
Id id = 1;
Kilometer kilometer = 2;
bool virtual = 3; //
}
message Responder {
Id id = 1;
Kilometer kilometer = 2;
}
//
message Slope {
Id id = 1;
repeated Point points = 2;
string id = 1;
repeated Kilometer kms = 2;
int32 degree = 3; //sin * 1000
}
//线
message Curve {
Id id = 1;
repeated Point points = 2;
int32 radius = 3; // mm
string id = 1;
repeated Kilometer kms = 2;
int32 radius = 3; // mm
}
//
message DevicePort {
Id deviceId = 1;
string deviceId = 1;
Port port = 2;
}
message Id {
string lineId = 1;
string stationId = 2;
string index = 3;
}
enum Port {
UNKNOWN = 0;
None = 0; ///
A = 1;
B = 2;
C = 3;
@ -80,18 +76,28 @@ enum Port {
//
message Kilometer {
int64 kilometer = 1; //mm
int64 value = 1; //mm
string coordinateSystem = 2; //
Direction direction = 3; //
}
//
message KilometerConvert {
Kilometer kilometerA = 1;
Kilometer kilometerB = 2;
bool sameTrend = 3; //
}
//
enum Direction {
LEFT = 0;
RIGHT = 1;
}
//
message Point {
repeated Kilometer kilometers = 1;
//
enum CheckPointType{
CheckPointType_Unknown = 0;
AxleCounter = 1; //
InsulatedJoint = 2; //
VirtualAxle = 3; //
}