proto同步

This commit is contained in:
dong 2023-12-14 11:16:08 +08:00
parent c0610f0422
commit dbe1c9517d

View File

@ -66,7 +66,7 @@ export namespace request {
constructor(data?: any[] | {
simulationId?: string;
mapId?: number;
deviceId?: string;
deviceId?: number;
operation?: Turnout.Operation;
}) {
super();
@ -99,9 +99,9 @@ export namespace request {
pb_1.Message.setField(this, 2, value);
}
get deviceId() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set deviceId(value: string) {
set deviceId(value: number) {
pb_1.Message.setField(this, 3, value);
}
get operation() {
@ -113,7 +113,7 @@ export namespace request {
static fromObject(data: {
simulationId?: string;
mapId?: number;
deviceId?: string;
deviceId?: number;
operation?: Turnout.Operation;
}): TurnoutOperationReq {
const message = new TurnoutOperationReq({});
@ -135,7 +135,7 @@ export namespace request {
const data: {
simulationId?: string;
mapId?: number;
deviceId?: string;
deviceId?: number;
operation?: Turnout.Operation;
} = {};
if (this.simulationId != null) {
@ -160,8 +160,8 @@ export namespace request {
writer.writeString(1, this.simulationId);
if (this.mapId != 0)
writer.writeInt32(2, this.mapId);
if (this.deviceId.length)
writer.writeString(3, this.deviceId);
if (this.deviceId != 0)
writer.writeUint32(3, this.deviceId);
if (this.operation != Turnout.Operation.Undefined)
writer.writeEnum(4, this.operation);
if (!w)
@ -180,7 +180,7 @@ export namespace request {
message.mapId = reader.readInt32();
break;
case 3:
message.deviceId = reader.readString();
message.deviceId = reader.readUint32();
break;
case 4:
message.operation = reader.readEnum();
@ -368,7 +368,7 @@ export namespace request {
constructor(data?: any[] | {
simulationId?: string;
mapId?: number;
deviceId?: string;
deviceId?: number;
operation?: Psd.Operation;
asdCodes?: number[];
group?: number;
@ -409,9 +409,9 @@ export namespace request {
pb_1.Message.setField(this, 2, value);
}
get deviceId() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set deviceId(value: string) {
set deviceId(value: number) {
pb_1.Message.setField(this, 3, value);
}
get operation() {
@ -435,7 +435,7 @@ export namespace request {
static fromObject(data: {
simulationId?: string;
mapId?: number;
deviceId?: string;
deviceId?: number;
operation?: Psd.Operation;
asdCodes?: number[];
group?: number;
@ -465,7 +465,7 @@ export namespace request {
const data: {
simulationId?: string;
mapId?: number;
deviceId?: string;
deviceId?: number;
operation?: Psd.Operation;
asdCodes?: number[];
group?: number;
@ -498,8 +498,8 @@ export namespace request {
writer.writeString(1, this.simulationId);
if (this.mapId != 0)
writer.writeInt32(2, this.mapId);
if (this.deviceId.length)
writer.writeString(3, this.deviceId);
if (this.deviceId != 0)
writer.writeUint32(3, this.deviceId);
if (this.operation != Psd.Operation.Undefined)
writer.writeEnum(4, this.operation);
if (this.asdCodes.length)
@ -522,7 +522,7 @@ export namespace request {
message.mapId = reader.readInt32();
break;
case 3:
message.deviceId = reader.readString();
message.deviceId = reader.readUint32();
break;
case 4:
message.operation = reader.readEnum();