rts-sim-testing-service/ats/verify/simulation/wayside/model/section/physical_section_model.go

30 lines
1.3 KiB
Go
Raw Normal View History

2023-07-31 11:30:34 +08:00
package section
import "joylink.club/bj-rtsts-server/ats/verify/simulation/wayside/face"
// 物理区段(一整个计轴区段、岔区几个计轴检测点限定的区域)物理区段(一整个计轴区段、岔区几个计轴检测点限定的区域)物理区段(一整个计轴区段、岔区几个计轴检测点限定的区域)物理区段(一整个计轴区段、岔区几个计轴检测点限定的区域)物理区段(一整个计轴区段、岔区几个计轴检测点限定的区域)v
type PhysicalSectionModel struct {
//物理区段基本信息
face.DeviceModel
//true - 岔区物理区段false - 非岔区物理区段
SwitchArea bool
//限定物理区段的计轴检测点
//key-图形id
AxlePoints map[string]face.AxlePointDeviceModeller
//该物理区段中包含的所有计轴区段
//key-图形id
AxleSections map[string]face.AxleSectionModeller
2023-08-10 14:18:55 +08:00
// 端口对应的计轴信息
PortAxlePoints map[string]face.AxlePointDeviceModeller
2023-07-31 11:30:34 +08:00
}
// 添加计轴检测点
func (psm *PhysicalSectionModel) AddAxlePoint(axlePointDeviceModel face.AxlePointDeviceModeller) {
psm.AxlePoints[axlePointDeviceModel.GetGraphicId()] = axlePointDeviceModel
}
// 添加计轴区段
func (psm *PhysicalSectionModel) AddAxleSection(axleSectionModel face.AxleSectionModeller) {
psm.AxleSections[axleSectionModel.GetGraphicId()] = axleSectionModel
}