2023-12-27 15:51:28 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
// 道岔位置
|
2024-01-02 18:22:28 +08:00
|
|
|
type PointsPosition int
|
2023-12-27 15:51:28 +08:00
|
|
|
|
|
|
|
const (
|
|
|
|
// 失表
|
2024-01-02 18:22:28 +08:00
|
|
|
TPos_Lost PointsPosition = 0
|
2023-12-27 15:51:28 +08:00
|
|
|
// 定位
|
2024-01-02 18:22:28 +08:00
|
|
|
TPos_DW PointsPosition = 1
|
2023-12-27 15:51:28 +08:00
|
|
|
// 反位
|
2024-01-02 18:22:28 +08:00
|
|
|
TPos_FW PointsPosition = 2
|
2023-12-27 15:51:28 +08:00
|
|
|
)
|
|
|
|
|
2023-12-28 11:06:46 +08:00
|
|
|
// 道岔端口
|
2023-12-27 15:51:28 +08:00
|
|
|
type Turnout_Port int
|
|
|
|
|
|
|
|
const (
|
2023-12-28 16:49:28 +08:00
|
|
|
TPort_A Turnout_Port = 1
|
|
|
|
TPort_B Turnout_Port = 2
|
|
|
|
TPort_C Turnout_Port = 3
|
2023-12-28 11:06:46 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// 道岔牵引类型
|
2024-01-02 18:22:28 +08:00
|
|
|
type PointsTractionType int
|
2023-12-28 11:06:46 +08:00
|
|
|
|
|
|
|
const (
|
|
|
|
// ZDJ9单机牵引
|
2024-01-02 18:22:28 +08:00
|
|
|
PTT_ZDJ9_1 PointsTractionType = 1
|
2023-12-28 11:06:46 +08:00
|
|
|
// ZDJ9双机牵引
|
2024-01-02 18:22:28 +08:00
|
|
|
PTT_ZDJ9_2 PointsTractionType = 2
|
2023-12-27 15:51:28 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// 道岔
|
2024-01-02 18:22:28 +08:00
|
|
|
type Points interface {
|
2023-12-27 15:51:28 +08:00
|
|
|
Model
|
|
|
|
// 获取A方向连接的link端口
|
|
|
|
GetALinkPort() *LinkPort
|
|
|
|
// 获取B方向连接的link端口
|
|
|
|
GetBLinkPort() *LinkPort
|
|
|
|
// 获取C方向连接的link端口
|
|
|
|
GetCLinkPort() *LinkPort
|
2023-12-28 11:06:46 +08:00
|
|
|
// 获取牵引类型
|
2024-01-02 18:22:28 +08:00
|
|
|
GetTractionType() PointsTractionType
|
|
|
|
// 获取转辙机数量
|
|
|
|
GetZzjCount() int
|
2023-12-27 15:51:28 +08:00
|
|
|
}
|