应答器实体
This commit is contained in:
parent
896558d116
commit
09e1ad68f9
@ -1036,6 +1036,7 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi
|
||||
SectionId: sectionId,
|
||||
TurnoutPort: turnoutPort,
|
||||
FixedTelegram: data.FixedTelegram,
|
||||
Type: convertToProtoBaliseType(data.Type),
|
||||
}
|
||||
repo.Transponders = append(repo.Transponders, converTransponderUid(responder, uidsMap))
|
||||
for _, stationName := range data.CentralizedStations {
|
||||
@ -1484,3 +1485,19 @@ func convertToProtoSignalModel(gSmt graphicData.Signal_Model) proto.Signal_Model
|
||||
panic(fmt.Sprintf("graphicData.Signal_Model[%d]无法映射到proto.Signal_Model", gSmt))
|
||||
}
|
||||
}
|
||||
func convertToProtoBaliseType(bt graphicData.Transponder_TransponderTypeEnum) proto.Transponder_Type {
|
||||
switch bt {
|
||||
case graphicData.Transponder_FB:
|
||||
return proto.Transponder_FB
|
||||
case graphicData.Transponder_WB:
|
||||
return proto.Transponder_WB
|
||||
case graphicData.Transponder_DB:
|
||||
return proto.Transponder_DB
|
||||
case graphicData.Transponder_VB:
|
||||
return proto.Transponder_VB
|
||||
case graphicData.Transponder_IB:
|
||||
return proto.Transponder_IB
|
||||
default:
|
||||
panic(fmt.Sprintf("graphicData.Transponder_TransponderTypeEnum[%d]无法映射到proto.Transponder_Type", bt))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user