Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtsts-server-go
This commit is contained in:
commit
d4915b2588
338
docs/docs.go
338
docs/docs.go
@ -4061,7 +4061,7 @@ const docTemplate = `{
|
|||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.SignalOperationReqDto"
|
"$ref": "#/definitions/request_proto.SignalOperationReq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -4113,7 +4113,7 @@ const docTemplate = `{
|
|||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/request_proto.TurnoutOperationReq"
|
"$ref": "#/definitions/request_proto.PointsOperationReq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -4616,16 +4616,6 @@ const docTemplate = `{
|
|||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "max_diameter",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "min_diameter",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"name": "name",
|
"name": "name",
|
||||||
@ -4643,6 +4633,7 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"description": "MinDiameter int32 ` + "`" + `json:\"min_diameter\" form:\"min_diameter\"` + "`" + `\nMaxDiameter int32 ` + "`" + `json:\"max_diameter\" form:\"max_diameter\"` + "`" + `",
|
||||||
"name": "train_sets",
|
"name": "train_sets",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
@ -5202,18 +5193,6 @@ const docTemplate = `{
|
|||||||
"dto.ConfigTrainData": {
|
"dto.ConfigTrainData": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"baseResistanceParamA": {
|
|
||||||
"description": "Mass int32 ` + "`" + `json:\"mass\" form:\"mass\"` + "`" + ` // 列车的质量(100=1ton)",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"baseResistanceParamB": {
|
|
||||||
"description": "基本阻力参数B",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"baseResistanceParamC": {
|
|
||||||
"description": "基本阻力参数C",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"curveResistanceParamR1": {
|
"curveResistanceParamR1": {
|
||||||
"description": "曲线阻力参数R1",
|
"description": "曲线阻力参数R1",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
@ -5230,6 +5209,22 @@ const docTemplate = `{
|
|||||||
"description": "曲线阻力参数R4",
|
"description": "曲线阻力参数R4",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
"davisParamA": {
|
||||||
|
"description": "Mass int32 ` + "`" + `json:\"mass\" form:\"mass\"` + "`" + ` // 列车的质量(100=1ton)",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"davisParamB": {
|
||||||
|
"description": "基本阻力参数B",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"davisParamC": {
|
||||||
|
"description": "基本阻力参数C",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"idling": {
|
||||||
|
"description": "空转",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"jump": {
|
"jump": {
|
||||||
"description": "是否跳跃",
|
"description": "是否跳跃",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@ -5255,7 +5250,7 @@ const docTemplate = `{
|
|||||||
"dto.ConfigTrainEnds": {
|
"dto.ConfigTrainEnds": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"radarCheckSpeed": {
|
"radarCheckSpeedDiff": {
|
||||||
"description": "雷达测速数值",
|
"description": "雷达测速数值",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
@ -5675,43 +5670,6 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.SignalOperationReqDto": {
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"aspect",
|
|
||||||
"id",
|
|
||||||
"mapId",
|
|
||||||
"operation",
|
|
||||||
"simulationId"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"aspect": {
|
|
||||||
"description": "当操作为Operation.Display时有效,表示显示的信号",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/state_proto.Signal_Aspect"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"mapId": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"operation": {
|
|
||||||
"description": "信号机操作类型",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/request_proto.Signal_Operation"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"simulationId": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dto.SimulationCreateReqDto": {
|
"dto.SimulationCreateReqDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -5807,12 +5765,6 @@ const docTemplate = `{
|
|||||||
"id": {
|
"id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"max_diameter": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"min_diameter": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -5826,6 +5778,7 @@ const docTemplate = `{
|
|||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"train_sets": {
|
"train_sets": {
|
||||||
|
"description": "MinDiameter int32 ` + "`" + `json:\"min_diameter\" form:\"min_diameter\"` + "`" + `\nMaxDiameter int32 ` + "`" + `json:\"max_diameter\" form:\"max_diameter\"` + "`" + `",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6029,6 +5982,88 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"request_proto.PointsOperationReq": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deviceId": {
|
||||||
|
"description": "设备id",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"mapId": {
|
||||||
|
"description": "图id",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"operation": {
|
||||||
|
"description": "道岔操作",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.Points_Operation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"param": {
|
||||||
|
"description": "道岔参数,当operation为SetParams时有效",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.PointsParam"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"simulationId": {
|
||||||
|
"description": "仿真id",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"request_proto.PointsParam": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"forcePosition": {
|
||||||
|
"description": "道岔强制",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.Points_Force"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"request_proto.Points_Force": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Points_FP_DW": "定位",
|
||||||
|
"Points_FP_FW": "反位",
|
||||||
|
"Points_FP_NONE": "无强制",
|
||||||
|
"Points_FP_SB": "失表"
|
||||||
|
},
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"Points_FP_NONE",
|
||||||
|
"Points_FP_DW",
|
||||||
|
"Points_FP_FW",
|
||||||
|
"Points_FP_SB"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request_proto.Points_Operation": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Points_SetParams": "设置参数",
|
||||||
|
"Points_Undefined": "未定义"
|
||||||
|
},
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"Points_Undefined",
|
||||||
|
"Points_SetParams"
|
||||||
|
]
|
||||||
|
},
|
||||||
"request_proto.PsdOperationReq": {
|
"request_proto.PsdOperationReq": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -6148,52 +6183,7 @@ const docTemplate = `{
|
|||||||
"Section_CancelFaultOcc"
|
"Section_CancelFaultOcc"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"request_proto.Signal_Operation": {
|
"request_proto.SignalOperationReq": {
|
||||||
"type": "integer",
|
|
||||||
"enum": [
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11
|
|
||||||
],
|
|
||||||
"x-enum-comments": {
|
|
||||||
"Signal_Display": "显示操作,如设置绿色、设置红黄色",
|
|
||||||
"Signal_LightACancelDs": "取消蓝灯断丝故障",
|
|
||||||
"Signal_LightAFaultDs": "设置蓝灯断丝故障",
|
|
||||||
"Signal_LightBCancelDs": "取消白灯断丝故障",
|
|
||||||
"Signal_LightBFaultDs": "设置白灯断丝故障",
|
|
||||||
"Signal_LightHCancelDs": "取消红灯断丝故障",
|
|
||||||
"Signal_LightHFaultDs": "设置红灯断丝故障",
|
|
||||||
"Signal_LightLCancelDs": "取消绿灯断丝故障",
|
|
||||||
"Signal_LightLFaultDs": "设置绿灯断丝故障",
|
|
||||||
"Signal_LightUCancelDs": "取消黄灯断丝故障",
|
|
||||||
"Signal_LightUFaultDs": "设置黄灯断丝故障",
|
|
||||||
"Signal_Undefined": "未定义"
|
|
||||||
},
|
|
||||||
"x-enum-varnames": [
|
|
||||||
"Signal_Undefined",
|
|
||||||
"Signal_Display",
|
|
||||||
"Signal_LightHFaultDs",
|
|
||||||
"Signal_LightUFaultDs",
|
|
||||||
"Signal_LightLFaultDs",
|
|
||||||
"Signal_LightAFaultDs",
|
|
||||||
"Signal_LightBFaultDs",
|
|
||||||
"Signal_LightHCancelDs",
|
|
||||||
"Signal_LightUCancelDs",
|
|
||||||
"Signal_LightLCancelDs",
|
|
||||||
"Signal_LightACancelDs",
|
|
||||||
"Signal_LightBCancelDs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"request_proto.TurnoutOperationReq": {
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"deviceId": {
|
"deviceId": {
|
||||||
@ -6205,10 +6195,18 @@ const docTemplate = `{
|
|||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"operation": {
|
"operation": {
|
||||||
"description": "道岔操作",
|
"description": "信号机操作",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/request_proto.Turnout_Operation"
|
"$ref": "#/definitions/request_proto.Signal_Operation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"param": {
|
||||||
|
"description": "信号机参数,当operation为SetParams时有效",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.SignalParam"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -6218,52 +6216,51 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"request_proto.Turnout_Operation": {
|
"request_proto.SignalParam": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"dsList": {
|
||||||
|
"description": "信号机断丝",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/request_proto.Signal_DS"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"force": {
|
||||||
|
"description": "信号机强制",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.Signal_Force"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"request_proto.Signal_DS": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"enum": [
|
"enum": [
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
3,
|
3,
|
||||||
4,
|
4
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11
|
|
||||||
],
|
],
|
||||||
"x-enum-comments": {
|
"x-enum-comments": {
|
||||||
"Turnout_CancelDC": "取消定操",
|
"Signal_DS_A": "蓝灯断丝",
|
||||||
"Turnout_CancelFC": "取消反操",
|
"Signal_DS_B": "白灯断丝",
|
||||||
"Turnout_CancelForce": "取消强制",
|
"Signal_DS_H": "红灯断丝",
|
||||||
"Turnout_CancelJC": "取消挤岔故障",
|
"Signal_DS_L": "绿灯断丝",
|
||||||
"Turnout_CancelSB": "取消失表故障",
|
"Signal_DS_U": "黄灯断丝"
|
||||||
"Turnout_DC": "定操",
|
|
||||||
"Turnout_FC": "反操",
|
|
||||||
"Turnout_ForceDw": "强制定位",
|
|
||||||
"Turnout_ForceFw": "强制反位",
|
|
||||||
"Turnout_SetJC": "设置挤岔故障",
|
|
||||||
"Turnout_SetSB": "设置失表故障",
|
|
||||||
"Turnout_Undefined": "未定义"
|
|
||||||
},
|
},
|
||||||
"x-enum-varnames": [
|
"x-enum-varnames": [
|
||||||
"Turnout_Undefined",
|
"Signal_DS_H",
|
||||||
"Turnout_DC",
|
"Signal_DS_U",
|
||||||
"Turnout_CancelDC",
|
"Signal_DS_L",
|
||||||
"Turnout_FC",
|
"Signal_DS_A",
|
||||||
"Turnout_CancelFC",
|
"Signal_DS_B"
|
||||||
"Turnout_SetSB",
|
|
||||||
"Turnout_CancelSB",
|
|
||||||
"Turnout_SetJC",
|
|
||||||
"Turnout_CancelJC",
|
|
||||||
"Turnout_ForceDw",
|
|
||||||
"Turnout_ForceFw",
|
|
||||||
"Turnout_CancelForce"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"state_proto.Signal_Aspect": {
|
"request_proto.Signal_Force": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"enum": [
|
"enum": [
|
||||||
0,
|
0,
|
||||||
@ -6275,15 +6272,40 @@ const docTemplate = `{
|
|||||||
6,
|
6,
|
||||||
7
|
7
|
||||||
],
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Signal_SF_A": "蓝灯",
|
||||||
|
"Signal_SF_B": "白灯",
|
||||||
|
"Signal_SF_H": "红灯",
|
||||||
|
"Signal_SF_HU": "红黄灯",
|
||||||
|
"Signal_SF_L": "绿灯",
|
||||||
|
"Signal_SF_M": "灭灯",
|
||||||
|
"Signal_SF_NONE": "无强制",
|
||||||
|
"Signal_SF_U": "黄灯"
|
||||||
|
},
|
||||||
"x-enum-varnames": [
|
"x-enum-varnames": [
|
||||||
"Signal_Non",
|
"Signal_SF_NONE",
|
||||||
"Signal_OFF",
|
"Signal_SF_M",
|
||||||
"Signal_L",
|
"Signal_SF_H",
|
||||||
"Signal_H",
|
"Signal_SF_U",
|
||||||
"Signal_U",
|
"Signal_SF_L",
|
||||||
"Signal_HU",
|
"Signal_SF_HU",
|
||||||
"Signal_B",
|
"Signal_SF_A",
|
||||||
"Signal_A"
|
"Signal_SF_B"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request_proto.Signal_Operation": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Signal_SetParams": "设置参数",
|
||||||
|
"Signal_Undefined": "未定义"
|
||||||
|
},
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"Signal_Undefined",
|
||||||
|
"Signal_SetParams"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -4055,7 +4055,7 @@
|
|||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/dto.SignalOperationReqDto"
|
"$ref": "#/definitions/request_proto.SignalOperationReq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -4107,7 +4107,7 @@
|
|||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/request_proto.TurnoutOperationReq"
|
"$ref": "#/definitions/request_proto.PointsOperationReq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -4610,16 +4610,6 @@
|
|||||||
"name": "id",
|
"name": "id",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "max_diameter",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "integer",
|
|
||||||
"name": "min_diameter",
|
|
||||||
"in": "query"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"name": "name",
|
"name": "name",
|
||||||
@ -4637,6 +4627,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"description": "MinDiameter int32 `json:\"min_diameter\" form:\"min_diameter\"`\nMaxDiameter int32 `json:\"max_diameter\" form:\"max_diameter\"`",
|
||||||
"name": "train_sets",
|
"name": "train_sets",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
}
|
}
|
||||||
@ -5196,18 +5187,6 @@
|
|||||||
"dto.ConfigTrainData": {
|
"dto.ConfigTrainData": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"baseResistanceParamA": {
|
|
||||||
"description": "Mass int32 `json:\"mass\" form:\"mass\"` // 列车的质量(100=1ton)",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"baseResistanceParamB": {
|
|
||||||
"description": "基本阻力参数B",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"baseResistanceParamC": {
|
|
||||||
"description": "基本阻力参数C",
|
|
||||||
"type": "number"
|
|
||||||
},
|
|
||||||
"curveResistanceParamR1": {
|
"curveResistanceParamR1": {
|
||||||
"description": "曲线阻力参数R1",
|
"description": "曲线阻力参数R1",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
@ -5224,6 +5203,22 @@
|
|||||||
"description": "曲线阻力参数R4",
|
"description": "曲线阻力参数R4",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
|
"davisParamA": {
|
||||||
|
"description": "Mass int32 `json:\"mass\" form:\"mass\"` // 列车的质量(100=1ton)",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"davisParamB": {
|
||||||
|
"description": "基本阻力参数B",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"davisParamC": {
|
||||||
|
"description": "基本阻力参数C",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"idling": {
|
||||||
|
"description": "空转",
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"jump": {
|
"jump": {
|
||||||
"description": "是否跳跃",
|
"description": "是否跳跃",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
@ -5249,7 +5244,7 @@
|
|||||||
"dto.ConfigTrainEnds": {
|
"dto.ConfigTrainEnds": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"radarCheckSpeed": {
|
"radarCheckSpeedDiff": {
|
||||||
"description": "雷达测速数值",
|
"description": "雷达测速数值",
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
@ -5669,43 +5664,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dto.SignalOperationReqDto": {
|
|
||||||
"type": "object",
|
|
||||||
"required": [
|
|
||||||
"aspect",
|
|
||||||
"id",
|
|
||||||
"mapId",
|
|
||||||
"operation",
|
|
||||||
"simulationId"
|
|
||||||
],
|
|
||||||
"properties": {
|
|
||||||
"aspect": {
|
|
||||||
"description": "当操作为Operation.Display时有效,表示显示的信号",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/state_proto.Signal_Aspect"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"id": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"mapId": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"operation": {
|
|
||||||
"description": "信号机操作类型",
|
|
||||||
"allOf": [
|
|
||||||
{
|
|
||||||
"$ref": "#/definitions/request_proto.Signal_Operation"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"simulationId": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dto.SimulationCreateReqDto": {
|
"dto.SimulationCreateReqDto": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -5801,12 +5759,6 @@
|
|||||||
"id": {
|
"id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"max_diameter": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"min_diameter": {
|
|
||||||
"type": "integer"
|
|
||||||
},
|
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@ -5820,6 +5772,7 @@
|
|||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"train_sets": {
|
"train_sets": {
|
||||||
|
"description": "MinDiameter int32 `json:\"min_diameter\" form:\"min_diameter\"`\nMaxDiameter int32 `json:\"max_diameter\" form:\"max_diameter\"`",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6023,6 +5976,88 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"request_proto.PointsOperationReq": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"deviceId": {
|
||||||
|
"description": "设备id",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"mapId": {
|
||||||
|
"description": "图id",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"operation": {
|
||||||
|
"description": "道岔操作",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.Points_Operation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"param": {
|
||||||
|
"description": "道岔参数,当operation为SetParams时有效",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.PointsParam"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"simulationId": {
|
||||||
|
"description": "仿真id",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"request_proto.PointsParam": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"forcePosition": {
|
||||||
|
"description": "道岔强制",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.Points_Force"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"request_proto.Points_Force": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Points_FP_DW": "定位",
|
||||||
|
"Points_FP_FW": "反位",
|
||||||
|
"Points_FP_NONE": "无强制",
|
||||||
|
"Points_FP_SB": "失表"
|
||||||
|
},
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"Points_FP_NONE",
|
||||||
|
"Points_FP_DW",
|
||||||
|
"Points_FP_FW",
|
||||||
|
"Points_FP_SB"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request_proto.Points_Operation": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Points_SetParams": "设置参数",
|
||||||
|
"Points_Undefined": "未定义"
|
||||||
|
},
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"Points_Undefined",
|
||||||
|
"Points_SetParams"
|
||||||
|
]
|
||||||
|
},
|
||||||
"request_proto.PsdOperationReq": {
|
"request_proto.PsdOperationReq": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -6142,52 +6177,7 @@
|
|||||||
"Section_CancelFaultOcc"
|
"Section_CancelFaultOcc"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"request_proto.Signal_Operation": {
|
"request_proto.SignalOperationReq": {
|
||||||
"type": "integer",
|
|
||||||
"enum": [
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11
|
|
||||||
],
|
|
||||||
"x-enum-comments": {
|
|
||||||
"Signal_Display": "显示操作,如设置绿色、设置红黄色",
|
|
||||||
"Signal_LightACancelDs": "取消蓝灯断丝故障",
|
|
||||||
"Signal_LightAFaultDs": "设置蓝灯断丝故障",
|
|
||||||
"Signal_LightBCancelDs": "取消白灯断丝故障",
|
|
||||||
"Signal_LightBFaultDs": "设置白灯断丝故障",
|
|
||||||
"Signal_LightHCancelDs": "取消红灯断丝故障",
|
|
||||||
"Signal_LightHFaultDs": "设置红灯断丝故障",
|
|
||||||
"Signal_LightLCancelDs": "取消绿灯断丝故障",
|
|
||||||
"Signal_LightLFaultDs": "设置绿灯断丝故障",
|
|
||||||
"Signal_LightUCancelDs": "取消黄灯断丝故障",
|
|
||||||
"Signal_LightUFaultDs": "设置黄灯断丝故障",
|
|
||||||
"Signal_Undefined": "未定义"
|
|
||||||
},
|
|
||||||
"x-enum-varnames": [
|
|
||||||
"Signal_Undefined",
|
|
||||||
"Signal_Display",
|
|
||||||
"Signal_LightHFaultDs",
|
|
||||||
"Signal_LightUFaultDs",
|
|
||||||
"Signal_LightLFaultDs",
|
|
||||||
"Signal_LightAFaultDs",
|
|
||||||
"Signal_LightBFaultDs",
|
|
||||||
"Signal_LightHCancelDs",
|
|
||||||
"Signal_LightUCancelDs",
|
|
||||||
"Signal_LightLCancelDs",
|
|
||||||
"Signal_LightACancelDs",
|
|
||||||
"Signal_LightBCancelDs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"request_proto.TurnoutOperationReq": {
|
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"deviceId": {
|
"deviceId": {
|
||||||
@ -6199,10 +6189,18 @@
|
|||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
"operation": {
|
"operation": {
|
||||||
"description": "道岔操作",
|
"description": "信号机操作",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/definitions/request_proto.Turnout_Operation"
|
"$ref": "#/definitions/request_proto.Signal_Operation"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"param": {
|
||||||
|
"description": "信号机参数,当operation为SetParams时有效",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.SignalParam"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -6212,52 +6210,51 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"request_proto.Turnout_Operation": {
|
"request_proto.SignalParam": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"dsList": {
|
||||||
|
"description": "信号机断丝",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/request_proto.Signal_DS"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"force": {
|
||||||
|
"description": "信号机强制",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/definitions/request_proto.Signal_Force"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"request_proto.Signal_DS": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"enum": [
|
"enum": [
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
2,
|
2,
|
||||||
3,
|
3,
|
||||||
4,
|
4
|
||||||
5,
|
|
||||||
6,
|
|
||||||
7,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11
|
|
||||||
],
|
],
|
||||||
"x-enum-comments": {
|
"x-enum-comments": {
|
||||||
"Turnout_CancelDC": "取消定操",
|
"Signal_DS_A": "蓝灯断丝",
|
||||||
"Turnout_CancelFC": "取消反操",
|
"Signal_DS_B": "白灯断丝",
|
||||||
"Turnout_CancelForce": "取消强制",
|
"Signal_DS_H": "红灯断丝",
|
||||||
"Turnout_CancelJC": "取消挤岔故障",
|
"Signal_DS_L": "绿灯断丝",
|
||||||
"Turnout_CancelSB": "取消失表故障",
|
"Signal_DS_U": "黄灯断丝"
|
||||||
"Turnout_DC": "定操",
|
|
||||||
"Turnout_FC": "反操",
|
|
||||||
"Turnout_ForceDw": "强制定位",
|
|
||||||
"Turnout_ForceFw": "强制反位",
|
|
||||||
"Turnout_SetJC": "设置挤岔故障",
|
|
||||||
"Turnout_SetSB": "设置失表故障",
|
|
||||||
"Turnout_Undefined": "未定义"
|
|
||||||
},
|
},
|
||||||
"x-enum-varnames": [
|
"x-enum-varnames": [
|
||||||
"Turnout_Undefined",
|
"Signal_DS_H",
|
||||||
"Turnout_DC",
|
"Signal_DS_U",
|
||||||
"Turnout_CancelDC",
|
"Signal_DS_L",
|
||||||
"Turnout_FC",
|
"Signal_DS_A",
|
||||||
"Turnout_CancelFC",
|
"Signal_DS_B"
|
||||||
"Turnout_SetSB",
|
|
||||||
"Turnout_CancelSB",
|
|
||||||
"Turnout_SetJC",
|
|
||||||
"Turnout_CancelJC",
|
|
||||||
"Turnout_ForceDw",
|
|
||||||
"Turnout_ForceFw",
|
|
||||||
"Turnout_CancelForce"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"state_proto.Signal_Aspect": {
|
"request_proto.Signal_Force": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"enum": [
|
"enum": [
|
||||||
0,
|
0,
|
||||||
@ -6269,15 +6266,40 @@
|
|||||||
6,
|
6,
|
||||||
7
|
7
|
||||||
],
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Signal_SF_A": "蓝灯",
|
||||||
|
"Signal_SF_B": "白灯",
|
||||||
|
"Signal_SF_H": "红灯",
|
||||||
|
"Signal_SF_HU": "红黄灯",
|
||||||
|
"Signal_SF_L": "绿灯",
|
||||||
|
"Signal_SF_M": "灭灯",
|
||||||
|
"Signal_SF_NONE": "无强制",
|
||||||
|
"Signal_SF_U": "黄灯"
|
||||||
|
},
|
||||||
"x-enum-varnames": [
|
"x-enum-varnames": [
|
||||||
"Signal_Non",
|
"Signal_SF_NONE",
|
||||||
"Signal_OFF",
|
"Signal_SF_M",
|
||||||
"Signal_L",
|
"Signal_SF_H",
|
||||||
"Signal_H",
|
"Signal_SF_U",
|
||||||
"Signal_U",
|
"Signal_SF_L",
|
||||||
"Signal_HU",
|
"Signal_SF_HU",
|
||||||
"Signal_B",
|
"Signal_SF_A",
|
||||||
"Signal_A"
|
"Signal_SF_B"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"request_proto.Signal_Operation": {
|
||||||
|
"type": "integer",
|
||||||
|
"enum": [
|
||||||
|
0,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"x-enum-comments": {
|
||||||
|
"Signal_SetParams": "设置参数",
|
||||||
|
"Signal_Undefined": "未定义"
|
||||||
|
},
|
||||||
|
"x-enum-varnames": [
|
||||||
|
"Signal_Undefined",
|
||||||
|
"Signal_SetParams"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -191,16 +191,6 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
dto.ConfigTrainData:
|
dto.ConfigTrainData:
|
||||||
properties:
|
properties:
|
||||||
baseResistanceParamA:
|
|
||||||
description: Mass int32 `json:"mass" form:"mass"` //
|
|
||||||
列车的质量(100=1ton)
|
|
||||||
type: number
|
|
||||||
baseResistanceParamB:
|
|
||||||
description: 基本阻力参数B
|
|
||||||
type: number
|
|
||||||
baseResistanceParamC:
|
|
||||||
description: 基本阻力参数C
|
|
||||||
type: number
|
|
||||||
curveResistanceParamR1:
|
curveResistanceParamR1:
|
||||||
description: 曲线阻力参数R1
|
description: 曲线阻力参数R1
|
||||||
type: number
|
type: number
|
||||||
@ -213,6 +203,19 @@ definitions:
|
|||||||
curveResistanceParamR4:
|
curveResistanceParamR4:
|
||||||
description: 曲线阻力参数R4
|
description: 曲线阻力参数R4
|
||||||
type: number
|
type: number
|
||||||
|
davisParamA:
|
||||||
|
description: Mass int32 `json:"mass" form:"mass"` //
|
||||||
|
列车的质量(100=1ton)
|
||||||
|
type: number
|
||||||
|
davisParamB:
|
||||||
|
description: 基本阻力参数B
|
||||||
|
type: number
|
||||||
|
davisParamC:
|
||||||
|
description: 基本阻力参数C
|
||||||
|
type: number
|
||||||
|
idling:
|
||||||
|
description: 空转
|
||||||
|
type: number
|
||||||
jump:
|
jump:
|
||||||
description: 是否跳跃
|
description: 是否跳跃
|
||||||
type: boolean
|
type: boolean
|
||||||
@ -231,7 +234,7 @@ definitions:
|
|||||||
type: object
|
type: object
|
||||||
dto.ConfigTrainEnds:
|
dto.ConfigTrainEnds:
|
||||||
properties:
|
properties:
|
||||||
radarCheckSpeed:
|
radarCheckSpeedDiff:
|
||||||
description: 雷达测速数值
|
description: 雷达测速数值
|
||||||
type: number
|
type: number
|
||||||
radarCheckTime:
|
radarCheckTime:
|
||||||
@ -515,29 +518,6 @@ definitions:
|
|||||||
description: 新添加的列车的索引
|
description: 新添加的列车的索引
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
dto.SignalOperationReqDto:
|
|
||||||
properties:
|
|
||||||
aspect:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/definitions/state_proto.Signal_Aspect'
|
|
||||||
description: 当操作为Operation.Display时有效,表示显示的信号
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
mapId:
|
|
||||||
type: integer
|
|
||||||
operation:
|
|
||||||
allOf:
|
|
||||||
- $ref: '#/definitions/request_proto.Signal_Operation'
|
|
||||||
description: 信号机操作类型
|
|
||||||
simulationId:
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- aspect
|
|
||||||
- id
|
|
||||||
- mapId
|
|
||||||
- operation
|
|
||||||
- simulationId
|
|
||||||
type: object
|
|
||||||
dto.SimulationCreateReqDto:
|
dto.SimulationCreateReqDto:
|
||||||
properties:
|
properties:
|
||||||
mapId:
|
mapId:
|
||||||
@ -603,10 +583,6 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
max_diameter:
|
|
||||||
type: integer
|
|
||||||
min_diameter:
|
|
||||||
type: integer
|
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
total_length:
|
total_length:
|
||||||
@ -614,6 +590,9 @@ definitions:
|
|||||||
train_model:
|
train_model:
|
||||||
type: integer
|
type: integer
|
||||||
train_sets:
|
train_sets:
|
||||||
|
description: |-
|
||||||
|
MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
||||||
|
MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
||||||
type: string
|
type: string
|
||||||
trainConfigData:
|
trainConfigData:
|
||||||
$ref: '#/definitions/dto.ConfigTrainData'
|
$ref: '#/definitions/dto.ConfigTrainData'
|
||||||
@ -761,6 +740,61 @@ definitions:
|
|||||||
description: 数据类型
|
description: 数据类型
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
|
request_proto.Points_Force:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
type: integer
|
||||||
|
x-enum-comments:
|
||||||
|
Points_FP_DW: 定位
|
||||||
|
Points_FP_FW: 反位
|
||||||
|
Points_FP_NONE: 无强制
|
||||||
|
Points_FP_SB: 失表
|
||||||
|
x-enum-varnames:
|
||||||
|
- Points_FP_NONE
|
||||||
|
- Points_FP_DW
|
||||||
|
- Points_FP_FW
|
||||||
|
- Points_FP_SB
|
||||||
|
request_proto.Points_Operation:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
type: integer
|
||||||
|
x-enum-comments:
|
||||||
|
Points_SetParams: 设置参数
|
||||||
|
Points_Undefined: 未定义
|
||||||
|
x-enum-varnames:
|
||||||
|
- Points_Undefined
|
||||||
|
- Points_SetParams
|
||||||
|
request_proto.PointsOperationReq:
|
||||||
|
properties:
|
||||||
|
deviceId:
|
||||||
|
description: 设备id
|
||||||
|
type: integer
|
||||||
|
mapId:
|
||||||
|
description: 图id
|
||||||
|
type: integer
|
||||||
|
operation:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/request_proto.Points_Operation'
|
||||||
|
description: 道岔操作
|
||||||
|
param:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/request_proto.PointsParam'
|
||||||
|
description: 道岔参数,当operation为SetParams时有效
|
||||||
|
simulationId:
|
||||||
|
description: 仿真id
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
request_proto.PointsParam:
|
||||||
|
properties:
|
||||||
|
forcePosition:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/request_proto.Points_Force'
|
||||||
|
description: 道岔强制
|
||||||
|
type: object
|
||||||
request_proto.Psd_Operation:
|
request_proto.Psd_Operation:
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
@ -860,89 +894,67 @@ definitions:
|
|||||||
- Section_CancelPdrst
|
- Section_CancelPdrst
|
||||||
- Section_SetFaultOcc
|
- Section_SetFaultOcc
|
||||||
- Section_CancelFaultOcc
|
- Section_CancelFaultOcc
|
||||||
|
request_proto.Signal_DS:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
type: integer
|
||||||
|
x-enum-comments:
|
||||||
|
Signal_DS_A: 蓝灯断丝
|
||||||
|
Signal_DS_B: 白灯断丝
|
||||||
|
Signal_DS_H: 红灯断丝
|
||||||
|
Signal_DS_L: 绿灯断丝
|
||||||
|
Signal_DS_U: 黄灯断丝
|
||||||
|
x-enum-varnames:
|
||||||
|
- Signal_DS_H
|
||||||
|
- Signal_DS_U
|
||||||
|
- Signal_DS_L
|
||||||
|
- Signal_DS_A
|
||||||
|
- Signal_DS_B
|
||||||
|
request_proto.Signal_Force:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
- 5
|
||||||
|
- 6
|
||||||
|
- 7
|
||||||
|
type: integer
|
||||||
|
x-enum-comments:
|
||||||
|
Signal_SF_A: 蓝灯
|
||||||
|
Signal_SF_B: 白灯
|
||||||
|
Signal_SF_H: 红灯
|
||||||
|
Signal_SF_HU: 红黄灯
|
||||||
|
Signal_SF_L: 绿灯
|
||||||
|
Signal_SF_M: 灭灯
|
||||||
|
Signal_SF_NONE: 无强制
|
||||||
|
Signal_SF_U: 黄灯
|
||||||
|
x-enum-varnames:
|
||||||
|
- Signal_SF_NONE
|
||||||
|
- Signal_SF_M
|
||||||
|
- Signal_SF_H
|
||||||
|
- Signal_SF_U
|
||||||
|
- Signal_SF_L
|
||||||
|
- Signal_SF_HU
|
||||||
|
- Signal_SF_A
|
||||||
|
- Signal_SF_B
|
||||||
request_proto.Signal_Operation:
|
request_proto.Signal_Operation:
|
||||||
enum:
|
enum:
|
||||||
- 0
|
- 0
|
||||||
- 1
|
- 1
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
- 4
|
|
||||||
- 5
|
|
||||||
- 6
|
|
||||||
- 7
|
|
||||||
- 8
|
|
||||||
- 9
|
|
||||||
- 10
|
|
||||||
- 11
|
|
||||||
type: integer
|
type: integer
|
||||||
x-enum-comments:
|
x-enum-comments:
|
||||||
Signal_Display: 显示操作,如设置绿色、设置红黄色
|
Signal_SetParams: 设置参数
|
||||||
Signal_LightACancelDs: 取消蓝灯断丝故障
|
|
||||||
Signal_LightAFaultDs: 设置蓝灯断丝故障
|
|
||||||
Signal_LightBCancelDs: 取消白灯断丝故障
|
|
||||||
Signal_LightBFaultDs: 设置白灯断丝故障
|
|
||||||
Signal_LightHCancelDs: 取消红灯断丝故障
|
|
||||||
Signal_LightHFaultDs: 设置红灯断丝故障
|
|
||||||
Signal_LightLCancelDs: 取消绿灯断丝故障
|
|
||||||
Signal_LightLFaultDs: 设置绿灯断丝故障
|
|
||||||
Signal_LightUCancelDs: 取消黄灯断丝故障
|
|
||||||
Signal_LightUFaultDs: 设置黄灯断丝故障
|
|
||||||
Signal_Undefined: 未定义
|
Signal_Undefined: 未定义
|
||||||
x-enum-varnames:
|
x-enum-varnames:
|
||||||
- Signal_Undefined
|
- Signal_Undefined
|
||||||
- Signal_Display
|
- Signal_SetParams
|
||||||
- Signal_LightHFaultDs
|
request_proto.SignalOperationReq:
|
||||||
- Signal_LightUFaultDs
|
|
||||||
- Signal_LightLFaultDs
|
|
||||||
- Signal_LightAFaultDs
|
|
||||||
- Signal_LightBFaultDs
|
|
||||||
- Signal_LightHCancelDs
|
|
||||||
- Signal_LightUCancelDs
|
|
||||||
- Signal_LightLCancelDs
|
|
||||||
- Signal_LightACancelDs
|
|
||||||
- Signal_LightBCancelDs
|
|
||||||
request_proto.Turnout_Operation:
|
|
||||||
enum:
|
|
||||||
- 0
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
- 4
|
|
||||||
- 5
|
|
||||||
- 6
|
|
||||||
- 7
|
|
||||||
- 8
|
|
||||||
- 9
|
|
||||||
- 10
|
|
||||||
- 11
|
|
||||||
type: integer
|
|
||||||
x-enum-comments:
|
|
||||||
Turnout_CancelDC: 取消定操
|
|
||||||
Turnout_CancelFC: 取消反操
|
|
||||||
Turnout_CancelForce: 取消强制
|
|
||||||
Turnout_CancelJC: 取消挤岔故障
|
|
||||||
Turnout_CancelSB: 取消失表故障
|
|
||||||
Turnout_DC: 定操
|
|
||||||
Turnout_FC: 反操
|
|
||||||
Turnout_ForceDw: 强制定位
|
|
||||||
Turnout_ForceFw: 强制反位
|
|
||||||
Turnout_SetJC: 设置挤岔故障
|
|
||||||
Turnout_SetSB: 设置失表故障
|
|
||||||
Turnout_Undefined: 未定义
|
|
||||||
x-enum-varnames:
|
|
||||||
- Turnout_Undefined
|
|
||||||
- Turnout_DC
|
|
||||||
- Turnout_CancelDC
|
|
||||||
- Turnout_FC
|
|
||||||
- Turnout_CancelFC
|
|
||||||
- Turnout_SetSB
|
|
||||||
- Turnout_CancelSB
|
|
||||||
- Turnout_SetJC
|
|
||||||
- Turnout_CancelJC
|
|
||||||
- Turnout_ForceDw
|
|
||||||
- Turnout_ForceFw
|
|
||||||
- Turnout_CancelForce
|
|
||||||
request_proto.TurnoutOperationReq:
|
|
||||||
properties:
|
properties:
|
||||||
deviceId:
|
deviceId:
|
||||||
description: 设备id
|
description: 设备id
|
||||||
@ -952,32 +964,28 @@ definitions:
|
|||||||
type: integer
|
type: integer
|
||||||
operation:
|
operation:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/definitions/request_proto.Turnout_Operation'
|
- $ref: '#/definitions/request_proto.Signal_Operation'
|
||||||
description: 道岔操作
|
description: 信号机操作
|
||||||
|
param:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/definitions/request_proto.SignalParam'
|
||||||
|
description: 信号机参数,当operation为SetParams时有效
|
||||||
simulationId:
|
simulationId:
|
||||||
description: 仿真id
|
description: 仿真id
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
state_proto.Signal_Aspect:
|
request_proto.SignalParam:
|
||||||
enum:
|
properties:
|
||||||
- 0
|
dsList:
|
||||||
- 1
|
description: 信号机断丝
|
||||||
- 2
|
items:
|
||||||
- 3
|
$ref: '#/definitions/request_proto.Signal_DS'
|
||||||
- 4
|
type: array
|
||||||
- 5
|
force:
|
||||||
- 6
|
allOf:
|
||||||
- 7
|
- $ref: '#/definitions/request_proto.Signal_Force'
|
||||||
type: integer
|
description: 信号机强制
|
||||||
x-enum-varnames:
|
type: object
|
||||||
- Signal_Non
|
|
||||||
- Signal_OFF
|
|
||||||
- Signal_L
|
|
||||||
- Signal_H
|
|
||||||
- Signal_U
|
|
||||||
- Signal_HU
|
|
||||||
- Signal_B
|
|
||||||
- Signal_A
|
|
||||||
host: localhost:9091
|
host: localhost:9091
|
||||||
info:
|
info:
|
||||||
contact: {}
|
contact: {}
|
||||||
@ -3553,7 +3561,7 @@ paths:
|
|||||||
name: SignalOperationReqDto
|
name: SignalOperationReqDto
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/dto.SignalOperationReqDto'
|
$ref: '#/definitions/request_proto.SignalOperationReq'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
@ -3586,7 +3594,7 @@ paths:
|
|||||||
name: TurnoutOperationReq
|
name: TurnoutOperationReq
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/request_proto.TurnoutOperationReq'
|
$ref: '#/definitions/request_proto.PointsOperationReq'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
@ -3855,12 +3863,6 @@ paths:
|
|||||||
- in: query
|
- in: query
|
||||||
name: id
|
name: id
|
||||||
type: integer
|
type: integer
|
||||||
- in: query
|
|
||||||
name: max_diameter
|
|
||||||
type: integer
|
|
||||||
- in: query
|
|
||||||
name: min_diameter
|
|
||||||
type: integer
|
|
||||||
- in: query
|
- in: query
|
||||||
name: name
|
name: name
|
||||||
type: string
|
type: string
|
||||||
@ -3870,7 +3872,10 @@ paths:
|
|||||||
- in: query
|
- in: query
|
||||||
name: train_model
|
name: train_model
|
||||||
type: integer
|
type: integer
|
||||||
- in: query
|
- description: |-
|
||||||
|
MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
||||||
|
MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
||||||
|
in: query
|
||||||
name: train_sets
|
name: train_sets
|
||||||
type: string
|
type: string
|
||||||
produces:
|
produces:
|
||||||
|
@ -95,7 +95,7 @@ type ConfigTrainEnds struct {
|
|||||||
SpeedSensorEnableA bool `json:"speedSensorEnableA"` // 2端速度传感器是否有效
|
SpeedSensorEnableA bool `json:"speedSensorEnableA"` // 2端速度传感器是否有效
|
||||||
SpeedSensorEnableB bool `json:"speedSensorEnableB"` // 2端速度传感器是否有效
|
SpeedSensorEnableB bool `json:"speedSensorEnableB"` // 2端速度传感器是否有效
|
||||||
RadarEnable bool `json:"radarEnable"` // 雷达是否有效
|
RadarEnable bool `json:"radarEnable"` // 雷达是否有效
|
||||||
RadarCheckSpeedDiff float32 `json:"radarCheckSpeed"` // 雷达测速数值
|
RadarCheckSpeedDiff float32 `json:"radarCheckSpeedDiff"` // 雷达测速数值
|
||||||
RadarCheckTime int32 `json:"radarCheckTime"` // 雷达检测时间(秒)
|
RadarCheckTime int32 `json:"radarCheckTime"` // 雷达检测时间(秒)
|
||||||
}
|
}
|
||||||
type ConfigTrainData struct {
|
type ConfigTrainData struct {
|
||||||
@ -237,7 +237,8 @@ type BaliseModifyTelegramReqDto struct {
|
|||||||
SimulationId string `json:"simulationId" form:"simulationId"` //仿真ID
|
SimulationId string `json:"simulationId" form:"simulationId"` //仿真ID
|
||||||
MapId int32 `json:"mapId" form:"mapId"` //地图ID
|
MapId int32 `json:"mapId" form:"mapId"` //地图ID
|
||||||
BaliseId uint32 `json:"baliseId" form:"baliseId"` //应答器ID
|
BaliseId uint32 `json:"baliseId" form:"baliseId"` //应答器ID
|
||||||
Telegram string `json:"telegram" from:"telegram"` //报文(16进制字符串)
|
FixedTelegram string `json:"fixedTelegram" from:"fixedTelegram"` //固定报文(16进制字符串)
|
||||||
|
FixedUserTelegram string `json:"fixedUserTelegram" from:"fixedUserTelegram"` //固定用户报文(16进制字符串)
|
||||||
}
|
}
|
||||||
|
|
||||||
// BaliseReqDto 应答器请求
|
// BaliseReqDto 应答器请求
|
||||||
|
4
go.mod
4
go.mod
@ -9,7 +9,6 @@ require (
|
|||||||
github.com/golang/protobuf v1.5.3
|
github.com/golang/protobuf v1.5.3
|
||||||
github.com/google/uuid v1.4.0
|
github.com/google/uuid v1.4.0
|
||||||
github.com/sagikazarmark/slog-shim v0.1.0
|
github.com/sagikazarmark/slog-shim v0.1.0
|
||||||
github.com/shopspring/decimal v1.3.1
|
|
||||||
github.com/spf13/viper v1.18.1
|
github.com/spf13/viper v1.18.1
|
||||||
github.com/stretchr/testify v1.8.4
|
github.com/stretchr/testify v1.8.4
|
||||||
github.com/swaggo/files v1.0.1
|
github.com/swaggo/files v1.0.1
|
||||||
@ -48,7 +47,6 @@ require (
|
|||||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||||
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
github.com/sagikazarmark/locafero v0.4.0 // indirect
|
||||||
github.com/simonvetter/modbus v1.6.0 // indirect
|
github.com/simonvetter/modbus v1.6.0 // indirect
|
||||||
github.com/snksoft/crc v1.1.0 // indirect
|
|
||||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||||
github.com/yohamta/donburi v1.3.9 // indirect
|
github.com/yohamta/donburi v1.3.9 // indirect
|
||||||
go.uber.org/atomic v1.9.0 // indirect
|
go.uber.org/atomic v1.9.0 // indirect
|
||||||
@ -97,7 +95,7 @@ require (
|
|||||||
golang.org/x/net v0.19.0 // indirect
|
golang.org/x/net v0.19.0 // indirect
|
||||||
golang.org/x/sys v0.15.0 // indirect
|
golang.org/x/sys v0.15.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.14.0 // indirect
|
||||||
google.golang.org/protobuf v1.31.0
|
google.golang.org/protobuf v1.32.0
|
||||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||||
)
|
)
|
||||||
|
8
go.sum
8
go.sum
@ -174,12 +174,8 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g
|
|||||||
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
|
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
|
||||||
github.com/samber/slog-gin v1.1.0 h1:dDvYEGJkJg0DxuNWo6m6gV5Bm+iSk85Ox9on7c7OjQU=
|
github.com/samber/slog-gin v1.1.0 h1:dDvYEGJkJg0DxuNWo6m6gV5Bm+iSk85Ox9on7c7OjQU=
|
||||||
github.com/samber/slog-gin v1.1.0/go.mod h1:vmMxOYIqDHbthu7SmiF/oOlMhpYukL62JB4Ct5etOvI=
|
github.com/samber/slog-gin v1.1.0/go.mod h1:vmMxOYIqDHbthu7SmiF/oOlMhpYukL62JB4Ct5etOvI=
|
||||||
github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
|
|
||||||
github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
|
||||||
github.com/simonvetter/modbus v1.6.0 h1:RDHJevtc7LDIVoHAbhDun8fy+QwnGe+ZU+sLm9ZZzjc=
|
github.com/simonvetter/modbus v1.6.0 h1:RDHJevtc7LDIVoHAbhDun8fy+QwnGe+ZU+sLm9ZZzjc=
|
||||||
github.com/simonvetter/modbus v1.6.0/go.mod h1:hh90ZaTaPLcK2REj6/fpTbiV0J6S7GWmd8q+GVRObPw=
|
github.com/simonvetter/modbus v1.6.0/go.mod h1:hh90ZaTaPLcK2REj6/fpTbiV0J6S7GWmd8q+GVRObPw=
|
||||||
github.com/snksoft/crc v1.1.0 h1:HkLdI4taFlgGGG1KvsWMpz78PkOC9TkPVpTV/cuWn48=
|
|
||||||
github.com/snksoft/crc v1.1.0/go.mod h1:5/gUOsgAm7OmIhb6WJzw7w5g2zfJi4FrHYgGPdshE+A=
|
|
||||||
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
|
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
|
||||||
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
|
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
|
||||||
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
|
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
|
||||||
@ -297,8 +293,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
|
|||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
||||||
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
|
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
|
||||||
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
|
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package message_server
|
package message_server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/hex"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"joylink.club/bj-rtsts-server/dto/common_proto"
|
"joylink.club/bj-rtsts-server/dto/common_proto"
|
||||||
"reflect"
|
"reflect"
|
||||||
@ -83,9 +82,11 @@ func collectBaliseStates(world ecs.World, mapId int32) ([]*state_proto.BaliseSta
|
|||||||
for id, structure := range uidStructure.TransponderIds {
|
for id, structure := range uidStructure.TransponderIds {
|
||||||
entry, ok := entity.GetEntityByUid(world, structure.Uid)
|
entry, ok := entity.GetEntityByUid(world, structure.Uid)
|
||||||
if ok {
|
if ok {
|
||||||
|
baliseFixedTelegram := component.BaliseFixedTelegramType.Get(entry)
|
||||||
baliseState := &state_proto.BaliseState{
|
baliseState := &state_proto.BaliseState{
|
||||||
Id: id,
|
Id: id,
|
||||||
Telegram: hex.EncodeToString(component.BaliseStateType.Get(entry).ValidTelegram),
|
FixedTelegram: fmt.Sprintf("%X", baliseFixedTelegram.Telegram),
|
||||||
|
FixedUserTelegram: fmt.Sprintf("%X", baliseFixedTelegram.UserTelegram),
|
||||||
}
|
}
|
||||||
transponderStates = append(transponderStates, baliseState)
|
transponderStates = append(transponderStates, baliseState)
|
||||||
km := component.KmType.Get(entry)
|
km := component.KmType.Get(entry)
|
||||||
|
2
third_party/can_btm/balise_detection.go
vendored
2
third_party/can_btm/balise_detection.go
vendored
@ -121,7 +121,7 @@ func (t *BaliseDetector) rcvTelegram(wd *component.WorldData, baliseId string) [
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil
|
return nil
|
||||||
} else {
|
} else {
|
||||||
return component.BaliseStateType.Get(entry).ValidTelegram
|
return component.BaliseFixedTelegramType.Get(entry).Telegram
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,14 +128,26 @@ func BaliseTelegramModify(simulation *VerifySimulation, req *dto.BaliseModifyTel
|
|||||||
if !ok {
|
if !ok {
|
||||||
return sys_error.New(fmt.Sprintf("没有[mapId:%d id:%d]的应答器", req.MapId, req.BaliseId))
|
return sys_error.New(fmt.Sprintf("没有[mapId:%d id:%d]的应答器", req.MapId, req.BaliseId))
|
||||||
}
|
}
|
||||||
if len(req.Telegram) != 256 {
|
fixedTelegramLen := 256
|
||||||
return sys_error.New(fmt.Sprintf("报文长度必须为[%d]", 256))
|
if len(req.FixedTelegram) != fixedTelegramLen {
|
||||||
|
return sys_error.New(fmt.Sprintf("固定报文长度必须为[%d]", fixedTelegramLen))
|
||||||
}
|
}
|
||||||
bytes, err := hex.DecodeString(req.Telegram)
|
fixedUserTelegramLen := 208
|
||||||
|
if len(req.FixedUserTelegram) != fixedUserTelegramLen {
|
||||||
|
return sys_error.New(fmt.Sprintf("固定用户报文长度必须为[%d]", fixedUserTelegramLen))
|
||||||
|
}
|
||||||
|
ft, err := hex.DecodeString(req.FixedTelegram)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return sys_error.New("报文解析出错", err)
|
return sys_error.New("固定报文解析出错", err)
|
||||||
}
|
}
|
||||||
component.BaliseStateType.SetValue(entry, component.BaliseState{ValidTelegram: bytes})
|
fut, err := hex.DecodeString(req.FixedUserTelegram)
|
||||||
|
if err != nil {
|
||||||
|
return sys_error.New("固定用户报文解析出错", err)
|
||||||
|
}
|
||||||
|
component.BaliseFixedTelegramType.SetValue(entry, component.BaliseState{
|
||||||
|
Telegram: ft,
|
||||||
|
UserTelegram: fut,
|
||||||
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,8 +164,8 @@ func BaliseTelegramReset(simulation *VerifySimulation, req *dto.BaliseReqDto) er
|
|||||||
|
|
||||||
func baliseTelegramReset(simulation *VerifySimulation, balise *repository.Transponder) error {
|
func baliseTelegramReset(simulation *VerifySimulation, balise *repository.Transponder) error {
|
||||||
entry, _ := entity.GetEntityByUid(simulation.World, balise.Id())
|
entry, _ := entity.GetEntityByUid(simulation.World, balise.Id())
|
||||||
component.BaliseStateType.SetValue(entry, component.BaliseState{
|
component.BaliseFixedTelegramType.SetValue(entry, component.BaliseState{
|
||||||
ValidTelegram: balise.FixedTelegram(),
|
Telegram: balise.FixedTelegram(),
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ func (s *VerifySimulation) CollectDynamicsTurnoutInfo() *message.DynamicsTurnout
|
|||||||
}
|
}
|
||||||
pos := component.TurnoutPositionType.Get(entry)
|
pos := component.TurnoutPositionType.Get(entry)
|
||||||
turnoutState.TurnoutInfos = append(turnoutState.TurnoutInfos, &message.TurnoutInfo{
|
turnoutState.TurnoutInfos = append(turnoutState.TurnoutInfos, &message.TurnoutInfo{
|
||||||
Code: 0,
|
Code: uint16(sta.CommonId),
|
||||||
NPosition: pos.Dw,
|
NPosition: pos.Dw,
|
||||||
RPosition: pos.Fw,
|
RPosition: pos.Fw,
|
||||||
})
|
})
|
||||||
@ -1034,13 +1034,18 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
|
|||||||
for _, data := range storage.Transponders {
|
for _, data := range storage.Transponders {
|
||||||
fixedTelegram, err := hex.DecodeString(data.FixedTelegram)
|
fixedTelegram, err := hex.DecodeString(data.FixedTelegram)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
slog.Error(fmt.Sprintf("解析应答器[%s]的报文出错:", err.Error()))
|
slog.Error(fmt.Sprintf("解析应答器[%s]的固定报文出错:", err.Error()))
|
||||||
|
}
|
||||||
|
fixedUserTelegram, err := hex.DecodeString(data.FixedUserTelegram)
|
||||||
|
if err != nil {
|
||||||
|
slog.Error(fmt.Sprintf("解析应答器[%s]的固定用户报文出错:", err.Error()))
|
||||||
}
|
}
|
||||||
responder := &proto.Transponder{
|
responder := &proto.Transponder{
|
||||||
Id: uidsMap.TransponderIds[GetMapElementId(data.Common)].Uid,
|
Id: uidsMap.TransponderIds[GetMapElementId(data.Common)].Uid,
|
||||||
Km: convertKm(data.KilometerSystem),
|
Km: convertKm(data.KilometerSystem),
|
||||||
FixedTelegram: fixedTelegram,
|
FixedTelegram: fixedTelegram,
|
||||||
Type: convertToProtoBaliseType(data.Type),
|
Type: convertToProtoBaliseType(data.Type),
|
||||||
|
FixedUserTelegram: fixedUserTelegram,
|
||||||
}
|
}
|
||||||
switch data.TransponderRef.DeviceType {
|
switch data.TransponderRef.DeviceType {
|
||||||
case data_proto.RelatedRef_Section:
|
case data_proto.RelatedRef_Section:
|
||||||
|
Loading…
Reference in New Issue
Block a user