rts-sim-testing-service/ats/verify/simulation/wayside/model/section/physical_section_model.go
2023-07-31 11:30:34 +08:00

28 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}
// 添加计轴检测点
func (psm *PhysicalSectionModel) AddAxlePoint(axlePointDeviceModel face.AxlePointDeviceModeller) {
psm.AxlePoints[axlePointDeviceModel.GetGraphicId()] = axlePointDeviceModel
}
// 添加计轴区段
func (psm *PhysicalSectionModel) AddAxleSection(axleSectionModel face.AxleSectionModeller) {
psm.AxleSections[axleSectionModel.GetGraphicId()] = axleSectionModel
}