proto同步
This commit is contained in:
parent
3a7662d308
commit
fe789210dc
@ -451,6 +451,8 @@ export namespace common {
|
||||
accEnable?: boolean;
|
||||
accCheckSpeedDiff?: number;
|
||||
accCheckTime?: number;
|
||||
accOutSpeed?: number;
|
||||
radarOutSpeed?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -479,6 +481,12 @@ export namespace common {
|
||||
if ("accCheckTime" in data && data.accCheckTime != undefined) {
|
||||
this.accCheckTime = data.accCheckTime;
|
||||
}
|
||||
if ("accOutSpeed" in data && data.accOutSpeed != undefined) {
|
||||
this.accOutSpeed = data.accOutSpeed;
|
||||
}
|
||||
if ("radarOutSpeed" in data && data.radarOutSpeed != undefined) {
|
||||
this.radarOutSpeed = data.radarOutSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
get speedSensorEnableA() {
|
||||
@ -529,6 +537,18 @@ export namespace common {
|
||||
set accCheckTime(value: number) {
|
||||
pb_1.Message.setField(this, 8, value);
|
||||
}
|
||||
get accOutSpeed() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
|
||||
}
|
||||
set accOutSpeed(value: number) {
|
||||
pb_1.Message.setField(this, 9, value);
|
||||
}
|
||||
get radarOutSpeed() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
|
||||
}
|
||||
set radarOutSpeed(value: number) {
|
||||
pb_1.Message.setField(this, 10, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
speedSensorEnableA?: boolean;
|
||||
speedSensorEnableB?: boolean;
|
||||
@ -538,6 +558,8 @@ export namespace common {
|
||||
accEnable?: boolean;
|
||||
accCheckSpeedDiff?: number;
|
||||
accCheckTime?: number;
|
||||
accOutSpeed?: number;
|
||||
radarOutSpeed?: number;
|
||||
}): TrainEndsState {
|
||||
const message = new TrainEndsState({});
|
||||
if (data.speedSensorEnableA != null) {
|
||||
@ -564,6 +586,12 @@ export namespace common {
|
||||
if (data.accCheckTime != null) {
|
||||
message.accCheckTime = data.accCheckTime;
|
||||
}
|
||||
if (data.accOutSpeed != null) {
|
||||
message.accOutSpeed = data.accOutSpeed;
|
||||
}
|
||||
if (data.radarOutSpeed != null) {
|
||||
message.radarOutSpeed = data.radarOutSpeed;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -576,6 +604,8 @@ export namespace common {
|
||||
accEnable?: boolean;
|
||||
accCheckSpeedDiff?: number;
|
||||
accCheckTime?: number;
|
||||
accOutSpeed?: number;
|
||||
radarOutSpeed?: number;
|
||||
} = {};
|
||||
if (this.speedSensorEnableA != null) {
|
||||
data.speedSensorEnableA = this.speedSensorEnableA;
|
||||
@ -601,6 +631,12 @@ export namespace common {
|
||||
if (this.accCheckTime != null) {
|
||||
data.accCheckTime = this.accCheckTime;
|
||||
}
|
||||
if (this.accOutSpeed != null) {
|
||||
data.accOutSpeed = this.accOutSpeed;
|
||||
}
|
||||
if (this.radarOutSpeed != null) {
|
||||
data.radarOutSpeed = this.radarOutSpeed;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -623,6 +659,10 @@ export namespace common {
|
||||
writer.writeFloat(7, this.accCheckSpeedDiff);
|
||||
if (this.accCheckTime != 0)
|
||||
writer.writeInt32(8, this.accCheckTime);
|
||||
if (this.accOutSpeed != 0)
|
||||
writer.writeInt32(9, this.accOutSpeed);
|
||||
if (this.radarOutSpeed != 0)
|
||||
writer.writeInt32(10, this.radarOutSpeed);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -656,6 +696,12 @@ export namespace common {
|
||||
case 8:
|
||||
message.accCheckTime = reader.readInt32();
|
||||
break;
|
||||
case 9:
|
||||
message.accOutSpeed = reader.readInt32();
|
||||
break;
|
||||
case 10:
|
||||
message.radarOutSpeed = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
@ -1039,6 +1039,7 @@ export namespace state {
|
||||
trainEndsB?: dependency_2.common.TrainEndsState;
|
||||
tailDeviceId?: number;
|
||||
tailOffset?: number;
|
||||
tailDevicePort?: string;
|
||||
btmState?: BTMState;
|
||||
}) {
|
||||
super();
|
||||
@ -1107,6 +1108,9 @@ export namespace state {
|
||||
if ("tailOffset" in data && data.tailOffset != undefined) {
|
||||
this.tailOffset = data.tailOffset;
|
||||
}
|
||||
if ("tailDevicePort" in data && data.tailDevicePort != undefined) {
|
||||
this.tailDevicePort = data.tailDevicePort;
|
||||
}
|
||||
if ("btmState" in data && data.btmState != undefined) {
|
||||
this.btmState = data.btmState;
|
||||
}
|
||||
@ -1253,14 +1257,20 @@ export namespace state {
|
||||
set tailOffset(value: number) {
|
||||
pb_1.Message.setField(this, 21, value);
|
||||
}
|
||||
get tailDevicePort() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 22, "") as string;
|
||||
}
|
||||
set tailDevicePort(value: string) {
|
||||
pb_1.Message.setField(this, 22, value);
|
||||
}
|
||||
get btmState() {
|
||||
return pb_1.Message.getWrapperField(this, BTMState, 22) as BTMState;
|
||||
return pb_1.Message.getWrapperField(this, BTMState, 23) as BTMState;
|
||||
}
|
||||
set btmState(value: BTMState) {
|
||||
pb_1.Message.setWrapperField(this, 22, value);
|
||||
pb_1.Message.setWrapperField(this, 23, value);
|
||||
}
|
||||
get has_btmState() {
|
||||
return pb_1.Message.getField(this, 22) != null;
|
||||
return pb_1.Message.getField(this, 23) != null;
|
||||
}
|
||||
static fromObject(data: {
|
||||
id?: string;
|
||||
@ -1284,6 +1294,7 @@ export namespace state {
|
||||
trainEndsB?: ReturnType<typeof dependency_2.common.TrainEndsState.prototype.toObject>;
|
||||
tailDeviceId?: number;
|
||||
tailOffset?: number;
|
||||
tailDevicePort?: string;
|
||||
btmState?: ReturnType<typeof BTMState.prototype.toObject>;
|
||||
}): TrainState {
|
||||
const message = new TrainState({});
|
||||
@ -1350,6 +1361,9 @@ export namespace state {
|
||||
if (data.tailOffset != null) {
|
||||
message.tailOffset = data.tailOffset;
|
||||
}
|
||||
if (data.tailDevicePort != null) {
|
||||
message.tailDevicePort = data.tailDevicePort;
|
||||
}
|
||||
if (data.btmState != null) {
|
||||
message.btmState = BTMState.fromObject(data.btmState);
|
||||
}
|
||||
@ -1378,6 +1392,7 @@ export namespace state {
|
||||
trainEndsB?: ReturnType<typeof dependency_2.common.TrainEndsState.prototype.toObject>;
|
||||
tailDeviceId?: number;
|
||||
tailOffset?: number;
|
||||
tailDevicePort?: string;
|
||||
btmState?: ReturnType<typeof BTMState.prototype.toObject>;
|
||||
} = {};
|
||||
if (this.id != null) {
|
||||
@ -1443,6 +1458,9 @@ export namespace state {
|
||||
if (this.tailOffset != null) {
|
||||
data.tailOffset = this.tailOffset;
|
||||
}
|
||||
if (this.tailDevicePort != null) {
|
||||
data.tailDevicePort = this.tailDevicePort;
|
||||
}
|
||||
if (this.btmState != null) {
|
||||
data.btmState = this.btmState.toObject();
|
||||
}
|
||||
@ -1494,8 +1512,10 @@ export namespace state {
|
||||
writer.writeUint32(20, this.tailDeviceId);
|
||||
if (this.tailOffset != 0)
|
||||
writer.writeInt64(21, this.tailOffset);
|
||||
if (this.tailDevicePort.length)
|
||||
writer.writeString(22, this.tailDevicePort);
|
||||
if (this.has_btmState)
|
||||
writer.writeMessage(22, this.btmState, () => this.btmState.serialize(writer));
|
||||
writer.writeMessage(23, this.btmState, () => this.btmState.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -1569,6 +1589,9 @@ export namespace state {
|
||||
message.tailOffset = reader.readInt64();
|
||||
break;
|
||||
case 22:
|
||||
message.tailDevicePort = reader.readString();
|
||||
break;
|
||||
case 23:
|
||||
reader.readMessage(message.btmState, () => message.btmState = BTMState.deserialize(reader));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
@ -5023,6 +5046,8 @@ export namespace state {
|
||||
accEnable?: boolean;
|
||||
accCheckSpeedDiff?: string;
|
||||
accCheckTime?: number;
|
||||
accOutSpeed?: number;
|
||||
radarOutSpeed?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -5051,6 +5076,12 @@ export namespace state {
|
||||
if ("accCheckTime" in data && data.accCheckTime != undefined) {
|
||||
this.accCheckTime = data.accCheckTime;
|
||||
}
|
||||
if ("accOutSpeed" in data && data.accOutSpeed != undefined) {
|
||||
this.accOutSpeed = data.accOutSpeed;
|
||||
}
|
||||
if ("radarOutSpeed" in data && data.radarOutSpeed != undefined) {
|
||||
this.radarOutSpeed = data.radarOutSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
get speedSensorEnableA() {
|
||||
@ -5101,6 +5132,18 @@ export namespace state {
|
||||
set accCheckTime(value: number) {
|
||||
pb_1.Message.setField(this, 8, value);
|
||||
}
|
||||
get accOutSpeed() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
|
||||
}
|
||||
set accOutSpeed(value: number) {
|
||||
pb_1.Message.setField(this, 9, value);
|
||||
}
|
||||
get radarOutSpeed() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
|
||||
}
|
||||
set radarOutSpeed(value: number) {
|
||||
pb_1.Message.setField(this, 10, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
speedSensorEnableA?: boolean;
|
||||
speedSensorEnableB?: boolean;
|
||||
@ -5110,6 +5153,8 @@ export namespace state {
|
||||
accEnable?: boolean;
|
||||
accCheckSpeedDiff?: string;
|
||||
accCheckTime?: number;
|
||||
accOutSpeed?: number;
|
||||
radarOutSpeed?: number;
|
||||
}): TrainEndsStateMqtt {
|
||||
const message = new TrainEndsStateMqtt({});
|
||||
if (data.speedSensorEnableA != null) {
|
||||
@ -5136,6 +5181,12 @@ export namespace state {
|
||||
if (data.accCheckTime != null) {
|
||||
message.accCheckTime = data.accCheckTime;
|
||||
}
|
||||
if (data.accOutSpeed != null) {
|
||||
message.accOutSpeed = data.accOutSpeed;
|
||||
}
|
||||
if (data.radarOutSpeed != null) {
|
||||
message.radarOutSpeed = data.radarOutSpeed;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -5148,6 +5199,8 @@ export namespace state {
|
||||
accEnable?: boolean;
|
||||
accCheckSpeedDiff?: string;
|
||||
accCheckTime?: number;
|
||||
accOutSpeed?: number;
|
||||
radarOutSpeed?: number;
|
||||
} = {};
|
||||
if (this.speedSensorEnableA != null) {
|
||||
data.speedSensorEnableA = this.speedSensorEnableA;
|
||||
@ -5173,6 +5226,12 @@ export namespace state {
|
||||
if (this.accCheckTime != null) {
|
||||
data.accCheckTime = this.accCheckTime;
|
||||
}
|
||||
if (this.accOutSpeed != null) {
|
||||
data.accOutSpeed = this.accOutSpeed;
|
||||
}
|
||||
if (this.radarOutSpeed != null) {
|
||||
data.radarOutSpeed = this.radarOutSpeed;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -5195,6 +5254,10 @@ export namespace state {
|
||||
writer.writeString(7, this.accCheckSpeedDiff);
|
||||
if (this.accCheckTime != 0)
|
||||
writer.writeInt32(8, this.accCheckTime);
|
||||
if (this.accOutSpeed != 0)
|
||||
writer.writeInt32(9, this.accOutSpeed);
|
||||
if (this.radarOutSpeed != 0)
|
||||
writer.writeInt32(10, this.radarOutSpeed);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -5228,6 +5291,12 @@ export namespace state {
|
||||
case 8:
|
||||
message.accCheckTime = reader.readInt32();
|
||||
break;
|
||||
case 9:
|
||||
message.accOutSpeed = reader.readInt32();
|
||||
break;
|
||||
case 10:
|
||||
message.radarOutSpeed = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
@ -52,9 +52,11 @@ export namespace graphicData {
|
||||
otherLineList?: OtherLine[];
|
||||
ibpBoxs?: IbpBox[];
|
||||
pslBoxs?: PslBox[];
|
||||
carWashings?: CarWashing[];
|
||||
garageDoors?: GarageDoor[];
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44], this.#one_of_decls);
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("canvas" in data && data.canvas != undefined) {
|
||||
this.canvas = data.canvas;
|
||||
@ -173,6 +175,12 @@ export namespace graphicData {
|
||||
if ("pslBoxs" in data && data.pslBoxs != undefined) {
|
||||
this.pslBoxs = data.pslBoxs;
|
||||
}
|
||||
if ("carWashings" in data && data.carWashings != undefined) {
|
||||
this.carWashings = data.carWashings;
|
||||
}
|
||||
if ("garageDoors" in data && data.garageDoors != undefined) {
|
||||
this.garageDoors = data.garageDoors;
|
||||
}
|
||||
}
|
||||
}
|
||||
get canvas() {
|
||||
@ -421,6 +429,18 @@ export namespace graphicData {
|
||||
set pslBoxs(value: PslBox[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 44, value);
|
||||
}
|
||||
get carWashings() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, CarWashing, 45) as CarWashing[];
|
||||
}
|
||||
set carWashings(value: CarWashing[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 45, value);
|
||||
}
|
||||
get garageDoors() {
|
||||
return pb_1.Message.getRepeatedWrapperField(this, GarageDoor, 46) as GarageDoor[];
|
||||
}
|
||||
set garageDoors(value: GarageDoor[]) {
|
||||
pb_1.Message.setRepeatedWrapperField(this, 46, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
|
||||
Platforms?: ReturnType<typeof Platform.prototype.toObject>[];
|
||||
@ -461,6 +481,8 @@ export namespace graphicData {
|
||||
otherLineList?: ReturnType<typeof OtherLine.prototype.toObject>[];
|
||||
ibpBoxs?: ReturnType<typeof IbpBox.prototype.toObject>[];
|
||||
pslBoxs?: ReturnType<typeof PslBox.prototype.toObject>[];
|
||||
carWashings?: ReturnType<typeof CarWashing.prototype.toObject>[];
|
||||
garageDoors?: ReturnType<typeof GarageDoor.prototype.toObject>[];
|
||||
}): RtssGraphicStorage {
|
||||
const message = new RtssGraphicStorage({});
|
||||
if (data.canvas != null) {
|
||||
@ -580,6 +602,12 @@ export namespace graphicData {
|
||||
if (data.pslBoxs != null) {
|
||||
message.pslBoxs = data.pslBoxs.map(item => PslBox.fromObject(item));
|
||||
}
|
||||
if (data.carWashings != null) {
|
||||
message.carWashings = data.carWashings.map(item => CarWashing.fromObject(item));
|
||||
}
|
||||
if (data.garageDoors != null) {
|
||||
message.garageDoors = data.garageDoors.map(item => GarageDoor.fromObject(item));
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -623,6 +651,8 @@ export namespace graphicData {
|
||||
otherLineList?: ReturnType<typeof OtherLine.prototype.toObject>[];
|
||||
ibpBoxs?: ReturnType<typeof IbpBox.prototype.toObject>[];
|
||||
pslBoxs?: ReturnType<typeof PslBox.prototype.toObject>[];
|
||||
carWashings?: ReturnType<typeof CarWashing.prototype.toObject>[];
|
||||
garageDoors?: ReturnType<typeof GarageDoor.prototype.toObject>[];
|
||||
} = {};
|
||||
if (this.canvas != null) {
|
||||
data.canvas = this.canvas.toObject();
|
||||
@ -741,6 +771,12 @@ export namespace graphicData {
|
||||
if (this.pslBoxs != null) {
|
||||
data.pslBoxs = this.pslBoxs.map((item: PslBox) => item.toObject());
|
||||
}
|
||||
if (this.carWashings != null) {
|
||||
data.carWashings = this.carWashings.map((item: CarWashing) => item.toObject());
|
||||
}
|
||||
if (this.garageDoors != null) {
|
||||
data.garageDoors = this.garageDoors.map((item: GarageDoor) => item.toObject());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -825,6 +861,10 @@ export namespace graphicData {
|
||||
writer.writeRepeatedMessage(43, this.ibpBoxs, (item: IbpBox) => item.serialize(writer));
|
||||
if (this.pslBoxs.length)
|
||||
writer.writeRepeatedMessage(44, this.pslBoxs, (item: PslBox) => item.serialize(writer));
|
||||
if (this.carWashings.length)
|
||||
writer.writeRepeatedMessage(45, this.carWashings, (item: CarWashing) => item.serialize(writer));
|
||||
if (this.garageDoors.length)
|
||||
writer.writeRepeatedMessage(46, this.garageDoors, (item: GarageDoor) => item.serialize(writer));
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -951,6 +991,12 @@ export namespace graphicData {
|
||||
case 44:
|
||||
reader.readMessage(message.pslBoxs, () => pb_1.Message.addToRepeatedWrapperField(message, 44, PslBox.deserialize(reader), PslBox));
|
||||
break;
|
||||
case 45:
|
||||
reader.readMessage(message.carWashings, () => pb_1.Message.addToRepeatedWrapperField(message, 45, CarWashing.deserialize(reader), CarWashing));
|
||||
break;
|
||||
case 46:
|
||||
reader.readMessage(message.garageDoors, () => pb_1.Message.addToRepeatedWrapperField(message, 46, GarageDoor.deserialize(reader), GarageDoor));
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
@ -5002,7 +5048,9 @@ export namespace graphicData {
|
||||
ScreenDoor = 7,
|
||||
SignalFaultAlarm = 8,
|
||||
Breakers = 9,
|
||||
PowerScreen = 10
|
||||
PowerScreen = 10,
|
||||
GarageDoor = 11,
|
||||
CarWashing = 12
|
||||
}
|
||||
export enum DevicePort {
|
||||
A = 0,
|
||||
@ -7931,6 +7979,192 @@ export namespace graphicData {
|
||||
return CurvatureKiloMarker.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class GarageDoor extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: CommonInfo;
|
||||
code?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo;
|
||||
}
|
||||
set common(value: CommonInfo) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get has_common() {
|
||||
return pb_1.Message.getField(this, 1) != null;
|
||||
}
|
||||
get code() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||
}
|
||||
set code(value: string) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): GarageDoor {
|
||||
const message = new GarageDoor({});
|
||||
if (data.common != null) {
|
||||
message.common = CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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.has_common)
|
||||
writer.writeMessage(1, this.common, () => this.common.serialize(writer));
|
||||
if (this.code.length)
|
||||
writer.writeString(2, this.code);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GarageDoor {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GarageDoor();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): GarageDoor {
|
||||
return GarageDoor.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class CarWashing extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
common?: CommonInfo;
|
||||
code?: string;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
if (!Array.isArray(data) && typeof data == "object") {
|
||||
if ("common" in data && data.common != undefined) {
|
||||
this.common = data.common;
|
||||
}
|
||||
if ("code" in data && data.code != undefined) {
|
||||
this.code = data.code;
|
||||
}
|
||||
}
|
||||
}
|
||||
get common() {
|
||||
return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo;
|
||||
}
|
||||
set common(value: CommonInfo) {
|
||||
pb_1.Message.setWrapperField(this, 1, value);
|
||||
}
|
||||
get has_common() {
|
||||
return pb_1.Message.getField(this, 1) != null;
|
||||
}
|
||||
get code() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
|
||||
}
|
||||
set code(value: string) {
|
||||
pb_1.Message.setField(this, 2, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
}): CarWashing {
|
||||
const message = new CarWashing({});
|
||||
if (data.common != null) {
|
||||
message.common = CommonInfo.fromObject(data.common);
|
||||
}
|
||||
if (data.code != null) {
|
||||
message.code = data.code;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
const data: {
|
||||
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
|
||||
code?: string;
|
||||
} = {};
|
||||
if (this.common != null) {
|
||||
data.common = this.common.toObject();
|
||||
}
|
||||
if (this.code != null) {
|
||||
data.code = this.code;
|
||||
}
|
||||
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.has_common)
|
||||
writer.writeMessage(1, this.common, () => this.common.serialize(writer));
|
||||
if (this.code.length)
|
||||
writer.writeString(2, this.code);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CarWashing {
|
||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CarWashing();
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup())
|
||||
break;
|
||||
switch (reader.getFieldNumber()) {
|
||||
case 1:
|
||||
reader.readMessage(message.common, () => message.common = CommonInfo.deserialize(reader));
|
||||
break;
|
||||
case 2:
|
||||
message.code = reader.readString();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
}
|
||||
serializeBinary(): Uint8Array {
|
||||
return this.serialize();
|
||||
}
|
||||
static deserializeBinary(bytes: Uint8Array): CarWashing {
|
||||
return CarWashing.deserialize(bytes);
|
||||
}
|
||||
}
|
||||
export class Beacon extends pb_1.Message {
|
||||
#one_of_decls: number[][] = [];
|
||||
constructor(data?: any[] | {
|
||||
|
Loading…
Reference in New Issue
Block a user