This commit is contained in:
Yuan 2023-06-21 09:33:13 +08:00
parent be3e2d9511
commit e2d2999967
2 changed files with 35 additions and 15 deletions

View File

@ -4490,7 +4490,7 @@ export namespace state {
recordTime?: number; recordTime?: number;
driverId?: string; driverId?: string;
routeId?: number; routeId?: number;
mode?: TrainMode; mode?: number;
nccWindow?: number; nccWindow?: number;
nccWindowOffset?: number; nccWindowOffset?: number;
rate?: number; rate?: number;
@ -4499,6 +4499,7 @@ export namespace state {
blockFlag?: number; blockFlag?: number;
show?: boolean; show?: boolean;
lineId?: number; lineId?: number;
trainIndex?: string;
}) { }) {
super(); 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, [], this.#one_of_decls);
@ -4575,6 +4576,9 @@ export namespace state {
if ("lineId" in data && data.lineId != undefined) { if ("lineId" in data && data.lineId != undefined) {
this.lineId = data.lineId; this.lineId = data.lineId;
} }
if ("trainIndex" in data && data.trainIndex != undefined) {
this.trainIndex = data.trainIndex;
}
} }
} }
get trainId() { get trainId() {
@ -4668,13 +4672,10 @@ export namespace state {
pb_1.Message.setField(this, 15, value); pb_1.Message.setField(this, 15, value);
} }
get mode() { get mode() {
return pb_1.Message.getWrapperField(this, TrainMode, 16) as TrainMode; return pb_1.Message.getFieldWithDefault(this, 16, 0) as number;
} }
set mode(value: TrainMode) { set mode(value: number) {
pb_1.Message.setWrapperField(this, 16, value); pb_1.Message.setField(this, 16, value);
}
get has_mode() {
return pb_1.Message.getField(this, 16) != null;
} }
get nccWindow() { get nccWindow() {
return pb_1.Message.getFieldWithDefault(this, 17, 0) as number; return pb_1.Message.getFieldWithDefault(this, 17, 0) as number;
@ -4724,6 +4725,12 @@ export namespace state {
set lineId(value: number) { set lineId(value: number) {
pb_1.Message.setField(this, 24, value); pb_1.Message.setField(this, 24, value);
} }
get trainIndex() {
return pb_1.Message.getFieldWithDefault(this, 25, "") as string;
}
set trainIndex(value: string) {
pb_1.Message.setField(this, 25, value);
}
static fromObject(data: { static fromObject(data: {
trainId?: string; trainId?: string;
globalId?: string; globalId?: string;
@ -4740,7 +4747,7 @@ export namespace state {
recordTime?: number; recordTime?: number;
driverId?: string; driverId?: string;
routeId?: number; routeId?: number;
mode?: ReturnType<typeof TrainMode.prototype.toObject>; mode?: number;
nccWindow?: number; nccWindow?: number;
nccWindowOffset?: number; nccWindowOffset?: number;
rate?: number; rate?: number;
@ -4749,6 +4756,7 @@ export namespace state {
blockFlag?: number; blockFlag?: number;
show?: boolean; show?: boolean;
lineId?: number; lineId?: number;
trainIndex?: string;
}): Train { }): Train {
const message = new Train({}); const message = new Train({});
if (data.trainId != null) { if (data.trainId != null) {
@ -4797,7 +4805,7 @@ export namespace state {
message.routeId = data.routeId; message.routeId = data.routeId;
} }
if (data.mode != null) { if (data.mode != null) {
message.mode = TrainMode.fromObject(data.mode); message.mode = data.mode;
} }
if (data.nccWindow != null) { if (data.nccWindow != null) {
message.nccWindow = data.nccWindow; message.nccWindow = data.nccWindow;
@ -4823,6 +4831,9 @@ export namespace state {
if (data.lineId != null) { if (data.lineId != null) {
message.lineId = data.lineId; message.lineId = data.lineId;
} }
if (data.trainIndex != null) {
message.trainIndex = data.trainIndex;
}
return message; return message;
} }
toObject() { toObject() {
@ -4842,7 +4853,7 @@ export namespace state {
recordTime?: number; recordTime?: number;
driverId?: string; driverId?: string;
routeId?: number; routeId?: number;
mode?: ReturnType<typeof TrainMode.prototype.toObject>; mode?: number;
nccWindow?: number; nccWindow?: number;
nccWindowOffset?: number; nccWindowOffset?: number;
rate?: number; rate?: number;
@ -4851,6 +4862,7 @@ export namespace state {
blockFlag?: number; blockFlag?: number;
show?: boolean; show?: boolean;
lineId?: number; lineId?: number;
trainIndex?: string;
} = {}; } = {};
if (this.trainId != null) { if (this.trainId != null) {
data.trainId = this.trainId; data.trainId = this.trainId;
@ -4898,7 +4910,7 @@ export namespace state {
data.routeId = this.routeId; data.routeId = this.routeId;
} }
if (this.mode != null) { if (this.mode != null) {
data.mode = this.mode.toObject(); data.mode = this.mode;
} }
if (this.nccWindow != null) { if (this.nccWindow != null) {
data.nccWindow = this.nccWindow; data.nccWindow = this.nccWindow;
@ -4924,6 +4936,9 @@ export namespace state {
if (this.lineId != null) { if (this.lineId != null) {
data.lineId = this.lineId; data.lineId = this.lineId;
} }
if (this.trainIndex != null) {
data.trainIndex = this.trainIndex;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -4960,8 +4975,8 @@ export namespace state {
writer.writeString(14, this.driverId); writer.writeString(14, this.driverId);
if (this.routeId != 0) if (this.routeId != 0)
writer.writeInt32(15, this.routeId); writer.writeInt32(15, this.routeId);
if (this.has_mode) if (this.mode != 0)
writer.writeMessage(16, this.mode, () => this.mode.serialize(writer)); writer.writeInt32(16, this.mode);
if (this.nccWindow != 0) if (this.nccWindow != 0)
writer.writeInt32(17, this.nccWindow); writer.writeInt32(17, this.nccWindow);
if (this.nccWindowOffset != 0) if (this.nccWindowOffset != 0)
@ -4978,6 +4993,8 @@ export namespace state {
writer.writeBool(23, this.show); writer.writeBool(23, this.show);
if (this.lineId != 0) if (this.lineId != 0)
writer.writeInt32(24, this.lineId); writer.writeInt32(24, this.lineId);
if (this.trainIndex.length)
writer.writeString(25, this.trainIndex);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -5033,7 +5050,7 @@ export namespace state {
message.routeId = reader.readInt32(); message.routeId = reader.readInt32();
break; break;
case 16: case 16:
reader.readMessage(message.mode, () => message.mode = TrainMode.deserialize(reader)); message.mode = reader.readInt32();
break; break;
case 17: case 17:
message.nccWindow = reader.readInt32(); message.nccWindow = reader.readInt32();
@ -5059,6 +5076,9 @@ export namespace state {
case 24: case 24:
message.lineId = reader.readInt32(); message.lineId = reader.readInt32();
break; break;
case 25:
message.trainIndex = reader.readString();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }

@ -1 +1 @@
Subproject commit 01222c99bad173afa8541aa44f2043408d946503 Subproject commit 3bd4f023cd1810dd1ec9611c3714d626a08377d2