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