protos同步
This commit is contained in:
parent
10f25f4d18
commit
34be287b13
@ -666,6 +666,7 @@ export namespace state {
|
||||
dynamicState?: TrainDynamicState;
|
||||
vobcState?: TrainVobcState;
|
||||
trainKilometer?: number;
|
||||
controlDelayTime?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -712,6 +713,9 @@ export namespace state {
|
||||
if ("trainKilometer" in data && data.trainKilometer != undefined) {
|
||||
this.trainKilometer = data.trainKilometer;
|
||||
}
|
||||
if ("controlDelayTime" in data && data.controlDelayTime != undefined) {
|
||||
this.controlDelayTime = data.controlDelayTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
get id() {
|
||||
@ -804,6 +808,12 @@ export namespace state {
|
||||
set trainKilometer(value: number) {
|
||||
pb_1.Message.setField(this, 14, value);
|
||||
}
|
||||
get controlDelayTime() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 15, 0) as number;
|
||||
}
|
||||
set controlDelayTime(value: number) {
|
||||
pb_1.Message.setField(this, 15, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
up?: boolean;
|
||||
@ -819,6 +829,7 @@ export namespace state {
|
||||
dynamicState?: ReturnType<typeof TrainDynamicState.prototype.toObject>;
|
||||
vobcState?: ReturnType<typeof TrainVobcState.prototype.toObject>;
|
||||
trainKilometer?: number;
|
||||
controlDelayTime?: number;
|
||||
}): TrainState {
|
||||
const message = new TrainState({});
|
||||
if (data.id != null) {
|
||||
@ -863,6 +874,9 @@ export namespace state {
|
||||
if (data.trainKilometer != null) {
|
||||
message.trainKilometer = data.trainKilometer;
|
||||
}
|
||||
if (data.controlDelayTime != null) {
|
||||
message.controlDelayTime = data.controlDelayTime;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -881,6 +895,7 @@ export namespace state {
|
||||
dynamicState?: ReturnType<typeof TrainDynamicState.prototype.toObject>;
|
||||
vobcState?: ReturnType<typeof TrainVobcState.prototype.toObject>;
|
||||
trainKilometer?: number;
|
||||
controlDelayTime?: number;
|
||||
} = {};
|
||||
if (this.id != null) {
|
||||
data.id = this.id;
|
||||
@ -924,6 +939,9 @@ export namespace state {
|
||||
if (this.trainKilometer != null) {
|
||||
data.trainKilometer = this.trainKilometer;
|
||||
}
|
||||
if (this.controlDelayTime != null) {
|
||||
data.controlDelayTime = this.controlDelayTime;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -958,6 +976,8 @@ export namespace state {
|
||||
writer.writeMessage(13, this.vobcState, () => this.vobcState.serialize(writer));
|
||||
if (this.trainKilometer != 0)
|
||||
writer.writeInt64(14, this.trainKilometer);
|
||||
if (this.controlDelayTime != 0)
|
||||
writer.writeInt64(15, this.controlDelayTime);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1009,6 +1029,9 @@ export namespace state {
|
||||
case 14:
|
||||
message.trainKilometer = reader.readInt64();
|
||||
break;
|
||||
case 15:
|
||||
message.controlDelayTime = reader.readInt64();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -1046,7 +1069,6 @@ export namespace state {
|
||||
tailRadarSpeed?: number;
|
||||
udpInterruption?: boolean;
|
||||
acceleration?: number;
|
||||
diffTime?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls);
|
||||
@ -1117,9 +1139,6 @@ export namespace state {
|
||||
if ("acceleration" in data && data.acceleration != undefined) {
|
||||
this.acceleration = data.acceleration;
|
||||
}
|
||||
if ("diffTime" in data && data.diffTime != undefined) {
|
||||
this.diffTime = data.diffTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
get heartbeat() {
|
||||
@ -1254,12 +1273,6 @@ export namespace state {
|
||||
set acceleration(value: number) {
|
||||
pb_1.Message.setField(this, 22, value);
|
||||
}
|
||||
get diffTime() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 24, 0) as number;
|
||||
}
|
||||
set diffTime(value: number) {
|
||||
pb_1.Message.setField(this, 24, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
heartbeat?: number;
|
||||
headLinkId?: string;
|
||||
@ -1283,7 +1296,6 @@ export namespace state {
|
||||
tailRadarSpeed?: number;
|
||||
udpInterruption?: boolean;
|
||||
acceleration?: number;
|
||||
diffTime?: number;
|
||||
}): TrainDynamicState {
|
||||
const message = new TrainDynamicState({});
|
||||
if (data.heartbeat != null) {
|
||||
@ -1352,9 +1364,6 @@ export namespace state {
|
||||
if (data.acceleration != null) {
|
||||
message.acceleration = data.acceleration;
|
||||
}
|
||||
if (data.diffTime != null) {
|
||||
message.diffTime = data.diffTime;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -1381,7 +1390,6 @@ export namespace state {
|
||||
tailRadarSpeed?: number;
|
||||
udpInterruption?: boolean;
|
||||
acceleration?: number;
|
||||
diffTime?: number;
|
||||
} = {};
|
||||
if (this.heartbeat != null) {
|
||||
data.heartbeat = this.heartbeat;
|
||||
@ -1449,9 +1457,6 @@ export namespace state {
|
||||
if (this.acceleration != null) {
|
||||
data.acceleration = this.acceleration;
|
||||
}
|
||||
if (this.diffTime != null) {
|
||||
data.diffTime = this.diffTime;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -1502,8 +1507,6 @@ export namespace state {
|
||||
writer.writeBool(21, this.udpInterruption);
|
||||
if (this.acceleration != 0)
|
||||
writer.writeFloat(22, this.acceleration);
|
||||
if (this.diffTime != 0)
|
||||
writer.writeInt64(24, this.diffTime);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1579,9 +1582,6 @@ export namespace state {
|
||||
case 22:
|
||||
message.acceleration = reader.readFloat();
|
||||
break;
|
||||
case 24:
|
||||
message.diffTime = reader.readInt64();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user