连锁映射数据调整

This commit is contained in:
fan 2024-06-12 17:36:47 +08:00
parent 13e5b77a97
commit 542745ef84
3 changed files with 455 additions and 5 deletions

@ -1 +1 @@
Subproject commit fed626ac4b0d1b2696026438d32fe812ebd00ac2
Subproject commit 0844608c8674ec2988c06ba61e73e7b6afe7d660

View File

@ -1166,6 +1166,7 @@ export namespace state {
tcc?: TrainControlState;
connState?: TrainConnState;
pluseCount?: SensorSpeedPulseCount;
vobcBtm?: VobcBtmState;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1248,6 +1249,9 @@ export namespace state {
if ("pluseCount" in data && data.pluseCount != undefined) {
this.pluseCount = data.pluseCount;
}
if ("vobcBtm" in data && data.vobcBtm != undefined) {
this.vobcBtm = data.vobcBtm;
}
}
}
get id() {
@ -1433,6 +1437,15 @@ export namespace state {
get has_pluseCount() {
return pb_1.Message.getField(this, 26) != null;
}
get vobcBtm() {
return pb_1.Message.getWrapperField(this, VobcBtmState, 27) as VobcBtmState;
}
set vobcBtm(value: VobcBtmState) {
pb_1.Message.setWrapperField(this, 27, value);
}
get has_vobcBtm() {
return pb_1.Message.getField(this, 27) != null;
}
static fromObject(data: {
id?: string;
up?: boolean;
@ -1460,6 +1473,7 @@ export namespace state {
tcc?: ReturnType<typeof TrainControlState.prototype.toObject>;
connState?: ReturnType<typeof TrainConnState.prototype.toObject>;
pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>;
vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>;
}): TrainState {
const message = new TrainState({});
if (data.id != null) {
@ -1540,6 +1554,9 @@ export namespace state {
if (data.pluseCount != null) {
message.pluseCount = SensorSpeedPulseCount.fromObject(data.pluseCount);
}
if (data.vobcBtm != null) {
message.vobcBtm = VobcBtmState.fromObject(data.vobcBtm);
}
return message;
}
toObject() {
@ -1570,6 +1587,7 @@ export namespace state {
tcc?: ReturnType<typeof TrainControlState.prototype.toObject>;
connState?: ReturnType<typeof TrainConnState.prototype.toObject>;
pluseCount?: ReturnType<typeof SensorSpeedPulseCount.prototype.toObject>;
vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>;
} = {};
if (this.id != null) {
data.id = this.id;
@ -1649,6 +1667,9 @@ export namespace state {
if (this.pluseCount != null) {
data.pluseCount = this.pluseCount.toObject();
}
if (this.vobcBtm != null) {
data.vobcBtm = this.vobcBtm.toObject();
}
return data;
}
serialize(): Uint8Array;
@ -1707,6 +1728,8 @@ export namespace state {
writer.writeMessage(25, this.connState, () => this.connState.serialize(writer));
if (this.has_pluseCount)
writer.writeMessage(26, this.pluseCount, () => this.pluseCount.serialize(writer));
if (this.has_vobcBtm)
writer.writeMessage(27, this.vobcBtm, () => this.vobcBtm.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
@ -1794,6 +1817,9 @@ export namespace state {
case 26:
reader.readMessage(message.pluseCount, () => message.pluseCount = SensorSpeedPulseCount.deserialize(reader));
break;
case 27:
reader.readMessage(message.vobcBtm, () => message.vobcBtm = VobcBtmState.deserialize(reader));
break;
default: reader.skipField();
}
}
@ -1806,6 +1832,430 @@ export namespace state {
return TrainState.deserialize(bytes);
}
}
export class VobcBtmState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
telegramState?: VobcBtmState.TelegramState[];
history?: Map<number, VobcBtmState.VobcBtmHistoryState>;
}) {
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 ("telegramState" in data && data.telegramState != undefined) {
this.telegramState = data.telegramState;
}
if ("history" in data && data.history != undefined) {
this.history = data.history;
}
}
if (!this.history)
this.history = new Map();
}
get telegramState() {
return pb_1.Message.getRepeatedWrapperField(this, VobcBtmState.TelegramState, 1) as VobcBtmState.TelegramState[];
}
set telegramState(value: VobcBtmState.TelegramState[]) {
pb_1.Message.setRepeatedWrapperField(this, 1, value);
}
get history() {
return pb_1.Message.getField(this, 2) as any as Map<number, VobcBtmState.VobcBtmHistoryState>;
}
set history(value: Map<number, VobcBtmState.VobcBtmHistoryState>) {
pb_1.Message.setField(this, 2, value as any);
}
static fromObject(data: {
telegramState?: ReturnType<typeof VobcBtmState.TelegramState.prototype.toObject>[];
history?: {
[key: number]: ReturnType<typeof VobcBtmState.VobcBtmHistoryState.prototype.toObject>;
};
}): VobcBtmState {
const message = new VobcBtmState({});
if (data.telegramState != null) {
message.telegramState = data.telegramState.map(item => VobcBtmState.TelegramState.fromObject(item));
}
if (typeof data.history == "object") {
message.history = new Map(Object.entries(data.history).map(([key, value]) => [Number(key), VobcBtmState.VobcBtmHistoryState.fromObject(value)]));
}
return message;
}
toObject() {
const data: {
telegramState?: ReturnType<typeof VobcBtmState.TelegramState.prototype.toObject>[];
history?: {
[key: number]: ReturnType<typeof VobcBtmState.VobcBtmHistoryState.prototype.toObject>;
};
} = {};
if (this.telegramState != null) {
data.telegramState = this.telegramState.map((item: VobcBtmState.TelegramState) => item.toObject());
}
if (this.history != null) {
data.history = (Object.fromEntries)((Array.from)(this.history).map(([key, value]) => [key, value.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.telegramState.length)
writer.writeRepeatedMessage(1, this.telegramState, (item: VobcBtmState.TelegramState) => item.serialize(writer));
for (const [key, value] of this.history) {
writer.writeMessage(2, this.history, () => {
writer.writeUint32(1, key);
writer.writeMessage(2, value, () => value.serialize(writer));
});
}
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VobcBtmState {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VobcBtmState();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.telegramState, () => pb_1.Message.addToRepeatedWrapperField(message, 1, VobcBtmState.TelegramState.deserialize(reader), VobcBtmState.TelegramState));
break;
case 2:
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.history as any, reader, reader.readUint32, () => {
let value;
reader.readMessage(message, () => value = VobcBtmState.VobcBtmHistoryState.deserialize(reader));
return value;
}));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): VobcBtmState {
return VobcBtmState.deserialize(bytes);
}
}
export namespace VobcBtmState {
export class TelegramState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
baliseId?: string;
telegram?: string;
arriveTime?: number;
leaveTime?: 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 ("baliseId" in data && data.baliseId != undefined) {
this.baliseId = data.baliseId;
}
if ("telegram" in data && data.telegram != undefined) {
this.telegram = data.telegram;
}
if ("arriveTime" in data && data.arriveTime != undefined) {
this.arriveTime = data.arriveTime;
}
if ("leaveTime" in data && data.leaveTime != undefined) {
this.leaveTime = data.leaveTime;
}
}
}
get baliseId() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set baliseId(value: string) {
pb_1.Message.setField(this, 1, value);
}
get telegram() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set telegram(value: string) {
pb_1.Message.setField(this, 2, value);
}
get arriveTime() {
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
}
set arriveTime(value: number) {
pb_1.Message.setField(this, 5, value);
}
get leaveTime() {
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
}
set leaveTime(value: number) {
pb_1.Message.setField(this, 6, value);
}
static fromObject(data: {
baliseId?: string;
telegram?: string;
arriveTime?: number;
leaveTime?: number;
}): TelegramState {
const message = new TelegramState({});
if (data.baliseId != null) {
message.baliseId = data.baliseId;
}
if (data.telegram != null) {
message.telegram = data.telegram;
}
if (data.arriveTime != null) {
message.arriveTime = data.arriveTime;
}
if (data.leaveTime != null) {
message.leaveTime = data.leaveTime;
}
return message;
}
toObject() {
const data: {
baliseId?: string;
telegram?: string;
arriveTime?: number;
leaveTime?: number;
} = {};
if (this.baliseId != null) {
data.baliseId = this.baliseId;
}
if (this.telegram != null) {
data.telegram = this.telegram;
}
if (this.arriveTime != null) {
data.arriveTime = this.arriveTime;
}
if (this.leaveTime != null) {
data.leaveTime = this.leaveTime;
}
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.baliseId.length)
writer.writeString(1, this.baliseId);
if (this.telegram.length)
writer.writeString(2, this.telegram);
if (this.arriveTime != 0)
writer.writeInt64(5, this.arriveTime);
if (this.leaveTime != 0)
writer.writeInt64(6, this.leaveTime);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TelegramState {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TelegramState();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.baliseId = reader.readString();
break;
case 2:
message.telegram = reader.readString();
break;
case 5:
message.arriveTime = reader.readInt64();
break;
case 6:
message.leaveTime = reader.readInt64();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): TelegramState {
return TelegramState.deserialize(bytes);
}
}
export class VobcBtmHistoryState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
sendCount?: number;
packetSendId?: number;
vobcLifeNum?: number;
sendTelegram?: string;
balisePacket?: string;
isFreePacket?: boolean;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("sendCount" in data && data.sendCount != undefined) {
this.sendCount = data.sendCount;
}
if ("packetSendId" in data && data.packetSendId != undefined) {
this.packetSendId = data.packetSendId;
}
if ("vobcLifeNum" in data && data.vobcLifeNum != undefined) {
this.vobcLifeNum = data.vobcLifeNum;
}
if ("sendTelegram" in data && data.sendTelegram != undefined) {
this.sendTelegram = data.sendTelegram;
}
if ("balisePacket" in data && data.balisePacket != undefined) {
this.balisePacket = data.balisePacket;
}
if ("isFreePacket" in data && data.isFreePacket != undefined) {
this.isFreePacket = data.isFreePacket;
}
}
}
get sendCount() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set sendCount(value: number) {
pb_1.Message.setField(this, 1, value);
}
get packetSendId() {
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
}
set packetSendId(value: number) {
pb_1.Message.setField(this, 2, value);
}
get vobcLifeNum() {
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set vobcLifeNum(value: number) {
pb_1.Message.setField(this, 3, value);
}
get sendTelegram() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set sendTelegram(value: string) {
pb_1.Message.setField(this, 4, value);
}
get balisePacket() {
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set balisePacket(value: string) {
pb_1.Message.setField(this, 5, value);
}
get isFreePacket() {
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
}
set isFreePacket(value: boolean) {
pb_1.Message.setField(this, 6, value);
}
static fromObject(data: {
sendCount?: number;
packetSendId?: number;
vobcLifeNum?: number;
sendTelegram?: string;
balisePacket?: string;
isFreePacket?: boolean;
}): VobcBtmHistoryState {
const message = new VobcBtmHistoryState({});
if (data.sendCount != null) {
message.sendCount = data.sendCount;
}
if (data.packetSendId != null) {
message.packetSendId = data.packetSendId;
}
if (data.vobcLifeNum != null) {
message.vobcLifeNum = data.vobcLifeNum;
}
if (data.sendTelegram != null) {
message.sendTelegram = data.sendTelegram;
}
if (data.balisePacket != null) {
message.balisePacket = data.balisePacket;
}
if (data.isFreePacket != null) {
message.isFreePacket = data.isFreePacket;
}
return message;
}
toObject() {
const data: {
sendCount?: number;
packetSendId?: number;
vobcLifeNum?: number;
sendTelegram?: string;
balisePacket?: string;
isFreePacket?: boolean;
} = {};
if (this.sendCount != null) {
data.sendCount = this.sendCount;
}
if (this.packetSendId != null) {
data.packetSendId = this.packetSendId;
}
if (this.vobcLifeNum != null) {
data.vobcLifeNum = this.vobcLifeNum;
}
if (this.sendTelegram != null) {
data.sendTelegram = this.sendTelegram;
}
if (this.balisePacket != null) {
data.balisePacket = this.balisePacket;
}
if (this.isFreePacket != null) {
data.isFreePacket = this.isFreePacket;
}
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.sendCount != 0)
writer.writeUint32(1, this.sendCount);
if (this.packetSendId != 0)
writer.writeUint32(2, this.packetSendId);
if (this.vobcLifeNum != 0)
writer.writeUint32(3, this.vobcLifeNum);
if (this.sendTelegram.length)
writer.writeString(4, this.sendTelegram);
if (this.balisePacket.length)
writer.writeString(5, this.balisePacket);
if (this.isFreePacket != false)
writer.writeBool(6, this.isFreePacket);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VobcBtmHistoryState {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VobcBtmHistoryState();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.sendCount = reader.readUint32();
break;
case 2:
message.packetSendId = reader.readUint32();
break;
case 3:
message.vobcLifeNum = reader.readUint32();
break;
case 4:
message.sendTelegram = reader.readString();
break;
case 5:
message.balisePacket = reader.readString();
break;
case 6:
message.isFreePacket = reader.readBool();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): VobcBtmHistoryState {
return VobcBtmHistoryState.deserialize(bytes);
}
}
}
export class SensorSpeedPulseCount extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {

View File

@ -9347,9 +9347,9 @@ export namespace graphicData {
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id != 0)
writer.writeInt32(1, this.id);
writer.writeUint32(1, this.id);
if (this.index != 0)
writer.writeInt32(2, this.index);
writer.writeUint32(2, this.index);
if (!w)
return writer.getResultBuffer();
}
@ -9360,10 +9360,10 @@ export namespace graphicData {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readInt32();
message.id = reader.readUint32();
break;
case 2:
message.index = reader.readInt32();
message.index = reader.readUint32();
break;
default: reader.skipField();
}