diff --git a/bj-rtss-message b/bj-rtss-message index 649dd84..3121207 160000 --- a/bj-rtss-message +++ b/bj-rtss-message @@ -1 +1 @@ -Subproject commit 649dd846204bcd9a99706f247665dabfe1bc97d0 +Subproject commit 31212079c61ac18638a6b93fda81388f4ad5a733 diff --git a/src/protos/stationLayoutGraphics.ts b/src/protos/stationLayoutGraphics.ts index f24f9c1..abe9019 100644 --- a/src/protos/stationLayoutGraphics.ts +++ b/src/protos/stationLayoutGraphics.ts @@ -1361,7 +1361,7 @@ export namespace graphicData { code?: string; kilometerSystem?: KilometerSystem; axleCountingRef?: RelatedRef[]; - indexNumber?: number; + index?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); @@ -1378,8 +1378,8 @@ export namespace graphicData { if ("axleCountingRef" in data && data.axleCountingRef != undefined) { this.axleCountingRef = data.axleCountingRef; } - if ("indexNumber" in data && data.indexNumber != undefined) { - this.indexNumber = data.indexNumber; + if ("index" in data && data.index != undefined) { + this.index = data.index; } } } @@ -1413,10 +1413,10 @@ export namespace graphicData { set axleCountingRef(value: RelatedRef[]) { pb_1.Message.setRepeatedWrapperField(this, 4, value); } - get indexNumber() { + get index() { return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; } - set indexNumber(value: number) { + set index(value: number) { pb_1.Message.setField(this, 5, value); } static fromObject(data: { @@ -1424,7 +1424,7 @@ export namespace graphicData { code?: string; kilometerSystem?: ReturnType; axleCountingRef?: ReturnType[]; - indexNumber?: number; + index?: number; }): AxleCounting { const message = new AxleCounting({}); if (data.common != null) { @@ -1439,8 +1439,8 @@ export namespace graphicData { if (data.axleCountingRef != null) { message.axleCountingRef = data.axleCountingRef.map(item => RelatedRef.fromObject(item)); } - if (data.indexNumber != null) { - message.indexNumber = data.indexNumber; + if (data.index != null) { + message.index = data.index; } return message; } @@ -1450,7 +1450,7 @@ export namespace graphicData { code?: string; kilometerSystem?: ReturnType; axleCountingRef?: ReturnType[]; - indexNumber?: number; + index?: number; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -1464,8 +1464,8 @@ export namespace graphicData { if (this.axleCountingRef != null) { data.axleCountingRef = this.axleCountingRef.map((item: RelatedRef) => item.toObject()); } - if (this.indexNumber != null) { - data.indexNumber = this.indexNumber; + if (this.index != null) { + data.index = this.index; } return data; } @@ -1481,8 +1481,8 @@ export namespace graphicData { writer.writeMessage(3, this.kilometerSystem, () => this.kilometerSystem.serialize(writer)); if (this.axleCountingRef.length) writer.writeRepeatedMessage(4, this.axleCountingRef, (item: RelatedRef) => item.serialize(writer)); - if (this.indexNumber != 0) - writer.writeInt32(5, this.indexNumber); + if (this.index != 0) + writer.writeInt32(5, this.index); if (!w) return writer.getResultBuffer(); } @@ -1505,7 +1505,7 @@ export namespace graphicData { reader.readMessage(message.axleCountingRef, () => pb_1.Message.addToRepeatedWrapperField(message, 4, RelatedRef.deserialize(reader), RelatedRef)); break; case 5: - message.indexNumber = reader.readInt32(); + message.index = reader.readInt32(); break; default: reader.skipField(); } @@ -2257,122 +2257,6 @@ export namespace graphicData { TurnoutPhysical = 2 } } - export class KilometerPoint extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - point?: Point; - kilometer?: number; - stName?: string; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("point" in data && data.point != undefined) { - this.point = data.point; - } - if ("kilometer" in data && data.kilometer != undefined) { - this.kilometer = data.kilometer; - } - if ("stName" in data && data.stName != undefined) { - this.stName = data.stName; - } - } - } - get point() { - return pb_1.Message.getWrapperField(this, Point, 1) as Point; - } - set point(value: Point) { - pb_1.Message.setWrapperField(this, 1, value); - } - get has_point() { - return pb_1.Message.getField(this, 1) != null; - } - get kilometer() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set kilometer(value: number) { - pb_1.Message.setField(this, 2, value); - } - get stName() { - return pb_1.Message.getFieldWithDefault(this, 3, "") as string; - } - set stName(value: string) { - pb_1.Message.setField(this, 3, value); - } - static fromObject(data: { - point?: ReturnType; - kilometer?: number; - stName?: string; - }): KilometerPoint { - const message = new KilometerPoint({}); - if (data.point != null) { - message.point = Point.fromObject(data.point); - } - if (data.kilometer != null) { - message.kilometer = data.kilometer; - } - if (data.stName != null) { - message.stName = data.stName; - } - return message; - } - toObject() { - const data: { - point?: ReturnType; - kilometer?: number; - stName?: string; - } = {}; - if (this.point != null) { - data.point = this.point.toObject(); - } - if (this.kilometer != null) { - data.kilometer = this.kilometer; - } - if (this.stName != null) { - data.stName = this.stName; - } - return data; - } - serialize(): Uint8Array; - serialize(w: pb_1.BinaryWriter): void; - serialize(w?: pb_1.BinaryWriter): Uint8Array | void { - const writer = w || new pb_1.BinaryWriter(); - if (this.has_point) - writer.writeMessage(1, this.point, () => this.point.serialize(writer)); - if (this.kilometer != 0) - writer.writeInt64(2, this.kilometer); - if (this.stName.length) - writer.writeString(3, this.stName); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KilometerPoint { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KilometerPoint(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.point, () => message.point = Point.deserialize(reader)); - break; - case 2: - message.kilometer = reader.readInt64(); - break; - case 3: - message.stName = reader.readString(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): KilometerPoint { - return KilometerPoint.deserialize(bytes); - } - } export class RelatedRef extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { @@ -3077,7 +2961,7 @@ export namespace graphicData { paRef?: RelatedRef; pbRef?: RelatedRef; turnoutPos?: TurnoutPosRef[]; - indexNumber?: number; + index?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 6], this.#one_of_decls); @@ -3100,8 +2984,8 @@ export namespace graphicData { if ("turnoutPos" in data && data.turnoutPos != undefined) { this.turnoutPos = data.turnoutPos; } - if ("indexNumber" in data && data.indexNumber != undefined) { - this.indexNumber = data.indexNumber; + if ("index" in data && data.index != undefined) { + this.index = data.index; } } } @@ -3150,10 +3034,10 @@ export namespace graphicData { set turnoutPos(value: TurnoutPosRef[]) { pb_1.Message.setRepeatedWrapperField(this, 6, value); } - get indexNumber() { + get index() { return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; } - set indexNumber(value: number) { + set index(value: number) { pb_1.Message.setField(this, 7, value); } static fromObject(data: { @@ -3163,7 +3047,7 @@ export namespace graphicData { paRef?: ReturnType; pbRef?: ReturnType; turnoutPos?: ReturnType[]; - indexNumber?: number; + index?: number; }): AxleCountingSection { const message = new AxleCountingSection({}); if (data.common != null) { @@ -3184,8 +3068,8 @@ export namespace graphicData { if (data.turnoutPos != null) { message.turnoutPos = data.turnoutPos.map(item => TurnoutPosRef.fromObject(item)); } - if (data.indexNumber != null) { - message.indexNumber = data.indexNumber; + if (data.index != null) { + message.index = data.index; } return message; } @@ -3197,7 +3081,7 @@ export namespace graphicData { paRef?: ReturnType; pbRef?: ReturnType; turnoutPos?: ReturnType[]; - indexNumber?: number; + index?: number; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -3217,8 +3101,8 @@ export namespace graphicData { if (this.turnoutPos != null) { data.turnoutPos = this.turnoutPos.map((item: TurnoutPosRef) => item.toObject()); } - if (this.indexNumber != null) { - data.indexNumber = this.indexNumber; + if (this.index != null) { + data.index = this.index; } return data; } @@ -3238,8 +3122,8 @@ export namespace graphicData { writer.writeMessage(5, this.pbRef, () => this.pbRef.serialize(writer)); if (this.turnoutPos.length) writer.writeRepeatedMessage(6, this.turnoutPos, (item: TurnoutPosRef) => item.serialize(writer)); - if (this.indexNumber != 0) - writer.writeInt32(7, this.indexNumber); + if (this.index != 0) + writer.writeInt32(7, this.index); if (!w) return writer.getResultBuffer(); } @@ -3268,7 +3152,7 @@ export namespace graphicData { reader.readMessage(message.turnoutPos, () => pb_1.Message.addToRepeatedWrapperField(message, 6, TurnoutPosRef.deserialize(reader), TurnoutPosRef)); break; case 7: - message.indexNumber = reader.readInt32(); + message.index = reader.readInt32(); break; default: reader.skipField(); } @@ -3289,7 +3173,7 @@ export namespace graphicData { code?: string; points?: Point[]; axleSectionId?: string; - indexNumber?: number; + index?: number; turnoutId?: string; }) { super(); @@ -3307,8 +3191,8 @@ export namespace graphicData { if ("axleSectionId" in data && data.axleSectionId != undefined) { this.axleSectionId = data.axleSectionId; } - if ("indexNumber" in data && data.indexNumber != undefined) { - this.indexNumber = data.indexNumber; + if ("index" in data && data.index != undefined) { + this.index = data.index; } if ("turnoutId" in data && data.turnoutId != undefined) { this.turnoutId = data.turnoutId; @@ -3342,10 +3226,10 @@ export namespace graphicData { set axleSectionId(value: string) { pb_1.Message.setField(this, 4, value); } - get indexNumber() { + get index() { return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; } - set indexNumber(value: number) { + set index(value: number) { pb_1.Message.setField(this, 5, value); } get turnoutId() { @@ -3359,7 +3243,7 @@ export namespace graphicData { code?: string; points?: ReturnType[]; axleSectionId?: string; - indexNumber?: number; + index?: number; turnoutId?: string; }): LogicSection { const message = new LogicSection({}); @@ -3375,8 +3259,8 @@ export namespace graphicData { if (data.axleSectionId != null) { message.axleSectionId = data.axleSectionId; } - if (data.indexNumber != null) { - message.indexNumber = data.indexNumber; + if (data.index != null) { + message.index = data.index; } if (data.turnoutId != null) { message.turnoutId = data.turnoutId; @@ -3389,7 +3273,7 @@ export namespace graphicData { code?: string; points?: ReturnType[]; axleSectionId?: string; - indexNumber?: number; + index?: number; turnoutId?: string; } = {}; if (this.common != null) { @@ -3404,8 +3288,8 @@ export namespace graphicData { if (this.axleSectionId != null) { data.axleSectionId = this.axleSectionId; } - if (this.indexNumber != null) { - data.indexNumber = this.indexNumber; + if (this.index != null) { + data.index = this.index; } if (this.turnoutId != null) { data.turnoutId = this.turnoutId; @@ -3424,8 +3308,8 @@ export namespace graphicData { writer.writeRepeatedMessage(3, this.points, (item: Point) => item.serialize(writer)); if (this.axleSectionId.length) writer.writeString(4, this.axleSectionId); - if (this.indexNumber != 0) - writer.writeInt32(5, this.indexNumber); + if (this.index != 0) + writer.writeInt32(5, this.index); if (this.turnoutId.length) writer.writeString(6, this.turnoutId); if (!w) @@ -3450,7 +3334,7 @@ export namespace graphicData { message.axleSectionId = reader.readString(); break; case 5: - message.indexNumber = reader.readInt32(); + message.index = reader.readInt32(); break; case 6: message.turnoutId = reader.readString();