Squashed commit of the following:
Some checks failed
CI / Docker-Build (push) Failing after 7m7s

commit fe56bdc27d
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date:   Wed Aug 21 17:37:48 2024 +0800

    旋钮请求更改

commit 5313a00dc6
Author: fan <fanyuhong@joylink.club>
Date:   Wed Aug 21 16:57:21 2024 +0800

    proto同步

commit f73b171f15
Author: joylink_zhaoerwei <Bob_Engineer@163.com>
Date:   Mon Aug 12 18:00:50 2024 +0800

    计轴区段的显示和状态(待与后端测试)
This commit is contained in:
joylink_zhaoerwei 2024-08-21 17:40:34 +08:00
parent fbc12f12ee
commit cef4a47bbc
7 changed files with 476 additions and 214 deletions

@ -1 +1 @@
Subproject commit 74bea4e9955524f7254876c90af08d963f666585
Subproject commit b7336a5bbe670add791fd42ebcfe21bf58df6bc4

View File

@ -191,7 +191,7 @@ export interface TccOperationParams {
controlType: request.TrainControl.TrainControlType;
controlButton?: object;
driverKey?: object;
dirKey?: object;
switchKey?: object;
handler?: object;
}
export async function tccOperation(params: TccOperationParams) {

View File

@ -1280,6 +1280,7 @@ export namespace state {
vobcBtm?: VobcBtmState;
oldLink?: string;
oldLinkOffset?: number;
btmBaliseCache?: TrainBtmCache;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -1371,6 +1372,9 @@ export namespace state {
if ("oldLinkOffset" in data && data.oldLinkOffset != undefined) {
this.oldLinkOffset = data.oldLinkOffset;
}
if ("btmBaliseCache" in data && data.btmBaliseCache != undefined) {
this.btmBaliseCache = data.btmBaliseCache;
}
}
}
get id() {
@ -1577,6 +1581,15 @@ export namespace state {
set oldLinkOffset(value: number) {
pb_1.Message.setField(this, 29, value);
}
get btmBaliseCache() {
return pb_1.Message.getWrapperField(this, TrainBtmCache, 30) as TrainBtmCache;
}
set btmBaliseCache(value: TrainBtmCache) {
pb_1.Message.setWrapperField(this, 30, value);
}
get has_btmBaliseCache() {
return pb_1.Message.getField(this, 30) != null;
}
static fromObject(data: {
id?: string;
up?: boolean;
@ -1607,6 +1620,7 @@ export namespace state {
vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>;
oldLink?: string;
oldLinkOffset?: number;
btmBaliseCache?: ReturnType<typeof TrainBtmCache.prototype.toObject>;
}): TrainState {
const message = new TrainState({});
if (data.id != null) {
@ -1696,6 +1710,9 @@ export namespace state {
if (data.oldLinkOffset != null) {
message.oldLinkOffset = data.oldLinkOffset;
}
if (data.btmBaliseCache != null) {
message.btmBaliseCache = TrainBtmCache.fromObject(data.btmBaliseCache);
}
return message;
}
toObject() {
@ -1729,6 +1746,7 @@ export namespace state {
vobcBtm?: ReturnType<typeof VobcBtmState.prototype.toObject>;
oldLink?: string;
oldLinkOffset?: number;
btmBaliseCache?: ReturnType<typeof TrainBtmCache.prototype.toObject>;
} = {};
if (this.id != null) {
data.id = this.id;
@ -1817,6 +1835,9 @@ export namespace state {
if (this.oldLinkOffset != null) {
data.oldLinkOffset = this.oldLinkOffset;
}
if (this.btmBaliseCache != null) {
data.btmBaliseCache = this.btmBaliseCache.toObject();
}
return data;
}
serialize(): Uint8Array;
@ -1881,6 +1902,8 @@ export namespace state {
writer.writeString(28, this.oldLink);
if (this.oldLinkOffset != 0)
writer.writeInt64(29, this.oldLinkOffset);
if (this.has_btmBaliseCache)
writer.writeMessage(30, this.btmBaliseCache, () => this.btmBaliseCache.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
@ -1977,6 +2000,9 @@ export namespace state {
case 29:
message.oldLinkOffset = reader.readInt64();
break;
case 30:
reader.readMessage(message.btmBaliseCache, () => message.btmBaliseCache = TrainBtmCache.deserialize(reader));
break;
default: reader.skipField();
}
}
@ -1989,6 +2015,165 @@ export namespace state {
return TrainState.deserialize(bytes);
}
}
export class TrainBtmCache extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
dsn?: number;
baliseCount?: number;
messageCounter?: number;
resendBaliseId?: string;
baliseList?: BTMState[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [5], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("dsn" in data && data.dsn != undefined) {
this.dsn = data.dsn;
}
if ("baliseCount" in data && data.baliseCount != undefined) {
this.baliseCount = data.baliseCount;
}
if ("messageCounter" in data && data.messageCounter != undefined) {
this.messageCounter = data.messageCounter;
}
if ("resendBaliseId" in data && data.resendBaliseId != undefined) {
this.resendBaliseId = data.resendBaliseId;
}
if ("baliseList" in data && data.baliseList != undefined) {
this.baliseList = data.baliseList;
}
}
}
get dsn() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set dsn(value: number) {
pb_1.Message.setField(this, 1, value);
}
get baliseCount() {
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
}
set baliseCount(value: number) {
pb_1.Message.setField(this, 2, value);
}
get messageCounter() {
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set messageCounter(value: number) {
pb_1.Message.setField(this, 3, value);
}
get resendBaliseId() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set resendBaliseId(value: string) {
pb_1.Message.setField(this, 4, value);
}
get baliseList() {
return pb_1.Message.getRepeatedWrapperField(this, BTMState, 5) as BTMState[];
}
set baliseList(value: BTMState[]) {
pb_1.Message.setRepeatedWrapperField(this, 5, value);
}
static fromObject(data: {
dsn?: number;
baliseCount?: number;
messageCounter?: number;
resendBaliseId?: string;
baliseList?: ReturnType<typeof BTMState.prototype.toObject>[];
}): TrainBtmCache {
const message = new TrainBtmCache({});
if (data.dsn != null) {
message.dsn = data.dsn;
}
if (data.baliseCount != null) {
message.baliseCount = data.baliseCount;
}
if (data.messageCounter != null) {
message.messageCounter = data.messageCounter;
}
if (data.resendBaliseId != null) {
message.resendBaliseId = data.resendBaliseId;
}
if (data.baliseList != null) {
message.baliseList = data.baliseList.map(item => BTMState.fromObject(item));
}
return message;
}
toObject() {
const data: {
dsn?: number;
baliseCount?: number;
messageCounter?: number;
resendBaliseId?: string;
baliseList?: ReturnType<typeof BTMState.prototype.toObject>[];
} = {};
if (this.dsn != null) {
data.dsn = this.dsn;
}
if (this.baliseCount != null) {
data.baliseCount = this.baliseCount;
}
if (this.messageCounter != null) {
data.messageCounter = this.messageCounter;
}
if (this.resendBaliseId != null) {
data.resendBaliseId = this.resendBaliseId;
}
if (this.baliseList != null) {
data.baliseList = this.baliseList.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.dsn != 0)
writer.writeUint32(1, this.dsn);
if (this.baliseCount != 0)
writer.writeUint32(2, this.baliseCount);
if (this.messageCounter != 0)
writer.writeUint32(3, this.messageCounter);
if (this.resendBaliseId.length)
writer.writeString(4, this.resendBaliseId);
if (this.baliseList.length)
writer.writeRepeatedMessage(5, this.baliseList, (item: BTMState) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TrainBtmCache {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TrainBtmCache();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.dsn = reader.readUint32();
break;
case 2:
message.baliseCount = reader.readUint32();
break;
case 3:
message.messageCounter = reader.readUint32();
break;
case 4:
message.resendBaliseId = reader.readString();
break;
case 5:
reader.readMessage(message.baliseList, () => pb_1.Message.addToRepeatedWrapperField(message, 5, BTMState.deserialize(reader), BTMState));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): TrainBtmCache {
return TrainBtmCache.deserialize(bytes);
}
}
export class VobcBtmState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
@ -3202,6 +3387,7 @@ export namespace state {
lightDir1?: boolean;
lightDir2?: boolean;
lightDriverActive?: boolean;
trainConnInitComplate?: boolean;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -3437,6 +3623,9 @@ export namespace state {
if ("lightDriverActive" in data && data.lightDriverActive != undefined) {
this.lightDriverActive = data.lightDriverActive;
}
if ("trainConnInitComplate" in data && data.trainConnInitComplate != undefined) {
this.trainConnInitComplate = data.trainConnInitComplate;
}
}
}
get lifeSignal() {
@ -3901,6 +4090,12 @@ export namespace state {
set lightDriverActive(value: boolean) {
pb_1.Message.setField(this, 81, value);
}
get trainConnInitComplate() {
return pb_1.Message.getFieldWithDefault(this, 82, false) as boolean;
}
set trainConnInitComplate(value: boolean) {
pb_1.Message.setField(this, 82, value);
}
static fromObject(data: {
lifeSignal?: number;
tc1Active?: boolean;
@ -3979,6 +4174,7 @@ export namespace state {
lightDir1?: boolean;
lightDir2?: boolean;
lightDriverActive?: boolean;
trainConnInitComplate?: boolean;
}): TrainVobcState {
const message = new TrainVobcState({});
if (data.lifeSignal != null) {
@ -4212,6 +4408,9 @@ export namespace state {
if (data.lightDriverActive != null) {
message.lightDriverActive = data.lightDriverActive;
}
if (data.trainConnInitComplate != null) {
message.trainConnInitComplate = data.trainConnInitComplate;
}
return message;
}
toObject() {
@ -4293,6 +4492,7 @@ export namespace state {
lightDir1?: boolean;
lightDir2?: boolean;
lightDriverActive?: boolean;
trainConnInitComplate?: boolean;
} = {};
if (this.lifeSignal != null) {
data.lifeSignal = this.lifeSignal;
@ -4525,6 +4725,9 @@ export namespace state {
if (this.lightDriverActive != null) {
data.lightDriverActive = this.lightDriverActive;
}
if (this.trainConnInitComplate != null) {
data.trainConnInitComplate = this.trainConnInitComplate;
}
return data;
}
serialize(): Uint8Array;
@ -4685,6 +4888,8 @@ export namespace state {
writer.writeBool(80, this.lightDir2);
if (this.lightDriverActive != false)
writer.writeBool(81, this.lightDriverActive);
if (this.trainConnInitComplate != false)
writer.writeBool(82, this.trainConnInitComplate);
if (!w)
return writer.getResultBuffer();
}
@ -4925,6 +5130,9 @@ export namespace state {
case 81:
message.lightDriverActive = reader.readBool();
break;
case 82:
message.trainConnInitComplate = reader.readBool();
break;
default: reader.skipField();
}
}
@ -6606,105 +6814,26 @@ export namespace state {
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 {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
dataSerialNumber?: number;
baliseCount?: number;
messageCounter?: number;
telegram?: string;
distance?: number;
aboveBalise?: boolean;
baliseTelegramForPcSimResend?: string;
telegram128?: string;
baliseId?: string;
isSend?: boolean;
unpack?: boolean;
baliseType?: number;
hasData?: boolean;
resendCount?: 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 ("dataSerialNumber" in data && data.dataSerialNumber != undefined) {
this.dataSerialNumber = data.dataSerialNumber;
}
if ("baliseCount" in data && data.baliseCount != undefined) {
this.baliseCount = data.baliseCount;
}
if ("messageCounter" in data && data.messageCounter != undefined) {
this.messageCounter = data.messageCounter;
}
if ("telegram" in data && data.telegram != undefined) {
this.telegram = data.telegram;
}
if ("distance" in data && data.distance != undefined) {
this.distance = data.distance;
}
if ("aboveBalise" in data && data.aboveBalise != undefined) {
this.aboveBalise = data.aboveBalise;
}
@ -6720,96 +6849,96 @@ export namespace state {
if ("isSend" in data && data.isSend != undefined) {
this.isSend = data.isSend;
}
if ("unpack" in data && data.unpack != undefined) {
this.unpack = data.unpack;
}
if ("baliseType" in data && data.baliseType != undefined) {
this.baliseType = data.baliseType;
}
if ("hasData" in data && data.hasData != undefined) {
this.hasData = data.hasData;
}
if ("resendCount" in data && data.resendCount != undefined) {
this.resendCount = data.resendCount;
}
}
get dataSerialNumber() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set dataSerialNumber(value: number) {
pb_1.Message.setField(this, 1, value);
}
get baliseCount() {
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
}
set baliseCount(value: number) {
pb_1.Message.setField(this, 2, value);
}
get messageCounter() {
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set messageCounter(value: number) {
pb_1.Message.setField(this, 3, value);
}
get telegram() {
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set telegram(value: string) {
pb_1.Message.setField(this, 4, value);
}
get distance() {
return pb_1.Message.getFieldWithDefault(this, 5, 0) as number;
}
set distance(value: number) {
pb_1.Message.setField(this, 5, value);
pb_1.Message.setField(this, 1, value);
}
get aboveBalise() {
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean;
}
set aboveBalise(value: boolean) {
pb_1.Message.setField(this, 6, value);
pb_1.Message.setField(this, 2, value);
}
get baliseTelegramForPcSimResend() {
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set baliseTelegramForPcSimResend(value: string) {
pb_1.Message.setField(this, 7, value);
pb_1.Message.setField(this, 3, value);
}
get telegram128() {
return pb_1.Message.getFieldWithDefault(this, 8, "") as string;
return pb_1.Message.getFieldWithDefault(this, 4, "") as string;
}
set telegram128(value: string) {
pb_1.Message.setField(this, 8, value);
pb_1.Message.setField(this, 4, value);
}
get baliseId() {
return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
return pb_1.Message.getFieldWithDefault(this, 5, "") as string;
}
set baliseId(value: string) {
pb_1.Message.setField(this, 9, value);
pb_1.Message.setField(this, 5, value);
}
get isSend() {
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
}
set isSend(value: boolean) {
pb_1.Message.setField(this, 6, value);
}
get unpack() {
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
}
set unpack(value: boolean) {
pb_1.Message.setField(this, 7, value);
}
get baliseType() {
return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
}
set baliseType(value: number) {
pb_1.Message.setField(this, 8, value);
}
get hasData() {
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
}
set hasData(value: boolean) {
pb_1.Message.setField(this, 9, value);
}
get resendCount() {
return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
}
set resendCount(value: number) {
pb_1.Message.setField(this, 10, value);
}
static fromObject(data: {
dataSerialNumber?: number;
baliseCount?: number;
messageCounter?: number;
telegram?: string;
distance?: number;
aboveBalise?: boolean;
baliseTelegramForPcSimResend?: string;
telegram128?: string;
baliseId?: string;
isSend?: boolean;
unpack?: boolean;
baliseType?: number;
hasData?: boolean;
resendCount?: number;
}): BTMState {
const message = new BTMState({});
if (data.dataSerialNumber != null) {
message.dataSerialNumber = data.dataSerialNumber;
}
if (data.baliseCount != null) {
message.baliseCount = data.baliseCount;
}
if (data.messageCounter != null) {
message.messageCounter = data.messageCounter;
}
if (data.telegram != null) {
message.telegram = data.telegram;
}
if (data.distance != null) {
message.distance = data.distance;
}
if (data.aboveBalise != null) {
message.aboveBalise = data.aboveBalise;
}
@ -6825,36 +6954,36 @@ export namespace state {
if (data.isSend != null) {
message.isSend = data.isSend;
}
if (data.unpack != null) {
message.unpack = data.unpack;
}
if (data.baliseType != null) {
message.baliseType = data.baliseType;
}
if (data.hasData != null) {
message.hasData = data.hasData;
}
if (data.resendCount != null) {
message.resendCount = data.resendCount;
}
return message;
}
toObject() {
const data: {
dataSerialNumber?: number;
baliseCount?: number;
messageCounter?: number;
telegram?: string;
distance?: number;
aboveBalise?: boolean;
baliseTelegramForPcSimResend?: string;
telegram128?: string;
baliseId?: string;
isSend?: boolean;
unpack?: boolean;
baliseType?: number;
hasData?: boolean;
resendCount?: number;
} = {};
if (this.dataSerialNumber != null) {
data.dataSerialNumber = this.dataSerialNumber;
}
if (this.baliseCount != null) {
data.baliseCount = this.baliseCount;
}
if (this.messageCounter != null) {
data.messageCounter = this.messageCounter;
}
if (this.telegram != null) {
data.telegram = this.telegram;
}
if (this.distance != null) {
data.distance = this.distance;
}
if (this.aboveBalise != null) {
data.aboveBalise = this.aboveBalise;
}
@ -6870,32 +6999,44 @@ export namespace state {
if (this.isSend != null) {
data.isSend = this.isSend;
}
if (this.unpack != null) {
data.unpack = this.unpack;
}
if (this.baliseType != null) {
data.baliseType = this.baliseType;
}
if (this.hasData != null) {
data.hasData = this.hasData;
}
if (this.resendCount != null) {
data.resendCount = this.resendCount;
}
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.dataSerialNumber != 0)
writer.writeUint32(1, this.dataSerialNumber);
if (this.baliseCount != 0)
writer.writeUint32(2, this.baliseCount);
if (this.messageCounter != 0)
writer.writeUint32(3, this.messageCounter);
if (this.telegram.length)
writer.writeString(4, this.telegram);
if (this.distance != 0)
writer.writeInt64(5, this.distance);
writer.writeString(1, this.telegram);
if (this.aboveBalise != false)
writer.writeBool(6, this.aboveBalise);
writer.writeBool(2, this.aboveBalise);
if (this.baliseTelegramForPcSimResend.length)
writer.writeString(7, this.baliseTelegramForPcSimResend);
writer.writeString(3, this.baliseTelegramForPcSimResend);
if (this.telegram128.length)
writer.writeString(8, this.telegram128);
writer.writeString(4, this.telegram128);
if (this.baliseId.length)
writer.writeString(9, this.baliseId);
writer.writeString(5, this.baliseId);
if (this.isSend != false)
writer.writeBool(10, this.isSend);
writer.writeBool(6, this.isSend);
if (this.unpack != false)
writer.writeBool(7, this.unpack);
if (this.baliseType != 0)
writer.writeInt32(8, this.baliseType);
if (this.hasData != false)
writer.writeBool(9, this.hasData);
if (this.resendCount != 0)
writer.writeUint32(10, this.resendCount);
if (!w)
return writer.getResultBuffer();
}
@ -6906,35 +7047,35 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.dataSerialNumber = reader.readUint32();
break;
case 2:
message.baliseCount = reader.readUint32();
break;
case 3:
message.messageCounter = reader.readUint32();
break;
case 4:
message.telegram = reader.readString();
break;
case 5:
message.distance = reader.readInt64();
break;
case 6:
case 2:
message.aboveBalise = reader.readBool();
break;
case 7:
case 3:
message.baliseTelegramForPcSimResend = reader.readString();
break;
case 8:
case 4:
message.telegram128 = reader.readString();
break;
case 9:
case 5:
message.baliseId = reader.readString();
break;
case 10:
case 6:
message.isSend = reader.readBool();
break;
case 7:
message.unpack = reader.readBool();
break;
case 8:
message.baliseType = reader.readInt32();
break;
case 9:
message.hasData = reader.readBool();
break;
case 10:
message.resendCount = reader.readUint32();
break;
default: reader.skipField();
}
}

View File

@ -1423,7 +1423,7 @@ export namespace request {
controlType?: TrainControl.TrainControlType;
controlButton?: TrainControl.ControlButton;
driverKey?: TrainControl.DriverKeySwitch;
dirKey?: TrainControl.DirectionKeySwitch;
switchKey?: TrainControl.SwitchKeyChange;
handler?: TrainControl.PushHandler;
}) {
super();
@ -1447,8 +1447,8 @@ export namespace request {
if ("driverKey" in data && data.driverKey != undefined) {
this.driverKey = data.driverKey;
}
if ("dirKey" in data && data.dirKey != undefined) {
this.dirKey = data.dirKey;
if ("switchKey" in data && data.switchKey != undefined) {
this.switchKey = data.switchKey;
}
if ("handler" in data && data.handler != undefined) {
this.handler = data.handler;
@ -1497,13 +1497,13 @@ export namespace request {
get has_driverKey() {
return pb_1.Message.getField(this, 6) != null;
}
get dirKey() {
return pb_1.Message.getWrapperField(this, TrainControl.DirectionKeySwitch, 7) as TrainControl.DirectionKeySwitch;
get switchKey() {
return pb_1.Message.getWrapperField(this, TrainControl.SwitchKeyChange, 7) as TrainControl.SwitchKeyChange;
}
set dirKey(value: TrainControl.DirectionKeySwitch) {
set switchKey(value: TrainControl.SwitchKeyChange) {
pb_1.Message.setWrapperField(this, 7, value);
}
get has_dirKey() {
get has_switchKey() {
return pb_1.Message.getField(this, 7) != null;
}
get handler() {
@ -1522,7 +1522,7 @@ export namespace request {
controlType?: TrainControl.TrainControlType;
controlButton?: ReturnType<typeof TrainControl.ControlButton.prototype.toObject>;
driverKey?: ReturnType<typeof TrainControl.DriverKeySwitch.prototype.toObject>;
dirKey?: ReturnType<typeof TrainControl.DirectionKeySwitch.prototype.toObject>;
switchKey?: ReturnType<typeof TrainControl.SwitchKeyChange.prototype.toObject>;
handler?: ReturnType<typeof TrainControl.PushHandler.prototype.toObject>;
}): TrainControl {
const message = new TrainControl({});
@ -1544,8 +1544,8 @@ export namespace request {
if (data.driverKey != null) {
message.driverKey = TrainControl.DriverKeySwitch.fromObject(data.driverKey);
}
if (data.dirKey != null) {
message.dirKey = TrainControl.DirectionKeySwitch.fromObject(data.dirKey);
if (data.switchKey != null) {
message.switchKey = TrainControl.SwitchKeyChange.fromObject(data.switchKey);
}
if (data.handler != null) {
message.handler = TrainControl.PushHandler.fromObject(data.handler);
@ -1560,7 +1560,7 @@ export namespace request {
controlType?: TrainControl.TrainControlType;
controlButton?: ReturnType<typeof TrainControl.ControlButton.prototype.toObject>;
driverKey?: ReturnType<typeof TrainControl.DriverKeySwitch.prototype.toObject>;
dirKey?: ReturnType<typeof TrainControl.DirectionKeySwitch.prototype.toObject>;
switchKey?: ReturnType<typeof TrainControl.SwitchKeyChange.prototype.toObject>;
handler?: ReturnType<typeof TrainControl.PushHandler.prototype.toObject>;
} = {};
if (this.simulationId != null) {
@ -1581,8 +1581,8 @@ export namespace request {
if (this.driverKey != null) {
data.driverKey = this.driverKey.toObject();
}
if (this.dirKey != null) {
data.dirKey = this.dirKey.toObject();
if (this.switchKey != null) {
data.switchKey = this.switchKey.toObject();
}
if (this.handler != null) {
data.handler = this.handler.toObject();
@ -1605,8 +1605,8 @@ export namespace request {
writer.writeMessage(5, this.controlButton, () => this.controlButton.serialize(writer));
if (this.has_driverKey)
writer.writeMessage(6, this.driverKey, () => this.driverKey.serialize(writer));
if (this.has_dirKey)
writer.writeMessage(7, this.dirKey, () => this.dirKey.serialize(writer));
if (this.has_switchKey)
writer.writeMessage(7, this.switchKey, () => this.switchKey.serialize(writer));
if (this.has_handler)
writer.writeMessage(8, this.handler, () => this.handler.serialize(writer));
if (!w)
@ -1637,7 +1637,7 @@ export namespace request {
reader.readMessage(message.driverKey, () => message.driverKey = TrainControl.DriverKeySwitch.deserialize(reader));
break;
case 7:
reader.readMessage(message.dirKey, () => message.dirKey = TrainControl.DirectionKeySwitch.deserialize(reader));
reader.readMessage(message.switchKey, () => message.switchKey = TrainControl.SwitchKeyChange.deserialize(reader));
break;
case 8:
reader.readMessage(message.handler, () => message.handler = TrainControl.PushHandler.deserialize(reader));
@ -1659,12 +1659,13 @@ export namespace request {
EMERGENT_BUTTON = 0,
DRIVER_KEY_SWITCH = 1,
DIRECTION_KEY_SWITCH = 2,
HANDLER = 3
HANDLER = 3,
TRAIN_DOOR_MODE_CHANGE = 4
}
export enum Direction {
BACKWARD = 0,
FORWARD = 1,
NEUTRALWARD = 2
export enum KeyLocation {
KL_END = 0,
KL_FONT = 1,
KL_CENTER = 2
}
export class ControlButton extends pb_1.Message {
#one_of_decls: number[][] = [];
@ -1867,7 +1868,7 @@ export namespace request {
return DriverKeySwitch.deserialize(bytes);
}
}
export class DirectionKeySwitch extends pb_1.Message {
export class SwitchKeyChange extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
val?: number;
@ -1888,8 +1889,8 @@ export namespace request {
}
static fromObject(data: {
val?: number;
}): DirectionKeySwitch {
const message = new DirectionKeySwitch({});
}): SwitchKeyChange {
const message = new SwitchKeyChange({});
if (data.val != null) {
message.val = data.val;
}
@ -1913,8 +1914,8 @@ export namespace request {
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DirectionKeySwitch {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DirectionKeySwitch();
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SwitchKeyChange {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SwitchKeyChange();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
@ -1930,8 +1931,8 @@ export namespace request {
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): DirectionKeySwitch {
return DirectionKeySwitch.deserialize(bytes);
static deserializeBinary(bytes: Uint8Array): SwitchKeyChange {
return SwitchKeyChange.deserialize(bytes);
}
}
export class PushHandler extends pb_1.Message {

View File

@ -58,9 +58,10 @@ export namespace graphicData {
lianSuoData?: LianSuoData;
holdButtons?: HoldButton[];
unattengedButtons?: UnattengedButton[];
kilometerMarkCalibrations?: KilometerMarkCalibration[];
}) {
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, 45, 46, 47, 50, 51], 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, 47, 50, 51, 52], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("canvas" in data && data.canvas != undefined) {
this.canvas = data.canvas;
@ -197,6 +198,9 @@ export namespace graphicData {
if ("unattengedButtons" in data && data.unattengedButtons != undefined) {
this.unattengedButtons = data.unattengedButtons;
}
if ("kilometerMarkCalibrations" in data && data.kilometerMarkCalibrations != undefined) {
this.kilometerMarkCalibrations = data.kilometerMarkCalibrations;
}
}
}
get canvas() {
@ -484,6 +488,12 @@ export namespace graphicData {
set unattengedButtons(value: UnattengedButton[]) {
pb_1.Message.setRepeatedWrapperField(this, 51, value);
}
get kilometerMarkCalibrations() {
return pb_1.Message.getRepeatedWrapperField(this, KilometerMarkCalibration, 52) as KilometerMarkCalibration[];
}
set kilometerMarkCalibrations(value: KilometerMarkCalibration[]) {
pb_1.Message.setRepeatedWrapperField(this, 52, value);
}
static fromObject(data: {
canvas?: ReturnType<typeof Canvas.prototype.toObject>;
Platforms?: ReturnType<typeof Platform.prototype.toObject>[];
@ -530,6 +540,7 @@ export namespace graphicData {
lianSuoData?: ReturnType<typeof LianSuoData.prototype.toObject>;
holdButtons?: ReturnType<typeof HoldButton.prototype.toObject>[];
unattengedButtons?: ReturnType<typeof UnattengedButton.prototype.toObject>[];
kilometerMarkCalibrations?: ReturnType<typeof KilometerMarkCalibration.prototype.toObject>[];
}): RtssGraphicStorage {
const message = new RtssGraphicStorage({});
if (data.canvas != null) {
@ -667,6 +678,9 @@ export namespace graphicData {
if (data.unattengedButtons != null) {
message.unattengedButtons = data.unattengedButtons.map(item => UnattengedButton.fromObject(item));
}
if (data.kilometerMarkCalibrations != null) {
message.kilometerMarkCalibrations = data.kilometerMarkCalibrations.map(item => KilometerMarkCalibration.fromObject(item));
}
return message;
}
toObject() {
@ -716,6 +730,7 @@ export namespace graphicData {
lianSuoData?: ReturnType<typeof LianSuoData.prototype.toObject>;
holdButtons?: ReturnType<typeof HoldButton.prototype.toObject>[];
unattengedButtons?: ReturnType<typeof UnattengedButton.prototype.toObject>[];
kilometerMarkCalibrations?: ReturnType<typeof KilometerMarkCalibration.prototype.toObject>[];
} = {};
if (this.canvas != null) {
data.canvas = this.canvas.toObject();
@ -852,6 +867,9 @@ export namespace graphicData {
if (this.unattengedButtons != null) {
data.unattengedButtons = this.unattengedButtons.map((item: UnattengedButton) => item.toObject());
}
if (this.kilometerMarkCalibrations != null) {
data.kilometerMarkCalibrations = this.kilometerMarkCalibrations.map((item: KilometerMarkCalibration) => item.toObject());
}
return data;
}
serialize(): Uint8Array;
@ -948,6 +966,8 @@ export namespace graphicData {
writer.writeRepeatedMessage(50, this.holdButtons, (item: HoldButton) => item.serialize(writer));
if (this.unattengedButtons.length)
writer.writeRepeatedMessage(51, this.unattengedButtons, (item: UnattengedButton) => item.serialize(writer));
if (this.kilometerMarkCalibrations.length)
writer.writeRepeatedMessage(52, this.kilometerMarkCalibrations, (item: KilometerMarkCalibration) => item.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
@ -1092,6 +1112,9 @@ export namespace graphicData {
case 51:
reader.readMessage(message.unattengedButtons, () => pb_1.Message.addToRepeatedWrapperField(message, 51, UnattengedButton.deserialize(reader), UnattengedButton));
break;
case 52:
reader.readMessage(message.kilometerMarkCalibrations, () => pb_1.Message.addToRepeatedWrapperField(message, 52, KilometerMarkCalibration.deserialize(reader), KilometerMarkCalibration));
break;
default: reader.skipField();
}
}
@ -10023,4 +10046,100 @@ export namespace graphicData {
return HoldButton.deserialize(bytes);
}
}
export class KilometerMarkCalibration extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
actualKm?: KilometerSystem;
designKm?: KilometerSystem;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("actualKm" in data && data.actualKm != undefined) {
this.actualKm = data.actualKm;
}
if ("designKm" in data && data.designKm != undefined) {
this.designKm = data.designKm;
}
}
}
get actualKm() {
return pb_1.Message.getWrapperField(this, KilometerSystem, 1) as KilometerSystem;
}
set actualKm(value: KilometerSystem) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_actualKm() {
return pb_1.Message.getField(this, 1) != null;
}
get designKm() {
return pb_1.Message.getWrapperField(this, KilometerSystem, 2) as KilometerSystem;
}
set designKm(value: KilometerSystem) {
pb_1.Message.setWrapperField(this, 2, value);
}
get has_designKm() {
return pb_1.Message.getField(this, 2) != null;
}
static fromObject(data: {
actualKm?: ReturnType<typeof KilometerSystem.prototype.toObject>;
designKm?: ReturnType<typeof KilometerSystem.prototype.toObject>;
}): KilometerMarkCalibration {
const message = new KilometerMarkCalibration({});
if (data.actualKm != null) {
message.actualKm = KilometerSystem.fromObject(data.actualKm);
}
if (data.designKm != null) {
message.designKm = KilometerSystem.fromObject(data.designKm);
}
return message;
}
toObject() {
const data: {
actualKm?: ReturnType<typeof KilometerSystem.prototype.toObject>;
designKm?: ReturnType<typeof KilometerSystem.prototype.toObject>;
} = {};
if (this.actualKm != null) {
data.actualKm = this.actualKm.toObject();
}
if (this.designKm != null) {
data.designKm = this.designKm.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.has_actualKm)
writer.writeMessage(1, this.actualKm, () => this.actualKm.serialize(writer));
if (this.has_designKm)
writer.writeMessage(2, this.designKm, () => this.designKm.serialize(writer));
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): KilometerMarkCalibration {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new KilometerMarkCalibration();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.actualKm, () => message.actualKm = KilometerSystem.deserialize(reader));
break;
case 2:
reader.readMessage(message.designKm, () => message.designKm = KilometerSystem.deserialize(reader));
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): KilometerMarkCalibration {
return KilometerMarkCalibration.deserialize(bytes);
}
}
}

View File

@ -593,7 +593,8 @@ export namespace tccGraphicData {
export namespace TccKey {
export enum TccKeyType {
driverControllerActivationClint = 0,
frontAndRearDirectionalControl = 1
frontAndRearDirectionalControl = 1,
trainDoorMode = 2
}
}
export class TccHandle extends pb_1.Message {

View File

@ -85,7 +85,7 @@ export const useTccStore = defineStore('tcc', {
trainId: this.tccId + '',
deviceId: this.tccKeyDirId,
controlType: request.TrainControl.TrainControlType.DIRECTION_KEY_SWITCH,
dirKey: {
switchKey: {
val: position,
},
})