2023-07-28 14:36:16 +08:00
|
|
|
|
package dto
|
|
|
|
|
|
2023-10-19 15:08:43 +08:00
|
|
|
|
import (
|
2024-01-11 10:24:56 +08:00
|
|
|
|
"joylink.club/bj-rtsts-server/dto/data_proto"
|
2023-10-19 15:08:43 +08:00
|
|
|
|
"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-10-24 16:37:27 +08:00
|
|
|
|
// 运行环境ID
|
|
|
|
|
ProjectRunConfigId int32 `json:"runConfigId" form:"runConfigId"`
|
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-10-26 18:09:09 +08:00
|
|
|
|
// 运行环境ID
|
|
|
|
|
ProjectRunConfigId int32 `json:"runConfigId" form:"runConfigId"`
|
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
|
2023-12-14 13:04:48 +08:00
|
|
|
|
Id uint32 `json:"id" form:"id"`
|
2023-08-10 14:18:55 +08:00
|
|
|
|
//道岔端口
|
|
|
|
|
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-11-13 14:15:56 +08:00
|
|
|
|
// 列车轮径
|
|
|
|
|
WheelDiameter int32 `json:"wheelDiameter" from:"wheelDiameter"`
|
2023-07-28 14:36:16 +08:00
|
|
|
|
}
|
2024-01-17 15:53:14 +08:00
|
|
|
|
type AddTrainReqDtoNew struct {
|
|
|
|
|
//仿真id
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"`
|
|
|
|
|
//列车方向,true-上行,false-下行
|
|
|
|
|
RunDirection bool `json:"up" form:"up"`
|
|
|
|
|
//车头所在link的索引
|
|
|
|
|
HeadLinkId string `json:"headLinkId" form:"headLinkId"`
|
|
|
|
|
//车头所在link内的偏移量,单位为mm
|
|
|
|
|
HeadLinkOffset int64 `json:"headLinkOffset" form:"headLinkOffset"`
|
|
|
|
|
//物理区段、道岔ID
|
|
|
|
|
Id uint32 `json:"id" form:"id"`
|
|
|
|
|
//道岔端口
|
|
|
|
|
DevicePort string `json:"devicePort" form:"devicePort"`
|
|
|
|
|
//车头所在link内的偏移量,单位为mm
|
|
|
|
|
HeadOffset int64 `json:"headOffset" form:"headOffset"`
|
|
|
|
|
//列车长度
|
|
|
|
|
TrainLength int64 `json:"trainLength" from:"trainLength"`
|
|
|
|
|
// 场景ID
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId"`
|
|
|
|
|
WheelDiameter int32 `json:"wheelDiameter" from:"wheelDiameter"`
|
|
|
|
|
// 列车数据配置
|
2024-01-18 10:48:04 +08:00
|
|
|
|
ConfigTrain ConfigTrainData `json:"configTrain" from:"mapId"`
|
|
|
|
|
TrainEndsA ConfigTrainEnds `json:"trainEndsA"` // 车辆A端
|
|
|
|
|
TrainEndsB ConfigTrainEnds `json:"trainEndsB"` // 车辆B端
|
2024-01-17 15:53:14 +08:00
|
|
|
|
}
|
2023-07-28 14:36:16 +08:00
|
|
|
|
|
2024-01-16 17:53:54 +08:00
|
|
|
|
// 为反正列车修改对应的测试配置
|
|
|
|
|
type ConfigTrainReqDto struct {
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"`
|
|
|
|
|
// 列车Id
|
2024-01-18 10:48:04 +08:00
|
|
|
|
TrainId int `json:"trainId" form:"trainId"`
|
2024-01-17 15:53:14 +08:00
|
|
|
|
Length int64 `json:"length"` // 列车的长度(cm)
|
|
|
|
|
ConfigData ConfigTrainData
|
2024-01-18 10:48:04 +08:00
|
|
|
|
TrainEndsA ConfigTrainEnds `json:"trainEndsA"` // 车辆A端
|
|
|
|
|
TrainEndsB ConfigTrainEnds `json:"trainEndsB"` // 车辆B端
|
2024-01-17 17:02:17 +08:00
|
|
|
|
WheelDiameter int32 `json:"wheelDiameter"` // 轮径(mm)
|
2024-01-16 17:53:54 +08:00
|
|
|
|
}
|
2024-01-17 13:09:45 +08:00
|
|
|
|
type ConfigTrainEnds struct {
|
2024-01-18 16:33:27 +08:00
|
|
|
|
SpeedSensorEnableA bool `json:"speedSensorEnableA"` // 2端速度传感器是否有效
|
|
|
|
|
SpeedSensorEnableB bool `json:"speedSensorEnableB"` // 2端速度传感器是否有效
|
|
|
|
|
RadarEnable bool `json:"radarEnable"` // 雷达是否有效
|
|
|
|
|
RadarCheckSpeedDiff float32 `json:"radarCheckSpeed"` // 雷达测速数值
|
|
|
|
|
RadarCheckTime int32 `json:"radarCheckTime"` // 雷达检测时间(秒)
|
2024-01-16 17:53:54 +08:00
|
|
|
|
}
|
|
|
|
|
type ConfigTrainData struct {
|
2024-01-17 15:53:14 +08:00
|
|
|
|
//Mass int32 `json:"mass" form:"mass"` // 列车的质量(100=1ton)
|
2024-01-16 17:53:54 +08:00
|
|
|
|
BaseResistanceParamA float32 `json:"baseResistanceParamA"` // 基本阻力参数A
|
|
|
|
|
BaseResistanceParamB float32 `json:"baseResistanceParamB"` // 基本阻力参数B
|
|
|
|
|
BaseResistanceParamC float32 `json:"baseResistanceParamC"` // 基本阻力参数C
|
|
|
|
|
CurveResistanceParamR1 float32 `json:"curveResistanceParamR1"` // 曲线阻力参数R1
|
|
|
|
|
CurveResistanceParamR2 float32 `json:"curveResistanceParamR2"` // 曲线阻力参数R2
|
|
|
|
|
CurveResistanceParamR3 float32 `json:"curveResistanceParamR3"` // 曲线阻力参数R3
|
|
|
|
|
CurveResistanceParamR4 float32 `json:"curveResistanceParamR4"` // 曲线阻力参数R4
|
|
|
|
|
RevolvingMassParam float32 `json:"revolvingMassParam"` // 旋转质量参数
|
|
|
|
|
Jump bool `json:"jump"` // 是否跳跃
|
|
|
|
|
Slip float32 `json:"slip"` // 打滑(%)
|
|
|
|
|
Slide int32 `json:"slide"` // 前溜/后溜(mm)(正数前溜,负数后溜)
|
|
|
|
|
StopSign int32 `json:"stopSign"` // 过标/欠标(mm)(正数过标,负数欠标)
|
2024-01-17 17:02:17 +08:00
|
|
|
|
//TrainEndsA ConfigTrainEnds `json:"TrainEndsA"` // 车辆A端
|
|
|
|
|
//TrainEndsB ConfigTrainEnds `json:"TrainEndsB"` // 车辆B端
|
2024-01-16 17:53:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-11-13 15:57:32 +08:00
|
|
|
|
// 为仿真添加测试车请求
|
|
|
|
|
type UpdateTrainReqDto struct {
|
|
|
|
|
// 仿真id
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"`
|
|
|
|
|
// 列车Id
|
|
|
|
|
Id string `json:"id" form:"id"`
|
|
|
|
|
//列车长度
|
|
|
|
|
TrainLength int64 `json:"trainLength" from:"trainLength"`
|
|
|
|
|
// 列车轮径
|
|
|
|
|
WheelDiameter int32 `json:"wheelDiameter" from:"wheelDiameter"`
|
|
|
|
|
}
|
|
|
|
|
|
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-31 15:55:17 +08:00
|
|
|
|
|
|
|
|
|
// AxleSectionOperationReqDto 计轴区段操作
|
|
|
|
|
type AxleSectionOperationReqDto struct {
|
2023-10-31 16:28:07 +08:00
|
|
|
|
SimulationId string `form:"simulationId" json:"simulationId" binding:"required"`
|
|
|
|
|
MapId int32 `json:"mapId" from:"mapId" binding:"required"`
|
2023-12-14 13:04:48 +08:00
|
|
|
|
DeviceId uint32 `form:"id" json:"id" binding:"required"`
|
2023-10-31 16:28:07 +08:00
|
|
|
|
Operation request_proto.Section_Operation `form:"operation" json:"operation"`
|
2023-11-01 11:08:26 +08:00
|
|
|
|
TrainIn bool `form:"trainIn" json:"trainIn"`
|
|
|
|
|
TrainOut bool `form:"trainOut" json:"trainOut"`
|
2023-10-31 15:55: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-12-14 13:04:48 +08:00
|
|
|
|
Id uint32 `form:"id" json:"id" binding:"required"`
|
2023-10-20 13:50:22 +08:00
|
|
|
|
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"`
|
2023-12-14 13:04:48 +08:00
|
|
|
|
StationId uint32 `form:"stationId" json:"stationId" binding:"required"`
|
|
|
|
|
ButtonId uint32 `form:"buttonId" json:"buttonId" 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"`
|
2023-12-14 13:04:48 +08:00
|
|
|
|
GateBoxId uint32 `form:"gateBoxId" json:"gateBoxId"`
|
2023-10-19 17:09:57 +08:00
|
|
|
|
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"`
|
2023-12-14 13:04:48 +08:00
|
|
|
|
StationId uint32 `form:"stationId" json:"stationId" binding:"required"`
|
|
|
|
|
KeyId uint32 `form:"keyId" json:"keyId"`
|
2023-10-20 13:50:22 +08:00
|
|
|
|
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-10-27 09:12:40 +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"`
|
|
|
|
|
ProjectRunConfigId int32 `form:"runConfigId" json:"runConfigId" ` // 运行环境ID
|
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"`
|
2023-12-14 13:04:48 +08:00
|
|
|
|
Id uint32 `form:"id" json:"id" binding:"required"`
|
2023-10-07 17:48:39 +08:00
|
|
|
|
Td bool `form:"td" json:"td"`
|
|
|
|
|
}
|
2024-01-08 17:45:24 +08:00
|
|
|
|
|
2024-01-10 14:06:01 +08:00
|
|
|
|
// BaliseMoveReqDto 应答器移位请求
|
|
|
|
|
type BaliseMoveReqDto struct {
|
2024-01-11 10:24:56 +08:00
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"` //仿真ID
|
|
|
|
|
MapId int32 `json:"mapId" form:"mapId"` //地图ID
|
|
|
|
|
BaliseId uint32 `json:"baliseId" form:"baliseId"` //应答器ID
|
|
|
|
|
Km data_proto.KilometerSystem `json:"km" form:"km"` //公里标
|
2024-01-10 14:06:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BaliseModifyTelegramReqDto 修改应答器报文
|
|
|
|
|
type BaliseModifyTelegramReqDto struct {
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"` //仿真ID
|
|
|
|
|
MapId int32 `json:"mapId" form:"mapId"` //地图ID
|
|
|
|
|
BaliseId uint32 `json:"baliseId" form:"baliseId"` //应答器ID
|
2024-01-16 13:44:28 +08:00
|
|
|
|
Telegram string `json:"telegram" from:"telegram"` //报文(16进制字符串)
|
2024-01-10 14:06:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BaliseReqDto 应答器请求
|
|
|
|
|
type BaliseReqDto struct {
|
|
|
|
|
SimulationId string `json:"simulationId" form:"simulationId"` //仿真ID
|
|
|
|
|
MapId int32 `json:"mapId" form:"mapId"` //地图ID
|
|
|
|
|
BaliseId uint32 `json:"baliseId" form:"baliseId"` //应答器ID
|
2024-01-08 17:45:24 +08:00
|
|
|
|
}
|