rts-sim-testing-service/ats/verify/simulation/wayside/model/section/physical_section_model.go
2023-08-10 14:18:55 +08:00

30 lines
1.3 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
// 端口对应的计轴信息
PortAxlePoints map[string]face.AxlePointDeviceModeller
}
// 添加计轴检测点
func (psm *PhysicalSectionModel) AddAxlePoint(axlePointDeviceModel face.AxlePointDeviceModeller) {
psm.AxlePoints[axlePointDeviceModel.GetGraphicId()] = axlePointDeviceModel
}
// 添加计轴区段
func (psm *PhysicalSectionModel) AddAxleSection(axleSectionModel face.AxleSectionModeller) {
psm.AxleSections[axleSectionModel.GetGraphicId()] = axleSectionModel
}