From eb71e7cd7376fde2b678c9e6f1ff2ee99854365a Mon Sep 17 00:00:00 2001 From: walker Date: Mon, 16 Oct 2023 11:13:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=81=93=E5=B2=94=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=B0=83=E7=94=A8=20swaggerdoc=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wayside/memory/wayside_memory_turnout.go | 4 +- bj-rtss-message | 2 +- docs/docs.go | 61 +++++++++++++++++++ docs/swagger.json | 61 +++++++++++++++++++ docs/swagger.yaml | 48 +++++++++++++++ rtss_simulation | 2 +- 6 files changed, 174 insertions(+), 4 deletions(-) diff --git a/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go b/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go index c42fc68..0170a80 100644 --- a/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go +++ b/ats/verify/simulation/wayside/memory/wayside_memory_turnout.go @@ -39,11 +39,11 @@ func HandleTurnoutOperation(simulation *VerifySimulation, req *request_proto.Tur case request_proto.Turnout_SetSB: fi.SetTurnoutFault(simulation.World, uid, component_proto.Turnout_SB) case request_proto.Turnout_CancelSB: - fi.CancleTurnoutFault(simulation.World, uid, component_proto.Turnout_SB) + fi.CancelTurnoutFault(simulation.World, uid, component_proto.Turnout_SB) case request_proto.Turnout_SetJC: fi.SetTurnoutFault(simulation.World, uid, component_proto.Turnout_JC) case request_proto.Turnout_CancelJC: - fi.CancleTurnoutFault(simulation.World, uid, component_proto.Turnout_JC) + fi.CancelTurnoutFault(simulation.World, uid, component_proto.Turnout_JC) default: panic(fmt.Sprintf("未知的道岔操作:%s", req.Operation)) } diff --git a/bj-rtss-message b/bj-rtss-message index c18ac28..3f409d7 160000 --- a/bj-rtss-message +++ b/bj-rtss-message @@ -1 +1 @@ -Subproject commit c18ac281a6360f6ceceb1df93c86dc888879fe46 +Subproject commit 3f409d717bab334f3d39a5af043c5f00881eaddd diff --git a/docs/docs.go b/docs/docs.go index 72eb0cf..8c86fd9 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -5110,6 +5110,67 @@ const docTemplate = `{ } } }, + "request_proto.TurnoutOperationReq": { + "type": "object", + "properties": { + "deviceId": { + "description": "设备id", + "type": "string" + }, + "mapId": { + "description": "图id", + "type": "integer" + }, + "operation": { + "description": "道岔操作", + "allOf": [ + { + "$ref": "#/definitions/request_proto.Turnout_Operation" + } + ] + }, + "simulationId": { + "description": "仿真id", + "type": "string" + } + } + }, + "request_proto.Turnout_Operation": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "x-enum-comments": { + "Turnout_CancelDC": "取消定操", + "Turnout_CancelFC": "取消反操", + "Turnout_CancelJC": "取消挤岔故障", + "Turnout_CancelSB": "取消失表故障", + "Turnout_DC": "定操", + "Turnout_FC": "反操", + "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" + ] + }, "state.Signal_Aspect": { "type": "integer", "enum": [ diff --git a/docs/swagger.json b/docs/swagger.json index f5780ed..733072a 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -5103,6 +5103,67 @@ } } }, + "request_proto.TurnoutOperationReq": { + "type": "object", + "properties": { + "deviceId": { + "description": "设备id", + "type": "string" + }, + "mapId": { + "description": "图id", + "type": "integer" + }, + "operation": { + "description": "道岔操作", + "allOf": [ + { + "$ref": "#/definitions/request_proto.Turnout_Operation" + } + ] + }, + "simulationId": { + "description": "仿真id", + "type": "string" + } + } + }, + "request_proto.Turnout_Operation": { + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ], + "x-enum-comments": { + "Turnout_CancelDC": "取消定操", + "Turnout_CancelFC": "取消反操", + "Turnout_CancelJC": "取消挤岔故障", + "Turnout_CancelSB": "取消失表故障", + "Turnout_DC": "定操", + "Turnout_FC": "反操", + "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" + ] + }, "state.Signal_Aspect": { "type": "integer", "enum": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index f58713e..5861728 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -485,6 +485,54 @@ definitions: description: 名称 type: string type: object + request_proto.Turnout_Operation: + enum: + - 0 + - 1 + - 2 + - 3 + - 4 + - 5 + - 6 + - 7 + - 8 + type: integer + x-enum-comments: + Turnout_CancelDC: 取消定操 + Turnout_CancelFC: 取消反操 + Turnout_CancelJC: 取消挤岔故障 + Turnout_CancelSB: 取消失表故障 + Turnout_DC: 定操 + Turnout_FC: 反操 + 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 + request_proto.TurnoutOperationReq: + properties: + deviceId: + description: 设备id + type: string + mapId: + description: 图id + type: integer + operation: + allOf: + - $ref: '#/definitions/request_proto.Turnout_Operation' + description: 道岔操作 + simulationId: + description: 仿真id + type: string + type: object state.Signal_Aspect: enum: - 0 diff --git a/rtss_simulation b/rtss_simulation index 1521868..93725ce 160000 --- a/rtss_simulation +++ b/rtss_simulation @@ -1 +1 @@ -Subproject commit 1521868a88969aecc27b4096481788486ab5d014 +Subproject commit 93725ce93431b07d1d56863eaa8a3f5f77d3a39f