diff --git a/bj-rtss-message b/bj-rtss-message index b6bb68a..0413df3 160000 --- a/bj-rtss-message +++ b/bj-rtss-message @@ -1 +1 @@ -Subproject commit b6bb68aa99c33ce539a7a858a3682f6269d5a392 +Subproject commit 0413df374c5d01759e53bee16490866a17882f5f diff --git a/src/components/draw-app/DrawProperties.vue b/src/components/draw-app/DrawProperties.vue index 5c1b15d..7a74f92 100644 --- a/src/components/draw-app/DrawProperties.vue +++ b/src/components/draw-app/DrawProperties.vue @@ -124,6 +124,9 @@ > + @@ -184,6 +187,7 @@ import TrackSectionProperty from './properties/TrackSectionProperty.vue'; import { TrackSection } from 'src/graphics/trackSection/TrackSection'; import TrackLogicSectionProperty from './properties/TrackLogicSectionProperty.vue'; import { TrackLogicSection } from 'src/graphics/trackLogicSection/TrackLogicSection'; +import MultipleSelectProperty from './properties/multipleSelectProperty.vue'; const drawStore = useDrawStore(); diff --git a/src/components/draw-app/properties/PlatformProperty.vue b/src/components/draw-app/properties/PlatformProperty.vue index 0b0b1ab..b41ee20 100644 --- a/src/components/draw-app/properties/PlatformProperty.vue +++ b/src/components/draw-app/properties/PlatformProperty.vue @@ -29,6 +29,21 @@ :options="optionsDirection" label="方向" /> + + + @@ -37,8 +52,10 @@ import { PlatformData } from 'src/drawApp/graphics/PlatformInteraction'; import { Platform } from 'src/graphics/platform/Platform'; import { useDrawStore } from 'src/stores/draw-store'; import { onMounted, onUnmounted, reactive, ref } from 'vue'; +import { useQuasar } from 'quasar'; const drawStore = useDrawStore(); +const $q = useQuasar(); const platformModel = reactive(new PlatformData()); const hasDoor = ref('是'); const optionsDoor = ['是', '否']; @@ -57,6 +74,23 @@ enum showSelectData { down = '向下', } +function removeStation(index: number) { + platformModel.centralizedStations.splice(index, 1); +} + +function addStation() { + $q.dialog({ + message: '添加设备的集中站', + prompt: { + model: '', + type: 'text', // optional + }, + cancel: true, + }).onOk((data: string) => { + platformModel.centralizedStations.push(data); + }); +} + onMounted(() => { drawStore.bindFormData(platformModel); const platform = drawStore.selectedGraphic as Platform; diff --git a/src/components/draw-app/properties/SectionProperty.vue b/src/components/draw-app/properties/SectionProperty.vue index 162d606..5e6e3a9 100644 --- a/src/components/draw-app/properties/SectionProperty.vue +++ b/src/components/draw-app/properties/SectionProperty.vue @@ -95,6 +95,21 @@ > + + + @@ -105,14 +120,15 @@ import { Section } from 'src/graphics/section/Section'; import { Turnout } from 'src/graphics/turnout/Turnout'; import { graphicData } from 'src/protos/stationLayoutGraphics'; import { useDrawStore } from 'src/stores/draw-store'; -import { computed, shallowRef, watchEffect } from 'vue'; +import { useQuasar } from 'quasar'; +import { computed, reactive, watchEffect } from 'vue'; const drawStore = useDrawStore(); - -const sectionModel = shallowRef(new SectionData()); +const $q = useQuasar(); +const sectionModel = reactive(new SectionData()); const sectionTypeText = computed(() => { - return ['物理区段', '', '道岔物理区段'][sectionModel.value.sectionType]; + return ['物理区段', '', '道岔物理区段'][sectionModel.sectionType]; }); const sectionRelations = computed(() => { @@ -160,17 +176,34 @@ const axleCountingRelations = computed(() => { ); }); +function removeStation(index: number) { + sectionModel.centralizedStations.splice(index, 1); +} + +function addStation() { + $q.dialog({ + message: '添加设备的集中站', + prompt: { + model: '', + type: 'text', // optional + }, + cancel: true, + }).onOk((data: string) => { + sectionModel.centralizedStations.push(data); + }); +} + watchEffect(() => { const section = drawStore.selectedGraphic; if (section && section instanceof Section) { - sectionModel.value = section.saveData(); + sectionModel.copyFrom(section.saveData()); } }); const onUpdate = () => { const section = drawStore.selectedGraphic as Section; if (section) { - drawStore.getDrawApp().updateGraphicAndRecord(section, sectionModel.value); + drawStore.getDrawApp().updateGraphicAndRecord(section, sectionModel); } }; diff --git a/src/components/draw-app/properties/SignalProperty.vue b/src/components/draw-app/properties/SignalProperty.vue index 7f7e9dd..948ccf2 100644 --- a/src/components/draw-app/properties/SignalProperty.vue +++ b/src/components/draw-app/properties/SignalProperty.vue @@ -89,6 +89,21 @@ @update:model-value="onUpdate" label="关联设备端口:" > + + + @@ -99,9 +114,11 @@ import { Direction, Signal } from 'src/graphics/signal/Signal'; import { Turnout } from 'src/graphics/turnout/Turnout'; import { graphicData } from 'src/protos/stationLayoutGraphics'; import { useDrawStore } from 'src/stores/draw-store'; +import { useQuasar } from 'quasar'; import { onMounted, onUnmounted, reactive } from 'vue'; const drawStore = useDrawStore(); +const $q = useQuasar(); const signalModel = reactive(new SignalData()); const kilometerSystem = reactive({ coordinateSystem: '', @@ -172,6 +189,23 @@ function initDeviceList() { }); } +function removeStation(index: number) { + signalModel.centralizedStations.splice(index, 1); +} + +function addStation() { + $q.dialog({ + message: '添加设备的集中站', + prompt: { + model: '', + type: 'text', // optional + }, + cancel: true, + }).onOk((data: string) => { + signalModel.centralizedStations.push(data); + }); +} + onMounted(() => { drawStore.bindFormData(signalModel); const signal = drawStore.selectedGraphic as Signal; diff --git a/src/components/draw-app/properties/TransponderProperty.vue b/src/components/draw-app/properties/TransponderProperty.vue index df98060..205d880 100644 --- a/src/components/draw-app/properties/TransponderProperty.vue +++ b/src/components/draw-app/properties/TransponderProperty.vue @@ -83,6 +83,21 @@ > + + + @@ -95,9 +110,11 @@ import { } from 'src/graphics/transponder/Transponder'; import { Turnout } from 'src/graphics/turnout/Turnout'; import { useDrawStore } from 'src/stores/draw-store'; +import { useQuasar } from 'quasar'; import { computed, onMounted, onUnmounted, reactive } from 'vue'; const drawStore = useDrawStore(); +const $q = useQuasar(); const transponderModel = reactive(new TransponderData()); const typeOptions = [ { label: '固定应答器', value: transponderTypeEnum.FB }, @@ -141,6 +158,23 @@ onUnmounted(() => { drawStore.unbindFormData(transponderModel); }); +function removeStation(index: number) { + transponderModel.centralizedStations.splice(index, 1); +} + +function addStation() { + $q.dialog({ + message: '添加设备的集中站', + prompt: { + model: '', + type: 'text', // optional + }, + cancel: true, + }).onOk((data: string) => { + transponderModel.centralizedStations.push(data); + }); +} + function onUpdate() { const Transponder = drawStore.selectedGraphic as Transponder; transponderModel.kilometerSystem = { diff --git a/src/components/draw-app/properties/TurnoutProperty.vue b/src/components/draw-app/properties/TurnoutProperty.vue index 3c87288..60644eb 100644 --- a/src/components/draw-app/properties/TurnoutProperty.vue +++ b/src/components/draw-app/properties/TurnoutProperty.vue @@ -104,6 +104,21 @@ > + + + @@ -114,16 +129,18 @@ import { Direction } from 'src/graphics/signal/Signal'; import { Turnout } from 'src/graphics/turnout/Turnout'; import { graphicData } from 'src/protos/stationLayoutGraphics'; import { useDrawStore } from 'src/stores/draw-store'; -import { computed, reactive, shallowRef, watchEffect } from 'vue'; +import { useQuasar } from 'quasar'; +import { computed, reactive, watchEffect, ref } from 'vue'; const drawStore = useDrawStore(); +const $q = useQuasar(); const CoordinateSystemOptions = [ { label: '车辆段', value: 'DEPOT' }, { label: '停车场', value: 'PARKING_LOT' }, { label: '正线', value: 'MAIN_LINE' }, { label: '换线', value: 'TRANSFER' }, ]; -const turnoutModel = shallowRef(new TurnoutData()); +const turnoutModel = reactive(new TurnoutData()); const kilometerSystem = reactive([ { coordinateSystem: '', kilometer: 0, direction: Direction.LEFT }, { coordinateSystem: '', kilometer: 0, direction: Direction.LEFT }, @@ -147,6 +164,23 @@ const switchMachineTypeOptions = [ }, ]; +function removeStation(index: number) { + turnoutModel.centralizedStations.splice(index, 1); +} + +function addStation() { + $q.dialog({ + message: '添加设备的集中站', + prompt: { + model: '', + type: 'text', // optional + }, + cancel: true, + }).onOk((data: string) => { + turnoutModel.centralizedStations.push(data); + }); +} + const sectionRelations = computed(() => { const turnout = drawStore.selectedGraphic as Turnout; @@ -182,13 +216,12 @@ const turnoutRelations = computed(() => { watchEffect(() => { const turnout = drawStore.selectedGraphic; if (turnout && turnout instanceof Turnout) { - turnoutModel.value = turnout.saveData(); - if (turnoutModel.value.kilometerSystem.length > 0) { + turnoutModel.copyFrom(turnout.saveData()); + if (turnoutModel.kilometerSystem.length > 0) { kilometerSystem.forEach((ks, i) => { - ks.coordinateSystem = - turnoutModel.value.kilometerSystem[i].coordinateSystem; - ks.kilometer = turnoutModel.value.kilometerSystem[i].kilometer; - ks.direction = turnoutModel.value.kilometerSystem[i].direction; + ks.coordinateSystem = turnoutModel.kilometerSystem[i].coordinateSystem; + ks.kilometer = turnoutModel.kilometerSystem[i].kilometer; + ks.direction = turnoutModel.kilometerSystem[i].direction; }); } } @@ -196,13 +229,13 @@ watchEffect(() => { const onUpdate = () => { const turnout = drawStore.selectedGraphic as Turnout; - turnoutModel.value.kilometerSystem = kilometerSystem.map((ks) => ({ + turnoutModel.kilometerSystem = kilometerSystem.map((ks) => ({ coordinateSystem: ks.coordinateSystem, kilometer: ks.kilometer, direction: ks.direction, })); if (turnout) { - drawStore.getDrawApp().updateGraphicAndRecord(turnout, turnoutModel.value); + drawStore.getDrawApp().updateGraphicAndRecord(turnout, turnoutModel); } }; diff --git a/src/components/draw-app/properties/multipleSelectProperty.vue b/src/components/draw-app/properties/multipleSelectProperty.vue new file mode 100644 index 0000000..4971edb --- /dev/null +++ b/src/components/draw-app/properties/multipleSelectProperty.vue @@ -0,0 +1,168 @@ + + + diff --git a/src/drawApp/graphics/AxleCountingInteraction.ts b/src/drawApp/graphics/AxleCountingInteraction.ts index a8a9ee5..04f5a82 100644 --- a/src/drawApp/graphics/AxleCountingInteraction.ts +++ b/src/drawApp/graphics/AxleCountingInteraction.ts @@ -62,6 +62,12 @@ export class AxleCountingData set type(type: graphicData.AxleCounting.TypeDetectionPoint) { this.data.type = type; } + get centralizedStations(): string[] { + return this.data.centralizedStations; + } + set centralizedStations(v: string[]) { + this.data.centralizedStations; + } clone(): AxleCountingData { return new AxleCountingData(this.data.cloneMessage()); } diff --git a/src/drawApp/graphics/PlatformInteraction.ts b/src/drawApp/graphics/PlatformInteraction.ts index 36941e2..61c0135 100644 --- a/src/drawApp/graphics/PlatformInteraction.ts +++ b/src/drawApp/graphics/PlatformInteraction.ts @@ -64,6 +64,12 @@ export class PlatformData extends GraphicDataBase implements IPlatformData { set refStationIndex(v: number) { this.data.refStationIndex = v; } + get centralizedStations(): string[] { + return this.data.centralizedStations; + } + set centralizedStations(v: string[]) { + this.data.centralizedStations = v; + } clone(): PlatformData { return new PlatformData(this.data.cloneMessage()); diff --git a/src/drawApp/graphics/SectionInteraction.ts b/src/drawApp/graphics/SectionInteraction.ts index c009489..f6cdce9 100644 --- a/src/drawApp/graphics/SectionInteraction.ts +++ b/src/drawApp/graphics/SectionInteraction.ts @@ -95,6 +95,12 @@ export class SectionData extends GraphicDataBase implements ISectionData { set segmentsCount(v: number) { this.data.segmentsCount = v; } + get centralizedStations(): string[] { + return this.data.centralizedStations; + } + set centralizedStations(v: string[]) { + this.data.centralizedStations = v; + } clone(): SectionData { return new SectionData(this.data.cloneMessage()); } diff --git a/src/drawApp/graphics/SignalInteraction.ts b/src/drawApp/graphics/SignalInteraction.ts index 1daed20..c156e92 100644 --- a/src/drawApp/graphics/SignalInteraction.ts +++ b/src/drawApp/graphics/SignalInteraction.ts @@ -64,6 +64,12 @@ export class SignalData extends GraphicDataBase implements ISignalData { set refDev(v: graphicData.RelatedRef) { this.data.refDev = v; } + get centralizedStations(): string[] { + return this.data.centralizedStations; + } + set centralizedStations(v: string[]) { + this.data.centralizedStations = v; + } clone(): SignalData { return new SignalData(this.data.cloneMessage()); } diff --git a/src/drawApp/graphics/TransponderInteraction.ts b/src/drawApp/graphics/TransponderInteraction.ts index e0f3c3f..8213f87 100644 --- a/src/drawApp/graphics/TransponderInteraction.ts +++ b/src/drawApp/graphics/TransponderInteraction.ts @@ -56,6 +56,12 @@ export class TransponderData set TransponderRef(v: graphicData.RelatedRef) { this.data.TransponderRef = v; } + get centralizedStations(): string[] { + return this.data.centralizedStations; + } + set centralizedStations(v: string[]) { + this.data.centralizedStations = v; + } clone(): TransponderData { return new TransponderData(this.data.cloneMessage()); } diff --git a/src/drawApp/graphics/TurnoutInteraction.ts b/src/drawApp/graphics/TurnoutInteraction.ts index 5b4d148..b48fcb1 100644 --- a/src/drawApp/graphics/TurnoutInteraction.ts +++ b/src/drawApp/graphics/TurnoutInteraction.ts @@ -265,6 +265,12 @@ export class TurnoutData extends GraphicDataBase implements ITurnoutData { set switchMachineType(v: graphicData.Turnout.SwitchMachineType) { this.data.switchMachineType = v; } + get centralizedStations(): string[] { + return this.data.centralizedStations; + } + set centralizedStations(v: string[]) { + this.data.centralizedStations = v; + } clone(): TurnoutData { return new TurnoutData(this.data.cloneMessage()); } diff --git a/src/graphics/axleCounting/AxleCounting.ts b/src/graphics/axleCounting/AxleCounting.ts index 33cf653..78286e7 100644 --- a/src/graphics/axleCounting/AxleCounting.ts +++ b/src/graphics/axleCounting/AxleCounting.ts @@ -27,6 +27,8 @@ export interface IAxleCountingData extends GraphicData { set invent(v: boolean); get type(): TypeDetectionPoint; // 计轴、区段边界 set type(v: TypeDetectionPoint); + get centralizedStations(): string[]; + set centralizedStations(v: string[]); clone(): IAxleCountingData; copyFrom(data: IAxleCountingData): void; eq(other: IAxleCountingData): boolean; diff --git a/src/graphics/platform/Platform.ts b/src/graphics/platform/Platform.ts index 671f19c..87a4dde 100644 --- a/src/graphics/platform/Platform.ts +++ b/src/graphics/platform/Platform.ts @@ -21,6 +21,8 @@ export interface IPlatformData extends GraphicData { set index(v: number); get refStationIndex(): number; set refStationIndex(v: number); + get centralizedStations(): string[]; + set centralizedStations(v: string[]); clone(): IPlatformData; copyFrom(data: IPlatformData): void; eq(other: IPlatformData): boolean; diff --git a/src/graphics/section/Section.ts b/src/graphics/section/Section.ts index 12f7737..99c1016 100644 --- a/src/graphics/section/Section.ts +++ b/src/graphics/section/Section.ts @@ -54,6 +54,8 @@ export interface ISectionData extends GraphicData { set isCurve(v: boolean); get segmentsCount(): number; // 曲线分段数 set segmentsCount(v: number); + get centralizedStations(): string[]; + set centralizedStations(v: string[]); clone(): ISectionData; copyFrom(data: ISectionData): void; eq(other: ISectionData): boolean; diff --git a/src/graphics/signal/Signal.ts b/src/graphics/signal/Signal.ts index 0567cec..27f2bcd 100644 --- a/src/graphics/signal/Signal.ts +++ b/src/graphics/signal/Signal.ts @@ -44,6 +44,8 @@ export interface ISignalData extends GraphicData { set index(v: number); get refDev(): IRelatedRefData; set refDev(v: IRelatedRefData); + get centralizedStations(): string[]; + set centralizedStations(v: string[]); clone(): ISignalData; copyFrom(data: ISignalData): void; eq(other: ISignalData): boolean; diff --git a/src/graphics/transponder/Transponder.ts b/src/graphics/transponder/Transponder.ts index 145c3b3..0df6ae2 100644 --- a/src/graphics/transponder/Transponder.ts +++ b/src/graphics/transponder/Transponder.ts @@ -27,6 +27,8 @@ export interface ITransponderData extends GraphicData { set kilometerSystem(v: KilometerSystem); get TransponderRef(): IRelatedRefData; set TransponderRef(v: IRelatedRefData); + get centralizedStations(): string[]; + set centralizedStations(v: string[]); clone(): ITransponderData; copyFrom(data: ITransponderData): void; eq(other: ITransponderData): boolean; diff --git a/src/graphics/turnout/Turnout.ts b/src/graphics/turnout/Turnout.ts index 6e82370..28f0aa4 100644 --- a/src/graphics/turnout/Turnout.ts +++ b/src/graphics/turnout/Turnout.ts @@ -47,6 +47,8 @@ export interface ITurnoutData extends GraphicData { set pcTrackSectionId(v: string); get switchMachineType(): graphicData.Turnout.SwitchMachineType; set switchMachineType(v: graphicData.Turnout.SwitchMachineType); + get centralizedStations(): string[]; + set centralizedStations(v: string[]); clone(): ITurnoutData; copyFrom(data: ITurnoutData): void; eq(other: ITurnoutData): boolean; diff --git a/src/protos/stationLayoutGraphics.ts b/src/protos/stationLayoutGraphics.ts index f8ce5f9..1c56b68 100644 --- a/src/protos/stationLayoutGraphics.ts +++ b/src/protos/stationLayoutGraphics.ts @@ -1223,9 +1223,10 @@ export namespace graphicData { direction?: string; index?: number; refStationIndex?: number; + centralizedStations?: string[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("common" in data && data.common != undefined) { this.common = data.common; @@ -1245,6 +1246,9 @@ export namespace graphicData { if ("refStationIndex" in data && data.refStationIndex != undefined) { this.refStationIndex = data.refStationIndex; } + if ("centralizedStations" in data && data.centralizedStations != undefined) { + this.centralizedStations = data.centralizedStations; + } } } get common() { @@ -1286,6 +1290,12 @@ export namespace graphicData { set refStationIndex(value: number) { pb_1.Message.setField(this, 6, value); } + get centralizedStations() { + return pb_1.Message.getFieldWithDefault(this, 7, []) as string[]; + } + set centralizedStations(value: string[]) { + pb_1.Message.setField(this, 7, value); + } static fromObject(data: { common?: ReturnType; code?: string; @@ -1293,6 +1303,7 @@ export namespace graphicData { direction?: string; index?: number; refStationIndex?: number; + centralizedStations?: string[]; }): Platform { const message = new Platform({}); if (data.common != null) { @@ -1313,6 +1324,9 @@ export namespace graphicData { if (data.refStationIndex != null) { message.refStationIndex = data.refStationIndex; } + if (data.centralizedStations != null) { + message.centralizedStations = data.centralizedStations; + } return message; } toObject() { @@ -1323,6 +1337,7 @@ export namespace graphicData { direction?: string; index?: number; refStationIndex?: number; + centralizedStations?: string[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -1342,6 +1357,9 @@ export namespace graphicData { if (this.refStationIndex != null) { data.refStationIndex = this.refStationIndex; } + if (this.centralizedStations != null) { + data.centralizedStations = this.centralizedStations; + } return data; } serialize(): Uint8Array; @@ -1360,6 +1378,8 @@ export namespace graphicData { writer.writeInt32(5, this.index); if (this.refStationIndex != 0) writer.writeInt32(6, this.refStationIndex); + if (this.centralizedStations.length) + writer.writeRepeatedString(7, this.centralizedStations); if (!w) return writer.getResultBuffer(); } @@ -1387,6 +1407,9 @@ export namespace graphicData { case 6: message.refStationIndex = reader.readInt32(); break; + case 7: + pb_1.Message.addToRepeatedField(message, 7, reader.readString()); + break; default: reader.skipField(); } } @@ -1690,9 +1713,10 @@ export namespace graphicData { index?: number; invent?: boolean; type?: AxleCounting.TypeDetectionPoint; + centralizedStations?: string[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 8], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("common" in data && data.common != undefined) { this.common = data.common; @@ -1715,6 +1739,9 @@ export namespace graphicData { if ("type" in data && data.type != undefined) { this.type = data.type; } + if ("centralizedStations" in data && data.centralizedStations != undefined) { + this.centralizedStations = data.centralizedStations; + } } } get common() { @@ -1765,6 +1792,12 @@ export namespace graphicData { set type(value: AxleCounting.TypeDetectionPoint) { pb_1.Message.setField(this, 7, value); } + get centralizedStations() { + return pb_1.Message.getFieldWithDefault(this, 8, []) as string[]; + } + set centralizedStations(value: string[]) { + pb_1.Message.setField(this, 8, value); + } static fromObject(data: { common?: ReturnType; code?: string; @@ -1773,6 +1806,7 @@ export namespace graphicData { index?: number; invent?: boolean; type?: AxleCounting.TypeDetectionPoint; + centralizedStations?: string[]; }): AxleCounting { const message = new AxleCounting({}); if (data.common != null) { @@ -1796,6 +1830,9 @@ export namespace graphicData { if (data.type != null) { message.type = data.type; } + if (data.centralizedStations != null) { + message.centralizedStations = data.centralizedStations; + } return message; } toObject() { @@ -1807,6 +1844,7 @@ export namespace graphicData { index?: number; invent?: boolean; type?: AxleCounting.TypeDetectionPoint; + centralizedStations?: string[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -1829,6 +1867,9 @@ export namespace graphicData { if (this.type != null) { data.type = this.type; } + if (this.centralizedStations != null) { + data.centralizedStations = this.centralizedStations; + } return data; } serialize(): Uint8Array; @@ -1849,6 +1890,8 @@ export namespace graphicData { writer.writeBool(6, this.invent); if (this.type != AxleCounting.TypeDetectionPoint.AxleCounting) writer.writeEnum(7, this.type); + if (this.centralizedStations.length) + writer.writeRepeatedString(8, this.centralizedStations); if (!w) return writer.getResultBuffer(); } @@ -1879,6 +1922,9 @@ export namespace graphicData { case 7: message.type = reader.readEnum(); break; + case 8: + pb_1.Message.addToRepeatedField(message, 8, reader.readString()); + break; default: reader.skipField(); } } @@ -1914,9 +1960,10 @@ export namespace graphicData { pbTrackSectionId?: string; pcTrackSectionId?: string; switchMachineType?: Turnout.SwitchMachineType; + centralizedStations?: string[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 7, 8, 13], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6, 7, 8, 13, 19], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("common" in data && data.common != undefined) { this.common = data.common; @@ -1960,6 +2007,9 @@ export namespace graphicData { if ("switchMachineType" in data && data.switchMachineType != undefined) { this.switchMachineType = data.switchMachineType; } + if ("centralizedStations" in data && data.centralizedStations != undefined) { + this.centralizedStations = data.centralizedStations; + } } } get common() { @@ -2058,6 +2108,12 @@ export namespace graphicData { set switchMachineType(value: Turnout.SwitchMachineType) { pb_1.Message.setField(this, 18, value); } + get centralizedStations() { + return pb_1.Message.getFieldWithDefault(this, 19, []) as string[]; + } + set centralizedStations(value: string[]) { + pb_1.Message.setField(this, 19, value); + } static fromObject(data: { common?: ReturnType; code?: string; @@ -2073,6 +2129,7 @@ export namespace graphicData { pbTrackSectionId?: string; pcTrackSectionId?: string; switchMachineType?: Turnout.SwitchMachineType; + centralizedStations?: string[]; }): Turnout { const message = new Turnout({}); if (data.common != null) { @@ -2117,6 +2174,9 @@ export namespace graphicData { if (data.switchMachineType != null) { message.switchMachineType = data.switchMachineType; } + if (data.centralizedStations != null) { + message.centralizedStations = data.centralizedStations; + } return message; } toObject() { @@ -2135,6 +2195,7 @@ export namespace graphicData { pbTrackSectionId?: string; pcTrackSectionId?: string; switchMachineType?: Turnout.SwitchMachineType; + centralizedStations?: string[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -2178,6 +2239,9 @@ export namespace graphicData { if (this.switchMachineType != null) { data.switchMachineType = this.switchMachineType; } + if (this.centralizedStations != null) { + data.centralizedStations = this.centralizedStations; + } return data; } serialize(): Uint8Array; @@ -2212,6 +2276,8 @@ export namespace graphicData { writer.writeString(17, this.pcTrackSectionId); if (this.switchMachineType != Turnout.SwitchMachineType.Unknown) writer.writeEnum(18, this.switchMachineType); + if (this.centralizedStations.length) + writer.writeRepeatedString(19, this.centralizedStations); if (!w) return writer.getResultBuffer(); } @@ -2263,6 +2329,9 @@ export namespace graphicData { case 18: message.switchMachineType = reader.readEnum(); break; + case 19: + pb_1.Message.addToRepeatedField(message, 19, reader.readString()); + break; default: reader.skipField(); } } @@ -2404,9 +2473,10 @@ export namespace graphicData { kilometerSystem?: KilometerSystem; index?: number; refDev?: RelatedRef; + centralizedStations?: string[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [9], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("common" in data && data.common != undefined) { this.common = data.common; @@ -2426,6 +2496,9 @@ export namespace graphicData { if ("refDev" in data && data.refDev != undefined) { this.refDev = data.refDev; } + if ("centralizedStations" in data && data.centralizedStations != undefined) { + this.centralizedStations = data.centralizedStations; + } } } get common() { @@ -2473,6 +2546,12 @@ export namespace graphicData { get has_refDev() { return pb_1.Message.getField(this, 8) != null; } + get centralizedStations() { + return pb_1.Message.getFieldWithDefault(this, 9, []) as string[]; + } + set centralizedStations(value: string[]) { + pb_1.Message.setField(this, 9, value); + } static fromObject(data: { common?: ReturnType; code?: string; @@ -2480,6 +2559,7 @@ export namespace graphicData { kilometerSystem?: ReturnType; index?: number; refDev?: ReturnType; + centralizedStations?: string[]; }): Signal { const message = new Signal({}); if (data.common != null) { @@ -2500,6 +2580,9 @@ export namespace graphicData { if (data.refDev != null) { message.refDev = RelatedRef.fromObject(data.refDev); } + if (data.centralizedStations != null) { + message.centralizedStations = data.centralizedStations; + } return message; } toObject() { @@ -2510,6 +2593,7 @@ export namespace graphicData { kilometerSystem?: ReturnType; index?: number; refDev?: ReturnType; + centralizedStations?: string[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -2529,6 +2613,9 @@ export namespace graphicData { if (this.refDev != null) { data.refDev = this.refDev.toObject(); } + if (this.centralizedStations != null) { + data.centralizedStations = this.centralizedStations; + } return data; } serialize(): Uint8Array; @@ -2547,6 +2634,8 @@ export namespace graphicData { writer.writeInt32(7, this.index); if (this.has_refDev) writer.writeMessage(8, this.refDev, () => this.refDev.serialize(writer)); + if (this.centralizedStations.length) + writer.writeRepeatedString(9, this.centralizedStations); if (!w) return writer.getResultBuffer(); } @@ -2574,6 +2663,9 @@ export namespace graphicData { case 8: reader.readMessage(message.refDev, () => message.refDev = RelatedRef.deserialize(reader)); break; + case 9: + pb_1.Message.addToRepeatedField(message, 9, reader.readString()); + break; default: reader.skipField(); } } @@ -2600,9 +2692,10 @@ export namespace graphicData { trackSectionId?: string; isCurve?: boolean; segmentsCount?: number; + centralizedStations?: string[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 7], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 7, 13], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("common" in data && data.common != undefined) { this.common = data.common; @@ -2637,6 +2730,9 @@ export namespace graphicData { if ("segmentsCount" in data && data.segmentsCount != undefined) { this.segmentsCount = data.segmentsCount; } + if ("centralizedStations" in data && data.centralizedStations != undefined) { + this.centralizedStations = data.centralizedStations; + } } } get common() { @@ -2714,6 +2810,12 @@ export namespace graphicData { set segmentsCount(value: number) { pb_1.Message.setField(this, 12, value); } + get centralizedStations() { + return pb_1.Message.getFieldWithDefault(this, 13, []) as string[]; + } + set centralizedStations(value: string[]) { + pb_1.Message.setField(this, 13, value); + } static fromObject(data: { common?: ReturnType; code?: string; @@ -2726,6 +2828,7 @@ export namespace graphicData { trackSectionId?: string; isCurve?: boolean; segmentsCount?: number; + centralizedStations?: string[]; }): Section { const message = new Section({}); if (data.common != null) { @@ -2761,6 +2864,9 @@ export namespace graphicData { if (data.segmentsCount != null) { message.segmentsCount = data.segmentsCount; } + if (data.centralizedStations != null) { + message.centralizedStations = data.centralizedStations; + } return message; } toObject() { @@ -2776,6 +2882,7 @@ export namespace graphicData { trackSectionId?: string; isCurve?: boolean; segmentsCount?: number; + centralizedStations?: string[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -2810,6 +2917,9 @@ export namespace graphicData { if (this.segmentsCount != null) { data.segmentsCount = this.segmentsCount; } + if (this.centralizedStations != null) { + data.centralizedStations = this.centralizedStations; + } return data; } serialize(): Uint8Array; @@ -2838,6 +2948,8 @@ export namespace graphicData { writer.writeBool(10, this.isCurve); if (this.segmentsCount != 0) writer.writeInt32(12, this.segmentsCount); + if (this.centralizedStations.length) + writer.writeRepeatedString(13, this.centralizedStations); if (!w) return writer.getResultBuffer(); } @@ -2880,6 +2992,9 @@ export namespace graphicData { case 12: message.segmentsCount = reader.readInt32(); break; + case 13: + pb_1.Message.addToRepeatedField(message, 13, reader.readString()); + break; default: reader.skipField(); } } @@ -3240,9 +3355,10 @@ export namespace graphicData { index?: number; kilometerSystem?: KilometerSystem; TransponderRef?: RelatedRef; + centralizedStations?: string[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [7], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("common" in data && data.common != undefined) { this.common = data.common; @@ -3262,6 +3378,9 @@ export namespace graphicData { if ("TransponderRef" in data && data.TransponderRef != undefined) { this.TransponderRef = data.TransponderRef; } + if ("centralizedStations" in data && data.centralizedStations != undefined) { + this.centralizedStations = data.centralizedStations; + } } } get common() { @@ -3309,6 +3428,12 @@ export namespace graphicData { get has_TransponderRef() { return pb_1.Message.getField(this, 6) != null; } + get centralizedStations() { + return pb_1.Message.getFieldWithDefault(this, 7, []) as string[]; + } + set centralizedStations(value: string[]) { + pb_1.Message.setField(this, 7, value); + } static fromObject(data: { common?: ReturnType; code?: string; @@ -3316,6 +3441,7 @@ export namespace graphicData { index?: number; kilometerSystem?: ReturnType; TransponderRef?: ReturnType; + centralizedStations?: string[]; }): Transponder { const message = new Transponder({}); if (data.common != null) { @@ -3336,6 +3462,9 @@ export namespace graphicData { if (data.TransponderRef != null) { message.TransponderRef = RelatedRef.fromObject(data.TransponderRef); } + if (data.centralizedStations != null) { + message.centralizedStations = data.centralizedStations; + } return message; } toObject() { @@ -3346,6 +3475,7 @@ export namespace graphicData { index?: number; kilometerSystem?: ReturnType; TransponderRef?: ReturnType; + centralizedStations?: string[]; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -3365,6 +3495,9 @@ export namespace graphicData { if (this.TransponderRef != null) { data.TransponderRef = this.TransponderRef.toObject(); } + if (this.centralizedStations != null) { + data.centralizedStations = this.centralizedStations; + } return data; } serialize(): Uint8Array; @@ -3383,6 +3516,8 @@ export namespace graphicData { writer.writeMessage(5, this.kilometerSystem, () => this.kilometerSystem.serialize(writer)); if (this.has_TransponderRef) writer.writeMessage(6, this.TransponderRef, () => this.TransponderRef.serialize(writer)); + if (this.centralizedStations.length) + writer.writeRepeatedString(7, this.centralizedStations); if (!w) return writer.getResultBuffer(); } @@ -3410,6 +3545,9 @@ export namespace graphicData { case 6: reader.readMessage(message.TransponderRef, () => message.TransponderRef = RelatedRef.deserialize(reader)); break; + case 7: + pb_1.Message.addToRepeatedField(message, 7, reader.readString()); + break; default: reader.skipField(); } }