33 lines
553 B
Go
33 lines
553 B
Go
|
package model
|
||
|
|
||
|
// 道岔位置
|
||
|
type TurnoutPosition int
|
||
|
|
||
|
const (
|
||
|
// 失表
|
||
|
TPos_Lost TurnoutPosition = 0
|
||
|
// 定位
|
||
|
TPos_DW TurnoutPosition = 1
|
||
|
// 反位
|
||
|
TPos_FW TurnoutPosition = 2
|
||
|
)
|
||
|
|
||
|
type Turnout_Port int
|
||
|
|
||
|
const (
|
||
|
TurnoutPort_A Turnout_Port = 0
|
||
|
TurnoutPort_B Turnout_Port = 1
|
||
|
TurnoutPort_C Turnout_Port = 2
|
||
|
)
|
||
|
|
||
|
// 道岔
|
||
|
type Turnout interface {
|
||
|
Model
|
||
|
// 获取A方向连接的link端口
|
||
|
GetALinkPort() *LinkPort
|
||
|
// 获取B方向连接的link端口
|
||
|
GetBLinkPort() *LinkPort
|
||
|
// 获取C方向连接的link端口
|
||
|
GetCLinkPort() *LinkPort
|
||
|
}
|