同步protoc

This commit is contained in:
fan 2023-11-17 11:00:05 +08:00
parent 17020acb33
commit c17561a467

View File

@ -45,9 +45,10 @@ export namespace graphicData {
beacons?: Beacon[];
generateAxleCountingConfig?: GenerateAxleCountingConfig;
departureTimers?: DepartureTimer[];
autoReturnBoxs?: AutoReturnBox[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39], this.#one_of_decls);
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("canvas" in data && data.canvas != undefined) {
this.canvas = data.canvas;
@ -148,6 +149,9 @@ export namespace graphicData {
if ("departureTimers" in data && data.departureTimers != undefined) {
this.departureTimers = data.departureTimers;
}
if ("autoReturnBoxs" in data && data.autoReturnBoxs != undefined) {
this.autoReturnBoxs = data.autoReturnBoxs;
}
}
}
get canvas() {
@ -360,6 +364,12 @@ export namespace graphicData {
set departureTimers(value: DepartureTimer[]) {
pb_1.Message.setRepeatedWrapperField(this, 39, value);
}
get autoReturnBoxs() {
return pb_1.Message.getRepeatedWrapperField(this, AutoReturnBox, 40) as AutoReturnBox[];
}
set autoReturnBoxs(value: AutoReturnBox[]) {
pb_1.Message.setRepeatedWrapperField(this, 40, value);
}
static fromObject(data: {
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
Platforms?: ReturnType<typeof Platform.prototype.toObject>[];
@ -394,6 +404,7 @@ export namespace graphicData {
beacons?: ReturnType<typeof Beacon.prototype.toObject>[];
generateAxleCountingConfig?: ReturnType<typeof GenerateAxleCountingConfig.prototype.toObject>;
departureTimers?: ReturnType<typeof DepartureTimer.prototype.toObject>[];
autoReturnBoxs?: ReturnType<typeof AutoReturnBox.prototype.toObject>[];
}): RtssGraphicStorage {
const message = new RtssGraphicStorage({});
if (data.canvas != null) {
@ -495,6 +506,9 @@ export namespace graphicData {
if (data.departureTimers != null) {
message.departureTimers = data.departureTimers.map(item => DepartureTimer.fromObject(item));
}
if (data.autoReturnBoxs != null) {
message.autoReturnBoxs = data.autoReturnBoxs.map(item => AutoReturnBox.fromObject(item));
}
return message;
}
toObject() {
@ -532,6 +546,7 @@ export namespace graphicData {
beacons?: ReturnType<typeof Beacon.prototype.toObject>[];
generateAxleCountingConfig?: ReturnType<typeof GenerateAxleCountingConfig.prototype.toObject>;
departureTimers?: ReturnType<typeof DepartureTimer.prototype.toObject>[];
autoReturnBoxs?: ReturnType<typeof AutoReturnBox.prototype.toObject>[];
} = {};
if (this.canvas != null) {
data.canvas = this.canvas.toObject();
@ -632,6 +647,9 @@ export namespace graphicData {
if (this.departureTimers != null) {
data.departureTimers = this.departureTimers.map((item: DepartureTimer) => item.toObject());
}
if (this.autoReturnBoxs != null) {
data.autoReturnBoxs = this.autoReturnBoxs.map((item: AutoReturnBox) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
@ -704,6 +722,8 @@ export namespace graphicData {
writer.writeMessage(38, this.generateAxleCountingConfig, () => this.generateAxleCountingConfig.serialize(writer));
if (this.departureTimers.length)
writer.writeRepeatedMessage(39, this.departureTimers, (item: DepartureTimer) => item.serialize(writer));
if (this.autoReturnBoxs.length)
writer.writeRepeatedMessage(40, this.autoReturnBoxs, (item: AutoReturnBox) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
@ -812,6 +832,9 @@ export namespace graphicData {
case 39:
reader.readMessage(message.departureTimers, () => pb_1.Message.addToRepeatedWrapperField(message, 39, DepartureTimer.deserialize(reader), DepartureTimer));
break;
case 40:
reader.readMessage(message.autoReturnBoxs, () => pb_1.Message.addToRepeatedWrapperField(message, 40, AutoReturnBox.deserialize(reader), AutoReturnBox));
break;
default: reader.skipField();
}
}
@ -6917,6 +6940,168 @@ export namespace graphicData {
return DepartureTimer.deserialize(bytes);
}
}
export class AutoReturnBox extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
common?: CommonInfo;
code?: string;
flip?: boolean;
index?: number;
refStand?: 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;
}
if ("flip" in data && data.flip != undefined) {
this.flip = data.flip;
}
if ("index" in data && data.index != undefined) {
this.index = data.index;
}
if ("refStand" in data && data.refStand != undefined) {
this.refStand = data.refStand;
}
}
}
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);
}
get flip() {
return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean;
}
set flip(value: boolean) {
pb_1.Message.setField(this, 3, value);
}
get index() {
return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
}
set index(value: number) {
pb_1.Message.setField(this, 4, value);
}
get refStand() {
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set refStand(value: string) {
pb_1.Message.setField(this, 5, value);
}
static fromObject(data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
code?: string;
flip?: boolean;
index?: number;
refStand?: string;
}): AutoReturnBox {
const message = new AutoReturnBox({});
if (data.common != null) {
message.common = CommonInfo.fromObject(data.common);
}
if (data.code != null) {
message.code = data.code;
}
if (data.flip != null) {
message.flip = data.flip;
}
if (data.index != null) {
message.index = data.index;
}
if (data.refStand != null) {
message.refStand = data.refStand;
}
return message;
}
toObject() {
const data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
code?: string;
flip?: boolean;
index?: number;
refStand?: string;
} = {};
if (this.common != null) {
data.common = this.common.toObject();
}
if (this.code != null) {
data.code = this.code;
}
if (this.flip != null) {
data.flip = this.flip;
}
if (this.index != null) {
data.index = this.index;
}
if (this.refStand != null) {
data.refStand = this.refStand;
}
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 (this.flip != false)
writer.writeBool(3, this.flip);
if (this.index != 0)
writer.writeInt32(4, this.index);
if (this.refStand.length)
writer.writeString(5, this.refStand);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AutoReturnBox {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AutoReturnBox();
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;
case 3:
message.flip = reader.readBool();
break;
case 4:
message.index = reader.readInt32();
break;
case 5:
message.refStand = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): AutoReturnBox {
return AutoReturnBox.deserialize(bytes);
}
}
export class UniqueIdOfStationLayout extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {