2023-07-28 14:36:16 +08:00
|
|
|
|
package dto
|
|
|
|
|
|
2023-10-19 15:08:43 +08:00
|
|
|
|
import (
|
|
|
|
|
"joylink.club/bj-rtsts-server/ats/verify/protos/state"
|
|
|
|
|
"joylink.club/bj-rtsts-server/dto/request_proto"
|
|
|
|
|
)
|
2023-10-13 14:41:55 +08:00
|
|
|
|
|
2023-07-28 15:49:44 +08:00
|
|
|
|
// 创建仿真请求
|
2023-07-28 14:36:16 +08:00
|
|
|
|
type SimulationCreateReqDto struct {
|
|
|
|
|
//地图id
|
|
|
|
|
MapId int32 `json:"mapId" form:"mapId"`
|
2023-08-30 13:25:57 +08:00
|
|
|
|
// 项目id
|
|
|
|
|
ProjectId int32 `json:"projectId" form:"projectId"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-28 15:49:44 +08:00
|
|
|
|
// 创建仿真响应
|
2023-07-28 14:36:16 +08:00
|
|
|
|
type SimulationCreateRspDto struct {
|
|
|
|
|
//地图id
|
|
|
|
|
MapId int32 `json:"mapId" form:"mapId"`
|
2023-08-30 13:25:57 +08:00
|
|
|
|
// 项目ID
|
|
|
|
|
ProjectId int32 `json:"projectId" form:"projectId"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
//仿真id
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"`
|
2023-09-19 11:02:50 +08:00
|
|
|
|
// 地图列表
|
|
|
|
|
MapIds []int32 `json:"mapIds" form:"mapIds"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// 为仿真添加测试车请求
|
|
|
|
|
type AddTrainReqDto struct {
|
|
|
|
|
//仿真id
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"`
|
|
|
|
|
//列车方向,true-上行,false-下行
|
2023-08-14 16:27:03 +08:00
|
|
|
|
RunDirection bool `json:"up" form:"up"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
//车头所在link的索引
|
|
|
|
|
HeadLinkId string `json:"headLinkId" form:"headLinkId"`
|
|
|
|
|
//车头所在link内的偏移量,单位为mm
|
|
|
|
|
HeadLinkOffset int64 `json:"headLinkOffset" form:"headLinkOffset"`
|
2023-08-10 14:18:55 +08:00
|
|
|
|
//物理区段、道岔ID
|
|
|
|
|
Id string `json:"id" form:"id"`
|
|
|
|
|
//道岔端口
|
|
|
|
|
DevicePort string `json:"devicePort" form:"devicePort"`
|
|
|
|
|
//车头所在link内的偏移量,单位为mm
|
|
|
|
|
HeadOffset int64 `json:"headOffset" form:"headOffset"`
|
2023-08-25 10:41:13 +08:00
|
|
|
|
//列车长度
|
|
|
|
|
TrainLength int64 `json:"trainLength" from:"trainLength"`
|
2023-09-21 15:10:48 +08:00
|
|
|
|
// 场景ID
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-28 15:49:44 +08:00
|
|
|
|
// 为仿真添加测试车请求
|
2023-07-28 14:36:16 +08:00
|
|
|
|
type AddTrainRspDto struct {
|
|
|
|
|
//仿真id
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"`
|
|
|
|
|
//新添加的列车的索引
|
|
|
|
|
TrainId string `json:"trainId" form:"trainId"`
|
2023-09-21 15:10:48 +08:00
|
|
|
|
// 场景ID
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
2023-07-28 15:49:44 +08:00
|
|
|
|
|
|
|
|
|
// 仿真移除列车请求
|
2023-07-28 16:14:31 +08:00
|
|
|
|
type RemoveTrainDto AddTrainRspDto
|
2023-07-28 15:49:44 +08:00
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
type SwitchOperationReqDto struct {
|
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
2023-09-21 15:10:48 +08:00
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
2023-09-27 18:11:16 +08:00
|
|
|
|
DeviceId string `form:"id" json:"id" binding:"required"`
|
2023-07-31 17:27:05 +08:00
|
|
|
|
TurnNormal bool `form:"turnNormal" json:"turnNormal"`
|
|
|
|
|
TurnReverse bool `form:"turnReverse" json:"turnReverse"`
|
2023-07-28 15:49:44 +08:00
|
|
|
|
}
|
2023-10-13 14:41:55 +08:00
|
|
|
|
type SignalOperationReqDto struct {
|
2023-10-19 15:08:43 +08:00
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
|
|
|
|
DeviceId string `form:"id" json:"id" binding:"required"`
|
|
|
|
|
Operation request_proto.Signal_Operation `form:"operation" json:"operation" binding:"required"` //信号机操作类型
|
|
|
|
|
Aspect state.Signal_Aspect `form:"aspect" json:"aspect" binding:"required"` // 当操作为Operation.Display时有效,表示显示的信号
|
2023-10-18 13:53:17 +08:00
|
|
|
|
}
|
2023-10-24 09:42:10 +08:00
|
|
|
|
type AxleSectionOperationReqDto struct {
|
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
|
|
|
|
DeviceId string `form:"id" json:"id" binding:"required"`
|
|
|
|
|
Operation request_proto.Section_AxleOperation `form:"operation" json:"operation"`
|
2023-10-24 10:19:51 +08:00
|
|
|
|
Reset bool `form:"reset" json:"reset"` //当操作为直接复位或预复位时有效,true-复位,false-取消或结束复位
|
2023-10-24 09:42:10 +08:00
|
|
|
|
}
|
2023-10-18 13:53:17 +08:00
|
|
|
|
|
2023-10-20 13:50:22 +08:00
|
|
|
|
type EsbButtonOperationReqDto struct {
|
2023-10-18 13:53:17 +08:00
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
2023-10-20 13:50:22 +08:00
|
|
|
|
Id string `form:"id" json:"id" binding:"required"`
|
|
|
|
|
Down bool `form:"down" json:"down"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type IBPButtonOperationReqDto struct {
|
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
|
|
|
|
StationId string `form:"stationId" json:"stationId" binding:"required"`
|
|
|
|
|
ButtonCode string `form:"buttonCode" json:"buttonCode" binding:"required"`
|
2023-10-19 17:46:26 +08:00
|
|
|
|
Down bool `form:"down" json:"down"`
|
2023-10-13 14:41:55 +08:00
|
|
|
|
}
|
2023-07-28 15:49:44 +08:00
|
|
|
|
|
2023-10-19 17:09:57 +08:00
|
|
|
|
type PslOperationReqDto struct {
|
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
|
|
|
|
GateBoxId string `form:"gateBoxId" json:"gateBoxId"`
|
|
|
|
|
ButtonCode string `form:"buttonCode" json:"buttonCode" binding:"required"`
|
|
|
|
|
Down bool `form:"down" json:"down"`
|
2023-10-13 14:41:55 +08:00
|
|
|
|
}
|
2023-07-28 15:49:44 +08:00
|
|
|
|
|
2023-10-20 13:50:22 +08:00
|
|
|
|
type KeyOperationReqDto struct {
|
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
|
|
|
|
StationId string `form:"stationId" json:"stationId" binding:"required"`
|
|
|
|
|
KeyCode string `form:"keyCode" json:"keyCode"`
|
|
|
|
|
Gear int32 `form:"gear" json:"gear"`
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-28 15:49:44 +08:00
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
// 地铁数据检测请求
|
|
|
|
|
type CheckMapDataReqDto struct {
|
|
|
|
|
Data []byte `form:"data" json:"data" binding:"required"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 地图检验数据响应
|
|
|
|
|
type CheckMapDataRspDto struct {
|
|
|
|
|
Success bool `form:"success" json:"success"`
|
|
|
|
|
Errors []string `form:"errors" json:"errors"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 仿真实例的基本信息响应
|
2023-08-30 13:25:57 +08:00
|
|
|
|
type SimulationInfoRspDto struct {
|
2023-09-19 11:02:50 +08:00
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId"`
|
|
|
|
|
MapId int32 `json:"mapId" form:"mapId"`
|
|
|
|
|
MapIds []int32 `form:"mapIds" json:"mapIds"`
|
|
|
|
|
ProjectId int32 `form:"projectId" json:"projectId"`
|
2023-07-28 15:49:44 +08:00
|
|
|
|
}
|
2023-08-30 13:25:57 +08:00
|
|
|
|
type SimulationInfoRspDtoArr []SimulationInfoRspDto
|
2023-10-07 17:48:39 +08:00
|
|
|
|
|
|
|
|
|
type RelayOperationReqDto struct {
|
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
|
|
|
|
Id string `form:"id" json:"id" binding:"required"`
|
|
|
|
|
Td bool `form:"td" json:"td"`
|
|
|
|
|
}
|