Merge branch 'master' of https://git.code.tencent.com/beijing-rtss-test/bj-rtsts-server-go
This commit is contained in:
commit
6e36afa3ec
|
@ -212,12 +212,13 @@ func configTrain(c *gin.Context) {
|
|||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param Authorization header string true "JWT Token"
|
||||
// @Param AddTrainReqDto body dto.AddTrainReqDto true "ATS测试仿真-添加列车"
|
||||
// @Param AddTrainReqDto body dto.AddTrainReqDtoNew true "ATS测试仿真-添加列车"
|
||||
// @Success 200 {object} dto.AddTrainRspDto
|
||||
// @Failure 500 {object} dto.ErrorDto
|
||||
// @Router /api/v1/simulation/train/add [post]
|
||||
func addTrain(c *gin.Context) {
|
||||
req := dto.AddTrainReqDto{}
|
||||
//req := dto.AddTrainReqDto{}
|
||||
req := dto.AddTrainReqDtoNew{}
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
panic(sys_error.New("添加列车失败,请求参数异常", err))
|
||||
}
|
||||
|
@ -234,8 +235,39 @@ func addTrain(c *gin.Context) {
|
|||
RunDirection: req.RunDirection,
|
||||
TrainLength: req.TrainLength,
|
||||
WheelDiameter: req.WheelDiameter,
|
||||
/*TrainDynamicConfig: &state_proto.TrainDynamicConfig{
|
||||
//int32 mass=1;
|
||||
//基本阻力参数A
|
||||
BaseResistanceParamA: req.ConfigTrain.BaseResistanceParamA,
|
||||
// 基本阻力参数B
|
||||
BaseResistanceParamB: req.ConfigTrain.BaseResistanceParamB,
|
||||
// 基本阻力参数C
|
||||
BaseResistanceParamC: req.ConfigTrain.BaseResistanceParamC,
|
||||
//曲线阻力参数R1
|
||||
CurveResistanceParamR1: req.ConfigTrain.CurveResistanceParamR1,
|
||||
// 曲线阻力参数R2
|
||||
CurveResistanceParamR2: req.ConfigTrain.CurveResistanceParamR2,
|
||||
// 曲线阻力参数R3
|
||||
CurveResistanceParamR3: req.ConfigTrain.CurveResistanceParamR3,
|
||||
// 曲线阻力参数R4
|
||||
CurveResistanceParamR4: req.ConfigTrain.CurveResistanceParamR4,
|
||||
//旋转质量参数
|
||||
RevolvingMassParam: req.ConfigTrain.RevolvingMassParam,
|
||||
//是否跳跃
|
||||
Jump: req.ConfigTrain.Jump,
|
||||
//打滑(%)
|
||||
Slip: req.ConfigTrain.Slip,
|
||||
//前溜/后溜(mm)(正数前溜,负数后溜)
|
||||
Slide: req.ConfigTrain.Slide,
|
||||
//过标/欠标(mm)(正数过标,负数欠标)
|
||||
StopSign: req.ConfigTrain.StopSign,
|
||||
//车径
|
||||
//WheelDiameter: req.ConfigTrain.WheelDiameter,
|
||||
TrainEndsA: memory.DtoTrainEndsToStateProto(req.ConfigTrain.TrainEndsA),
|
||||
TrainEndsB: memory.DtoTrainEndsToStateProto(req.ConfigTrain.TrainEndsB),
|
||||
},*/
|
||||
}
|
||||
memory.AddTrainState(simulation, rsp, req.MapId)
|
||||
memory.AddTrainStateNew(simulation, rsp, req.ConfigTrain, req.TrainEndsA, req.TrainEndsB, req.MapId)
|
||||
c.JSON(http.StatusOK, &rsp)
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit ff0352b2f88a5cb50f93b8b1338238f560e3ee9b
|
||||
Subproject commit 8469ef8778e98f43caa6cdf6e18a19ecb7f490de
|
103
docs/docs.go
103
docs/docs.go
|
@ -4165,7 +4165,7 @@ const docTemplate = `{
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AddTrainReqDto"
|
||||
"$ref": "#/definitions/dto.AddTrainReqDtoNew"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -5003,9 +5003,33 @@ const docTemplate = `{
|
|||
"PictureType_TrainData"
|
||||
]
|
||||
},
|
||||
"dto.AddTrainReqDto": {
|
||||
"dto.AddTrainReqDtoNew": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ConfigTrain": {
|
||||
"description": "列车数据配置",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainData"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainEndsA": {
|
||||
"description": "车辆A端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainEndsB": {
|
||||
"description": "车辆B端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"devicePort": {
|
||||
"description": "道岔端口",
|
||||
"type": "string"
|
||||
|
@ -5043,7 +5067,6 @@ const docTemplate = `{
|
|||
"type": "boolean"
|
||||
},
|
||||
"wheelDiameter": {
|
||||
"description": "列车轮径",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
@ -5216,7 +5239,7 @@ const docTemplate = `{
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"baseResistanceParamA": {
|
||||
"description": "基本阻力参数A",
|
||||
"description": "Mass int32 ` + "`" + `json:\"mass\" form:\"mass\"` + "`" + ` // 列车的质量(100=1ton)",
|
||||
"type": "number"
|
||||
},
|
||||
"baseResistanceParamB": {
|
||||
|
@ -5247,26 +5270,6 @@ const docTemplate = `{
|
|||
"description": "是否跳跃",
|
||||
"type": "boolean"
|
||||
},
|
||||
"length": {
|
||||
"description": "列车的长度(cm)",
|
||||
"type": "integer"
|
||||
},
|
||||
"mass": {
|
||||
"description": "列车的质量(100=1ton)",
|
||||
"type": "integer"
|
||||
},
|
||||
"radarCheckSpeed": {
|
||||
"description": "雷达测速数值",
|
||||
"type": "number"
|
||||
},
|
||||
"radarCheckTime": {
|
||||
"description": "雷达检测时间(秒)",
|
||||
"type": "integer"
|
||||
},
|
||||
"radarEnable": {
|
||||
"description": "雷达是否有效",
|
||||
"type": "boolean"
|
||||
},
|
||||
"revolvingMassParam": {
|
||||
"description": "旋转质量参数",
|
||||
"type": "number"
|
||||
|
@ -5282,16 +5285,53 @@ const docTemplate = `{
|
|||
"stopSign": {
|
||||
"description": "过标/欠标(mm)(正数过标,负数欠标)",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ConfigTrainEnds": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"radarCheckSpeed": {
|
||||
"description": "雷达测速数值",
|
||||
"type": "number"
|
||||
},
|
||||
"wheelDiameter": {
|
||||
"description": "轮径(mm)",
|
||||
"radarCheckTime": {
|
||||
"description": "雷达检测时间(秒)",
|
||||
"type": "integer"
|
||||
},
|
||||
"radarEnable": {
|
||||
"description": "雷达是否有效",
|
||||
"type": "boolean"
|
||||
},
|
||||
"speedSensorEnableA": {
|
||||
"description": "2端速度传感器是否有效",
|
||||
"type": "boolean"
|
||||
},
|
||||
"speedSensorEnableB": {
|
||||
"description": "2端速度传感器是否有效",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ConfigTrainReqDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"TrainEndsA": {
|
||||
"description": "车辆A端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainEndsB": {
|
||||
"description": "车辆B端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainId": {
|
||||
"description": "列车Id",
|
||||
"type": "integer"
|
||||
|
@ -5299,8 +5339,16 @@ const docTemplate = `{
|
|||
"configData": {
|
||||
"$ref": "#/definitions/dto.ConfigTrainData"
|
||||
},
|
||||
"length": {
|
||||
"description": "列车的长度(cm)",
|
||||
"type": "integer"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
},
|
||||
"wheelDiameter": {
|
||||
"description": "轮径(mm)",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5786,6 +5834,9 @@ const docTemplate = `{
|
|||
"dto.TrainInfoDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"TrainConfigData": {
|
||||
"$ref": "#/definitions/dto.ConfigTrainData"
|
||||
},
|
||||
"carriage_length": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
|
@ -4159,7 +4159,7 @@
|
|||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AddTrainReqDto"
|
||||
"$ref": "#/definitions/dto.AddTrainReqDtoNew"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -4997,9 +4997,33 @@
|
|||
"PictureType_TrainData"
|
||||
]
|
||||
},
|
||||
"dto.AddTrainReqDto": {
|
||||
"dto.AddTrainReqDtoNew": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ConfigTrain": {
|
||||
"description": "列车数据配置",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainData"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainEndsA": {
|
||||
"description": "车辆A端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainEndsB": {
|
||||
"description": "车辆B端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"devicePort": {
|
||||
"description": "道岔端口",
|
||||
"type": "string"
|
||||
|
@ -5037,7 +5061,6 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"wheelDiameter": {
|
||||
"description": "列车轮径",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
|
@ -5210,7 +5233,7 @@
|
|||
"type": "object",
|
||||
"properties": {
|
||||
"baseResistanceParamA": {
|
||||
"description": "基本阻力参数A",
|
||||
"description": "Mass int32 `json:\"mass\" form:\"mass\"` // 列车的质量(100=1ton)",
|
||||
"type": "number"
|
||||
},
|
||||
"baseResistanceParamB": {
|
||||
|
@ -5241,26 +5264,6 @@
|
|||
"description": "是否跳跃",
|
||||
"type": "boolean"
|
||||
},
|
||||
"length": {
|
||||
"description": "列车的长度(cm)",
|
||||
"type": "integer"
|
||||
},
|
||||
"mass": {
|
||||
"description": "列车的质量(100=1ton)",
|
||||
"type": "integer"
|
||||
},
|
||||
"radarCheckSpeed": {
|
||||
"description": "雷达测速数值",
|
||||
"type": "number"
|
||||
},
|
||||
"radarCheckTime": {
|
||||
"description": "雷达检测时间(秒)",
|
||||
"type": "integer"
|
||||
},
|
||||
"radarEnable": {
|
||||
"description": "雷达是否有效",
|
||||
"type": "boolean"
|
||||
},
|
||||
"revolvingMassParam": {
|
||||
"description": "旋转质量参数",
|
||||
"type": "number"
|
||||
|
@ -5276,16 +5279,53 @@
|
|||
"stopSign": {
|
||||
"description": "过标/欠标(mm)(正数过标,负数欠标)",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ConfigTrainEnds": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"radarCheckSpeed": {
|
||||
"description": "雷达测速数值",
|
||||
"type": "number"
|
||||
},
|
||||
"wheelDiameter": {
|
||||
"description": "轮径(mm)",
|
||||
"radarCheckTime": {
|
||||
"description": "雷达检测时间(秒)",
|
||||
"type": "integer"
|
||||
},
|
||||
"radarEnable": {
|
||||
"description": "雷达是否有效",
|
||||
"type": "boolean"
|
||||
},
|
||||
"speedSensorEnableA": {
|
||||
"description": "2端速度传感器是否有效",
|
||||
"type": "boolean"
|
||||
},
|
||||
"speedSensorEnableB": {
|
||||
"description": "2端速度传感器是否有效",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ConfigTrainReqDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"TrainEndsA": {
|
||||
"description": "车辆A端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainEndsB": {
|
||||
"description": "车辆B端",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ConfigTrainEnds"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TrainId": {
|
||||
"description": "列车Id",
|
||||
"type": "integer"
|
||||
|
@ -5293,8 +5333,16 @@
|
|||
"configData": {
|
||||
"$ref": "#/definitions/dto.ConfigTrainData"
|
||||
},
|
||||
"length": {
|
||||
"description": "列车的长度(cm)",
|
||||
"type": "integer"
|
||||
},
|
||||
"simulationId": {
|
||||
"type": "string"
|
||||
},
|
||||
"wheelDiameter": {
|
||||
"description": "轮径(mm)",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -5780,6 +5828,9 @@
|
|||
"dto.TrainInfoDto": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"TrainConfigData": {
|
||||
"$ref": "#/definitions/dto.ConfigTrainData"
|
||||
},
|
||||
"carriage_length": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
|
@ -35,8 +35,20 @@ definitions:
|
|||
- PictureType_RelayCabinetLayout
|
||||
- PictureType_IBP
|
||||
- PictureType_TrainData
|
||||
dto.AddTrainReqDto:
|
||||
dto.AddTrainReqDtoNew:
|
||||
properties:
|
||||
ConfigTrain:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.ConfigTrainData'
|
||||
description: 列车数据配置
|
||||
TrainEndsA:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.ConfigTrainEnds'
|
||||
description: 车辆A端
|
||||
TrainEndsB:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.ConfigTrainEnds'
|
||||
description: 车辆B端
|
||||
devicePort:
|
||||
description: 道岔端口
|
||||
type: string
|
||||
|
@ -65,7 +77,6 @@ definitions:
|
|||
description: 列车方向,true-上行,false-下行
|
||||
type: boolean
|
||||
wheelDiameter:
|
||||
description: 列车轮径
|
||||
type: integer
|
||||
type: object
|
||||
dto.AddTrainRspDto:
|
||||
|
@ -181,7 +192,8 @@ definitions:
|
|||
dto.ConfigTrainData:
|
||||
properties:
|
||||
baseResistanceParamA:
|
||||
description: 基本阻力参数A
|
||||
description: Mass int32 `json:"mass" form:"mass"` //
|
||||
列车的质量(100=1ton)
|
||||
type: number
|
||||
baseResistanceParamB:
|
||||
description: 基本阻力参数B
|
||||
|
@ -204,21 +216,6 @@ definitions:
|
|||
jump:
|
||||
description: 是否跳跃
|
||||
type: boolean
|
||||
length:
|
||||
description: 列车的长度(cm)
|
||||
type: integer
|
||||
mass:
|
||||
description: 列车的质量(100=1ton)
|
||||
type: integer
|
||||
radarCheckSpeed:
|
||||
description: 雷达测速数值
|
||||
type: number
|
||||
radarCheckTime:
|
||||
description: 雷达检测时间(秒)
|
||||
type: integer
|
||||
radarEnable:
|
||||
description: 雷达是否有效
|
||||
type: boolean
|
||||
revolvingMassParam:
|
||||
description: 旋转质量参数
|
||||
type: number
|
||||
|
@ -231,19 +228,48 @@ definitions:
|
|||
stopSign:
|
||||
description: 过标/欠标(mm)(正数过标,负数欠标)
|
||||
type: integer
|
||||
wheelDiameter:
|
||||
description: 轮径(mm)
|
||||
type: object
|
||||
dto.ConfigTrainEnds:
|
||||
properties:
|
||||
radarCheckSpeed:
|
||||
description: 雷达测速数值
|
||||
type: number
|
||||
radarCheckTime:
|
||||
description: 雷达检测时间(秒)
|
||||
type: integer
|
||||
radarEnable:
|
||||
description: 雷达是否有效
|
||||
type: boolean
|
||||
speedSensorEnableA:
|
||||
description: 2端速度传感器是否有效
|
||||
type: boolean
|
||||
speedSensorEnableB:
|
||||
description: 2端速度传感器是否有效
|
||||
type: boolean
|
||||
type: object
|
||||
dto.ConfigTrainReqDto:
|
||||
properties:
|
||||
TrainEndsA:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.ConfigTrainEnds'
|
||||
description: 车辆A端
|
||||
TrainEndsB:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.ConfigTrainEnds'
|
||||
description: 车辆B端
|
||||
TrainId:
|
||||
description: 列车Id
|
||||
type: integer
|
||||
configData:
|
||||
$ref: '#/definitions/dto.ConfigTrainData'
|
||||
length:
|
||||
description: 列车的长度(cm)
|
||||
type: integer
|
||||
simulationId:
|
||||
type: string
|
||||
wheelDiameter:
|
||||
description: 轮径(mm)
|
||||
type: integer
|
||||
type: object
|
||||
dto.ErrorDto:
|
||||
properties:
|
||||
|
@ -571,6 +597,8 @@ definitions:
|
|||
type: object
|
||||
dto.TrainInfoDto:
|
||||
properties:
|
||||
TrainConfigData:
|
||||
$ref: '#/definitions/dto.ConfigTrainData'
|
||||
carriage_length:
|
||||
type: integer
|
||||
description:
|
||||
|
@ -3591,7 +3619,7 @@ paths:
|
|||
name: AddTrainReqDto
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.AddTrainReqDto'
|
||||
$ref: '#/definitions/dto.AddTrainReqDtoNew'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
|
|
@ -0,0 +1,392 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v4.23.1
|
||||
// source: common_data.proto
|
||||
|
||||
package common_proto
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 动力学列车配置
|
||||
type TrainDynamicConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 列车的质量(100=1ton)
|
||||
//
|
||||
// int32 mass=1;
|
||||
//
|
||||
// 基本阻力参数A
|
||||
BaseResistanceParamA float32 `protobuf:"fixed32,1,opt,name=baseResistanceParamA,proto3" json:"baseResistanceParamA,omitempty"`
|
||||
// 基本阻力参数B
|
||||
BaseResistanceParamB float32 `protobuf:"fixed32,2,opt,name=baseResistanceParamB,proto3" json:"baseResistanceParamB,omitempty"`
|
||||
// 基本阻力参数C
|
||||
BaseResistanceParamC float32 `protobuf:"fixed32,3,opt,name=baseResistanceParamC,proto3" json:"baseResistanceParamC,omitempty"`
|
||||
// 曲线阻力参数R1
|
||||
CurveResistanceParamR1 float32 `protobuf:"fixed32,4,opt,name=curveResistanceParamR1,proto3" json:"curveResistanceParamR1,omitempty"`
|
||||
// 曲线阻力参数R2
|
||||
CurveResistanceParamR2 float32 `protobuf:"fixed32,5,opt,name=curveResistanceParamR2,proto3" json:"curveResistanceParamR2,omitempty"`
|
||||
// 曲线阻力参数R3
|
||||
CurveResistanceParamR3 float32 `protobuf:"fixed32,6,opt,name=curveResistanceParamR3,proto3" json:"curveResistanceParamR3,omitempty"`
|
||||
// 曲线阻力参数R4
|
||||
CurveResistanceParamR4 float32 `protobuf:"fixed32,7,opt,name=curveResistanceParamR4,proto3" json:"curveResistanceParamR4,omitempty"`
|
||||
// 旋转质量参数
|
||||
RevolvingMassParam float32 `protobuf:"fixed32,8,opt,name=revolvingMassParam,proto3" json:"revolvingMassParam,omitempty"`
|
||||
// 是否跳跃
|
||||
Jump bool `protobuf:"varint,9,opt,name=jump,proto3" json:"jump,omitempty"`
|
||||
// 打滑(%)
|
||||
Slip float32 `protobuf:"fixed32,10,opt,name=slip,proto3" json:"slip,omitempty"`
|
||||
// 前溜/后溜(mm)(正数前溜,负数后溜)
|
||||
Slide int32 `protobuf:"varint,11,opt,name=slide,proto3" json:"slide,omitempty"`
|
||||
// 过标/欠标(mm)(正数过标,负数欠标)
|
||||
StopSign int32 `protobuf:"varint,12,opt,name=stopSign,proto3" json:"stopSign,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) Reset() {
|
||||
*x = TrainDynamicConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_data_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrainDynamicConfig) ProtoMessage() {}
|
||||
|
||||
func (x *TrainDynamicConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_data_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TrainDynamicConfig.ProtoReflect.Descriptor instead.
|
||||
func (*TrainDynamicConfig) Descriptor() ([]byte, []int) {
|
||||
return file_common_data_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetBaseResistanceParamA() float32 {
|
||||
if x != nil {
|
||||
return x.BaseResistanceParamA
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetBaseResistanceParamB() float32 {
|
||||
if x != nil {
|
||||
return x.BaseResistanceParamB
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetBaseResistanceParamC() float32 {
|
||||
if x != nil {
|
||||
return x.BaseResistanceParamC
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetCurveResistanceParamR1() float32 {
|
||||
if x != nil {
|
||||
return x.CurveResistanceParamR1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetCurveResistanceParamR2() float32 {
|
||||
if x != nil {
|
||||
return x.CurveResistanceParamR2
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetCurveResistanceParamR3() float32 {
|
||||
if x != nil {
|
||||
return x.CurveResistanceParamR3
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetCurveResistanceParamR4() float32 {
|
||||
if x != nil {
|
||||
return x.CurveResistanceParamR4
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetRevolvingMassParam() float32 {
|
||||
if x != nil {
|
||||
return x.RevolvingMassParam
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetJump() bool {
|
||||
if x != nil {
|
||||
return x.Jump
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetSlip() float32 {
|
||||
if x != nil {
|
||||
return x.Slip
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetSlide() int32 {
|
||||
if x != nil {
|
||||
return x.Slide
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainDynamicConfig) GetStopSign() int32 {
|
||||
if x != nil {
|
||||
return x.StopSign
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 列车一端的状态
|
||||
type TrainEndsState struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// 速度传感器
|
||||
SpeedSensorEnableA bool `protobuf:"varint,1,opt,name=speedSensorEnableA,proto3" json:"speedSensorEnableA,omitempty"`
|
||||
SpeedSensorEnableB bool `protobuf:"varint,2,opt,name=speedSensorEnableB,proto3" json:"speedSensorEnableB,omitempty"`
|
||||
// 雷达是否有效
|
||||
RadarEnable bool `protobuf:"varint,3,opt,name=radarEnable,proto3" json:"radarEnable,omitempty"`
|
||||
// 雷达测速数值
|
||||
RadarCheckSpeed float32 `protobuf:"fixed32,4,opt,name=radarCheckSpeed,proto3" json:"radarCheckSpeed,omitempty"`
|
||||
// 雷达检测时间(秒)
|
||||
RadarCheckTime int32 `protobuf:"varint,5,opt,name=radarCheckTime,proto3" json:"radarCheckTime,omitempty"`
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) Reset() {
|
||||
*x = TrainEndsState{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_data_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*TrainEndsState) ProtoMessage() {}
|
||||
|
||||
func (x *TrainEndsState) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_data_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use TrainEndsState.ProtoReflect.Descriptor instead.
|
||||
func (*TrainEndsState) Descriptor() ([]byte, []int) {
|
||||
return file_common_data_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) GetSpeedSensorEnableA() bool {
|
||||
if x != nil {
|
||||
return x.SpeedSensorEnableA
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) GetSpeedSensorEnableB() bool {
|
||||
if x != nil {
|
||||
return x.SpeedSensorEnableB
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) GetRadarEnable() bool {
|
||||
if x != nil {
|
||||
return x.RadarEnable
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) GetRadarCheckSpeed() float32 {
|
||||
if x != nil {
|
||||
return x.RadarCheckSpeed
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *TrainEndsState) GetRadarCheckTime() int32 {
|
||||
if x != nil {
|
||||
return x.RadarCheckTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_common_data_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_data_proto_rawDesc = []byte{
|
||||
0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0x9a, 0x04, 0x0a, 0x12,
|
||||
0x54, 0x72, 0x61, 0x69, 0x6e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x12, 0x32, 0x0a, 0x14, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74,
|
||||
0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02,
|
||||
0x52, 0x14, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x41, 0x12, 0x32, 0x0a, 0x14, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65,
|
||||
0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74,
|
||||
0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x12, 0x32, 0x0a, 0x14, 0x62, 0x61,
|
||||
0x73, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61,
|
||||
0x6d, 0x43, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x14, 0x62, 0x61, 0x73, 0x65, 0x52, 0x65,
|
||||
0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x43, 0x12, 0x36,
|
||||
0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x16,
|
||||
0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x52, 0x31, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52,
|
||||
0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x32,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73,
|
||||
0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x32, 0x12, 0x36,
|
||||
0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x33, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x16,
|
||||
0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x52, 0x33, 0x12, 0x36, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52,
|
||||
0x65, 0x73, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x34,
|
||||
0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, 0x16, 0x63, 0x75, 0x72, 0x76, 0x65, 0x52, 0x65, 0x73,
|
||||
0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x34, 0x12, 0x2e,
|
||||
0x0a, 0x12, 0x72, 0x65, 0x76, 0x6f, 0x6c, 0x76, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x12, 0x72, 0x65, 0x76, 0x6f,
|
||||
0x6c, 0x76, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x6a, 0x75, 0x6d, 0x70, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x6a, 0x75,
|
||||
0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02,
|
||||
0x52, 0x04, 0x73, 0x6c, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x18,
|
||||
0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x6c, 0x69, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08,
|
||||
0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08,
|
||||
0x73, 0x74, 0x6f, 0x70, 0x53, 0x69, 0x67, 0x6e, 0x22, 0xe4, 0x01, 0x0a, 0x0e, 0x54, 0x72, 0x61,
|
||||
0x69, 0x6e, 0x45, 0x6e, 0x64, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x73,
|
||||
0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x41, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65,
|
||||
0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x12, 0x2e, 0x0a, 0x12, 0x73,
|
||||
0x70, 0x65, 0x65, 0x64, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||
0x42, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x70, 0x65, 0x65, 0x64, 0x53, 0x65,
|
||||
0x6e, 0x73, 0x6f, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x42, 0x12, 0x20, 0x0a, 0x0b, 0x72,
|
||||
0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0b, 0x72, 0x61, 0x64, 0x61, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x28, 0x0a,
|
||||
0x0f, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0f, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65,
|
||||
0x63, 0x6b, 0x53, 0x70, 0x65, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x64, 0x61, 0x72,
|
||||
0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0e, 0x72, 0x61, 0x64, 0x61, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x42,
|
||||
0x2f, 0x5a, 0x2d, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f,
|
||||
0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f,
|
||||
0x64, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_common_data_proto_rawDescOnce sync.Once
|
||||
file_common_data_proto_rawDescData = file_common_data_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_common_data_proto_rawDescGZIP() []byte {
|
||||
file_common_data_proto_rawDescOnce.Do(func() {
|
||||
file_common_data_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_data_proto_rawDescData)
|
||||
})
|
||||
return file_common_data_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_common_data_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_common_data_proto_goTypes = []interface{}{
|
||||
(*TrainDynamicConfig)(nil), // 0: common.TrainDynamicConfig
|
||||
(*TrainEndsState)(nil), // 1: common.TrainEndsState
|
||||
}
|
||||
var file_common_data_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_common_data_proto_init() }
|
||||
func file_common_data_proto_init() {
|
||||
if File_common_data_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_common_data_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainDynamicConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_data_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TrainEndsState); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_common_data_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_common_data_proto_goTypes,
|
||||
DependencyIndexes: file_common_data_proto_depIdxs,
|
||||
MessageInfos: file_common_data_proto_msgTypes,
|
||||
}.Build()
|
||||
File_common_data_proto = out.File
|
||||
file_common_data_proto_rawDesc = nil
|
||||
file_common_data_proto_goTypes = nil
|
||||
file_common_data_proto_depIdxs = nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -54,19 +54,52 @@ type AddTrainReqDto struct {
|
|||
// 列车轮径
|
||||
WheelDiameter int32 `json:"wheelDiameter" from:"wheelDiameter"`
|
||||
}
|
||||
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"`
|
||||
// 列车数据配置
|
||||
ConfigTrain ConfigTrainData `json:"ConfigTrain" from:"mapId"`
|
||||
TrainEndsA ConfigTrainEnds `json:"TrainEndsA"` // 车辆A端
|
||||
TrainEndsB ConfigTrainEnds `json:"TrainEndsB"` // 车辆B端
|
||||
}
|
||||
|
||||
// 为反正列车修改对应的测试配置
|
||||
type ConfigTrainReqDto struct {
|
||||
SimulationId string `json:"simulationId" form:"simulationId"`
|
||||
// 列车Id
|
||||
TrainId int `json:"TrainId" form:"TrainId"`
|
||||
ConfigData ConfigTrainData
|
||||
TrainId int `json:"TrainId" form:"TrainId"`
|
||||
Length int64 `json:"length"` // 列车的长度(cm)
|
||||
ConfigData ConfigTrainData
|
||||
TrainEndsA ConfigTrainEnds `json:"TrainEndsA"` // 车辆A端
|
||||
TrainEndsB ConfigTrainEnds `json:"TrainEndsB"` // 车辆B端
|
||||
WheelDiameter int32 `json:"wheelDiameter"` // 轮径(mm)
|
||||
}
|
||||
type ConfigTrainEnds struct {
|
||||
SpeedSensorEnableA bool `json:"speedSensorEnableA"` // 2端速度传感器是否有效
|
||||
SpeedSensorEnableB bool `json:"speedSensorEnableB"` // 2端速度传感器是否有效
|
||||
RadarEnable bool `json:"radarEnable"` // 雷达是否有效
|
||||
RadarCheckSpeed float32 `json:"radarCheckSpeed"` // 雷达测速数值
|
||||
RadarCheckTime int32 `json:"radarCheckTime"` // 雷达检测时间(秒)
|
||||
}
|
||||
|
||||
type ConfigTrainData struct {
|
||||
//
|
||||
Mass int32 `json:"mass" form:"mass"` // 列车的质量(100=1ton)
|
||||
Length int64 `json:"length"` // 列车的长度(cm)
|
||||
//Mass int32 `json:"mass" form:"mass"` // 列车的质量(100=1ton)
|
||||
BaseResistanceParamA float32 `json:"baseResistanceParamA"` // 基本阻力参数A
|
||||
BaseResistanceParamB float32 `json:"baseResistanceParamB"` // 基本阻力参数B
|
||||
BaseResistanceParamC float32 `json:"baseResistanceParamC"` // 基本阻力参数C
|
||||
|
@ -79,10 +112,8 @@ type ConfigTrainData struct {
|
|||
Slip float32 `json:"slip"` // 打滑(%)
|
||||
Slide int32 `json:"slide"` // 前溜/后溜(mm)(正数前溜,负数后溜)
|
||||
StopSign int32 `json:"stopSign"` // 过标/欠标(mm)(正数过标,负数欠标)
|
||||
WheelDiameter int32 `json:"wheelDiameter"` // 轮径(mm)
|
||||
RadarEnable bool `json:"radarEnable"` // 雷达是否有效
|
||||
RadarCheckSpeed float32 `json:"radarCheckSpeed"` // 雷达测速数值
|
||||
RadarCheckTime int32 `json:"radarCheckTime"` // 雷达检测时间(秒)
|
||||
//TrainEndsA ConfigTrainEnds `json:"TrainEndsA"` // 车辆A端
|
||||
//TrainEndsB ConfigTrainEnds `json:"TrainEndsB"` // 车辆B端
|
||||
}
|
||||
|
||||
// 为仿真添加测试车请求
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,15 +16,16 @@ type TrainInfoReqDto struct {
|
|||
}
|
||||
|
||||
type TrainInfoDto struct {
|
||||
Id int32 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
TrainModel int32 `json:"train_model" form:"train_model"`
|
||||
CarriageLength int32 `json:"carriage_length" form:"carriage_length"`
|
||||
TotalLength int32 `json:"total_length" form:"total_length"`
|
||||
MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
||||
MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
||||
TrainSets string `json:"train_sets" form:"train_sets"`
|
||||
Description string `json:"description" form:"description"`
|
||||
Id int32 `json:"id" form:"id"`
|
||||
Name string `json:"name" form:"name"`
|
||||
TrainModel int32 `json:"train_model" form:"train_model"`
|
||||
CarriageLength int32 `json:"carriage_length" form:"carriage_length"`
|
||||
TotalLength int32 `json:"total_length" form:"total_length"`
|
||||
MinDiameter int32 `json:"min_diameter" form:"min_diameter"`
|
||||
MaxDiameter int32 `json:"max_diameter" form:"max_diameter"`
|
||||
TrainSets string `json:"train_sets" form:"train_sets"`
|
||||
Description string `json:"description" form:"description"`
|
||||
TrainConfigData ConfigTrainData `json:"TrainConfigData" form:"TrainConfigData"`
|
||||
}
|
||||
|
||||
func ConvertToTrainDto(trailInfos []*PublishedDto) []*TrainInfoDto {
|
||||
|
|
279
go.work.sum
279
go.work.sum
|
@ -139,283 +139,4 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
|
|||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
|
||||
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
|
||||
github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
|
||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
|
||||
github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4=
|
||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
|
||||
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
|
||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
||||
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
||||
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
|
||||
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
|
||||
github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/ebitengine/purego v0.1.0/go.mod h1:Eh8I3yvknDYZeCuXH9kRNaPuHEwvXDCk378o9xszmHg=
|
||||
github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
|
||||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
|
||||
github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
|
||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
|
||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
||||
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
|
||||
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
|
||||
github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8=
|
||||
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/go-pkcs11 v0.2.1-0.20230907215043-c6f79328ddf9/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY=
|
||||
github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
|
||||
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
|
||||
github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
|
||||
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.4/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
|
||||
github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU=
|
||||
github.com/googleapis/google-cloud-go-testing v0.0.0-20210719221736-1c9a4c676720/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
|
||||
github.com/hajimehoshi/ebiten/v2 v2.4.13/go.mod h1:BZcqCU4XHmScUi+lsKexocWcf4offMFwfp8dVGIB/G4=
|
||||
github.com/hajimehoshi/file2byteslice v1.0.0/go.mod h1:CqqAHp7Dk/AqQiwuhV1yT2334qbA/tFWQW0MD2dGqUE=
|
||||
github.com/hashicorp/consul/api v1.25.1/go.mod h1:iiLVwR/htV7mas/sy0O+XSuEnrdBUUydemjxcUrAt4g=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
|
||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
|
||||
github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
|
||||
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
|
||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
|
||||
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
|
||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
|
||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
|
||||
github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
|
||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
|
||||
github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
|
||||
github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0=
|
||||
github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4=
|
||||
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
|
||||
github.com/jezek/xgb v1.0.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk=
|
||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE=
|
||||
github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
|
||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
|
||||
github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
|
||||
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
|
||||
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE=
|
||||
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
|
||||
github.com/nats-io/nats.go v1.31.0/go.mod h1:di3Bm5MLsoB4Bx61CBTsxuarI36WbhAwOm8QrW39+i8=
|
||||
github.com/nats-io/nkeys v0.4.6/go.mod h1:4DxZNzenSVd1cYQoAa8948QY3QDjrHfcfVADymtkpts=
|
||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/sftp v1.13.6/go.mod h1:tz1ryNURKu77RL+GuCzmoJYxQczL3wLNNpPWagdg4Qk=
|
||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
|
||||
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
|
||||
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
|
||||
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
|
||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
|
||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
||||
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
|
||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
|
||||
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
|
||||
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
|
||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
|
||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
|
||||
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
|
||||
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
|
||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
||||
github.com/sagikazarmark/crypt v0.17.0/go.mod h1:SMtHTvdmsZMuY/bpZoqokSoChIrcJ/epOxZN58PbZDg=
|
||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
|
||||
github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
|
||||
github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo=
|
||||
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
|
||||
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
||||
github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA=
|
||||
go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI=
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U=
|
||||
go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA=
|
||||
go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ=
|
||||
go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM=
|
||||
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
|
||||
go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U=
|
||||
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
|
||||
go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
|
||||
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
|
||||
go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
|
||||
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
||||
golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw=
|
||||
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
|
||||
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g=
|
||||
golang.org/x/image v0.1.0/go.mod h1:iyPr49SD/G/TBxYVB/9RRtGUT5eNbo2u4NamWeQcD5c=
|
||||
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
|
||||
golang.org/x/mobile v0.0.0-20221012134814-c746ac228303/go.mod h1:M32cGdzp91A8Ex9qQtyZinr19EYxzkFqDjW2oyHzTDQ=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
|
||||
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
|
||||
golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco=
|
||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
||||
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
|
||||
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
|
||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
||||
golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ=
|
||||
golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk=
|
||||
golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0=
|
||||
golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM=
|
||||
golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM=
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
|
||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
|
||||
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
google.golang.org/api v0.128.0/go.mod h1:Y611qgqaE92On/7g65MQgxYul3c0rEB894kniWLY750=
|
||||
google.golang.org/api v0.149.0/go.mod h1:Mwn1B7JTXrzXtnvmzQE2BD6bYZQ8DShKZDZbeN9I7qI=
|
||||
google.golang.org/api v0.150.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg=
|
||||
google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY=
|
||||
google.golang.org/api v0.153.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY=
|
||||
google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
|
||||
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4=
|
||||
google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI=
|
||||
google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405/go.mod h1:3WDQMjmJk36UQhjQ89emUzb1mdaHcPeeAh4SCBKznB4=
|
||||
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405/go.mod h1:oT32Z4o8Zv2xPQTg0pbVaPr0MPOH6f14RgXt7zfIpwg=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4=
|
||||
google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc=
|
||||
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
|
||||
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
|
||||
google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
|
||||
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
|
||||
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
|
||||
google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 655a0712af53b18d1eeb73eee309af12b2142b5a
|
||||
Subproject commit 0203bbcefa0797f2efae50bbaa5e9c6d0f30a84e
|
|
@ -2,6 +2,7 @@ package service
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"joylink.club/bj-rtsts-server/dto/common_proto"
|
||||
"time"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
|
@ -63,6 +64,21 @@ func CreateTrain(td *dto.TrainInfoDto, user *model.User) bool {
|
|||
}, true)
|
||||
return true
|
||||
}
|
||||
func TrainConfigToProtoConvert(t dto.ConfigTrainData) *common_proto.TrainDynamicConfig {
|
||||
return &common_proto.TrainDynamicConfig{
|
||||
BaseResistanceParamA: t.BaseResistanceParamA,
|
||||
BaseResistanceParamB: t.BaseResistanceParamB,
|
||||
BaseResistanceParamC: t.BaseResistanceParamC,
|
||||
CurveResistanceParamR1: t.CurveResistanceParamR1,
|
||||
CurveResistanceParamR2: t.CurveResistanceParamR2,
|
||||
CurveResistanceParamR3: t.CurveResistanceParamR3,
|
||||
CurveResistanceParamR4: t.CurveResistanceParamR4,
|
||||
Jump: t.Jump,
|
||||
Slip: t.Slip,
|
||||
Slide: t.Slide,
|
||||
StopSign: t.StopSign,
|
||||
}
|
||||
}
|
||||
|
||||
// 转成列车proto
|
||||
func convertTrainProto(t *dto.TrainInfoDto) []byte {
|
||||
|
@ -73,6 +89,7 @@ func convertTrainProto(t *dto.TrainInfoDto) []byte {
|
|||
MinDiameter: t.MinDiameter,
|
||||
MaxDiameter: t.MaxDiameter,
|
||||
TrainSets: t.TrainSets,
|
||||
DynamicConfig: TrainConfigToProtoConvert(t.TrainConfigData),
|
||||
}
|
||||
b, _ := proto.Marshal(message)
|
||||
return b
|
||||
|
|
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
type DynamicsMessageManager interface {
|
||||
CollectDynamicsTurnoutInfo() []*message.DynamicsTurnoutInfo
|
||||
CollectDynamicsTurnoutInfo() *message.DynamicsTurnoutInfo
|
||||
HandleDynamicsTrainInfo(info *message.DynamicsTrainInfo)
|
||||
GetDynamicsRunConfig() *config.DynamicsConfig
|
||||
GetDynamicsRunRepository() *message.LineBaseInfo
|
||||
|
@ -277,13 +277,10 @@ func (d *dynamics) sendTurnoutStateTask(ctx context.Context) {
|
|||
return
|
||||
default:
|
||||
}
|
||||
turnoutStates := d.manager.CollectDynamicsTurnoutInfo()
|
||||
// slog.Debug("发送道岔状态", "count", len(turnoutStates))
|
||||
for _, state := range turnoutStates {
|
||||
turnoutStateLifeSignal++
|
||||
state.LifeSignal = turnoutStateLifeSignal
|
||||
d.turnoutStateUdpClient.SendMsg(state)
|
||||
}
|
||||
turnoutState := d.manager.CollectDynamicsTurnoutInfo()
|
||||
turnoutStateLifeSignal++
|
||||
turnoutState.LifeSignal = turnoutStateLifeSignal
|
||||
d.turnoutStateUdpClient.SendMsg(turnoutState)
|
||||
time.Sleep(time.Millisecond * TurnoutMessageSendInterval)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,24 +6,30 @@ import (
|
|||
)
|
||||
|
||||
type DynamicsTurnoutInfo struct {
|
||||
LifeSignal uint16
|
||||
Code uint16
|
||||
NPosition bool
|
||||
RPosition bool
|
||||
LifeSignal uint16
|
||||
TurnoutInfos []*TurnoutInfo
|
||||
}
|
||||
|
||||
type TurnoutInfo struct {
|
||||
Code uint16
|
||||
NPosition bool
|
||||
RPosition bool
|
||||
}
|
||||
|
||||
func (t *DynamicsTurnoutInfo) Encode() []byte {
|
||||
var data []byte
|
||||
data = binary.BigEndian.AppendUint16(data, t.LifeSignal)
|
||||
data = binary.BigEndian.AppendUint16(data, t.Code)
|
||||
var b byte
|
||||
if t.NPosition {
|
||||
b |= 1 << 7
|
||||
for _, info := range t.TurnoutInfos {
|
||||
data = binary.BigEndian.AppendUint16(data, info.Code)
|
||||
var b byte
|
||||
if info.NPosition {
|
||||
b |= 1 << 7
|
||||
}
|
||||
if info.RPosition {
|
||||
b |= 1 << 6
|
||||
}
|
||||
data = append(data, b)
|
||||
}
|
||||
if t.RPosition {
|
||||
b |= 1 << 6
|
||||
}
|
||||
data = append(data, b)
|
||||
return data
|
||||
}
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@ type InitTrainInfo struct {
|
|||
LinkIndex uint16 `json:"linkIndex"`
|
||||
LinkOffset uint32 `json:"linkOffset"`
|
||||
//单位0.1km/h
|
||||
Speed uint16 `json:"speed"`
|
||||
Up bool `json:"up"`
|
||||
TrainLength uint32 `json:"trainLength"`
|
||||
Speed uint16 `json:"speed"`
|
||||
Up bool `json:"up"`
|
||||
//TrainLength uint32 `json:"trainLength"`
|
||||
TrainOperationConfig *TrainOperationConfig `json:"TrainOperationConfig"`
|
||||
}
|
||||
|
||||
// 移除列车请求参数
|
||||
|
@ -51,8 +52,8 @@ type Curve struct {
|
|||
Curvature int32 `json:"curvature"`
|
||||
}
|
||||
type TrainOperationConfig struct {
|
||||
TrainIndex int `json:"trainIndex"`
|
||||
Mass int `json:"mass" form:"mass"` //列车的质量(100=1ton)
|
||||
TrainIndex int `json:"trainIndex"`
|
||||
//Mass int `json:"mass" form:"mass"` //列车的质量(100=1ton)
|
||||
Length int `json:"列车的长度(cm)"`
|
||||
BaseResistanceParamA float32 `json:"基本阻力参数A"`
|
||||
BaseResistanceParamB float32 `json:"基本阻力参数B"`
|
||||
|
@ -66,7 +67,7 @@ type TrainOperationConfig struct {
|
|||
Slip float32 `json:"打滑(%)"`
|
||||
Slide int `json:"前溜/后溜(mm)(正数前溜,负数后溜)"`
|
||||
StopSign int `json:"过标/欠标(mm)(正数过标,负数欠标)"`
|
||||
WheelDiameter int `json:"轮径(mm)"`
|
||||
//WheelDiameter int `json:"轮径(mm)"`
|
||||
//RadarSpeed float32 `json:"雷达速度差值(m/s)"`
|
||||
//RadarDuration int `json:"雷达速度差值持续时间(ms)"`
|
||||
//RadarIsValid bool `json:"雷达是否失效"`
|
||||
|
|
|
@ -2,9 +2,12 @@ package memory
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"joylink.club/bj-rtsts-server/dto/common_proto"
|
||||
"joylink.club/bj-rtsts-server/service"
|
||||
"joylink.club/bj-rtsts-server/third_party/can_btm"
|
||||
"log/slog"
|
||||
"math"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
|
@ -18,8 +21,106 @@ import (
|
|||
"joylink.club/bj-rtsts-server/dto/state_proto"
|
||||
)
|
||||
|
||||
func DtoTrainEndsToStateProto(ends dto.ConfigTrainEnds) *common_proto.TrainEndsState {
|
||||
return &common_proto.TrainEndsState{SpeedSensorEnableA: ends.SpeedSensorEnableA, SpeedSensorEnableB: ends.SpeedSensorEnableB,
|
||||
RadarEnable: ends.RadarEnable, RadarCheckSpeed: ends.RadarCheckSpeed, RadarCheckTime: ends.RadarCheckTime}
|
||||
}
|
||||
func CreateMsgTrainConfig(trainId int, trainLen int64, configTrainData dto.ConfigTrainData) *message.TrainOperationConfig {
|
||||
return &message.TrainOperationConfig{TrainIndex: trainId, Length: int(trainLen),
|
||||
BaseResistanceParamA: configTrainData.BaseResistanceParamA, BaseResistanceParamB: configTrainData.BaseResistanceParamB,
|
||||
BaseResistanceParamC: configTrainData.BaseResistanceParamC, CurveResistanceParamR1: configTrainData.CurveResistanceParamR1,
|
||||
CurveResistanceParamR2: configTrainData.CurveResistanceParamR2, CurveResistanceParamR3: configTrainData.CurveResistanceParamR3,
|
||||
CurveResistanceParamR4: configTrainData.CurveResistanceParamR4, RevolvingMassParam: configTrainData.RevolvingMassParam,
|
||||
Jump: configTrainData.Jump, Slip: configTrainData.Slip, Slide: int(configTrainData.Slide),
|
||||
StopSign: int(configTrainData.StopSign)}
|
||||
}
|
||||
|
||||
// 增加列车状态
|
||||
func AddTrainState(vs *VerifySimulation, status *state_proto.TrainState, mapId int32) *state_proto.TrainState {
|
||||
func AddTrainStateNew(vs *VerifySimulation, status *state_proto.TrainState, configTrainData dto.ConfigTrainData, trainEndsA dto.ConfigTrainEnds,
|
||||
trainEndsB dto.ConfigTrainEnds, mapId int32) *state_proto.TrainState {
|
||||
allTrainMap := &vs.Memory.Status.TrainStateMap
|
||||
_, ok := allTrainMap.Load(status.Id)
|
||||
if ok {
|
||||
panic(fmt.Sprintf("列车【%s】已存在", status.Id))
|
||||
}
|
||||
// 显示状态
|
||||
status.Show = true
|
||||
//向动力学发送初始化请求
|
||||
trainIndex, _ := strconv.ParseUint(status.Id, 10, 16)
|
||||
slog.Debug("添加列车", "trainIndex", trainIndex, "HeadDeviceId", status.HeadDeviceId, "HeadOffset", status.HeadOffset)
|
||||
// 映射link、偏移量、运行方向
|
||||
var uid string
|
||||
if status.DevicePort == "" {
|
||||
uid = QueryUidByMidAndComId(mapId, status.HeadDeviceId, &data_proto.Section{})
|
||||
} else {
|
||||
uid = QueryUidByMidAndComId(mapId, status.HeadDeviceId, &data_proto.Turnout{})
|
||||
}
|
||||
// 车头所在link、link上的偏移
|
||||
linkId, loffset := QueryLinkAndOffsetByDevice(vs.Repo, uid, status.DevicePort, status.HeadOffset)
|
||||
// link上的运行方向、设备上的运行方向
|
||||
up, pointTo := QueryUpAndABByDevice(vs.Repo, uid, status.DevicePort, status.RunDirection)
|
||||
// 车头所在公里标
|
||||
kilometer := CalcTrainKilometer(vs.Repo, uid, status.DevicePort, status.RunDirection, status.HeadOffset)
|
||||
// 车尾相对车头link的偏移量
|
||||
calctailOffset := calcTrailTailOffset(loffset, status.TrainLength, up)
|
||||
// 车尾位置
|
||||
tailLink, _, _, tailLOffset, _, _, e1 := CalcInitializeLink(vs, linkId, calctailOffset, up)
|
||||
if e1 != nil {
|
||||
panic(sys_error.New("添加列车失败,列车车尾占用位置计算出错", e1))
|
||||
}
|
||||
status.Up = up
|
||||
status.PointTo = pointTo
|
||||
status.TrainKilometer = kilometer.Value
|
||||
status.DynamicState = &state_proto.TrainDynamicState{
|
||||
HeadLinkId: linkId,
|
||||
HeadLinkOffset: loffset,
|
||||
TailLinkId: tailLink,
|
||||
TailLinkOffset: tailLOffset,
|
||||
RunningUp: up,
|
||||
}
|
||||
/* status.TrainDynamicConfig = &state_proto.TrainDynamicConfig{
|
||||
BaseResistanceParamA: configTrainData.BaseResistanceParamA, BaseResistanceParamB: configTrainData.BaseResistanceParamB,
|
||||
BaseResistanceParamC: configTrainData.BaseResistanceParamC, CurveResistanceParamR1: configTrainData.CurveResistanceParamR1,
|
||||
CurveResistanceParamR2: configTrainData.CurveResistanceParamR2, CurveResistanceParamR3: configTrainData.CurveResistanceParamR3,
|
||||
CurveResistanceParamR4: configTrainData.CurveResistanceParamR4, RevolvingMassParam: configTrainData.RevolvingMassParam,
|
||||
Jump: configTrainData.Jump, Slip: configTrainData.Slip,
|
||||
Slide: configTrainData.Slide, StopSign: configTrainData.StopSign,
|
||||
TrainEndsA: DtoTrainEndsToStateProto(configTrainData.TrainEndsA),
|
||||
TrainEndsB: DtoTrainEndsToStateProto(configTrainData.TrainEndsB)}*/
|
||||
//初始化列车参数状态
|
||||
createOrUpdateStateDynamicConfig(status, configTrainData, trainEndsA, trainEndsB)
|
||||
status.VobcState = &state_proto.TrainVobcState{}
|
||||
slog.Debug("列车初始化", "trainIndex", trainIndex, "linkId", linkId, "loffset", loffset)
|
||||
linkIdInt, _ := strconv.Atoi(linkId)
|
||||
err := dynamics.Default().RequestAddTrain(&message.InitTrainInfo{
|
||||
TrainIndex: uint16(trainIndex),
|
||||
LinkIndex: uint16(linkIdInt),
|
||||
LinkOffset: uint32(loffset),
|
||||
Speed: uint16(math.Round(float64(status.Speed * 10))),
|
||||
Up: status.Up,
|
||||
TrainOperationConfig: CreateMsgTrainConfig(int(trainIndex), status.TrainLength, configTrainData),
|
||||
})
|
||||
if err != nil {
|
||||
panic(dto.ErrorDto{Code: dto.DynamicsError, Message: err.Error()})
|
||||
}
|
||||
// world中加车
|
||||
fi.AddTrainToWorld(vs.World, status.Id)
|
||||
fi.UpdateTrainPositionFromDynamics(vs.World, fi.TrainPositionInfo{
|
||||
TrainId: status.Id,
|
||||
Up: status.Up,
|
||||
Len: uint32(status.TrainLength),
|
||||
HeadLink: linkId,
|
||||
HeadLinkOffset: uint32(loffset),
|
||||
TailLink: tailLink,
|
||||
TailLinkOffset: uint32(tailLOffset),
|
||||
})
|
||||
// 将信息合并到当前设备状态中
|
||||
allTrainMap.Store(status.Id, status)
|
||||
return status
|
||||
}
|
||||
|
||||
// 增加列车状态
|
||||
/*func AddTrainState(vs *VerifySimulation, status *state_proto.TrainState, mapId int32) *state_proto.TrainState {
|
||||
allTrainMap := &vs.Memory.Status.TrainStateMap
|
||||
_, ok := allTrainMap.Load(status.Id)
|
||||
if ok {
|
||||
|
@ -88,11 +189,46 @@ func AddTrainState(vs *VerifySimulation, status *state_proto.TrainState, mapId i
|
|||
// 将信息合并到当前设备状态中
|
||||
allTrainMap.Store(status.Id, status)
|
||||
return status
|
||||
}*/
|
||||
|
||||
func createOrUpdateStateDynamicConfig(trainState *state_proto.TrainState, configTrainData dto.ConfigTrainData, trainEndsA dto.ConfigTrainEnds,
|
||||
trainEndsB dto.ConfigTrainEnds) {
|
||||
trainState.TrainDynamicConfig = service.TrainConfigToProtoConvert(configTrainData)
|
||||
|
||||
/*if trainState.TrainDynamicConfig == nil {
|
||||
trainState.TrainDynamicConfig = &common_proto.TrainDynamicConfig{}
|
||||
}
|
||||
trainState.TrainDynamicConfig.BaseResistanceParamA = configTrainData.BaseResistanceParamA
|
||||
trainState.TrainDynamicConfig.BaseResistanceParamB = configTrainData.BaseResistanceParamB
|
||||
trainState.TrainDynamicConfig.BaseResistanceParamC = configTrainData.BaseResistanceParamC
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR1 = configTrainData.CurveResistanceParamR1
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR2 = configTrainData.CurveResistanceParamR2
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR3 = configTrainData.CurveResistanceParamR3
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR4 = configTrainData.CurveResistanceParamR4
|
||||
trainState.TrainDynamicConfig.Jump = configTrainData.Jump
|
||||
trainState.TrainDynamicConfig.Slip = configTrainData.Slip
|
||||
trainState.TrainDynamicConfig.Slide = configTrainData.Slide
|
||||
trainState.TrainDynamicConfig.StopSign = configTrainData.StopSign*/
|
||||
copyTrainEnds(trainState, "TrainEndsA", trainEndsA)
|
||||
copyTrainEnds(trainState, "TrainEndsB", trainEndsB)
|
||||
}
|
||||
|
||||
func copyTrainEnds(trainState *state_proto.TrainState, fieldName string, configData dto.ConfigTrainEnds) {
|
||||
fieldVal := reflect.ValueOf(trainState).Elem().FieldByName(fieldName)
|
||||
endsVal := fieldVal.Interface().(*common_proto.TrainEndsState)
|
||||
if endsVal == nil {
|
||||
endsVal = &common_proto.TrainEndsState{}
|
||||
fieldVal.Set(reflect.ValueOf(endsVal))
|
||||
}
|
||||
endsVal.SpeedSensorEnableA = configData.SpeedSensorEnableA
|
||||
endsVal.SpeedSensorEnableA = configData.SpeedSensorEnableB
|
||||
endsVal.RadarEnable = configData.RadarEnable
|
||||
endsVal.RadarCheckSpeed = configData.RadarCheckSpeed
|
||||
endsVal.RadarCheckTime = configData.RadarCheckTime
|
||||
}
|
||||
func UpdateConfigTrain(vs *VerifySimulation, ct *dto.ConfigTrainReqDto) {
|
||||
allTrainMap := &vs.Memory.Status.TrainStateMap
|
||||
data, ok := allTrainMap.Load(ct.TrainId)
|
||||
data, ok := allTrainMap.Load(strconv.Itoa(ct.TrainId))
|
||||
if !ok {
|
||||
panic(sys_error.New(fmt.Sprintf("列车【%s】不存在", ct.TrainId)))
|
||||
}
|
||||
|
@ -100,39 +236,33 @@ func UpdateConfigTrain(vs *VerifySimulation, ct *dto.ConfigTrainReqDto) {
|
|||
if !ok {
|
||||
panic(sys_error.New(fmt.Sprintf("列车参数修改断言:列车【%s】不存在", ct.TrainId)))
|
||||
}
|
||||
if trainState.DynamicState.TrainDynamicConfig == nil {
|
||||
trainState.DynamicState.TrainDynamicConfig = &state_proto.TrainDynamicConfig{}
|
||||
}
|
||||
trainState.DynamicState.TrainDynamicConfig.BaseResistanceParamA = ct.ConfigData.BaseResistanceParamA
|
||||
trainState.DynamicState.TrainDynamicConfig.BaseResistanceParamB = ct.ConfigData.BaseResistanceParamB
|
||||
trainState.DynamicState.TrainDynamicConfig.BaseResistanceParamC = ct.ConfigData.BaseResistanceParamC
|
||||
trainState.DynamicState.TrainDynamicConfig.CurveResistanceParamR1 = ct.ConfigData.CurveResistanceParamR1
|
||||
trainState.DynamicState.TrainDynamicConfig.CurveResistanceParamR2 = ct.ConfigData.CurveResistanceParamR2
|
||||
trainState.DynamicState.TrainDynamicConfig.CurveResistanceParamR3 = ct.ConfigData.CurveResistanceParamR3
|
||||
trainState.DynamicState.TrainDynamicConfig.CurveResistanceParamR4 = ct.ConfigData.CurveResistanceParamR4
|
||||
trainState.TrainLength = ct.ConfigData.Length
|
||||
trainState.DynamicState.TrainDynamicConfig.Mass = ct.ConfigData.Mass
|
||||
trainState.DynamicState.TrainDynamicConfig.Jump = ct.ConfigData.Jump
|
||||
trainState.DynamicState.TrainDynamicConfig.Slip = ct.ConfigData.Slip
|
||||
trainState.DynamicState.TrainDynamicConfig.Slide = ct.ConfigData.Slide
|
||||
trainState.DynamicState.TrainDynamicConfig.StopSign = ct.ConfigData.StopSign
|
||||
trainState.DynamicState.TrainDynamicConfig.RadarEnable = ct.ConfigData.RadarEnable
|
||||
trainState.DynamicState.TrainDynamicConfig.RadarCheckSpeed = ct.ConfigData.RadarCheckSpeed
|
||||
trainState.DynamicState.TrainDynamicConfig.RadarCheckTime = ct.ConfigData.RadarCheckTime
|
||||
trainState.WheelDiameter = ct.ConfigData.WheelDiameter
|
||||
requestDynamic(ct)
|
||||
createOrUpdateStateDynamicConfig(trainState, ct.ConfigData, ct.TrainEndsA, ct.TrainEndsB)
|
||||
/* if trainState.TrainDynamicConfig == nil {
|
||||
trainState.TrainDynamicConfig = &state_proto.TrainDynamicConfig{}
|
||||
}*/
|
||||
/*trainState.TrainDynamicConfig.BaseResistanceParamA = ct.ConfigData.BaseResistanceParamA
|
||||
trainState.TrainDynamicConfig.BaseResistanceParamB = ct.ConfigData.BaseResistanceParamB
|
||||
trainState.TrainDynamicConfig.BaseResistanceParamC = ct.ConfigData.BaseResistanceParamC
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR1 = ct.ConfigData.CurveResistanceParamR1
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR2 = ct.ConfigData.CurveResistanceParamR2
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR3 = ct.ConfigData.CurveResistanceParamR3
|
||||
trainState.TrainDynamicConfig.CurveResistanceParamR4 = ct.ConfigData.CurveResistanceParamR4
|
||||
trainState.TrainDynamicConfig.Jump = ct.ConfigData.Jump
|
||||
trainState.TrainDynamicConfig.Slip = ct.ConfigData.Slip
|
||||
trainState.TrainDynamicConfig.Slide = ct.ConfigData.Slide
|
||||
trainState.TrainDynamicConfig.StopSign = ct.ConfigData.StopSign*/
|
||||
trainState.TrainLength = ct.Length
|
||||
|
||||
trainState.WheelDiameter = ct.WheelDiameter
|
||||
//copyTrainEnds(trainState.TrainDynamicConfig, "TrainEndsA", ct.ConfigData.TrainEndsA)
|
||||
//copyTrainEnds(trainState.TrainDynamicConfig, "TrainEndsB", ct.ConfigData.TrainEndsB)
|
||||
//requestDynamicConfig(ct)
|
||||
}
|
||||
|
||||
func requestDynamic(ct *dto.ConfigTrainReqDto) {
|
||||
cd := ct.ConfigData
|
||||
msg := &message.TrainOperationConfig{TrainIndex: ct.TrainId, Mass: int(cd.Mass), Length: int(cd.Length),
|
||||
BaseResistanceParamA: cd.BaseResistanceParamA, BaseResistanceParamB: cd.BaseResistanceParamB,
|
||||
BaseResistanceParamC: cd.BaseResistanceParamC, CurveResistanceParamR1: cd.CurveResistanceParamR1,
|
||||
CurveResistanceParamR2: cd.CurveResistanceParamR2, CurveResistanceParamR3: cd.CurveResistanceParamR3,
|
||||
CurveResistanceParamR4: cd.CurveResistanceParamR4, RevolvingMassParam: cd.RevolvingMassParam,
|
||||
Jump: cd.Jump, Slip: cd.Slip, Slide: int(cd.Slide),
|
||||
StopSign: int(cd.StopSign), WheelDiameter: int(cd.WheelDiameter)}
|
||||
err := dynamics.Default().TrainOperationConfig(msg)
|
||||
func requestDynamicConfig(ct *dto.ConfigTrainReqDto) {
|
||||
msg := CreateMsgTrainConfig(ct.TrainId, ct.Length, ct.ConfigData)
|
||||
err2 := dynamics.Default().TrainOperationConfig(msg)
|
||||
err := err2
|
||||
if err != nil {
|
||||
slog.Error("列车参数变更请求动力学失败", err)
|
||||
panic(sys_error.New(fmt.Sprintf("列车参数变更请求动力学失败")))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package memory
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log/slog"
|
||||
|
@ -219,21 +220,29 @@ func (s *VerifySimulation) CollectSectionStatus(city string, lineId string, cent
|
|||
}
|
||||
|
||||
// 采集动力学道岔状态
|
||||
func (s *VerifySimulation) CollectDynamicsTurnoutInfo() []*message.DynamicsTurnoutInfo {
|
||||
var turnoutStates []*message.DynamicsTurnoutInfo
|
||||
for _, o := range s.Repo.TurnoutList() {
|
||||
sta := s.uidMap[o.Id()]
|
||||
func (s *VerifySimulation) CollectDynamicsTurnoutInfo() *message.DynamicsTurnoutInfo {
|
||||
turnoutState := &message.DynamicsTurnoutInfo{}
|
||||
for _, turnout := range s.Repo.TurnoutList() {
|
||||
sta := s.uidMap[turnout.Id()]
|
||||
if sta == nil {
|
||||
continue
|
||||
}
|
||||
s := handlerDynamicsTurnoutState(s.World, o.Id())
|
||||
if s == nil {
|
||||
continue
|
||||
entry, ok := entity.GetEntityByUid(s.World, turnout.Id())
|
||||
if !ok {
|
||||
slog.Warn(fmt.Sprintf("id=%s的道岔不存在", turnout.Id()))
|
||||
return nil
|
||||
}
|
||||
s.Code = uint16(sta.CommonId)
|
||||
turnoutStates = append(turnoutStates, s)
|
||||
if !entry.HasComponent(component.TurnoutPositionType) {
|
||||
return nil
|
||||
}
|
||||
pos := component.TurnoutPositionType.Get(entry)
|
||||
turnoutState.TurnoutInfos = append(turnoutState.TurnoutInfos, &message.TurnoutInfo{
|
||||
Code: 0,
|
||||
NPosition: pos.Dw,
|
||||
RPosition: pos.Fw,
|
||||
})
|
||||
}
|
||||
return turnoutStates
|
||||
return turnoutState
|
||||
}
|
||||
|
||||
// HandleSectionCmdMsg 计轴设备接收到联锁发送来的控制命令
|
||||
|
@ -268,19 +277,6 @@ func (s *VerifySimulation) HandleSectionCmdMsg(city string, lineId string, centr
|
|||
fi.AxleSectionRstDrive(s.World, cmds)
|
||||
}
|
||||
|
||||
func handlerDynamicsTurnoutState(w ecs.World, uid string) *message.DynamicsTurnoutInfo {
|
||||
entry, ok := entity.GetEntityByUid(w, uid)
|
||||
if !ok {
|
||||
fmt.Printf("id=%s的道岔不存在", uid)
|
||||
return nil
|
||||
}
|
||||
if !entry.HasComponent(component.TurnoutPositionType) {
|
||||
return nil
|
||||
}
|
||||
pos := component.TurnoutPositionType.Get(entry)
|
||||
return &message.DynamicsTurnoutInfo{NPosition: pos.Dw, RPosition: pos.Fw}
|
||||
}
|
||||
|
||||
// 处理动力学列车速度消息
|
||||
func (s *VerifySimulation) HandleDynamicsTrainInfo(info *message.DynamicsTrainInfo) {
|
||||
trainId := strconv.Itoa(int(info.Number))
|
||||
|
@ -1036,10 +1032,14 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
|
|||
}
|
||||
stm := make(map[string][]string)
|
||||
for _, data := range storage.Transponders {
|
||||
fixedTelegram, err := hex.DecodeString(data.FixedTelegram)
|
||||
if err != nil {
|
||||
slog.Error(fmt.Sprintf("解析应答器[%s]的报文出错:", err.Error()))
|
||||
}
|
||||
responder := &proto.Transponder{
|
||||
Id: uidsMap.TransponderIds[GetMapElementId(data.Common)].Uid,
|
||||
Km: convertKm(data.KilometerSystem),
|
||||
FixedTelegram: data.FixedTelegram,
|
||||
FixedTelegram: fixedTelegram,
|
||||
Type: convertToProtoBaliseType(data.Type),
|
||||
}
|
||||
switch data.TransponderRef.DeviceType {
|
||||
|
|
Loading…
Reference in New Issue