修改道岔接口调用
swaggerdoc生成
This commit is contained in:
parent
9a7ecd5763
commit
eb71e7cd73
@ -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))
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit c18ac281a6360f6ceceb1df93c86dc888879fe46
|
||||
Subproject commit 3f409d717bab334f3d39a5af043c5f00881eaddd
|
61
docs/docs.go
61
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": [
|
||||
|
@ -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": [
|
||||
|
@ -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
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 1521868a88969aecc27b4096481788486ab5d014
|
||||
Subproject commit 93725ce93431b07d1d56863eaa8a3f5f77d3a39f
|
Loading…
Reference in New Issue
Block a user