应答器固定报文

This commit is contained in:
xzb 2023-11-22 13:52:38 +08:00
parent db439177cb
commit fddc36f190
2 changed files with 7 additions and 5 deletions

View File

@ -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 {

View File

@ -9,12 +9,14 @@ type Transponder struct {
//section *PhysicalSection
//turnoutPort TurnoutPort
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,
fixedTelegram: fixedTelegram,
}
}