2023-12-27 15:51:28 +08:00
|
|
|
package model
|
|
|
|
|
|
|
|
// 道岔位置
|
|
|
|
type TurnoutPosition int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// 失表
|
|
|
|
TPos_Lost TurnoutPosition = 0
|
|
|
|
// 定位
|
|
|
|
TPos_DW TurnoutPosition = 1
|
|
|
|
// 反位
|
|
|
|
TPos_FW TurnoutPosition = 2
|
|
|
|
)
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
|
|
|
// 道岔牵引类型
|
|
|
|
type TurnoutTractionType int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// ZDJ9单机牵引
|
2023-12-28 16:49:28 +08:00
|
|
|
TTT_ZDJ9_1 TurnoutTractionType = 1
|
2023-12-28 11:06:46 +08:00
|
|
|
// ZDJ9双机牵引
|
2023-12-28 16:49:28 +08:00
|
|
|
TTT_ZDJ9_2 TurnoutTractionType = 2
|
2023-12-27 15:51:28 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
// 道岔
|
|
|
|
type Turnout interface {
|
|
|
|
Model
|
|
|
|
// 获取A方向连接的link端口
|
|
|
|
GetALinkPort() *LinkPort
|
|
|
|
// 获取B方向连接的link端口
|
|
|
|
GetBLinkPort() *LinkPort
|
|
|
|
// 获取C方向连接的link端口
|
|
|
|
GetCLinkPort() *LinkPort
|
2023-12-28 11:06:46 +08:00
|
|
|
// 获取牵引类型
|
|
|
|
GetTractionType() TurnoutTractionType
|
2023-12-27 15:51:28 +08:00
|
|
|
}
|