同步protoc

This commit is contained in:
joylink_zhaoerwei 2024-05-11 08:27:32 +08:00
parent 00b61a2891
commit 959592c17b
3 changed files with 278 additions and 114 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

@ -1146,9 +1146,9 @@ export namespace state {
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
runDirection?: boolean;
headDirection?: boolean;
driftTo?: boolean;
trainRunUp?: boolean;
trainActiveDirection?: number;
dynamicState?: TrainDynamicState;
vobcState?: TrainVobcState;
trainKilometer?: number;
@ -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);
@ -1191,14 +1192,14 @@ export namespace state {
if ("devicePort" in data && data.devicePort != undefined) {
this.devicePort = data.devicePort;
}
if ("pointTo" in data && data.pointTo != undefined) {
this.pointTo = data.pointTo;
if ("driftTo" in data && data.driftTo != undefined) {
this.driftTo = data.driftTo;
}
if ("runDirection" in data && data.runDirection != undefined) {
this.runDirection = data.runDirection;
if ("trainRunUp" in data && data.trainRunUp != undefined) {
this.trainRunUp = data.trainRunUp;
}
if ("headDirection" in data && data.headDirection != undefined) {
this.headDirection = data.headDirection;
if ("trainActiveDirection" in data && data.trainActiveDirection != undefined) {
this.trainActiveDirection = data.trainActiveDirection;
}
if ("dynamicState" in data && data.dynamicState != undefined) {
this.dynamicState = data.dynamicState;
@ -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() {
@ -1292,22 +1296,22 @@ export namespace state {
set devicePort(value: string) {
pb_1.Message.setField(this, 8, value);
}
get pointTo() {
get driftTo() {
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
}
set pointTo(value: boolean) {
set driftTo(value: boolean) {
pb_1.Message.setField(this, 9, value);
}
get runDirection() {
get trainRunUp() {
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
}
set runDirection(value: boolean) {
set trainRunUp(value: boolean) {
pb_1.Message.setField(this, 10, value);
}
get headDirection() {
return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean;
get trainActiveDirection() {
return pb_1.Message.getFieldWithDefault(this, 11, 0) as number;
}
set headDirection(value: boolean) {
set trainActiveDirection(value: number) {
pb_1.Message.setField(this, 11, value);
}
get dynamicState() {
@ -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;
@ -1427,9 +1440,9 @@ export namespace state {
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
runDirection?: boolean;
headDirection?: boolean;
driftTo?: boolean;
trainRunUp?: boolean;
trainActiveDirection?: number;
dynamicState?: ReturnType<typeof TrainDynamicState.prototype.toObject>;
vobcState?: ReturnType<typeof TrainVobcState.prototype.toObject>;
trainKilometer?: number;
@ -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) {
@ -1470,14 +1484,14 @@ export namespace state {
if (data.devicePort != null) {
message.devicePort = data.devicePort;
}
if (data.pointTo != null) {
message.pointTo = data.pointTo;
if (data.driftTo != null) {
message.driftTo = data.driftTo;
}
if (data.runDirection != null) {
message.runDirection = data.runDirection;
if (data.trainRunUp != null) {
message.trainRunUp = data.trainRunUp;
}
if (data.headDirection != null) {
message.headDirection = data.headDirection;
if (data.trainActiveDirection != null) {
message.trainActiveDirection = data.trainActiveDirection;
}
if (data.dynamicState != null) {
message.dynamicState = TrainDynamicState.fromObject(data.dynamicState);
@ -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() {
@ -1533,9 +1550,9 @@ export namespace state {
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
runDirection?: boolean;
headDirection?: boolean;
driftTo?: boolean;
trainRunUp?: boolean;
trainActiveDirection?: number;
dynamicState?: ReturnType<typeof TrainDynamicState.prototype.toObject>;
vobcState?: ReturnType<typeof TrainVobcState.prototype.toObject>;
trainKilometer?: number;
@ -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;
@ -1575,14 +1593,14 @@ export namespace state {
if (this.devicePort != null) {
data.devicePort = this.devicePort;
}
if (this.pointTo != null) {
data.pointTo = this.pointTo;
if (this.driftTo != null) {
data.driftTo = this.driftTo;
}
if (this.runDirection != null) {
data.runDirection = this.runDirection;
if (this.trainRunUp != null) {
data.trainRunUp = this.trainRunUp;
}
if (this.headDirection != null) {
data.headDirection = this.headDirection;
if (this.trainActiveDirection != null) {
data.trainActiveDirection = this.trainActiveDirection;
}
if (this.dynamicState != null) {
data.dynamicState = this.dynamicState.toObject();
@ -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;
@ -1648,12 +1669,12 @@ export namespace state {
writer.writeInt64(7, this.headOffset);
if (this.devicePort.length)
writer.writeString(8, this.devicePort);
if (this.pointTo != false)
writer.writeBool(9, this.pointTo);
if (this.runDirection != false)
writer.writeBool(10, this.runDirection);
if (this.headDirection != false)
writer.writeBool(11, this.headDirection);
if (this.driftTo != false)
writer.writeBool(9, this.driftTo);
if (this.trainRunUp != false)
writer.writeBool(10, this.trainRunUp);
if (this.trainActiveDirection != 0)
writer.writeUint32(11, this.trainActiveDirection);
if (this.has_dynamicState)
writer.writeMessage(12, this.dynamicState, () => this.dynamicState.serialize(writer));
if (this.has_vobcState)
@ -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();
}
@ -1716,13 +1739,13 @@ export namespace state {
message.devicePort = reader.readString();
break;
case 9:
message.pointTo = reader.readBool();
message.driftTo = reader.readBool();
break;
case 10:
message.runDirection = reader.readBool();
message.trainRunUp = reader.readBool();
break;
case 11:
message.headDirection = reader.readBool();
message.trainActiveDirection = reader.readUint32();
break;
case 12:
reader.readMessage(message.dynamicState, () => message.dynamicState = TrainDynamicState.deserialize(reader));
@ -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[] | {
@ -4085,9 +4201,9 @@ export namespace state {
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
runDirection?: boolean;
headDirection?: boolean;
driftTo?: boolean;
trainRunUp?: boolean;
trainActiveDirection?: number;
trainKilometer?: number;
controlDelayTime?: number;
wheelDiameter?: number;
@ -4175,14 +4291,14 @@ export namespace state {
if ("devicePort" in data && data.devicePort != undefined) {
this.devicePort = data.devicePort;
}
if ("pointTo" in data && data.pointTo != undefined) {
this.pointTo = data.pointTo;
if ("driftTo" in data && data.driftTo != undefined) {
this.driftTo = data.driftTo;
}
if ("runDirection" in data && data.runDirection != undefined) {
this.runDirection = data.runDirection;
if ("trainRunUp" in data && data.trainRunUp != undefined) {
this.trainRunUp = data.trainRunUp;
}
if ("headDirection" in data && data.headDirection != undefined) {
this.headDirection = data.headDirection;
if ("trainActiveDirection" in data && data.trainActiveDirection != undefined) {
this.trainActiveDirection = data.trainActiveDirection;
}
if ("trainKilometer" in data && data.trainKilometer != undefined) {
this.trainKilometer = data.trainKilometer;
@ -4411,22 +4527,22 @@ export namespace state {
set devicePort(value: string) {
pb_1.Message.setField(this, 8, value);
}
get pointTo() {
get driftTo() {
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
}
set pointTo(value: boolean) {
set driftTo(value: boolean) {
pb_1.Message.setField(this, 9, value);
}
get runDirection() {
get trainRunUp() {
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
}
set runDirection(value: boolean) {
set trainRunUp(value: boolean) {
pb_1.Message.setField(this, 10, value);
}
get headDirection() {
return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean;
get trainActiveDirection() {
return pb_1.Message.getFieldWithDefault(this, 11, 0) as number;
}
set headDirection(value: boolean) {
set trainActiveDirection(value: number) {
pb_1.Message.setField(this, 11, value);
}
get trainKilometer() {
@ -4807,9 +4923,9 @@ export namespace state {
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
runDirection?: boolean;
headDirection?: boolean;
driftTo?: boolean;
trainRunUp?: boolean;
trainActiveDirection?: number;
trainKilometer?: number;
controlDelayTime?: number;
wheelDiameter?: number;
@ -4895,14 +5011,14 @@ export namespace state {
if (data.devicePort != null) {
message.devicePort = data.devicePort;
}
if (data.pointTo != null) {
message.pointTo = data.pointTo;
if (data.driftTo != null) {
message.driftTo = data.driftTo;
}
if (data.runDirection != null) {
message.runDirection = data.runDirection;
if (data.trainRunUp != null) {
message.trainRunUp = data.trainRunUp;
}
if (data.headDirection != null) {
message.headDirection = data.headDirection;
if (data.trainActiveDirection != null) {
message.trainActiveDirection = data.trainActiveDirection;
}
if (data.trainKilometer != null) {
message.trainKilometer = data.trainKilometer;
@ -5093,9 +5209,9 @@ export namespace state {
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
runDirection?: boolean;
headDirection?: boolean;
driftTo?: boolean;
trainRunUp?: boolean;
trainActiveDirection?: number;
trainKilometer?: number;
controlDelayTime?: number;
wheelDiameter?: number;
@ -5180,14 +5296,14 @@ export namespace state {
if (this.devicePort != null) {
data.devicePort = this.devicePort;
}
if (this.pointTo != null) {
data.pointTo = this.pointTo;
if (this.driftTo != null) {
data.driftTo = this.driftTo;
}
if (this.runDirection != null) {
data.runDirection = this.runDirection;
if (this.trainRunUp != null) {
data.trainRunUp = this.trainRunUp;
}
if (this.headDirection != null) {
data.headDirection = this.headDirection;
if (this.trainActiveDirection != null) {
data.trainActiveDirection = this.trainActiveDirection;
}
if (this.trainKilometer != null) {
data.trainKilometer = this.trainKilometer;
@ -5388,12 +5504,12 @@ export namespace state {
writer.writeInt64(7, this.headOffset);
if (this.devicePort.length)
writer.writeString(8, this.devicePort);
if (this.pointTo != false)
writer.writeBool(9, this.pointTo);
if (this.runDirection != false)
writer.writeBool(10, this.runDirection);
if (this.headDirection != false)
writer.writeBool(11, this.headDirection);
if (this.driftTo != false)
writer.writeBool(9, this.driftTo);
if (this.trainRunUp != false)
writer.writeBool(10, this.trainRunUp);
if (this.trainActiveDirection != 0)
writer.writeUint32(11, this.trainActiveDirection);
if (this.trainKilometer != 0)
writer.writeInt64(12, this.trainKilometer);
if (this.controlDelayTime != 0)
@ -5546,13 +5662,13 @@ export namespace state {
message.devicePort = reader.readString();
break;
case 9:
message.pointTo = reader.readBool();
message.driftTo = reader.readBool();
break;
case 10:
message.runDirection = reader.readBool();
message.trainRunUp = reader.readBool();
break;
case 11:
message.headDirection = reader.readBool();
message.trainActiveDirection = reader.readUint32();
break;
case 12:
message.trainKilometer = reader.readInt64();
@ -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[] | {}) {
@ -1665,6 +1661,11 @@ export namespace request {
DIRECTION_KEY_SWITCH = 2,
HANDLER = 3
}
export enum Direction {
BACKWARD = 0,
FORWARD = 1,
NEUTRALWARD = 2
}
export class EmergentButton extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
@ -1736,7 +1737,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 +1744,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 +1752,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 +1776,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 +1788,6 @@ export namespace request {
case 1:
message.val = reader.readBool();
break;
case 2:
message.dt = reader.readEnum();
break;
default: reader.skipField();
}
}