信号机模型类型
This commit is contained in:
parent
5d85a92dc4
commit
4e26ee104f
@ -64,7 +64,7 @@ func buildModels(source *proto.Repository, repository *Repository) {
|
||||
repository.turnoutMap[m.Id()] = m
|
||||
}
|
||||
for _, protoData := range source.Signals {
|
||||
m := NewSignal(protoData.Id, protoData.Km, protoData.Code)
|
||||
m := NewSignal(protoData.Id, protoData.Km, protoData.Code, protoData.Model)
|
||||
repository.signalMap[m.Id()] = m
|
||||
}
|
||||
for _, protoData := range source.Transponders {
|
||||
|
@ -11,13 +11,15 @@ type Signal struct {
|
||||
linkPosition *LinkPosition
|
||||
//信号机电路系统电子元器件
|
||||
componentGroups []*ElectronicComponentGroup
|
||||
model proto.Signal_Model
|
||||
}
|
||||
|
||||
func NewSignal(id string, km *proto.Kilometer, code string) *Signal {
|
||||
func NewSignal(id string, km *proto.Kilometer, code string, model proto.Signal_Model) *Signal {
|
||||
return &Signal{
|
||||
Identity: identity{id, proto.DeviceType_DeviceType_Signal},
|
||||
km: km,
|
||||
code: code,
|
||||
model: model,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user