Merge branch 'develop' into local-test

This commit is contained in:
joylink_fanyuhong 2024-08-06 13:23:11 +08:00
commit 69ccdf56d5

View File

@ -1188,6 +1188,8 @@ export namespace state {
connState?: TrainConnState; connState?: TrainConnState;
pluseCount?: SensorSpeedPulseCount; pluseCount?: SensorSpeedPulseCount;
vobcBtm?: VobcBtmState; vobcBtm?: VobcBtmState;
oldLink?: string;
oldLinkOffset?: number;
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1273,6 +1275,12 @@ export namespace state {
if ("vobcBtm" in data && data.vobcBtm != undefined) { if ("vobcBtm" in data && data.vobcBtm != undefined) {
this.vobcBtm = data.vobcBtm; this.vobcBtm = data.vobcBtm;
} }
if ("oldLink" in data && data.oldLink != undefined) {
this.oldLink = data.oldLink;
}
if ("oldLinkOffset" in data && data.oldLinkOffset != undefined) {
this.oldLinkOffset = data.oldLinkOffset;
}
} }
} }
get id() { get id() {
@ -1467,6 +1475,18 @@ export namespace state {
get has_vobcBtm() { get has_vobcBtm() {
return pb_1.Message.getField(this, 27) != null; return pb_1.Message.getField(this, 27) != null;
} }
get oldLink() {
return pb_1.Message.getFieldWithDefault(this, 28, "") as string;
}
set oldLink(value: string) {
pb_1.Message.setField(this, 28, value);
}
get oldLinkOffset() {
return pb_1.Message.getFieldWithDefault(this, 29, 0) as number;
}
set oldLinkOffset(value: number) {
pb_1.Message.setField(this, 29, value);
}
static fromObject(data: { static fromObject(data: {
id?: string; id?: string;
up?: boolean; up?: boolean;
@ -1495,6 +1515,8 @@ export namespace state {
connState?: ReturnType<typeof TrainConnState.prototype.toObject>; connState?: ReturnType<typeof TrainConnState.prototype.toObject>;
pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>; pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>;
vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>; vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>;
oldLink?: string;
oldLinkOffset?: number;
}): TrainState { }): TrainState {
const message = new TrainState({}); const message = new TrainState({});
if (data.id != null) { if (data.id != null) {
@ -1578,6 +1600,12 @@ export namespace state {
if (data.vobcBtm != null) { if (data.vobcBtm != null) {
message.vobcBtm = VobcBtmState.fromObject(data.vobcBtm); message.vobcBtm = VobcBtmState.fromObject(data.vobcBtm);
} }
if (data.oldLink != null) {
message.oldLink = data.oldLink;
}
if (data.oldLinkOffset != null) {
message.oldLinkOffset = data.oldLinkOffset;
}
return message; return message;
} }
toObject() { toObject() {
@ -1609,6 +1637,8 @@ export namespace state {
connState?: ReturnType<typeof TrainConnState.prototype.toObject>; connState?: ReturnType<typeof TrainConnState.prototype.toObject>;
pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>; pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>;
vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>; vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>;
oldLink?: string;
oldLinkOffset?: number;
} = {}; } = {};
if (this.id != null) { if (this.id != null) {
data.id = this.id; data.id = this.id;
@ -1691,6 +1721,12 @@ export namespace state {
if (this.vobcBtm != null) { if (this.vobcBtm != null) {
data.vobcBtm = this.vobcBtm.toObject(); data.vobcBtm = this.vobcBtm.toObject();
} }
if (this.oldLink != null) {
data.oldLink = this.oldLink;
}
if (this.oldLinkOffset != null) {
data.oldLinkOffset = this.oldLinkOffset;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -1751,6 +1787,10 @@ export namespace state {
writer.writeMessage(26, this.pluseCount, () => this.pluseCount.serialize(writer)); writer.writeMessage(26, this.pluseCount, () => this.pluseCount.serialize(writer));
if (this.has_vobcBtm) if (this.has_vobcBtm)
writer.writeMessage(27, this.vobcBtm, () => this.vobcBtm.serialize(writer)); writer.writeMessage(27, this.vobcBtm, () => this.vobcBtm.serialize(writer));
if (this.oldLink.length)
writer.writeString(28, this.oldLink);
if (this.oldLinkOffset != 0)
writer.writeInt64(29, this.oldLinkOffset);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -1841,6 +1881,12 @@ export namespace state {
case 27: case 27:
reader.readMessage(message.vobcBtm, () => message.vobcBtm = VobcBtmState.deserialize(reader)); reader.readMessage(message.vobcBtm, () => message.vobcBtm = VobcBtmState.deserialize(reader));
break; break;
case 28:
message.oldLink = reader.readString();
break;
case 29:
message.oldLinkOffset = reader.readInt64();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }
@ -2282,9 +2328,11 @@ export namespace state {
constructor(data?: any[] | { constructor(data?: any[] | {
pulseCount1?: number; pulseCount1?: number;
pulseCount2?: number; pulseCount2?: number;
pulseCount3?: number[];
pulseCount4?: number[];
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { if (!Array.isArray(data) && typeof data == "object") {
if ("pulseCount1" in data && data.pulseCount1 != undefined) { if ("pulseCount1" in data && data.pulseCount1 != undefined) {
this.pulseCount1 = data.pulseCount1; this.pulseCount1 = data.pulseCount1;
@ -2292,6 +2340,12 @@ export namespace state {
if ("pulseCount2" in data && data.pulseCount2 != undefined) { if ("pulseCount2" in data && data.pulseCount2 != undefined) {
this.pulseCount2 = data.pulseCount2; this.pulseCount2 = data.pulseCount2;
} }
if ("pulseCount3" in data && data.pulseCount3 != undefined) {
this.pulseCount3 = data.pulseCount3;
}
if ("pulseCount4" in data && data.pulseCount4 != undefined) {
this.pulseCount4 = data.pulseCount4;
}
} }
} }
get pulseCount1() { get pulseCount1() {
@ -2306,9 +2360,23 @@ export namespace state {
set pulseCount2(value: number) { set pulseCount2(value: number) {
pb_1.Message.setField(this, 2, value); pb_1.Message.setField(this, 2, value);
} }
get pulseCount3() {
return pb_1.Message.getFieldWithDefault(this, 3, []) as number[];
}
set pulseCount3(value: number[]) {
pb_1.Message.setField(this, 3, value);
}
get pulseCount4() {
return pb_1.Message.getFieldWithDefault(this, 4, []) as number[];
}
set pulseCount4(value: number[]) {
pb_1.Message.setField(this, 4, value);
}
static fromObject(data: { static fromObject(data: {
pulseCount1?: number; pulseCount1?: number;
pulseCount2?: number; pulseCount2?: number;
pulseCount3?: number[];
pulseCount4?: number[];
}): SensorSpeedPulseCount { }): SensorSpeedPulseCount {
const message = new SensorSpeedPulseCount({}); const message = new SensorSpeedPulseCount({});
if (data.pulseCount1 != null) { if (data.pulseCount1 != null) {
@ -2317,12 +2385,20 @@ export namespace state {
if (data.pulseCount2 != null) { if (data.pulseCount2 != null) {
message.pulseCount2 = data.pulseCount2; message.pulseCount2 = data.pulseCount2;
} }
if (data.pulseCount3 != null) {
message.pulseCount3 = data.pulseCount3;
}
if (data.pulseCount4 != null) {
message.pulseCount4 = data.pulseCount4;
}
return message; return message;
} }
toObject() { toObject() {
const data: { const data: {
pulseCount1?: number; pulseCount1?: number;
pulseCount2?: number; pulseCount2?: number;
pulseCount3?: number[];
pulseCount4?: number[];
} = {}; } = {};
if (this.pulseCount1 != null) { if (this.pulseCount1 != null) {
data.pulseCount1 = this.pulseCount1; data.pulseCount1 = this.pulseCount1;
@ -2330,6 +2406,12 @@ export namespace state {
if (this.pulseCount2 != null) { if (this.pulseCount2 != null) {
data.pulseCount2 = this.pulseCount2; data.pulseCount2 = this.pulseCount2;
} }
if (this.pulseCount3 != null) {
data.pulseCount3 = this.pulseCount3;
}
if (this.pulseCount4 != null) {
data.pulseCount4 = this.pulseCount4;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -2340,6 +2422,10 @@ export namespace state {
writer.writeUint32(1, this.pulseCount1); writer.writeUint32(1, this.pulseCount1);
if (this.pulseCount2 != 0) if (this.pulseCount2 != 0)
writer.writeUint32(2, this.pulseCount2); writer.writeUint32(2, this.pulseCount2);
if (this.pulseCount3.length)
writer.writePackedFloat(3, this.pulseCount3);
if (this.pulseCount4.length)
writer.writePackedFloat(4, this.pulseCount4);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -2355,6 +2441,12 @@ export namespace state {
case 2: case 2:
message.pulseCount2 = reader.readUint32(); message.pulseCount2 = reader.readUint32();
break; break;
case 3:
message.pulseCount3 = reader.readPackedFloat();
break;
case 4:
message.pulseCount4 = reader.readPackedFloat();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }
@ -2849,7 +2941,7 @@ export namespace state {
if (this.acceleration != 0) if (this.acceleration != 0)
writer.writeFloat(22, this.acceleration); writer.writeFloat(22, this.acceleration);
if (this.Displacement != 0) if (this.Displacement != 0)
writer.writeInt32(23, this.Displacement); writer.writeFloat(23, this.Displacement);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -2926,7 +3018,7 @@ export namespace state {
message.acceleration = reader.readFloat(); message.acceleration = reader.readFloat();
break; break;
case 23: case 23:
message.Displacement = reader.readInt32(); message.Displacement = reader.readFloat();
break; break;
default: reader.skipField(); default: reader.skipField();
} }
@ -6182,7 +6274,7 @@ export namespace state {
if (this.has_trainEndsB) if (this.has_trainEndsB)
writer.writeMessage(64, this.trainEndsB, () => this.trainEndsB.serialize(writer)); writer.writeMessage(64, this.trainEndsB, () => this.trainEndsB.serialize(writer));
if (this.Displacement != 0) if (this.Displacement != 0)
writer.writeInt32(65, this.Displacement); writer.writeFloat(65, this.Displacement);
if (this.tailDeviceId != 0) if (this.tailDeviceId != 0)
writer.writeUint32(66, this.tailDeviceId); writer.writeUint32(66, this.tailDeviceId);
if (this.tailOffset != 0) if (this.tailOffset != 0)
@ -6395,7 +6487,7 @@ export namespace state {
reader.readMessage(message.trainEndsB, () => message.trainEndsB = TrainEndsStateMqtt.deserialize(reader)); reader.readMessage(message.trainEndsB, () => message.trainEndsB = TrainEndsStateMqtt.deserialize(reader));
break; break;
case 65: case 65:
message.Displacement = reader.readInt32(); message.Displacement = reader.readFloat();
break; break;
case 66: case 66:
message.tailDeviceId = reader.readUint32(); message.tailDeviceId = reader.readUint32();
@ -6424,6 +6516,73 @@ export namespace state {
return TrainMapState.deserialize(bytes); return TrainMapState.deserialize(bytes);
} }
} }
export class BtmStateCache extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
btmStateList?: BTMState[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("btmStateList" in data && data.btmStateList != undefined) {
this.btmStateList = data.btmStateList;
}
}
}
get btmStateList() {
return pb_1.Message.getRepeatedWrapperField(this, BTMState, 1) as BTMState[];
}
set btmStateList(value: BTMState[]) {
pb_1.Message.setRepeatedWrapperField(this, 1, value);
}
static fromObject(data: {
btmStateList?: ReturnType<typeof BTMState.prototype.toObject>[];
}): BtmStateCache {
const message = new BtmStateCache({});
if (data.btmStateList != null) {
message.btmStateList = data.btmStateList.map(item => BTMState.fromObject(item));
}
return message;
}
toObject() {
const data: {
btmStateList?: ReturnType<typeof BTMState.prototype.toObject>[];
} = {};
if (this.btmStateList != null) {
data.btmStateList = this.btmStateList.map((item: BTMState) => item.toObject());
}
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.btmStateList.length)
writer.writeRepeatedMessage(1, this.btmStateList, (item: BTMState) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BtmStateCache {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BtmStateCache();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.btmStateList, () => pb_1.Message.addToRepeatedWrapperField(message, 1, BTMState.deserialize(reader), BTMState));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): BtmStateCache {
return BtmStateCache.deserialize(bytes);
}
}
export class BTMState extends pb_1.Message { export class BTMState extends pb_1.Message {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | { constructor(data?: any[] | {
@ -6434,6 +6593,9 @@ export namespace state {
distance?: number; distance?: number;
aboveBalise?: boolean; aboveBalise?: boolean;
baliseTelegramForPcSimResend?: string; baliseTelegramForPcSimResend?: string;
telegram128?: string;
baliseId?: string;
isSend?: boolean;
}) { }) {
super(); super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -6459,6 +6621,15 @@ export namespace state {
if ("baliseTelegramForPcSimResend" in data && data.baliseTelegramForPcSimResend != undefined) { if ("baliseTelegramForPcSimResend" in data && data.baliseTelegramForPcSimResend != undefined) {
this.baliseTelegramForPcSimResend = data.baliseTelegramForPcSimResend; this.baliseTelegramForPcSimResend = data.baliseTelegramForPcSimResend;
} }
if ("telegram128" in data && data.telegram128 != undefined) {
this.telegram128 = data.telegram128;
}
if ("baliseId" in data && data.baliseId != undefined) {
this.baliseId = data.baliseId;
}
if ("isSend" in data && data.isSend != undefined) {
this.isSend = data.isSend;
}
} }
} }
get dataSerialNumber() { get dataSerialNumber() {
@ -6503,6 +6674,24 @@ export namespace state {
set baliseTelegramForPcSimResend(value: string) { set baliseTelegramForPcSimResend(value: string) {
pb_1.Message.setField(this, 7, value); pb_1.Message.setField(this, 7, value);
} }
get telegram128() {
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
}
set telegram128(value: string) {
pb_1.Message.setField(this, 8, value);
}
get baliseId() {
return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
}
set baliseId(value: string) {
pb_1.Message.setField(this, 9, value);
}
get isSend() {
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
}
set isSend(value: boolean) {
pb_1.Message.setField(this, 10, value);
}
static fromObject(data: { static fromObject(data: {
dataSerialNumber?: number; dataSerialNumber?: number;
baliseCount?: number; baliseCount?: number;
@ -6511,6 +6700,9 @@ export namespace state {
distance?: number; distance?: number;
aboveBalise?: boolean; aboveBalise?: boolean;
baliseTelegramForPcSimResend?: string; baliseTelegramForPcSimResend?: string;
telegram128?: string;
baliseId?: string;
isSend?: boolean;
}): BTMState { }): BTMState {
const message = new BTMState({}); const message = new BTMState({});
if (data.dataSerialNumber != null) { if (data.dataSerialNumber != null) {
@ -6534,6 +6726,15 @@ export namespace state {
if (data.baliseTelegramForPcSimResend != null) { if (data.baliseTelegramForPcSimResend != null) {
message.baliseTelegramForPcSimResend = data.baliseTelegramForPcSimResend; message.baliseTelegramForPcSimResend = data.baliseTelegramForPcSimResend;
} }
if (data.telegram128 != null) {
message.telegram128 = data.telegram128;
}
if (data.baliseId != null) {
message.baliseId = data.baliseId;
}
if (data.isSend != null) {
message.isSend = data.isSend;
}
return message; return message;
} }
toObject() { toObject() {
@ -6545,6 +6746,9 @@ export namespace state {
distance?: number; distance?: number;
aboveBalise?: boolean; aboveBalise?: boolean;
baliseTelegramForPcSimResend?: string; baliseTelegramForPcSimResend?: string;
telegram128?: string;
baliseId?: string;
isSend?: boolean;
} = {}; } = {};
if (this.dataSerialNumber != null) { if (this.dataSerialNumber != null) {
data.dataSerialNumber = this.dataSerialNumber; data.dataSerialNumber = this.dataSerialNumber;
@ -6567,6 +6771,15 @@ export namespace state {
if (this.baliseTelegramForPcSimResend != null) { if (this.baliseTelegramForPcSimResend != null) {
data.baliseTelegramForPcSimResend = this.baliseTelegramForPcSimResend; data.baliseTelegramForPcSimResend = this.baliseTelegramForPcSimResend;
} }
if (this.telegram128 != null) {
data.telegram128 = this.telegram128;
}
if (this.baliseId != null) {
data.baliseId = this.baliseId;
}
if (this.isSend != null) {
data.isSend = this.isSend;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -6587,6 +6800,12 @@ export namespace state {
writer.writeBool(6, this.aboveBalise); writer.writeBool(6, this.aboveBalise);
if (this.baliseTelegramForPcSimResend.length) if (this.baliseTelegramForPcSimResend.length)
writer.writeString(7, this.baliseTelegramForPcSimResend); writer.writeString(7, this.baliseTelegramForPcSimResend);
if (this.telegram128.length)
writer.writeString(8, this.telegram128);
if (this.baliseId.length)
writer.writeString(9, this.baliseId);
if (this.isSend != false)
writer.writeBool(10, this.isSend);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -6617,6 +6836,15 @@ export namespace state {
case 7: case 7:
message.baliseTelegramForPcSimResend = reader.readString(); message.baliseTelegramForPcSimResend = reader.readString();
break; break;
case 8:
message.telegram128 = reader.readString();
break;
case 9:
message.baliseId = reader.readString();
break;
case 10:
message.isSend = reader.readBool();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }