应答器固定报文
This commit is contained in:
parent
db439177cb
commit
fddc36f190
@ -78,7 +78,7 @@ func buildModels(source *proto.Repository, repository *Repository) error {
|
||||
repository.signalMap[m.Id()] = m
|
||||
}
|
||||
for _, protoData := range source.Transponders {
|
||||
m := NewTransponder(protoData.Id, protoData.Km)
|
||||
m := NewTransponder(protoData.Id, protoData.Km, protoData.FixedTelegram)
|
||||
repository.responderMap[m.Id()] = m
|
||||
}
|
||||
for _, protoData := range source.Slopes {
|
||||
|
@ -8,13 +8,15 @@ type Transponder struct {
|
||||
km *proto.Kilometer
|
||||
//section *PhysicalSection
|
||||
//turnoutPort TurnoutPort
|
||||
linkPosition *LinkPosition
|
||||
linkPosition *LinkPosition
|
||||
fixedTelegram string //无源应答器固定报文
|
||||
}
|
||||
|
||||
func NewTransponder(id string, km *proto.Kilometer) *Transponder {
|
||||
func NewTransponder(id string, km *proto.Kilometer, fixedTelegram string) *Transponder {
|
||||
return &Transponder{
|
||||
Identity: identity{id, proto.DeviceType_DeviceType_Transponder},
|
||||
km: km,
|
||||
Identity: identity{id, proto.DeviceType_DeviceType_Transponder},
|
||||
km: km,
|
||||
fixedTelegram: fixedTelegram,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user