同步protoc
All checks were successful
CI / Docker-Build (push) Successful in 1m51s

This commit is contained in:
joylink_zhaoerwei 2024-05-07 15:32:21 +08:00
parent 05dd848aba
commit 07f5f27d4c
4 changed files with 233 additions and 28 deletions

View File

@ -25,6 +25,7 @@ export namespace common {
idlingD?: number;
stopSign?: number;
slide?: number;
trainLoad?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -80,6 +81,9 @@ export namespace common {
if ("slide" in data && data.slide != undefined) {
this.slide = data.slide;
}
if ("trainLoad" in data && data.trainLoad != undefined) {
this.trainLoad = data.trainLoad;
}
}
}
get davisParamA() {
@ -184,6 +188,12 @@ export namespace common {
set slide(value: number) {
pb_1.Message.setField(this, 18, value);
}
get trainLoad() {
return pb_1.Message.getFieldWithDefault(this, 19, 0) as number;
}
set trainLoad(value: number) {
pb_1.Message.setField(this, 19, value);
}
static fromObject(data: {
davisParamA?: number;
davisParamB?: number;
@ -202,6 +212,7 @@ export namespace common {
idlingD?: number;
stopSign?: number;
slide?: number;
trainLoad?: number;
}): TrainDynamicConfig {
const message = new TrainDynamicConfig({});
if (data.davisParamA != null) {
@ -255,6 +266,9 @@ export namespace common {
if (data.slide != null) {
message.slide = data.slide;
}
if (data.trainLoad != null) {
message.trainLoad = data.trainLoad;
}
return message;
}
toObject() {
@ -276,6 +290,7 @@ export namespace common {
idlingD?: number;
stopSign?: number;
slide?: number;
trainLoad?: number;
} = {};
if (this.davisParamA != null) {
data.davisParamA = this.davisParamA;
@ -328,6 +343,9 @@ export namespace common {
if (this.slide != null) {
data.slide = this.slide;
}
if (this.trainLoad != null) {
data.trainLoad = this.trainLoad;
}
return data;
}
serialize(): Uint8Array;
@ -368,6 +386,8 @@ export namespace common {
writer.writeInt32(17, this.stopSign);
if (this.slide != 0)
writer.writeFloat(18, this.slide);
if (this.trainLoad != 0)
writer.writeInt32(19, this.trainLoad);
if (!w)
return writer.getResultBuffer();
}
@ -428,6 +448,9 @@ export namespace common {
case 18:
message.slide = reader.readFloat();
break;
case 19:
message.trainLoad = reader.readInt32();
break;
default: reader.skipField();
}
}
@ -453,6 +476,8 @@ export namespace common {
accCheckTime?: number;
accOutSpeed?: number;
radarOutSpeed?: number;
radarCheckTimeOverAt?: number;
accCheckTimeOverAt?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -487,6 +512,12 @@ export namespace common {
if ("radarOutSpeed" in data && data.radarOutSpeed != undefined) {
this.radarOutSpeed = data.radarOutSpeed;
}
if ("radarCheckTimeOverAt" in data && data.radarCheckTimeOverAt != undefined) {
this.radarCheckTimeOverAt = data.radarCheckTimeOverAt;
}
if ("accCheckTimeOverAt" in data && data.accCheckTimeOverAt != undefined) {
this.accCheckTimeOverAt = data.accCheckTimeOverAt;
}
}
}
get speedSensorEnableA() {
@ -549,6 +580,18 @@ export namespace common {
set radarOutSpeed(value: number) {
pb_1.Message.setField(this, 10, value);
}
get radarCheckTimeOverAt() {
return pb_1.Message.getFieldWithDefault(this, 11, 0) as number;
}
set radarCheckTimeOverAt(value: number) {
pb_1.Message.setField(this, 11, value);
}
get accCheckTimeOverAt() {
return pb_1.Message.getFieldWithDefault(this, 12, 0) as number;
}
set accCheckTimeOverAt(value: number) {
pb_1.Message.setField(this, 12, value);
}
static fromObject(data: {
speedSensorEnableA?: boolean;
speedSensorEnableB?: boolean;
@ -560,6 +603,8 @@ export namespace common {
accCheckTime?: number;
accOutSpeed?: number;
radarOutSpeed?: number;
radarCheckTimeOverAt?: number;
accCheckTimeOverAt?: number;
}): TrainEndsState {
const message = new TrainEndsState({});
if (data.speedSensorEnableA != null) {
@ -592,6 +637,12 @@ export namespace common {
if (data.radarOutSpeed != null) {
message.radarOutSpeed = data.radarOutSpeed;
}
if (data.radarCheckTimeOverAt != null) {
message.radarCheckTimeOverAt = data.radarCheckTimeOverAt;
}
if (data.accCheckTimeOverAt != null) {
message.accCheckTimeOverAt = data.accCheckTimeOverAt;
}
return message;
}
toObject() {
@ -606,6 +657,8 @@ export namespace common {
accCheckTime?: number;
accOutSpeed?: number;
radarOutSpeed?: number;
radarCheckTimeOverAt?: number;
accCheckTimeOverAt?: number;
} = {};
if (this.speedSensorEnableA != null) {
data.speedSensorEnableA = this.speedSensorEnableA;
@ -637,6 +690,12 @@ export namespace common {
if (this.radarOutSpeed != null) {
data.radarOutSpeed = this.radarOutSpeed;
}
if (this.radarCheckTimeOverAt != null) {
data.radarCheckTimeOverAt = this.radarCheckTimeOverAt;
}
if (this.accCheckTimeOverAt != null) {
data.accCheckTimeOverAt = this.accCheckTimeOverAt;
}
return data;
}
serialize(): Uint8Array;
@ -663,6 +722,10 @@ export namespace common {
writer.writeInt32(9, this.accOutSpeed);
if (this.radarOutSpeed != 0)
writer.writeInt32(10, this.radarOutSpeed);
if (this.radarCheckTimeOverAt != 0)
writer.writeInt64(11, this.radarCheckTimeOverAt);
if (this.accCheckTimeOverAt != 0)
writer.writeInt64(12, this.accCheckTimeOverAt);
if (!w)
return writer.getResultBuffer();
}
@ -702,6 +765,12 @@ export namespace common {
case 10:
message.radarOutSpeed = reader.readInt32();
break;
case 11:
message.radarCheckTimeOverAt = reader.readInt64();
break;
case 12:
message.accCheckTimeOverAt = reader.readInt64();
break;
default: reader.skipField();
}
}

View File

@ -1163,6 +1163,7 @@ export namespace state {
btmState?: BTMState;
tcc?: TrainControlState;
connState?: TrainConnState;
pluseCount?: SensorSpeedPulseCount;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1242,6 +1243,9 @@ export namespace state {
if ("connState" in data && data.connState != undefined) {
this.connState = data.connState;
}
if ("pluseCount" in data && data.pluseCount != undefined) {
this.pluseCount = data.pluseCount;
}
}
}
get id() {
@ -1418,6 +1422,15 @@ 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;
}
static fromObject(data: {
id?: string;
up?: boolean;
@ -1444,6 +1457,7 @@ export namespace state {
btmState?: ReturnType<typeof BTMState.prototype.toObject>;
tcc?: ReturnType<typeof TrainControlState.prototype.toObject>;
connState?: ReturnType<typeof TrainConnState.prototype.toObject>;
pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>;
}): TrainState {
const message = new TrainState({});
if (data.id != null) {
@ -1521,6 +1535,9 @@ export namespace state {
if (data.connState != null) {
message.connState = TrainConnState.fromObject(data.connState);
}
if (data.pluseCount != null) {
message.pluseCount = SensorSpeedPulseCount.fromObject(data.pluseCount);
}
return message;
}
toObject() {
@ -1550,6 +1567,7 @@ export namespace state {
btmState?: ReturnType<typeof BTMState.prototype.toObject>;
tcc?: ReturnType<typeof TrainControlState.prototype.toObject>;
connState?: ReturnType<typeof TrainConnState.prototype.toObject>;
pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>;
} = {};
if (this.id != null) {
data.id = this.id;
@ -1626,6 +1644,9 @@ export namespace state {
if (this.connState != null) {
data.connState = this.connState.toObject();
}
if (this.pluseCount != null) {
data.pluseCount = this.pluseCount.toObject();
}
return data;
}
serialize(): Uint8Array;
@ -1682,6 +1703,8 @@ export namespace state {
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 (!w)
return writer.getResultBuffer();
}
@ -1766,6 +1789,9 @@ export namespace state {
case 25:
reader.readMessage(message.connState, () => message.connState = TrainConnState.deserialize(reader));
break;
case 26:
reader.readMessage(message.pluseCount, () => message.pluseCount = SensorSpeedPulseCount.deserialize(reader));
break;
default: reader.skipField();
}
}
@ -1778,6 +1804,96 @@ export namespace state {
return TrainState.deserialize(bytes);
}
}
export class SensorSpeedPulseCount extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
pulseCount1?: number;
pulseCount2?: 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 ("pulseCount1" in data && data.pulseCount1 != undefined) {
this.pulseCount1 = data.pulseCount1;
}
if ("pulseCount2" in data && data.pulseCount2 != undefined) {
this.pulseCount2 = data.pulseCount2;
}
}
}
get pulseCount1() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
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);
}
static fromObject(data: {
pulseCount1?: number;
pulseCount2?: number;
}): SensorSpeedPulseCount {
const message = new SensorSpeedPulseCount({});
if (data.pulseCount1 != null) {
message.pulseCount1 = data.pulseCount1;
}
if (data.pulseCount2 != null) {
message.pulseCount2 = data.pulseCount2;
}
return message;
}
toObject() {
const data: {
pulseCount1?: number;
pulseCount2?: number;
} = {};
if (this.pulseCount1 != null) {
data.pulseCount1 = this.pulseCount1;
}
if (this.pulseCount2 != null) {
data.pulseCount2 = this.pulseCount2;
}
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.pulseCount1 != 0)
writer.writeUint32(1, this.pulseCount1);
if (this.pulseCount2 != 0)
writer.writeUint32(2, this.pulseCount2);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SensorSpeedPulseCount {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SensorSpeedPulseCount();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.pulseCount1 = reader.readUint32();
break;
case 2:
message.pulseCount2 = reader.readUint32();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): SensorSpeedPulseCount {
return SensorSpeedPulseCount.deserialize(bytes);
}
}
export class TrainDynamicState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
@ -9325,7 +9441,8 @@ export namespace state {
export enum Type {
Undefined = 0,
Dynamics = 1,
SemiPhysicalTrain = 2
SemiPhysicalTrain = 2,
Train_pc_sim = 3
}
export enum State {
Normal = 0,

View File

@ -5,10 +5,6 @@
* git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from "google-protobuf";
export namespace request {
export enum DriverType {
ONE_END = 0,
TWO_END = 1
}
export class Relay extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
@ -1736,7 +1732,6 @@ export namespace request {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
val?: boolean;
dt?: DriverType;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1744,9 +1739,6 @@ export namespace request {
if ("val" in data && data.val != undefined) {
this.val = data.val;
}
if ("dt" in data && data.dt != undefined) {
this.dt = data.dt;
}
}
}
get val() {
@ -1755,36 +1747,22 @@ export namespace request {
set val(value: boolean) {
pb_1.Message.setField(this, 1, value);
}
get dt() {
return pb_1.Message.getFieldWithDefault(this, 2, DriverType.ONE_END) as DriverType;
}
set dt(value: DriverType) {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
val?: boolean;
dt?: DriverType;
}): DriverKeySwitch {
const message = new DriverKeySwitch({});
if (data.val != null) {
message.val = data.val;
}
if (data.dt != null) {
message.dt = data.dt;
}
return message;
}
toObject() {
const data: {
val?: boolean;
dt?: DriverType;
} = {};
if (this.val != null) {
data.val = this.val;
}
if (this.dt != null) {
data.dt = this.dt;
}
return data;
}
serialize(): Uint8Array;
@ -1793,8 +1771,6 @@ export namespace request {
const writer = w || new pb_1.BinaryWriter();
if (this.val != false)
writer.writeBool(1, this.val);
if (this.dt != DriverType.ONE_END)
writer.writeEnum(2, this.dt);
if (!w)
return writer.getResultBuffer();
}
@ -1807,9 +1783,6 @@ export namespace request {
case 1:
message.val = reader.readBool();
break;
case 2:
message.dt = reader.readEnum();
break;
default: reader.skipField();
}
}

View File

@ -7528,6 +7528,8 @@ export namespace graphicData {
code?: string;
linkSection?: number;
centralizedStations?: number[];
duanNum?: number;
width?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls);
@ -7544,6 +7546,12 @@ export namespace graphicData {
if ("centralizedStations" in data && data.centralizedStations != undefined) {
this.centralizedStations = data.centralizedStations;
}
if ("duanNum" in data && data.duanNum != undefined) {
this.duanNum = data.duanNum;
}
if ("width" in data && data.width != undefined) {
this.width = data.width;
}
}
}
get common() {
@ -7573,11 +7581,25 @@ export namespace graphicData {
set centralizedStations(value: number[]) {
pb_1.Message.setField(this, 4, value);
}
get duanNum() {
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
}
set duanNum(value: number) {
pb_1.Message.setField(this, 5, value);
}
get width() {
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
}
set width(value: number) {
pb_1.Message.setField(this, 6, value);
}
static fromObject(data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
code?: string;
linkSection?: number;
centralizedStations?: number[];
duanNum?: number;
width?: number;
}): CarWashing {
const message = new CarWashing({});
if (data.common != null) {
@ -7592,6 +7614,12 @@ export namespace graphicData {
if (data.centralizedStations != null) {
message.centralizedStations = data.centralizedStations;
}
if (data.duanNum != null) {
message.duanNum = data.duanNum;
}
if (data.width != null) {
message.width = data.width;
}
return message;
}
toObject() {
@ -7600,6 +7628,8 @@ export namespace graphicData {
code?: string;
linkSection?: number;
centralizedStations?: number[];
duanNum?: number;
width?: number;
} = {};
if (this.common != null) {
data.common = this.common.toObject();
@ -7613,6 +7643,12 @@ export namespace graphicData {
if (this.centralizedStations != null) {
data.centralizedStations = this.centralizedStations;
}
if (this.duanNum != null) {
data.duanNum = this.duanNum;
}
if (this.width != null) {
data.width = this.width;
}
return data;
}
serialize(): Uint8Array;
@ -7627,6 +7663,10 @@ export namespace graphicData {
writer.writeUint32(3, this.linkSection);
if (this.centralizedStations.length)
writer.writePackedUint32(4, this.centralizedStations);
if (this.duanNum != 0)
writer.writeUint32(5, this.duanNum);
if (this.width != 0)
writer.writeUint32(6, this.width);
if (!w)
return writer.getResultBuffer();
}
@ -7648,6 +7688,12 @@ export namespace graphicData {
case 4:
message.centralizedStations = reader.readPackedUint32();
break;
case 5:
message.duanNum = reader.readUint32();
break;
case 6:
message.width = reader.readUint32();
break;
default: reader.skipField();
}
}