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