diff --git a/src/protos/device_state.ts b/src/protos/device_state.ts index 191adb4..02fc97f 100644 --- a/src/protos/device_state.ts +++ b/src/protos/device_state.ts @@ -1132,6 +1132,7 @@ export namespace state { export enum TrainConnType { NONE = 0, VOBC = 1, + PC_SIM = 2, PC_SIM_A = 3, PC_SIM_B = 4 } diff --git a/src/protos/stationLayoutGraphics.ts b/src/protos/stationLayoutGraphics.ts index 2dbb09c..32bbd2a 100644 --- a/src/protos/stationLayoutGraphics.ts +++ b/src/protos/stationLayoutGraphics.ts @@ -55,6 +55,7 @@ export namespace graphicData { carWashings?: CarWashing[]; garageDoors?: GarageDoor[]; floodGates?: GarageDoor[]; + lianSuoData?: LianSuoData; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47], this.#one_of_decls); @@ -185,6 +186,9 @@ export namespace graphicData { if ("floodGates" in data && data.floodGates != undefined) { this.floodGates = data.floodGates; } + if ("lianSuoData" in data && data.lianSuoData != undefined) { + this.lianSuoData = data.lianSuoData; + } } } get canvas() { @@ -451,6 +455,15 @@ export namespace graphicData { set floodGates(value: GarageDoor[]) { pb_1.Message.setRepeatedWrapperField(this, 47, value); } + get lianSuoData() { + return pb_1.Message.getWrapperField(this, LianSuoData, 49) as LianSuoData; + } + set lianSuoData(value: LianSuoData) { + pb_1.Message.setWrapperField(this, 49, value); + } + get has_lianSuoData() { + return pb_1.Message.getField(this, 49) != null; + } static fromObject(data: { canvas?: ReturnType; Platforms?: ReturnType[]; @@ -494,6 +507,7 @@ export namespace graphicData { carWashings?: ReturnType[]; garageDoors?: ReturnType[]; floodGates?: ReturnType[]; + lianSuoData?: ReturnType; }): RtssGraphicStorage { const message = new RtssGraphicStorage({}); if (data.canvas != null) { @@ -622,6 +636,9 @@ export namespace graphicData { if (data.floodGates != null) { message.floodGates = data.floodGates.map(item => GarageDoor.fromObject(item)); } + if (data.lianSuoData != null) { + message.lianSuoData = LianSuoData.fromObject(data.lianSuoData); + } return message; } toObject() { @@ -668,6 +685,7 @@ export namespace graphicData { carWashings?: ReturnType[]; garageDoors?: ReturnType[]; floodGates?: ReturnType[]; + lianSuoData?: ReturnType; } = {}; if (this.canvas != null) { data.canvas = this.canvas.toObject(); @@ -795,6 +813,9 @@ export namespace graphicData { if (this.floodGates != null) { data.floodGates = this.floodGates.map((item: GarageDoor) => item.toObject()); } + if (this.lianSuoData != null) { + data.lianSuoData = this.lianSuoData.toObject(); + } return data; } serialize(): Uint8Array; @@ -885,6 +906,8 @@ export namespace graphicData { writer.writeRepeatedMessage(46, this.garageDoors, (item: GarageDoor) => item.serialize(writer)); if (this.floodGates.length) writer.writeRepeatedMessage(47, this.floodGates, (item: GarageDoor) => item.serialize(writer)); + if (this.has_lianSuoData) + writer.writeMessage(49, this.lianSuoData, () => this.lianSuoData.serialize(writer)); if (!w) return writer.getResultBuffer(); } @@ -1020,6 +1043,9 @@ export namespace graphicData { case 47: reader.readMessage(message.floodGates, () => pb_1.Message.addToRepeatedWrapperField(message, 47, GarageDoor.deserialize(reader), GarageDoor)); break; + case 49: + reader.readMessage(message.lianSuoData, () => message.lianSuoData = LianSuoData.deserialize(reader)); + break; default: reader.skipField(); } } @@ -9238,4 +9264,345 @@ export namespace graphicData { return OtherLine.deserialize(bytes); } } + export class LianSuoIndexData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + index?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("index" in data && data.index != undefined) { + this.index = data.index; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get index() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set index(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: number; + index?: number; + }): LianSuoIndexData { + const message = new LianSuoIndexData({}); + if (data.id != null) { + message.id = data.id; + } + if (data.index != null) { + message.index = data.index; + } + return message; + } + toObject() { + const data: { + id?: number; + index?: number; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.index != null) { + data.index = this.index; + } + 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.id != 0) + writer.writeInt32(1, this.id); + if (this.index != 0) + writer.writeInt32(2, this.index); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LianSuoIndexData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LianSuoIndexData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readInt32(); + break; + case 2: + message.index = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LianSuoIndexData { + return LianSuoIndexData.deserialize(bytes); + } + } + export class LianSuoData extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + stations?: LianSuoIndexData[]; + switchs?: LianSuoIndexData[]; + screenDoors?: LianSuoIndexData[]; + signals?: LianSuoIndexData[]; + sections?: LianSuoIndexData[]; + floodGates?: LianSuoIndexData[]; + spksSwitchs?: LianSuoIndexData[]; + garageDoors?: LianSuoIndexData[]; + carWashing?: LianSuoIndexData[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4, 5, 6, 7, 8, 9], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("stations" in data && data.stations != undefined) { + this.stations = data.stations; + } + if ("switchs" in data && data.switchs != undefined) { + this.switchs = data.switchs; + } + if ("screenDoors" in data && data.screenDoors != undefined) { + this.screenDoors = data.screenDoors; + } + if ("signals" in data && data.signals != undefined) { + this.signals = data.signals; + } + if ("sections" in data && data.sections != undefined) { + this.sections = data.sections; + } + if ("floodGates" in data && data.floodGates != undefined) { + this.floodGates = data.floodGates; + } + if ("spksSwitchs" in data && data.spksSwitchs != undefined) { + this.spksSwitchs = data.spksSwitchs; + } + if ("garageDoors" in data && data.garageDoors != undefined) { + this.garageDoors = data.garageDoors; + } + if ("carWashing" in data && data.carWashing != undefined) { + this.carWashing = data.carWashing; + } + } + } + get stations() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 1) as LianSuoIndexData[]; + } + set stations(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + get switchs() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 2) as LianSuoIndexData[]; + } + set switchs(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + get screenDoors() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 3) as LianSuoIndexData[]; + } + set screenDoors(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 3, value); + } + get signals() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 4) as LianSuoIndexData[]; + } + set signals(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 4, value); + } + get sections() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 5) as LianSuoIndexData[]; + } + set sections(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 5, value); + } + get floodGates() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 6) as LianSuoIndexData[]; + } + set floodGates(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 6, value); + } + get spksSwitchs() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 7) as LianSuoIndexData[]; + } + set spksSwitchs(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 7, value); + } + get garageDoors() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 8) as LianSuoIndexData[]; + } + set garageDoors(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 8, value); + } + get carWashing() { + return pb_1.Message.getRepeatedWrapperField(this, LianSuoIndexData, 9) as LianSuoIndexData[]; + } + set carWashing(value: LianSuoIndexData[]) { + pb_1.Message.setRepeatedWrapperField(this, 9, value); + } + static fromObject(data: { + stations?: ReturnType[]; + switchs?: ReturnType[]; + screenDoors?: ReturnType[]; + signals?: ReturnType[]; + sections?: ReturnType[]; + floodGates?: ReturnType[]; + spksSwitchs?: ReturnType[]; + garageDoors?: ReturnType[]; + carWashing?: ReturnType[]; + }): LianSuoData { + const message = new LianSuoData({}); + if (data.stations != null) { + message.stations = data.stations.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.switchs != null) { + message.switchs = data.switchs.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.screenDoors != null) { + message.screenDoors = data.screenDoors.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.signals != null) { + message.signals = data.signals.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.sections != null) { + message.sections = data.sections.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.floodGates != null) { + message.floodGates = data.floodGates.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.spksSwitchs != null) { + message.spksSwitchs = data.spksSwitchs.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.garageDoors != null) { + message.garageDoors = data.garageDoors.map(item => LianSuoIndexData.fromObject(item)); + } + if (data.carWashing != null) { + message.carWashing = data.carWashing.map(item => LianSuoIndexData.fromObject(item)); + } + return message; + } + toObject() { + const data: { + stations?: ReturnType[]; + switchs?: ReturnType[]; + screenDoors?: ReturnType[]; + signals?: ReturnType[]; + sections?: ReturnType[]; + floodGates?: ReturnType[]; + spksSwitchs?: ReturnType[]; + garageDoors?: ReturnType[]; + carWashing?: ReturnType[]; + } = {}; + if (this.stations != null) { + data.stations = this.stations.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.switchs != null) { + data.switchs = this.switchs.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.screenDoors != null) { + data.screenDoors = this.screenDoors.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.signals != null) { + data.signals = this.signals.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.sections != null) { + data.sections = this.sections.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.floodGates != null) { + data.floodGates = this.floodGates.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.spksSwitchs != null) { + data.spksSwitchs = this.spksSwitchs.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.garageDoors != null) { + data.garageDoors = this.garageDoors.map((item: LianSuoIndexData) => item.toObject()); + } + if (this.carWashing != null) { + data.carWashing = this.carWashing.map((item: LianSuoIndexData) => item.toObject()); + } + 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.stations.length) + writer.writeRepeatedMessage(1, this.stations, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.switchs.length) + writer.writeRepeatedMessage(2, this.switchs, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.screenDoors.length) + writer.writeRepeatedMessage(3, this.screenDoors, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.signals.length) + writer.writeRepeatedMessage(4, this.signals, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.sections.length) + writer.writeRepeatedMessage(5, this.sections, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.floodGates.length) + writer.writeRepeatedMessage(6, this.floodGates, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.spksSwitchs.length) + writer.writeRepeatedMessage(7, this.spksSwitchs, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.garageDoors.length) + writer.writeRepeatedMessage(8, this.garageDoors, (item: LianSuoIndexData) => item.serialize(writer)); + if (this.carWashing.length) + writer.writeRepeatedMessage(9, this.carWashing, (item: LianSuoIndexData) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): LianSuoData { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new LianSuoData(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.stations, () => pb_1.Message.addToRepeatedWrapperField(message, 1, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 2: + reader.readMessage(message.switchs, () => pb_1.Message.addToRepeatedWrapperField(message, 2, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 3: + reader.readMessage(message.screenDoors, () => pb_1.Message.addToRepeatedWrapperField(message, 3, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 4: + reader.readMessage(message.signals, () => pb_1.Message.addToRepeatedWrapperField(message, 4, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 5: + reader.readMessage(message.sections, () => pb_1.Message.addToRepeatedWrapperField(message, 5, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 6: + reader.readMessage(message.floodGates, () => pb_1.Message.addToRepeatedWrapperField(message, 6, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 7: + reader.readMessage(message.spksSwitchs, () => pb_1.Message.addToRepeatedWrapperField(message, 7, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 8: + reader.readMessage(message.garageDoors, () => pb_1.Message.addToRepeatedWrapperField(message, 8, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + case 9: + reader.readMessage(message.carWashing, () => pb_1.Message.addToRepeatedWrapperField(message, 9, LianSuoIndexData.deserialize(reader), LianSuoIndexData)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): LianSuoData { + return LianSuoData.deserialize(bytes); + } + } }