28 lines
1.2 KiB
Go
28 lines
1.2 KiB
Go
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
|
||
}
|