35 lines
597 B
Go
35 lines
597 B
Go
package model
|
|
|
|
type ModelType string
|
|
|
|
const (
|
|
// 车站
|
|
ModelType_Station ModelType = "Station"
|
|
// 站台
|
|
ModelType_Stand ModelType = "Stand"
|
|
// 屏蔽门
|
|
ModelType_PSD ModelType = "PSD"
|
|
// Link
|
|
ModelType_Link ModelType = "Link"
|
|
// 区段
|
|
ModelType_Section ModelType = "Section"
|
|
// 道岔
|
|
ModelType_Turnout ModelType = "Turnout"
|
|
// 信号机
|
|
ModelType_Signal ModelType = "Signal"
|
|
// 应答器
|
|
ModelType_Balise ModelType = "Balise"
|
|
)
|
|
|
|
type Uid interface {
|
|
Id() string
|
|
}
|
|
|
|
// 模型接口
|
|
type Model interface {
|
|
// Unique id,唯一id
|
|
Uid() Uid
|
|
// 模型类型
|
|
Type() ModelType
|
|
}
|