diff --git a/src/protos/device_state.ts b/src/protos/device_state.ts index 8a5d9df..f8a61aa 100644 --- a/src/protos/device_state.ts +++ b/src/protos/device_state.ts @@ -1273,19 +1273,22 @@ export namespace state { tailDeviceId?: number; tailOffset?: number; tailDevicePort?: string; - btmState?: BTMState; tcc?: TrainControlState; connState?: TrainConnState; - pluseCount?: SensorSpeedPulseCount; - vobcBtm?: VobcBtmState; oldLink?: string; oldLinkOffset?: number; - btmBaliseCache?: TrainBtmCache; + oldTailLink?: string; + oldTailLinkOffset?: number; + btmBaliseCacheA?: TrainBtmCache; + btmBaliseCacheB?: TrainBtmCache; TrainLoad?: number; TrainMaxSpeed?: number; TrainMaxAcc?: number; TrainMaxBrake?: number; TrainEmergencyBrake?: number; + projectCode?: string; + trainPort?: TrainState.TrainPort; + pulseCountMap?: Map; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -1356,29 +1359,29 @@ export namespace state { if ("tailDevicePort" in data && data.tailDevicePort != undefined) { this.tailDevicePort = data.tailDevicePort; } - if ("btmState" in data && data.btmState != undefined) { - this.btmState = data.btmState; - } if ("tcc" in data && data.tcc != undefined) { this.tcc = data.tcc; } if ("connState" in data && data.connState != undefined) { this.connState = data.connState; } - if ("pluseCount" in data && data.pluseCount != undefined) { - this.pluseCount = data.pluseCount; - } - if ("vobcBtm" in data && data.vobcBtm != undefined) { - this.vobcBtm = data.vobcBtm; - } if ("oldLink" in data && data.oldLink != undefined) { this.oldLink = data.oldLink; } if ("oldLinkOffset" in data && data.oldLinkOffset != undefined) { this.oldLinkOffset = data.oldLinkOffset; } - if ("btmBaliseCache" in data && data.btmBaliseCache != undefined) { - this.btmBaliseCache = data.btmBaliseCache; + if ("oldTailLink" in data && data.oldTailLink != undefined) { + this.oldTailLink = data.oldTailLink; + } + if ("oldTailLinkOffset" in data && data.oldTailLinkOffset != undefined) { + this.oldTailLinkOffset = data.oldTailLinkOffset; + } + if ("btmBaliseCacheA" in data && data.btmBaliseCacheA != undefined) { + this.btmBaliseCacheA = data.btmBaliseCacheA; + } + if ("btmBaliseCacheB" in data && data.btmBaliseCacheB != undefined) { + this.btmBaliseCacheB = data.btmBaliseCacheB; } if ("TrainLoad" in data && data.TrainLoad != undefined) { this.TrainLoad = data.TrainLoad; @@ -1395,7 +1398,18 @@ export namespace state { if ("TrainEmergencyBrake" in data && data.TrainEmergencyBrake != undefined) { this.TrainEmergencyBrake = data.TrainEmergencyBrake; } + if ("projectCode" in data && data.projectCode != undefined) { + this.projectCode = data.projectCode; + } + if ("trainPort" in data && data.trainPort != undefined) { + this.trainPort = data.trainPort; + } + if ("pulseCountMap" in data && data.pulseCountMap != undefined) { + this.pulseCountMap = data.pulseCountMap; + } } + if (!this.pulseCountMap) + this.pulseCountMap = new Map(); } get id() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; @@ -1544,15 +1558,6 @@ export namespace state { set tailDevicePort(value: string) { pb_1.Message.setField(this, 22, value); } - get btmState() { - return pb_1.Message.getWrapperField(this, BTMState, 23) as BTMState; - } - set btmState(value: BTMState) { - pb_1.Message.setWrapperField(this, 23, value); - } - get has_btmState() { - return pb_1.Message.getField(this, 23) != null; - } get tcc() { return pb_1.Message.getWrapperField(this, TrainControlState, 24) as TrainControlState; } @@ -1571,24 +1576,6 @@ export namespace state { get has_connState() { return pb_1.Message.getField(this, 25) != null; } - get pluseCount() { - return pb_1.Message.getWrapperField(this, SensorSpeedPulseCount, 26) as SensorSpeedPulseCount; - } - set pluseCount(value: SensorSpeedPulseCount) { - pb_1.Message.setWrapperField(this, 26, value); - } - get has_pluseCount() { - return pb_1.Message.getField(this, 26) != null; - } - get vobcBtm() { - return pb_1.Message.getWrapperField(this, VobcBtmState, 27) as VobcBtmState; - } - set vobcBtm(value: VobcBtmState) { - pb_1.Message.setWrapperField(this, 27, value); - } - get has_vobcBtm() { - return pb_1.Message.getField(this, 27) != null; - } get oldLink() { return pb_1.Message.getFieldWithDefault(this, 28, "") as string; } @@ -1601,45 +1588,84 @@ export namespace state { set oldLinkOffset(value: number) { pb_1.Message.setField(this, 29, value); } - get btmBaliseCache() { - return pb_1.Message.getWrapperField(this, TrainBtmCache, 30) as TrainBtmCache; + get oldTailLink() { + return pb_1.Message.getFieldWithDefault(this, 30, "") as string; } - set btmBaliseCache(value: TrainBtmCache) { - pb_1.Message.setWrapperField(this, 30, value); + set oldTailLink(value: string) { + pb_1.Message.setField(this, 30, value); } - get has_btmBaliseCache() { - return pb_1.Message.getField(this, 30) != null; - } - get TrainLoad() { + get oldTailLinkOffset() { return pb_1.Message.getFieldWithDefault(this, 31, 0) as number; } - set TrainLoad(value: number) { + set oldTailLinkOffset(value: number) { pb_1.Message.setField(this, 31, value); } - get TrainMaxSpeed() { - return pb_1.Message.getFieldWithDefault(this, 32, 0) as number; + get btmBaliseCacheA() { + return pb_1.Message.getWrapperField(this, TrainBtmCache, 32) as TrainBtmCache; } - set TrainMaxSpeed(value: number) { - pb_1.Message.setField(this, 32, value); + set btmBaliseCacheA(value: TrainBtmCache) { + pb_1.Message.setWrapperField(this, 32, value); } - get TrainMaxAcc() { - return pb_1.Message.getFieldWithDefault(this, 33, 0) as number; + get has_btmBaliseCacheA() { + return pb_1.Message.getField(this, 32) != null; } - set TrainMaxAcc(value: number) { - pb_1.Message.setField(this, 33, value); + get btmBaliseCacheB() { + return pb_1.Message.getWrapperField(this, TrainBtmCache, 33) as TrainBtmCache; } - get TrainMaxBrake() { + set btmBaliseCacheB(value: TrainBtmCache) { + pb_1.Message.setWrapperField(this, 33, value); + } + get has_btmBaliseCacheB() { + return pb_1.Message.getField(this, 33) != null; + } + get TrainLoad() { return pb_1.Message.getFieldWithDefault(this, 34, 0) as number; } - set TrainMaxBrake(value: number) { + set TrainLoad(value: number) { pb_1.Message.setField(this, 34, value); } - get TrainEmergencyBrake() { + get TrainMaxSpeed() { return pb_1.Message.getFieldWithDefault(this, 35, 0) as number; } - set TrainEmergencyBrake(value: number) { + set TrainMaxSpeed(value: number) { pb_1.Message.setField(this, 35, value); } + get TrainMaxAcc() { + return pb_1.Message.getFieldWithDefault(this, 36, 0) as number; + } + set TrainMaxAcc(value: number) { + pb_1.Message.setField(this, 36, value); + } + get TrainMaxBrake() { + return pb_1.Message.getFieldWithDefault(this, 37, 0) as number; + } + set TrainMaxBrake(value: number) { + pb_1.Message.setField(this, 37, value); + } + get TrainEmergencyBrake() { + return pb_1.Message.getFieldWithDefault(this, 38, 0) as number; + } + set TrainEmergencyBrake(value: number) { + pb_1.Message.setField(this, 38, value); + } + get projectCode() { + return pb_1.Message.getFieldWithDefault(this, 39, "") as string; + } + set projectCode(value: string) { + pb_1.Message.setField(this, 39, value); + } + get trainPort() { + return pb_1.Message.getFieldWithDefault(this, 40, TrainState.TrainPort.PORT_NONE) as TrainState.TrainPort; + } + set trainPort(value: TrainState.TrainPort) { + pb_1.Message.setField(this, 40, value); + } + get pulseCountMap() { + return pb_1.Message.getField(this, 41) as any as Map; + } + set pulseCountMap(value: Map) { + pb_1.Message.setField(this, 41, value as any); + } static fromObject(data: { id?: string; up?: boolean; @@ -1663,19 +1689,24 @@ export namespace state { tailDeviceId?: number; tailOffset?: number; tailDevicePort?: string; - btmState?: ReturnType; tcc?: ReturnType; connState?: ReturnType; - pluseCount?: ReturnType; - vobcBtm?: ReturnType; oldLink?: string; oldLinkOffset?: number; - btmBaliseCache?: ReturnType; + oldTailLink?: string; + oldTailLinkOffset?: number; + btmBaliseCacheA?: ReturnType; + btmBaliseCacheB?: ReturnType; TrainLoad?: number; TrainMaxSpeed?: number; TrainMaxAcc?: number; TrainMaxBrake?: number; TrainEmergencyBrake?: number; + projectCode?: string; + trainPort?: TrainState.TrainPort; + pulseCountMap?: { + [key: number]: ReturnType; + }; }): TrainState { const message = new TrainState({}); if (data.id != null) { @@ -1744,29 +1775,29 @@ export namespace state { if (data.tailDevicePort != null) { message.tailDevicePort = data.tailDevicePort; } - if (data.btmState != null) { - message.btmState = BTMState.fromObject(data.btmState); - } if (data.tcc != null) { message.tcc = TrainControlState.fromObject(data.tcc); } if (data.connState != null) { message.connState = TrainConnState.fromObject(data.connState); } - if (data.pluseCount != null) { - message.pluseCount = SensorSpeedPulseCount.fromObject(data.pluseCount); - } - if (data.vobcBtm != null) { - message.vobcBtm = VobcBtmState.fromObject(data.vobcBtm); - } if (data.oldLink != null) { message.oldLink = data.oldLink; } if (data.oldLinkOffset != null) { message.oldLinkOffset = data.oldLinkOffset; } - if (data.btmBaliseCache != null) { - message.btmBaliseCache = TrainBtmCache.fromObject(data.btmBaliseCache); + if (data.oldTailLink != null) { + message.oldTailLink = data.oldTailLink; + } + if (data.oldTailLinkOffset != null) { + message.oldTailLinkOffset = data.oldTailLinkOffset; + } + if (data.btmBaliseCacheA != null) { + message.btmBaliseCacheA = TrainBtmCache.fromObject(data.btmBaliseCacheA); + } + if (data.btmBaliseCacheB != null) { + message.btmBaliseCacheB = TrainBtmCache.fromObject(data.btmBaliseCacheB); } if (data.TrainLoad != null) { message.TrainLoad = data.TrainLoad; @@ -1783,6 +1814,15 @@ export namespace state { if (data.TrainEmergencyBrake != null) { message.TrainEmergencyBrake = data.TrainEmergencyBrake; } + if (data.projectCode != null) { + message.projectCode = data.projectCode; + } + if (data.trainPort != null) { + message.trainPort = data.trainPort; + } + if (typeof data.pulseCountMap == "object") { + message.pulseCountMap = new Map(Object.entries(data.pulseCountMap).map(([key, value]) => [Number(key), SensorSpeedPulseCount.fromObject(value)])); + } return message; } toObject() { @@ -1809,19 +1849,24 @@ export namespace state { tailDeviceId?: number; tailOffset?: number; tailDevicePort?: string; - btmState?: ReturnType; tcc?: ReturnType; connState?: ReturnType; - pluseCount?: ReturnType; - vobcBtm?: ReturnType; oldLink?: string; oldLinkOffset?: number; - btmBaliseCache?: ReturnType; + oldTailLink?: string; + oldTailLinkOffset?: number; + btmBaliseCacheA?: ReturnType; + btmBaliseCacheB?: ReturnType; TrainLoad?: number; TrainMaxSpeed?: number; TrainMaxAcc?: number; TrainMaxBrake?: number; TrainEmergencyBrake?: number; + projectCode?: string; + trainPort?: TrainState.TrainPort; + pulseCountMap?: { + [key: number]: ReturnType; + }; } = {}; if (this.id != null) { data.id = this.id; @@ -1889,29 +1934,29 @@ export namespace state { if (this.tailDevicePort != null) { data.tailDevicePort = this.tailDevicePort; } - if (this.btmState != null) { - data.btmState = this.btmState.toObject(); - } if (this.tcc != null) { data.tcc = this.tcc.toObject(); } if (this.connState != null) { data.connState = this.connState.toObject(); } - if (this.pluseCount != null) { - data.pluseCount = this.pluseCount.toObject(); - } - if (this.vobcBtm != null) { - data.vobcBtm = this.vobcBtm.toObject(); - } if (this.oldLink != null) { data.oldLink = this.oldLink; } if (this.oldLinkOffset != null) { data.oldLinkOffset = this.oldLinkOffset; } - if (this.btmBaliseCache != null) { - data.btmBaliseCache = this.btmBaliseCache.toObject(); + if (this.oldTailLink != null) { + data.oldTailLink = this.oldTailLink; + } + if (this.oldTailLinkOffset != null) { + data.oldTailLinkOffset = this.oldTailLinkOffset; + } + if (this.btmBaliseCacheA != null) { + data.btmBaliseCacheA = this.btmBaliseCacheA.toObject(); + } + if (this.btmBaliseCacheB != null) { + data.btmBaliseCacheB = this.btmBaliseCacheB.toObject(); } if (this.TrainLoad != null) { data.TrainLoad = this.TrainLoad; @@ -1928,6 +1973,15 @@ export namespace state { if (this.TrainEmergencyBrake != null) { data.TrainEmergencyBrake = this.TrainEmergencyBrake; } + if (this.projectCode != null) { + data.projectCode = this.projectCode; + } + if (this.trainPort != null) { + data.trainPort = this.trainPort; + } + if (this.pulseCountMap != null) { + data.pulseCountMap = (Object.fromEntries)((Array.from)(this.pulseCountMap).map(([key, value]) => [key, value.toObject()])); + } return data; } serialize(): Uint8Array; @@ -1978,32 +2032,42 @@ export namespace state { writer.writeInt64(21, this.tailOffset); if (this.tailDevicePort.length) writer.writeString(22, this.tailDevicePort); - if (this.has_btmState) - writer.writeMessage(23, this.btmState, () => this.btmState.serialize(writer)); if (this.has_tcc) writer.writeMessage(24, this.tcc, () => this.tcc.serialize(writer)); if (this.has_connState) writer.writeMessage(25, this.connState, () => this.connState.serialize(writer)); - if (this.has_pluseCount) - writer.writeMessage(26, this.pluseCount, () => this.pluseCount.serialize(writer)); - if (this.has_vobcBtm) - writer.writeMessage(27, this.vobcBtm, () => this.vobcBtm.serialize(writer)); if (this.oldLink.length) writer.writeString(28, this.oldLink); if (this.oldLinkOffset != 0) writer.writeInt64(29, this.oldLinkOffset); - if (this.has_btmBaliseCache) - writer.writeMessage(30, this.btmBaliseCache, () => this.btmBaliseCache.serialize(writer)); + if (this.oldTailLink.length) + writer.writeString(30, this.oldTailLink); + if (this.oldTailLinkOffset != 0) + writer.writeInt64(31, this.oldTailLinkOffset); + if (this.has_btmBaliseCacheA) + writer.writeMessage(32, this.btmBaliseCacheA, () => this.btmBaliseCacheA.serialize(writer)); + if (this.has_btmBaliseCacheB) + writer.writeMessage(33, this.btmBaliseCacheB, () => this.btmBaliseCacheB.serialize(writer)); if (this.TrainLoad != 0) - writer.writeInt32(31, this.TrainLoad); + writer.writeInt32(34, this.TrainLoad); if (this.TrainMaxSpeed != 0) - writer.writeFloat(32, this.TrainMaxSpeed); + writer.writeFloat(35, this.TrainMaxSpeed); if (this.TrainMaxAcc != 0) - writer.writeFloat(33, this.TrainMaxAcc); + writer.writeFloat(36, this.TrainMaxAcc); if (this.TrainMaxBrake != 0) - writer.writeFloat(34, this.TrainMaxBrake); + writer.writeFloat(37, this.TrainMaxBrake); if (this.TrainEmergencyBrake != 0) - writer.writeFloat(35, this.TrainEmergencyBrake); + writer.writeFloat(38, this.TrainEmergencyBrake); + if (this.projectCode.length) + writer.writeString(39, this.projectCode); + if (this.trainPort != TrainState.TrainPort.PORT_NONE) + writer.writeEnum(40, this.trainPort); + for (const [key, value] of this.pulseCountMap) { + writer.writeMessage(41, this.pulseCountMap, () => { + writer.writeInt32(1, key); + writer.writeMessage(2, value, () => value.serialize(writer)); + }); + } if (!w) return writer.getResultBuffer(); } @@ -2079,21 +2143,12 @@ export namespace state { case 22: message.tailDevicePort = reader.readString(); break; - case 23: - reader.readMessage(message.btmState, () => message.btmState = BTMState.deserialize(reader)); - break; case 24: reader.readMessage(message.tcc, () => message.tcc = TrainControlState.deserialize(reader)); break; case 25: reader.readMessage(message.connState, () => message.connState = TrainConnState.deserialize(reader)); break; - case 26: - reader.readMessage(message.pluseCount, () => message.pluseCount = SensorSpeedPulseCount.deserialize(reader)); - break; - case 27: - reader.readMessage(message.vobcBtm, () => message.vobcBtm = VobcBtmState.deserialize(reader)); - break; case 28: message.oldLink = reader.readString(); break; @@ -2101,23 +2156,45 @@ export namespace state { message.oldLinkOffset = reader.readInt64(); break; case 30: - reader.readMessage(message.btmBaliseCache, () => message.btmBaliseCache = TrainBtmCache.deserialize(reader)); + message.oldTailLink = reader.readString(); break; case 31: - message.TrainLoad = reader.readInt32(); + message.oldTailLinkOffset = reader.readInt64(); break; case 32: - message.TrainMaxSpeed = reader.readFloat(); + reader.readMessage(message.btmBaliseCacheA, () => message.btmBaliseCacheA = TrainBtmCache.deserialize(reader)); break; case 33: - message.TrainMaxAcc = reader.readFloat(); + reader.readMessage(message.btmBaliseCacheB, () => message.btmBaliseCacheB = TrainBtmCache.deserialize(reader)); break; case 34: - message.TrainMaxBrake = reader.readFloat(); + message.TrainLoad = reader.readInt32(); break; case 35: + message.TrainMaxSpeed = reader.readFloat(); + break; + case 36: + message.TrainMaxAcc = reader.readFloat(); + break; + case 37: + message.TrainMaxBrake = reader.readFloat(); + break; + case 38: message.TrainEmergencyBrake = reader.readFloat(); break; + case 39: + message.projectCode = reader.readString(); + break; + case 40: + message.trainPort = reader.readEnum(); + break; + case 41: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.pulseCountMap as any, reader, reader.readInt32, () => { + let value; + reader.readMessage(message, () => value = SensorSpeedPulseCount.deserialize(reader)); + return value; + })); + break; default: reader.skipField(); } } @@ -2130,6 +2207,13 @@ export namespace state { return TrainState.deserialize(bytes); } } + export namespace TrainState { + export enum TrainPort { + PORT_NONE = 0, + PORT_A = 1, + PORT_B = 2 + } + } export class TrainBtmCache extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { @@ -2289,453 +2373,21 @@ export namespace state { return TrainBtmCache.deserialize(bytes); } } - export class VobcBtmState extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - telegramState?: VobcBtmState.TelegramState[]; - history?: Map; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("telegramState" in data && data.telegramState != undefined) { - this.telegramState = data.telegramState; - } - if ("history" in data && data.history != undefined) { - this.history = data.history; - } - } - if (!this.history) - this.history = new Map(); - } - get telegramState() { - return pb_1.Message.getRepeatedWrapperField(this, VobcBtmState.TelegramState, 1) as VobcBtmState.TelegramState[]; - } - set telegramState(value: VobcBtmState.TelegramState[]) { - pb_1.Message.setRepeatedWrapperField(this, 1, value); - } - get history() { - return pb_1.Message.getField(this, 2) as any as Map; - } - set history(value: Map) { - pb_1.Message.setField(this, 2, value as any); - } - static fromObject(data: { - telegramState?: ReturnType[]; - history?: { - [key: number]: ReturnType; - }; - }): VobcBtmState { - const message = new VobcBtmState({}); - if (data.telegramState != null) { - message.telegramState = data.telegramState.map(item => VobcBtmState.TelegramState.fromObject(item)); - } - if (typeof data.history == "object") { - message.history = new Map(Object.entries(data.history).map(([key, value]) => [Number(key), VobcBtmState.VobcBtmHistoryState.fromObject(value)])); - } - return message; - } - toObject() { - const data: { - telegramState?: ReturnType[]; - history?: { - [key: number]: ReturnType; - }; - } = {}; - if (this.telegramState != null) { - data.telegramState = this.telegramState.map((item: VobcBtmState.TelegramState) => item.toObject()); - } - if (this.history != null) { - data.history = (Object.fromEntries)((Array.from)(this.history).map(([key, value]) => [key, value.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.telegramState.length) - writer.writeRepeatedMessage(1, this.telegramState, (item: VobcBtmState.TelegramState) => item.serialize(writer)); - for (const [key, value] of this.history) { - writer.writeMessage(2, this.history, () => { - writer.writeUint32(1, key); - writer.writeMessage(2, value, () => value.serialize(writer)); - }); - } - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VobcBtmState { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VobcBtmState(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - reader.readMessage(message.telegramState, () => pb_1.Message.addToRepeatedWrapperField(message, 1, VobcBtmState.TelegramState.deserialize(reader), VobcBtmState.TelegramState)); - break; - case 2: - reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.history as any, reader, reader.readUint32, () => { - let value; - reader.readMessage(message, () => value = VobcBtmState.VobcBtmHistoryState.deserialize(reader)); - return value; - })); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): VobcBtmState { - return VobcBtmState.deserialize(bytes); - } - } - export namespace VobcBtmState { - export class TelegramState extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - baliseId?: string; - telegram?: string; - arriveTime?: number; - leaveTime?: 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 ("baliseId" in data && data.baliseId != undefined) { - this.baliseId = data.baliseId; - } - if ("telegram" in data && data.telegram != undefined) { - this.telegram = data.telegram; - } - if ("arriveTime" in data && data.arriveTime != undefined) { - this.arriveTime = data.arriveTime; - } - if ("leaveTime" in data && data.leaveTime != undefined) { - this.leaveTime = data.leaveTime; - } - } - } - get baliseId() { - return pb_1.Message.getFieldWithDefault(this, 1, "") as string; - } - set baliseId(value: string) { - pb_1.Message.setField(this, 1, value); - } - get telegram() { - return pb_1.Message.getFieldWithDefault(this, 2, "") as string; - } - set telegram(value: string) { - pb_1.Message.setField(this, 2, value); - } - get arriveTime() { - return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; - } - set arriveTime(value: number) { - pb_1.Message.setField(this, 5, value); - } - get leaveTime() { - return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; - } - set leaveTime(value: number) { - pb_1.Message.setField(this, 6, value); - } - static fromObject(data: { - baliseId?: string; - telegram?: string; - arriveTime?: number; - leaveTime?: number; - }): TelegramState { - const message = new TelegramState({}); - if (data.baliseId != null) { - message.baliseId = data.baliseId; - } - if (data.telegram != null) { - message.telegram = data.telegram; - } - if (data.arriveTime != null) { - message.arriveTime = data.arriveTime; - } - if (data.leaveTime != null) { - message.leaveTime = data.leaveTime; - } - return message; - } - toObject() { - const data: { - baliseId?: string; - telegram?: string; - arriveTime?: number; - leaveTime?: number; - } = {}; - if (this.baliseId != null) { - data.baliseId = this.baliseId; - } - if (this.telegram != null) { - data.telegram = this.telegram; - } - if (this.arriveTime != null) { - data.arriveTime = this.arriveTime; - } - if (this.leaveTime != null) { - data.leaveTime = this.leaveTime; - } - 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.baliseId.length) - writer.writeString(1, this.baliseId); - if (this.telegram.length) - writer.writeString(2, this.telegram); - if (this.arriveTime != 0) - writer.writeInt64(5, this.arriveTime); - if (this.leaveTime != 0) - writer.writeInt64(6, this.leaveTime); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TelegramState { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TelegramState(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.baliseId = reader.readString(); - break; - case 2: - message.telegram = reader.readString(); - break; - case 5: - message.arriveTime = reader.readInt64(); - break; - case 6: - message.leaveTime = reader.readInt64(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): TelegramState { - return TelegramState.deserialize(bytes); - } - } - export class VobcBtmHistoryState extends pb_1.Message { - #one_of_decls: number[][] = []; - constructor(data?: any[] | { - sendCount?: number; - packetSendId?: number; - vobcLifeNum?: number; - sendTelegram?: string; - balisePacket?: string; - isFreePacket?: boolean; - }) { - super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); - if (!Array.isArray(data) && typeof data == "object") { - if ("sendCount" in data && data.sendCount != undefined) { - this.sendCount = data.sendCount; - } - if ("packetSendId" in data && data.packetSendId != undefined) { - this.packetSendId = data.packetSendId; - } - if ("vobcLifeNum" in data && data.vobcLifeNum != undefined) { - this.vobcLifeNum = data.vobcLifeNum; - } - if ("sendTelegram" in data && data.sendTelegram != undefined) { - this.sendTelegram = data.sendTelegram; - } - if ("balisePacket" in data && data.balisePacket != undefined) { - this.balisePacket = data.balisePacket; - } - if ("isFreePacket" in data && data.isFreePacket != undefined) { - this.isFreePacket = data.isFreePacket; - } - } - } - get sendCount() { - return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; - } - set sendCount(value: number) { - pb_1.Message.setField(this, 1, value); - } - get packetSendId() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set packetSendId(value: number) { - pb_1.Message.setField(this, 2, value); - } - get vobcLifeNum() { - return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; - } - set vobcLifeNum(value: number) { - pb_1.Message.setField(this, 3, value); - } - get sendTelegram() { - return pb_1.Message.getFieldWithDefault(this, 4, "") as string; - } - set sendTelegram(value: string) { - pb_1.Message.setField(this, 4, value); - } - get balisePacket() { - return pb_1.Message.getFieldWithDefault(this, 5, "") as string; - } - set balisePacket(value: string) { - pb_1.Message.setField(this, 5, value); - } - get isFreePacket() { - return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; - } - set isFreePacket(value: boolean) { - pb_1.Message.setField(this, 6, value); - } - static fromObject(data: { - sendCount?: number; - packetSendId?: number; - vobcLifeNum?: number; - sendTelegram?: string; - balisePacket?: string; - isFreePacket?: boolean; - }): VobcBtmHistoryState { - const message = new VobcBtmHistoryState({}); - if (data.sendCount != null) { - message.sendCount = data.sendCount; - } - if (data.packetSendId != null) { - message.packetSendId = data.packetSendId; - } - if (data.vobcLifeNum != null) { - message.vobcLifeNum = data.vobcLifeNum; - } - if (data.sendTelegram != null) { - message.sendTelegram = data.sendTelegram; - } - if (data.balisePacket != null) { - message.balisePacket = data.balisePacket; - } - if (data.isFreePacket != null) { - message.isFreePacket = data.isFreePacket; - } - return message; - } - toObject() { - const data: { - sendCount?: number; - packetSendId?: number; - vobcLifeNum?: number; - sendTelegram?: string; - balisePacket?: string; - isFreePacket?: boolean; - } = {}; - if (this.sendCount != null) { - data.sendCount = this.sendCount; - } - if (this.packetSendId != null) { - data.packetSendId = this.packetSendId; - } - if (this.vobcLifeNum != null) { - data.vobcLifeNum = this.vobcLifeNum; - } - if (this.sendTelegram != null) { - data.sendTelegram = this.sendTelegram; - } - if (this.balisePacket != null) { - data.balisePacket = this.balisePacket; - } - if (this.isFreePacket != null) { - data.isFreePacket = this.isFreePacket; - } - 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.sendCount != 0) - writer.writeUint32(1, this.sendCount); - if (this.packetSendId != 0) - writer.writeUint32(2, this.packetSendId); - if (this.vobcLifeNum != 0) - writer.writeUint32(3, this.vobcLifeNum); - if (this.sendTelegram.length) - writer.writeString(4, this.sendTelegram); - if (this.balisePacket.length) - writer.writeString(5, this.balisePacket); - if (this.isFreePacket != false) - writer.writeBool(6, this.isFreePacket); - if (!w) - return writer.getResultBuffer(); - } - static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VobcBtmHistoryState { - const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VobcBtmHistoryState(); - while (reader.nextField()) { - if (reader.isEndGroup()) - break; - switch (reader.getFieldNumber()) { - case 1: - message.sendCount = reader.readUint32(); - break; - case 2: - message.packetSendId = reader.readUint32(); - break; - case 3: - message.vobcLifeNum = reader.readUint32(); - break; - case 4: - message.sendTelegram = reader.readString(); - break; - case 5: - message.balisePacket = reader.readString(); - break; - case 6: - message.isFreePacket = reader.readBool(); - break; - default: reader.skipField(); - } - } - return message; - } - serializeBinary(): Uint8Array { - return this.serialize(); - } - static deserializeBinary(bytes: Uint8Array): VobcBtmHistoryState { - return VobcBtmHistoryState.deserialize(bytes); - } - } - } export class SensorSpeedPulseCount extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { pulseCount1?: number; - pulseCount2?: number; pulseCount3?: number[]; - pulseCount4?: number[]; }) { super(); - pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("pulseCount1" in data && data.pulseCount1 != undefined) { this.pulseCount1 = data.pulseCount1; } - if ("pulseCount2" in data && data.pulseCount2 != undefined) { - this.pulseCount2 = data.pulseCount2; - } if ("pulseCount3" in data && data.pulseCount3 != undefined) { this.pulseCount3 = data.pulseCount3; } - if ("pulseCount4" in data && data.pulseCount4 != undefined) { - this.pulseCount4 = data.pulseCount4; - } } } get pulseCount1() { @@ -2744,64 +2396,36 @@ export namespace state { set pulseCount1(value: number) { pb_1.Message.setField(this, 1, value); } - get pulseCount2() { - return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; - } - set pulseCount2(value: number) { - pb_1.Message.setField(this, 2, value); - } get pulseCount3() { return pb_1.Message.getFieldWithDefault(this, 3, []) as number[]; } set pulseCount3(value: number[]) { pb_1.Message.setField(this, 3, value); } - get pulseCount4() { - return pb_1.Message.getFieldWithDefault(this, 4, []) as number[]; - } - set pulseCount4(value: number[]) { - pb_1.Message.setField(this, 4, value); - } static fromObject(data: { pulseCount1?: number; - pulseCount2?: number; pulseCount3?: number[]; - pulseCount4?: number[]; }): SensorSpeedPulseCount { const message = new SensorSpeedPulseCount({}); if (data.pulseCount1 != null) { message.pulseCount1 = data.pulseCount1; } - if (data.pulseCount2 != null) { - message.pulseCount2 = data.pulseCount2; - } if (data.pulseCount3 != null) { message.pulseCount3 = data.pulseCount3; } - if (data.pulseCount4 != null) { - message.pulseCount4 = data.pulseCount4; - } return message; } toObject() { const data: { pulseCount1?: number; - pulseCount2?: number; pulseCount3?: number[]; - pulseCount4?: number[]; } = {}; if (this.pulseCount1 != null) { data.pulseCount1 = this.pulseCount1; } - if (this.pulseCount2 != null) { - data.pulseCount2 = this.pulseCount2; - } if (this.pulseCount3 != null) { data.pulseCount3 = this.pulseCount3; } - if (this.pulseCount4 != null) { - data.pulseCount4 = this.pulseCount4; - } return data; } serialize(): Uint8Array; @@ -2810,12 +2434,8 @@ export namespace state { const writer = w || new pb_1.BinaryWriter(); if (this.pulseCount1 != 0) writer.writeUint32(1, this.pulseCount1); - if (this.pulseCount2 != 0) - writer.writeUint32(2, this.pulseCount2); if (this.pulseCount3.length) writer.writePackedFloat(3, this.pulseCount3); - if (this.pulseCount4.length) - writer.writePackedFloat(4, this.pulseCount4); if (!w) return writer.getResultBuffer(); } @@ -2828,15 +2448,9 @@ export namespace state { case 1: message.pulseCount1 = reader.readUint32(); break; - case 2: - message.pulseCount2 = reader.readUint32(); - break; case 3: message.pulseCount3 = reader.readPackedFloat(); break; - case 4: - message.pulseCount4 = reader.readPackedFloat(); - break; default: reader.skipField(); } } @@ -3506,6 +3120,7 @@ export namespace state { atoCloseRightDoor?: boolean; lightAtoSend?: boolean; atoStepLevel?: TrainVobcState.AtoStepLevel; + vobcBtmInfo?: TrainVobcState.VobcBtmInfo; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -3753,6 +3368,9 @@ export namespace state { if ("atoStepLevel" in data && data.atoStepLevel != undefined) { this.atoStepLevel = data.atoStepLevel; } + if ("vobcBtmInfo" in data && data.vobcBtmInfo != undefined) { + this.vobcBtmInfo = data.vobcBtmInfo; + } } } get lifeSignal() { @@ -4241,6 +3859,15 @@ export namespace state { set atoStepLevel(value: TrainVobcState.AtoStepLevel) { pb_1.Message.setField(this, 85, value); } + get vobcBtmInfo() { + return pb_1.Message.getWrapperField(this, TrainVobcState.VobcBtmInfo, 86) as TrainVobcState.VobcBtmInfo; + } + set vobcBtmInfo(value: TrainVobcState.VobcBtmInfo) { + pb_1.Message.setWrapperField(this, 86, value); + } + get has_vobcBtmInfo() { + return pb_1.Message.getField(this, 86) != null; + } static fromObject(data: { lifeSignal?: number; tc1Active?: boolean; @@ -4323,6 +3950,7 @@ export namespace state { atoCloseRightDoor?: boolean; lightAtoSend?: boolean; atoStepLevel?: TrainVobcState.AtoStepLevel; + vobcBtmInfo?: ReturnType; }): TrainVobcState { const message = new TrainVobcState({}); if (data.lifeSignal != null) { @@ -4568,6 +4196,9 @@ export namespace state { if (data.atoStepLevel != null) { message.atoStepLevel = data.atoStepLevel; } + if (data.vobcBtmInfo != null) { + message.vobcBtmInfo = TrainVobcState.VobcBtmInfo.fromObject(data.vobcBtmInfo); + } return message; } toObject() { @@ -4653,6 +4284,7 @@ export namespace state { atoCloseRightDoor?: boolean; lightAtoSend?: boolean; atoStepLevel?: TrainVobcState.AtoStepLevel; + vobcBtmInfo?: ReturnType; } = {}; if (this.lifeSignal != null) { data.lifeSignal = this.lifeSignal; @@ -4897,6 +4529,9 @@ export namespace state { if (this.atoStepLevel != null) { data.atoStepLevel = this.atoStepLevel; } + if (this.vobcBtmInfo != null) { + data.vobcBtmInfo = this.vobcBtmInfo.toObject(); + } return data; } serialize(): Uint8Array; @@ -5065,6 +4700,8 @@ export namespace state { writer.writeBool(84, this.lightAtoSend); if (this.atoStepLevel != TrainVobcState.AtoStepLevel.ATO_STEP_LEVEL_NONE) writer.writeEnum(85, this.atoStepLevel); + if (this.has_vobcBtmInfo) + writer.writeMessage(86, this.vobcBtmInfo, () => this.vobcBtmInfo.serialize(writer)); if (!w) return writer.getResultBuffer(); } @@ -5317,6 +4954,9 @@ export namespace state { case 85: message.atoStepLevel = reader.readEnum(); break; + case 86: + reader.readMessage(message.vobcBtmInfo, () => message.vobcBtmInfo = TrainVobcState.VobcBtmInfo.deserialize(reader)); + break; default: reader.skipField(); } } @@ -5340,6 +4980,119 @@ export namespace state { ATO_STEP_LEVEL_6 = 6, ATO_STEP_LEVEL_7 = 7 } + export class VobcBtmInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + btmId?: number; + vobcId?: number; + vobcLifeId?: 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 ("btmId" in data && data.btmId != undefined) { + this.btmId = data.btmId; + } + if ("vobcId" in data && data.vobcId != undefined) { + this.vobcId = data.vobcId; + } + if ("vobcLifeId" in data && data.vobcLifeId != undefined) { + this.vobcLifeId = data.vobcLifeId; + } + } + } + get btmId() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set btmId(value: number) { + pb_1.Message.setField(this, 1, value); + } + get vobcId() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set vobcId(value: number) { + pb_1.Message.setField(this, 2, value); + } + get vobcLifeId() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set vobcLifeId(value: number) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + btmId?: number; + vobcId?: number; + vobcLifeId?: number; + }): VobcBtmInfo { + const message = new VobcBtmInfo({}); + if (data.btmId != null) { + message.btmId = data.btmId; + } + if (data.vobcId != null) { + message.vobcId = data.vobcId; + } + if (data.vobcLifeId != null) { + message.vobcLifeId = data.vobcLifeId; + } + return message; + } + toObject() { + const data: { + btmId?: number; + vobcId?: number; + vobcLifeId?: number; + } = {}; + if (this.btmId != null) { + data.btmId = this.btmId; + } + if (this.vobcId != null) { + data.vobcId = this.vobcId; + } + if (this.vobcLifeId != null) { + data.vobcLifeId = this.vobcLifeId; + } + 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.btmId != 0) + writer.writeUint32(1, this.btmId); + if (this.vobcId != 0) + writer.writeUint32(2, this.vobcId); + if (this.vobcLifeId != 0) + writer.writeUint32(3, this.vobcLifeId); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VobcBtmInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VobcBtmInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.btmId = reader.readUint32(); + break; + case 2: + message.vobcId = reader.readUint32(); + break; + case 3: + message.vobcLifeId = reader.readUint32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VobcBtmInfo { + return VobcBtmInfo.deserialize(bytes); + } + } } export class TrainMapState extends pb_1.Message { #one_of_decls: number[][] = []; @@ -5412,7 +5165,6 @@ export namespace state { tailDeviceId?: number; tailOffset?: number; tailDevicePort?: string; - btmState?: BTMState; connState?: TrainConnState; }) { super(); @@ -5622,9 +5374,6 @@ export namespace state { if ("tailDevicePort" in data && data.tailDevicePort != undefined) { this.tailDevicePort = data.tailDevicePort; } - if ("btmState" in data && data.btmState != undefined) { - this.btmState = data.btmState; - } if ("connState" in data && data.connState != undefined) { this.connState = data.connState; } @@ -6047,23 +5796,14 @@ export namespace state { set tailDevicePort(value: string) { pb_1.Message.setField(this, 68, value); } - get btmState() { - return pb_1.Message.getWrapperField(this, BTMState, 69) as BTMState; - } - set btmState(value: BTMState) { - pb_1.Message.setWrapperField(this, 69, value); - } - get has_btmState() { - return pb_1.Message.getField(this, 69) != null; - } get connState() { - return pb_1.Message.getWrapperField(this, TrainConnState, 70) as TrainConnState; + return pb_1.Message.getWrapperField(this, TrainConnState, 69) as TrainConnState; } set connState(value: TrainConnState) { - pb_1.Message.setWrapperField(this, 70, value); + pb_1.Message.setWrapperField(this, 69, value); } get has_connState() { - return pb_1.Message.getField(this, 70) != null; + return pb_1.Message.getField(this, 69) != null; } static fromObject(data: { id?: string; @@ -6134,7 +5874,6 @@ export namespace state { tailDeviceId?: number; tailOffset?: number; tailDevicePort?: string; - btmState?: ReturnType; connState?: ReturnType; }): TrainMapState { const message = new TrainMapState({}); @@ -6342,9 +6081,6 @@ export namespace state { if (data.tailDevicePort != null) { message.tailDevicePort = data.tailDevicePort; } - if (data.btmState != null) { - message.btmState = BTMState.fromObject(data.btmState); - } if (data.connState != null) { message.connState = TrainConnState.fromObject(data.connState); } @@ -6420,7 +6156,6 @@ export namespace state { tailDeviceId?: number; tailOffset?: number; tailDevicePort?: string; - btmState?: ReturnType; connState?: ReturnType; } = {}; if (this.id != null) { @@ -6627,9 +6362,6 @@ export namespace state { if (this.tailDevicePort != null) { data.tailDevicePort = this.tailDevicePort; } - if (this.btmState != null) { - data.btmState = this.btmState.toObject(); - } if (this.connState != null) { data.connState = this.connState.toObject(); } @@ -6775,10 +6507,8 @@ export namespace state { writer.writeInt64(67, this.tailOffset); if (this.tailDevicePort.length) writer.writeString(68, this.tailDevicePort); - if (this.has_btmState) - writer.writeMessage(69, this.btmState, () => this.btmState.serialize(writer)); if (this.has_connState) - writer.writeMessage(70, this.connState, () => this.connState.serialize(writer)); + writer.writeMessage(69, this.connState, () => this.connState.serialize(writer)); if (!w) return writer.getResultBuffer(); } @@ -6993,9 +6723,6 @@ export namespace state { message.tailDevicePort = reader.readString(); break; case 69: - reader.readMessage(message.btmState, () => message.btmState = BTMState.deserialize(reader)); - break; - case 70: reader.readMessage(message.connState, () => message.connState = TrainConnState.deserialize(reader)); break; default: reader.skipField(); @@ -7023,6 +6750,7 @@ export namespace state { baliseType?: number; hasData?: boolean; resendCount?: number; + packageDataSN?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -7057,6 +6785,9 @@ export namespace state { if ("resendCount" in data && data.resendCount != undefined) { this.resendCount = data.resendCount; } + if ("packageDataSN" in data && data.packageDataSN != undefined) { + this.packageDataSN = data.packageDataSN; + } } } get telegram() { @@ -7119,6 +6850,12 @@ export namespace state { set resendCount(value: number) { pb_1.Message.setField(this, 10, value); } + get packageDataSN() { + return pb_1.Message.getFieldWithDefault(this, 11, 0) as number; + } + set packageDataSN(value: number) { + pb_1.Message.setField(this, 11, value); + } static fromObject(data: { telegram?: string; aboveBalise?: boolean; @@ -7130,6 +6867,7 @@ export namespace state { baliseType?: number; hasData?: boolean; resendCount?: number; + packageDataSN?: number; }): BTMState { const message = new BTMState({}); if (data.telegram != null) { @@ -7162,6 +6900,9 @@ export namespace state { if (data.resendCount != null) { message.resendCount = data.resendCount; } + if (data.packageDataSN != null) { + message.packageDataSN = data.packageDataSN; + } return message; } toObject() { @@ -7176,6 +6917,7 @@ export namespace state { baliseType?: number; hasData?: boolean; resendCount?: number; + packageDataSN?: number; } = {}; if (this.telegram != null) { data.telegram = this.telegram; @@ -7207,6 +6949,9 @@ export namespace state { if (this.resendCount != null) { data.resendCount = this.resendCount; } + if (this.packageDataSN != null) { + data.packageDataSN = this.packageDataSN; + } return data; } serialize(): Uint8Array; @@ -7233,6 +6978,8 @@ export namespace state { writer.writeBool(9, this.hasData); if (this.resendCount != 0) writer.writeUint32(10, this.resendCount); + if (this.packageDataSN != 0) + writer.writeUint32(11, this.packageDataSN); if (!w) return writer.getResultBuffer(); } @@ -7272,6 +7019,9 @@ export namespace state { case 10: message.resendCount = reader.readUint32(); break; + case 11: + message.packageDataSN = reader.readUint32(); + break; default: reader.skipField(); } } @@ -10813,8 +10563,6 @@ export namespace state { switchKeyMap?: Map; pushHandler?: TrainControlState.PushHandler; lightMaps?: Map; - lineInitTimeStamp12?: number; - line12ConnErr?: boolean; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); @@ -10834,12 +10582,6 @@ export namespace state { if ("lightMaps" in data && data.lightMaps != undefined) { this.lightMaps = data.lightMaps; } - if ("lineInitTimeStamp12" in data && data.lineInitTimeStamp12 != undefined) { - this.lineInitTimeStamp12 = data.lineInitTimeStamp12; - } - if ("line12ConnErr" in data && data.line12ConnErr != undefined) { - this.line12ConnErr = data.line12ConnErr; - } } if (!this.buttons) this.buttons = new Map(); @@ -10881,18 +10623,6 @@ export namespace state { set lightMaps(value: Map) { pb_1.Message.setField(this, 5, value as any); } - get lineInitTimeStamp12() { - return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; - } - set lineInitTimeStamp12(value: number) { - pb_1.Message.setField(this, 6, value); - } - get line12ConnErr() { - return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean; - } - set line12ConnErr(value: boolean) { - pb_1.Message.setField(this, 7, value); - } static fromObject(data: { buttons?: { [key: string]: ReturnType; @@ -10905,8 +10635,6 @@ export namespace state { lightMaps?: { [key: string]: ReturnType; }; - lineInitTimeStamp12?: number; - line12ConnErr?: boolean; }): TrainControlState { const message = new TrainControlState({}); if (typeof data.buttons == "object") { @@ -10924,12 +10652,6 @@ export namespace state { if (typeof data.lightMaps == "object") { message.lightMaps = new Map(Object.entries(data.lightMaps).map(([key, value]) => [key, TrainControlState.ControlLight.fromObject(value)])); } - if (data.lineInitTimeStamp12 != null) { - message.lineInitTimeStamp12 = data.lineInitTimeStamp12; - } - if (data.line12ConnErr != null) { - message.line12ConnErr = data.line12ConnErr; - } return message; } toObject() { @@ -10945,8 +10667,6 @@ export namespace state { lightMaps?: { [key: string]: ReturnType; }; - lineInitTimeStamp12?: number; - line12ConnErr?: boolean; } = {}; if (this.buttons != null) { data.buttons = (Object.fromEntries)((Array.from)(this.buttons).map(([key, value]) => [key, value.toObject()])); @@ -10963,12 +10683,6 @@ export namespace state { if (this.lightMaps != null) { data.lightMaps = (Object.fromEntries)((Array.from)(this.lightMaps).map(([key, value]) => [key, value.toObject()])); } - if (this.lineInitTimeStamp12 != null) { - data.lineInitTimeStamp12 = this.lineInitTimeStamp12; - } - if (this.line12ConnErr != null) { - data.line12ConnErr = this.line12ConnErr; - } return data; } serialize(): Uint8Array; @@ -10997,10 +10711,6 @@ export namespace state { writer.writeMessage(2, value, () => value.serialize(writer)); }); } - if (this.lineInitTimeStamp12 != 0) - writer.writeInt64(6, this.lineInitTimeStamp12); - if (this.line12ConnErr != false) - writer.writeBool(7, this.line12ConnErr); if (!w) return writer.getResultBuffer(); } @@ -11037,12 +10747,6 @@ export namespace state { return value; })); break; - case 6: - message.lineInitTimeStamp12 = reader.readInt64(); - break; - case 7: - message.line12ConnErr = reader.readBool(); - break; default: reader.skipField(); } }