From e894f02e387f77f77f06fe50cd36e1dec70c8d46 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 3 Apr 2024 11:17:12 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=97=E8=BD=A6=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E5=8F=B0=E4=BA=A4=E4=BA=92=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drawApp/graphics/TccHandleInteraction.ts | 36 +++++--------------- src/drawApp/tccScene.ts | 3 ++ src/graphics/tccHandle/TccHandle.ts | 2 +- src/stores/tcc-store.ts | 28 +++++++++++++++ 4 files changed, 40 insertions(+), 29 deletions(-) diff --git a/src/drawApp/graphics/TccHandleInteraction.ts b/src/drawApp/graphics/TccHandleInteraction.ts index 812429e..c625b47 100644 --- a/src/drawApp/graphics/TccHandleInteraction.ts +++ b/src/drawApp/graphics/TccHandleInteraction.ts @@ -10,10 +10,6 @@ import { state } from 'src/protos/device_state'; import { GraphicInteractionPlugin, IGraphicScene, JlGraphic } from 'jl-graphic'; import { type FederatedMouseEvent, DisplayObject } from 'pixi.js'; import { useTccStore } from 'src/stores/tcc-store'; -import { useLineStore } from 'src/stores/line-store'; -import { tccOperation } from 'src/api/Simulation'; -import { errorNotify } from 'src/utils/CommonNotify'; -import { request } from 'src/protos/request'; export class TccHandleData extends GraphicDataBase implements ITccHandleData { constructor(data?: tccGraphicData.TccHandle) { @@ -103,15 +99,15 @@ export class TccHandleInteraction extends GraphicInteractionPlugin { g._tccHandle.eventMode = 'static'; g._tccHandle.cursor = 'Move'; g._tccHandle.onmousedown = (e) => { + e.stopPropagation(); this.onMouseDown(e); }; g._tccHandle.onmouseup = (e) => { - this.onMouseUp(e); + e.stopPropagation(); + this.onMouseUp(); }; g.onmousemove = (e) => { - this.onMouseMove(e); - }; - g.onmouseleave = (e) => { + e.stopPropagation(); this.onMouseMove(e); }; } @@ -120,12 +116,13 @@ export class TccHandleInteraction extends GraphicInteractionPlugin { g._tccHandle.onmousedown = null; g._tccHandle.onmouseup = null; g.onmousemove = null; - g.onmouseleave = null; } onMouseDown(e: FederatedMouseEvent) { const target = e.target as DisplayObject; const tccHandle = target.getGraphic(); if (!tccHandle) return; + useTccStore().tccHandleId = tccHandle.id; + useTccStore().mouseDownOnTccHandle = true; this.isMouseDown = true; this.mouseDownBeginPos = e.clientY; this.mouseDownTccHandleBeginPos = tccHandle._tccHandle.y; @@ -149,25 +146,8 @@ export class TccHandleInteraction extends GraphicInteractionPlugin { } } } - onMouseUp(e: FederatedMouseEvent) { + onMouseUp() { this.isMouseDown = false; - const simulationId = useLineStore().simulationId; - const mapId = useLineStore().mapId; - const tccId = useTccStore().tccId; - const target = e.target as DisplayObject; - const tccHandle = target.getGraphic(); - if (!tccHandle || !simulationId || !mapId) return; - const handleVal = Math.floor(-(tccHandle._tccHandle.y / 144) * 100); - tccOperation({ - simulationId, - trainId: tccId + '', - deviceId: tccHandle.id, - controlType: request.TrainControl.TrainControlType.HANDLER, - handler: { - val: handleVal, - }, - }).catch((err) => { - errorNotify('操作失败', { message: err.origin.response.data.title }); - }); + useTccStore().mouseDownOnTccHandle = false; } } diff --git a/src/drawApp/tccScene.ts b/src/drawApp/tccScene.ts index c007eb9..a882aa9 100644 --- a/src/drawApp/tccScene.ts +++ b/src/drawApp/tccScene.ts @@ -59,6 +59,9 @@ export function initTccScene(lineApp: IGraphicApp, sceneName: string) { }; tccScene.canvas.onmouseup = () => { tccStore.canvasMouseDown = false; + if (tccStore.mouseDownOnTccHandle) { + tccStore.onMouseUpFromTccHandle(); + } }; lineApp.on('destroy', () => { tccScene.canvas.onmousedown = null; diff --git a/src/graphics/tccHandle/TccHandle.ts b/src/graphics/tccHandle/TccHandle.ts index c346e01..9a9ee93 100644 --- a/src/graphics/tccHandle/TccHandle.ts +++ b/src/graphics/tccHandle/TccHandle.ts @@ -54,7 +54,7 @@ export class TccHandle extends JlGraphic { return this.getStates(); } doRepaint(): void { - this._tccHandle.y = -Math.floor((this.state.gear * 144) / 100); + this._tccHandle.y = -(this.state.gear * 144) / 100; this._tccHandle.texture = this.tccHandleTextures.tccHandle; } } diff --git a/src/stores/tcc-store.ts b/src/stores/tcc-store.ts index 1b7c1de..161b3e6 100644 --- a/src/stores/tcc-store.ts +++ b/src/stores/tcc-store.ts @@ -1,6 +1,11 @@ import { defineStore } from 'pinia'; import { initTccScene } from 'src/drawApp/tccScene'; import { getLineApp } from 'src/drawApp/lineApp'; +import { useLineStore } from './line-store'; +import { tccOperation } from 'src/api/Simulation'; +import { errorNotify } from 'src/utils/CommonNotify'; +import { request } from 'src/protos/request'; +import { TccHandle } from 'src/graphics/tccHandle/TccHandle'; export const useTccStore = defineStore('tcc', { state: () => ({ @@ -8,6 +13,8 @@ export const useTccStore = defineStore('tcc', { tccId: 0, isTccDialogOpen: false, canvasMouseDown: false, + mouseDownOnTccHandle: false, + tccHandleId: 0, }), actions: { getTccScene() { @@ -30,5 +37,26 @@ export const useTccStore = defineStore('tcc', { this.trainControlMapId = 0; this.isTccDialogOpen = false; }, + onMouseUpFromTccHandle() { + const simulationId = useLineStore().simulationId; + const tccHandle = this.getTccScene().queryStore.queryById( + this.tccHandleId + ); + if (!simulationId) return; + const handleVal = Number( + (-(tccHandle._tccHandle.y / 144) * 100).toFixed() + ); + tccOperation({ + simulationId, + trainId: this.tccId + '', + deviceId: this.tccHandleId, + controlType: request.TrainControl.TrainControlType.HANDLER, + handler: { + val: handleVal, + }, + }).catch((err) => { + errorNotify('操作失败', { message: err.origin.response.data.title }); + }); + }, }, }); From bd73f65860d87279223c821ea056de66f8791fe7 Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 3 Apr 2024 14:56:06 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=88=97=E8=BD=A6=E9=A9=BE=E9=A9=B6?= =?UTF-8?q?=E5=8F=B0=E4=BA=A4=E4=BA=92=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/drawApp/graphics/TccKeyInteraction.ts | 83 +++++++++-------------- src/drawApp/tccScene.ts | 5 ++ src/stores/tcc-store.ts | 33 +++++++++ 3 files changed, 71 insertions(+), 50 deletions(-) diff --git a/src/drawApp/graphics/TccKeyInteraction.ts b/src/drawApp/graphics/TccKeyInteraction.ts index 32e6059..25b61ea 100644 --- a/src/drawApp/graphics/TccKeyInteraction.ts +++ b/src/drawApp/graphics/TccKeyInteraction.ts @@ -96,7 +96,7 @@ export enum KeyRotationMethod { export interface IKeyInteractionConfig { gearPositionAmount?: number; keyRotationMethod: KeyRotationMethod; - doAfterChangeRotation: (g: JlGraphic, rotation: number) => void; + doAfterChangeRotation: () => void; } export abstract class KeyInteraction< G extends JlGraphic @@ -105,6 +105,7 @@ export abstract class KeyInteraction< ratatingSprite: Sprite = new Sprite(); mouseDownBeginPos = new Point(); mouseDownBeginRotation = 0; + changeRotation = 0; keyInteractionConfig: IKeyInteractionConfig; lastTimenRotation = 0; constructor( @@ -122,11 +123,17 @@ export abstract class KeyInteraction< g.onmouseup = (e) => { e.stopPropagation(); this.isMouseDown = false; + this.keyInteractionConfig.doAfterChangeRotation(); + }; + g.onmousedown = () => { + useTccStore().tccKeyDirId = g.id; + useTccStore().mouseDownOnTccKeyDir = true; }; } totalUnbind(g: G): void { g.onmousemove = null; g.onmouseup = null; + g.onmousedown = null; } keyBind(g: Sprite): void { this.ratatingSprite = g; @@ -147,6 +154,7 @@ export abstract class KeyInteraction< this.isMouseDown = true; this.mouseDownBeginPos = this.app.toCanvasCoordinates(e.global); this.mouseDownBeginRotation = this.ratatingSprite.rotation; + this.changeRotation = this.mouseDownBeginRotation; this.lastTimenRotation = this.ratatingSprite.rotation; } onMousemove(e: FederatedMouseEvent) { @@ -160,45 +168,46 @@ export abstract class KeyInteraction< g.position, mouseEndPos ); - let changeRotation = 0; if ( this.keyInteractionConfig.keyRotationMethod == KeyRotationMethod.jumpChange ) { if (direction == 'ssz') { if (angle < 45) { - changeRotation = this.mouseDownBeginRotation; - } - if ( + this.changeRotation = this.mouseDownBeginRotation; + } else if ( angle >= 45 && angle < 90 && this.mouseDownBeginRotation !== Math.PI / 4 ) { - changeRotation = this.mouseDownBeginRotation + Math.PI / 4; + this.changeRotation = this.mouseDownBeginRotation + Math.PI / 4; } else if ( angle >= 90 && this.mouseDownBeginRotation == -Math.PI / 4 ) { - changeRotation = this.mouseDownBeginRotation + Math.PI / 2; - } - if (this.lastTimenRotation !== changeRotation) { - this.lastTimenRotation = changeRotation; - this.keyInteractionConfig.doAfterChangeRotation(g, changeRotation); + this.changeRotation = this.mouseDownBeginRotation + Math.PI / 2; } } if (direction == 'nsz') { if (angle < 45) { - changeRotation = this.mouseDownBeginRotation; - } else if (angle >= 45 && angle < 90) { - changeRotation = this.mouseDownBeginRotation - Math.PI / 4; - } else if (angle >= 90 && changeRotation == Math.PI / 4) { - changeRotation = this.mouseDownBeginRotation - Math.PI / 2; - } - if (this.lastTimenRotation !== changeRotation) { - this.lastTimenRotation = changeRotation; - this.keyInteractionConfig.doAfterChangeRotation(g, changeRotation); + this.changeRotation = this.mouseDownBeginRotation; + } else if ( + angle >= 45 && + angle < 90 && + this.mouseDownBeginRotation !== -Math.PI / 4 + ) { + this.changeRotation = this.mouseDownBeginRotation - Math.PI / 4; + } else if ( + angle >= 90 && + this.mouseDownBeginRotation == Math.PI / 4 + ) { + this.changeRotation = this.mouseDownBeginRotation - Math.PI / 2; } } + if (this.lastTimenRotation !== this.changeRotation) { + this.lastTimenRotation = this.changeRotation; + this.ratatingSprite.rotation = this.changeRotation; + } } else { if (direction == 'ssz') { this.ratatingSprite.rotation = @@ -218,8 +227,8 @@ export class TccKeyInteraction extends KeyInteraction { super(TccKeyInteraction.Name, app, { gearPositionAmount: 3, keyRotationMethod: KeyRotationMethod.jumpChange, - doAfterChangeRotation: (g: JlGraphic, rotation: number) => { - this.changeState(g, rotation); + doAfterChangeRotation: () => { + this.changeState(); }, }); } @@ -276,34 +285,8 @@ export class TccKeyInteraction extends KeyInteraction { errorNotify('操作失败', { message: err.origin.response.data.title }); }); } - changeState(g: JlGraphic, rotation: number) { - let position = 0; - switch (rotation) { - case Math.PI / 4: - position = 0; - break; - case -Math.PI / 4: - position = 1; - break; - default: - position = 2; - break; - } - (g as TccKey).state.position = position; - const simulationId = useLineStore().simulationId; - const tccId = useTccStore().tccId; - if (!simulationId) return; - tccOperation({ - simulationId, - trainId: tccId + '', - deviceId: g.id, - controlType: request.TrainControl.TrainControlType.DIRECTION_KEY_SWITCH, - dirKey: { - val: position, - }, - }).catch((err) => { - errorNotify('操作失败', { message: err.origin.response.data.title }); - }); + changeState() { + useTccStore().mouseDownOnTccKeyDir = false; } } diff --git a/src/drawApp/tccScene.ts b/src/drawApp/tccScene.ts index a882aa9..1e5fb60 100644 --- a/src/drawApp/tccScene.ts +++ b/src/drawApp/tccScene.ts @@ -61,6 +61,11 @@ export function initTccScene(lineApp: IGraphicApp, sceneName: string) { tccStore.canvasMouseDown = false; if (tccStore.mouseDownOnTccHandle) { tccStore.onMouseUpFromTccHandle(); + tccStore.mouseDownOnTccHandle = false; + } + if (tccStore.mouseDownOnTccKeyDir) { + tccStore.onMouseUpFromTccKeyDir(); + tccStore.mouseDownOnTccKeyDir = false; } }; lineApp.on('destroy', () => { diff --git a/src/stores/tcc-store.ts b/src/stores/tcc-store.ts index 161b3e6..77dad4b 100644 --- a/src/stores/tcc-store.ts +++ b/src/stores/tcc-store.ts @@ -6,6 +6,7 @@ import { tccOperation } from 'src/api/Simulation'; import { errorNotify } from 'src/utils/CommonNotify'; import { request } from 'src/protos/request'; import { TccHandle } from 'src/graphics/tccHandle/TccHandle'; +import { TccKey } from 'src/graphics/tccKey/TccKey'; export const useTccStore = defineStore('tcc', { state: () => ({ @@ -15,6 +16,8 @@ export const useTccStore = defineStore('tcc', { canvasMouseDown: false, mouseDownOnTccHandle: false, tccHandleId: 0, + mouseDownOnTccKeyDir: false, + tccKeyDirId: 0, }), actions: { getTccScene() { @@ -58,5 +61,35 @@ export const useTccStore = defineStore('tcc', { errorNotify('操作失败', { message: err.origin.response.data.title }); }); }, + onMouseUpFromTccKeyDir() { + const tccKeyDir = this.getTccScene().queryStore.queryById( + this.tccKeyDirId + ); + let position = 0; + switch (tccKeyDir._tccKey.rotation) { + case Math.PI / 4: + position = 0; + break; + case -Math.PI / 4: + position = 1; + break; + default: + position = 2; + break; + } + const simulationId = useLineStore().simulationId; + if (!simulationId) return; + tccOperation({ + simulationId, + trainId: this.tccId + '', + deviceId: this.tccKeyDirId, + controlType: request.TrainControl.TrainControlType.DIRECTION_KEY_SWITCH, + dirKey: { + val: position, + }, + }).catch((err) => { + errorNotify('操作失败', { message: err.origin.response.data.title }); + }); + }, }, }); From f4ed04eed31834765aa8abbd4477b38216853403 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 3 Apr 2024 15:22:50 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E6=B4=97=E8=BD=A6=E6=9C=BA=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rts-sim-testing-message | 2 +- .../properties/CarWashingProperty.vue | 9 +++ .../line-app/states/CarWashingState.vue | 1 - src/drawApp/graphics/CarWashingInteraction.ts | 6 ++ src/graphics/carWashing/CarWashing.ts | 57 +++++++++++++++---- .../carWashing/CarWashingDrawAssistant.ts | 22 +++---- 6 files changed, 70 insertions(+), 27 deletions(-) diff --git a/rts-sim-testing-message b/rts-sim-testing-message index 78f0ddf..ee7cf29 160000 --- a/rts-sim-testing-message +++ b/rts-sim-testing-message @@ -1 +1 @@ -Subproject commit 78f0ddfd2413bdac81d33ea2b199edaa4de9e6fb +Subproject commit ee7cf291112f13273080ee430588e9a9b9a72d04 diff --git a/src/components/draw-app/properties/CarWashingProperty.vue b/src/components/draw-app/properties/CarWashingProperty.vue index f4e25b5..eacfcbf 100644 --- a/src/components/draw-app/properties/CarWashingProperty.vue +++ b/src/components/draw-app/properties/CarWashingProperty.vue @@ -17,10 +17,19 @@ + { }); function getNameFormat() { - console.log(code.value, '1111111'); return code.value; } diff --git a/src/drawApp/graphics/CarWashingInteraction.ts b/src/drawApp/graphics/CarWashingInteraction.ts index e890826..4edc798 100644 --- a/src/drawApp/graphics/CarWashingInteraction.ts +++ b/src/drawApp/graphics/CarWashingInteraction.ts @@ -61,6 +61,12 @@ export class CarWashingData extends GraphicDataBase implements ICarWashingData { set duanNum(v: number) { this.data.duanNum = v; } + get width(): number { + return this.data.width; + } + set width(v: number) { + this.data.width = v; + } clone(): CarWashingData { return new CarWashingData(this.data.cloneMessage()); } diff --git a/src/graphics/carWashing/CarWashing.ts b/src/graphics/carWashing/CarWashing.ts index a84ecd9..c9ac6d3 100644 --- a/src/graphics/carWashing/CarWashing.ts +++ b/src/graphics/carWashing/CarWashing.ts @@ -19,6 +19,8 @@ export interface ICarWashingData extends GraphicData { set centralizedStations(v: number[]); get duanNum(): number; set duanNum(v: number); + get width(): number; + set width(v: number); clone(): ICarWashingData; copyFrom(data: ICarWashingData): void; eq(other: ICarWashingData): boolean; @@ -51,19 +53,23 @@ const carWashingConsts = { codeColor: 0xffffff, bodyRectLineColor: 0xffffff, bodyRectLineWidth: 2, - bodyRectWidth: 10, - bodyRectHeight: 20, - bodyColor: 0x000000, + bodyRectWidth: 60, + bodyRectHeight: 40, + bodyColor: 0xffffff, }; export class CarWashing extends JlGraphic { static Type = 'carWashing'; codeGraph: VectorText = new VectorText(''); rectBody: Graphics = new Graphics(); + stopText: VectorText = new VectorText(''); + stateText: VectorText = new VectorText(''); constructor() { super(CarWashing.Type); this.addChild(this.codeGraph); this.addChild(this.rectBody); + this.addChild(this.stopText); + this.addChild(this.stateText); this.codeGraph.name = 'carw_code'; } get code(): string { @@ -93,18 +99,49 @@ export class CarWashing extends JlGraphic { codeGraph.position.set(0, -30); } this.rectBody.clear(); - this.rectBody.beginFill(carWashingConsts.bodyColor, 0); - this.rectBody.lineStyle( - carWashingConsts.bodyRectLineWidth, - carWashingConsts.bodyRectLineColor - ); + this.rectBody.beginFill(carWashingConsts.bodyColor, 1); + const width = this.datas.width || carWashingConsts.bodyRectWidth; this.rectBody.drawRect( - -carWashingConsts.bodyRectWidth / 2, + -width / 2, -carWashingConsts.bodyRectHeight / 2, - carWashingConsts.bodyRectWidth, + width, carWashingConsts.bodyRectHeight ); this.rectBody.endFill(); + if (this.states.jtj) { + this.stopText.text = '紧'; + this.stopText.style.fill = carWashingConsts.codeColor; + this.stopText.setVectorFontSize(carWashingConsts.codeFontSize); + this.stopText.anchor.set(0.5); + this.stopText.position.set(width / 2 + 20, -15); + } + let stateText = ''; + if (this.states.xcjxj) { + stateText = '就绪'; + } else if (this.states.xcyxj) { + stateText = '洗车'; + } else if (this.states.tgyxj) { + stateText = '通过'; + } else if (this.states.cfjList.length === 2) { + if (this.states.cfjList[0]) { + stateText = '头部'; + } else if (this.states.cfjList[1]) { + stateText = '尾部'; + } + } else if (this.states.cfjList.length === 3) { + if (this.states.cfjList[1]) { + stateText = '尾部'; + } else if (this.states.cfjList[2]) { + stateText = '中部'; + } else if (this.states.cfjList[0]) { + stateText = '头部'; + } + } + this.stateText.text = stateText; + this.stateText.style.fill = carWashingConsts.codeColor; + this.stateText.setVectorFontSize(carWashingConsts.codeFontSize); + this.stateText.anchor.set(0.5); + this.stateText.position.set(width / 2 + 15, 15); } buildRelation() { const sections = this.queryStore diff --git a/src/graphics/carWashing/CarWashingDrawAssistant.ts b/src/graphics/carWashing/CarWashingDrawAssistant.ts index ff15cd7..fd0ef62 100644 --- a/src/graphics/carWashing/CarWashingDrawAssistant.ts +++ b/src/graphics/carWashing/CarWashingDrawAssistant.ts @@ -9,6 +9,7 @@ import { JlGraphic, } from 'jl-graphic'; import { CarWashing, CarWashingTemplate, ICarWashingData } from './CarWashing'; +import { Section } from '../section/Section'; export interface ICarWashingDataDrawOptions { newData: () => ICarWashingData; @@ -61,24 +62,15 @@ function buildAbsorbablePositions( carWashing: CarWashing ): AbsorbablePosition[] { const aps: AbsorbablePosition[] = []; - const carWashings = carWashing.queryStore.queryByType( - CarWashing.Type - ); - const canvas = carWashing.getCanvas(); - carWashings.forEach((item) => { - if (item.id === carWashing.id) { - return; - } + const sections = carWashing.queryStore.queryByType
(Section.Type); + sections.forEach((item) => { + const p1 = item.localToCanvasPoint(item.getStartPoint()); + const p2 = item.localToCanvasPoint(item.getEndPoint()); const ala = new AbsorbableLine( - new Point(item.x, 0), - new Point(item.x, canvas.height) - ); - const alb = new AbsorbableLine( - new Point(0, item.y), - new Point(canvas.width, item.y) + new Point(p1.x, p1.y), + new Point(p2.x, p2.y) ); aps.push(ala); - aps.push(alb); }); return aps; } From be50562f0eaad103a280ed001dec6c0d0a6fc257 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 3 Apr 2024 16:36:01 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=BD=A6=E5=BA=93=E9=97=A8=E9=98=B2?= =?UTF-8?q?=E6=B7=B9=E9=97=A8=E7=8A=B6=E6=80=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rts-sim-testing-message | 2 +- src/components/line-app/states/FloodGateState.vue | 4 ++++ src/components/line-app/states/GarageDoorState.vue | 4 ++++ src/configs/UrlManage.ts | 2 +- src/drawApp/graphics/FloodGateInteraction.ts | 6 ++++++ src/drawApp/graphics/GarageDoorInteraction.ts | 6 ++++++ src/drawApp/lineScene.ts | 1 + src/graphics/floodGate/FloodGate.ts | 14 ++++++++++---- src/graphics/garageDoor/GarageDoor.ts | 14 ++++++++++---- 9 files changed, 43 insertions(+), 10 deletions(-) diff --git a/rts-sim-testing-message b/rts-sim-testing-message index ee7cf29..208bcae 160000 --- a/rts-sim-testing-message +++ b/rts-sim-testing-message @@ -1 +1 @@ -Subproject commit ee7cf291112f13273080ee430588e9a9b9a72d04 +Subproject commit 208bcaedccf71e7bfd2535e2889ca4cf7c4bdbb6 diff --git a/src/components/line-app/states/FloodGateState.vue b/src/components/line-app/states/FloodGateState.vue index 271bab3..0594b9e 100644 --- a/src/components/line-app/states/FloodGateState.vue +++ b/src/components/line-app/states/FloodGateState.vue @@ -83,6 +83,7 @@ const list: KeyType[] = [ { label: '防淹门索引', key: 'id' }, { label: '防淹门名称', key: 'code', formatFn: getNameFormat }, { label: '防淹门关闭', key: 'mgj', formatFn: getName }, + { label: '控制端', key: 'local', formatFn: getLocal }, { label: '防淹门强制', key: 'param', formatFn: getForceName }, { label: '设置故障', key: 'param', formatFn: getFaultName }, ]; @@ -117,6 +118,9 @@ function getName(v: boolean) { if (v) return '是'; return '否'; } +function getLocal(v: boolean) { + return v ? '本地' : '远程'; +} function getForceName() { return ( diff --git a/src/components/line-app/states/GarageDoorState.vue b/src/components/line-app/states/GarageDoorState.vue index ce57a26..439efcb 100644 --- a/src/components/line-app/states/GarageDoorState.vue +++ b/src/components/line-app/states/GarageDoorState.vue @@ -83,6 +83,7 @@ const list: KeyType[] = [ { label: '车库门索引', key: 'id' }, { label: '车库门名称', key: 'code', formatFn: getNameFormat }, { label: '车库门关闭', key: 'mgj', formatFn: getName }, + { label: '控制端', key: 'local', formatFn: getLocal }, // { label: '状态丢失', key: 'stateLoss', formatFn: getName }, { label: '车库门强制', key: 'param', formatFn: getForceName }, { label: '设置故障', key: 'param', formatFn: getFaultName }, @@ -118,6 +119,9 @@ function getName(v: boolean) { if (v) return '是'; return '否'; } +function getLocal(v: boolean) { + return v ? '本地' : '远程'; +} function getForceName() { return ( diff --git a/src/configs/UrlManage.ts b/src/configs/UrlManage.ts index d22c5bd..6a575cd 100644 --- a/src/configs/UrlManage.ts +++ b/src/configs/UrlManage.ts @@ -9,7 +9,7 @@ function getHost(): string { // return '192.168.3.7:9091'; // return '192.168.3.47:9091'; // return '192.168.3.37:9091'; - //return '192.168.33.207:9091'; // 张骞 + return '192.168.33.207:9091'; // 张骞 // return '192.168.33.93:9091'; // return '192.168.3.37:9091'; //卫志宏 // return 'test.joylink.club/bjrtsts-service'; // 测试 diff --git a/src/drawApp/graphics/FloodGateInteraction.ts b/src/drawApp/graphics/FloodGateInteraction.ts index 3cfd8c4..fafc921 100644 --- a/src/drawApp/graphics/FloodGateInteraction.ts +++ b/src/drawApp/graphics/FloodGateInteraction.ts @@ -108,6 +108,12 @@ export class FloodGateState set param(param: request.CkmParam) { this.states.param = param; } + get local(): boolean { + return this.states.local; + } + set local(v: boolean) { + this.states.local = v; + } get states(): state.CkmState { return this.getState(); } diff --git a/src/drawApp/graphics/GarageDoorInteraction.ts b/src/drawApp/graphics/GarageDoorInteraction.ts index 8ec0801..545059f 100644 --- a/src/drawApp/graphics/GarageDoorInteraction.ts +++ b/src/drawApp/graphics/GarageDoorInteraction.ts @@ -108,6 +108,12 @@ export class GarageDoorState set param(param: request.CkmParam) { this.states.param = param; } + get local(): boolean { + return this.states.local; + } + set local(v: boolean) { + this.states.local = v; + } get states(): state.CkmState { return this.getState(); } diff --git a/src/drawApp/lineScene.ts b/src/drawApp/lineScene.ts index 64bfa84..4717856 100644 --- a/src/drawApp/lineScene.ts +++ b/src/drawApp/lineScene.ts @@ -465,6 +465,7 @@ function handleSubscribe(lineScene: IGraphicScene) { states.push(new FloodGateState(item)); } }); + // console.log(storage.allStatus.ckmStates, storage.allStatus.fymStates); storage.allStatus.xcjStates.forEach((item) => { if (item.id) { states.push(new CarWashingState(item)); diff --git a/src/graphics/floodGate/FloodGate.ts b/src/graphics/floodGate/FloodGate.ts index 1638474..52ce81c 100644 --- a/src/graphics/floodGate/FloodGate.ts +++ b/src/graphics/floodGate/FloodGate.ts @@ -31,6 +31,8 @@ export interface IFloodGateState extends GraphicState { set mgj(v: boolean); get param(): request.CkmParam; set param(v: request.CkmParam); + get local(): boolean; + set local(v: boolean); } const garageConsts = { @@ -38,6 +40,7 @@ const garageConsts = { codeColor: 0xffffff, bodyLineColor: 0xffffff, lossStateColor: 0x0000ff, + localStateColor: 0x00ff00, bodyLineWidth: 2, bodyColor: 0x000000, bodyRectWidth: 10, @@ -87,10 +90,13 @@ export class FloodGate extends JlGraphic { codeGraph.position.set(0, -30); } this.lineBody.clear(); - const color = - this.states.param?.fault === request.Ckm.Fault.FA_State_Loss - ? garageConsts.lossStateColor - : garageConsts.bodyLineColor; + let color = garageConsts.bodyLineColor; + if (this.states.local) { + color = garageConsts.localStateColor; + } + if (this.states.param?.fault === request.Ckm.Fault.FA_State_Loss) { + color = garageConsts.lossStateColor; + } this.lineBody.lineStyle(garageConsts.bodyLineWidth, color); this.lineBody.moveTo( -garageConsts.bodyRectWidth / 2, diff --git a/src/graphics/garageDoor/GarageDoor.ts b/src/graphics/garageDoor/GarageDoor.ts index 67f28ca..70e493c 100644 --- a/src/graphics/garageDoor/GarageDoor.ts +++ b/src/graphics/garageDoor/GarageDoor.ts @@ -31,6 +31,8 @@ export interface IGarageDoorState extends GraphicState { set mgj(v: boolean); get param(): request.CkmParam; set param(v: request.CkmParam); + get local(): boolean; + set local(v: boolean); } const garageConsts = { @@ -38,6 +40,7 @@ const garageConsts = { codeColor: 0xffffff, bodyLineColor: 0xffffff, lossStateColor: 0x0000ff, + localStateColor: 0x00ff00, bodyLineWidth: 2, bodyColor: 0x000000, bodyRectWidth: 10, @@ -87,10 +90,13 @@ export class GarageDoor extends JlGraphic { codeGraph.position.set(0, -30); } this.lineBody.clear(); - const color = - this.states.param?.fault === request.Ckm.Fault.FA_State_Loss - ? garageConsts.lossStateColor - : garageConsts.bodyLineColor; + let color = garageConsts.bodyLineColor; + if (this.states.local) { + color = garageConsts.localStateColor; + } + if (this.states.param?.fault === request.Ckm.Fault.FA_State_Loss) { + color = garageConsts.lossStateColor; + } this.lineBody.lineStyle(garageConsts.bodyLineWidth, color); this.lineBody.moveTo( -garageConsts.bodyRectWidth / 2, From 1c99ed9b506e97f92b6a227b8a876d7cf28db3ca Mon Sep 17 00:00:00 2001 From: joylink_zhaoerwei Date: Wed, 3 Apr 2024 16:36:39 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E6=89=A7=E8=A1=8Cprotoc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/protos/device_state.ts | 1196 ++++++++++++++++++++++++++- src/protos/stationLayoutGraphics.ts | 23 + 2 files changed, 1196 insertions(+), 23 deletions(-) diff --git a/src/protos/device_state.ts b/src/protos/device_state.ts index d4a1a6b..328483c 100644 --- a/src/protos/device_state.ts +++ b/src/protos/device_state.ts @@ -2380,6 +2380,53 @@ export namespace state { allDoorClose?: boolean; udpInterruption?: boolean; updateTime?: number; + forceDoorAllow?: boolean; + modeLevelDownBtn?: boolean; + confirmBtn?: boolean; + modeLevelUpBtn?: boolean; + atoSendTrainBtn?: boolean; + trainIntegrity?: boolean; + atpOrAtoBypassState?: boolean; + obstacleCheckBtn?: boolean; + driverActiveReportBtn?: boolean; + brakeHeavyFault?: boolean; + leftDoorStateBtn?: boolean; + rightDoorStateBtn?: boolean; + wakeUpBtn?: boolean; + overhaulBtn?: boolean; + undervoltageBtn?: boolean; + sleepBtn?: boolean; + emergentHandleDown?: boolean; + doorLockState?: boolean; + lifeDoorState?: boolean; + trainLowPowerResetState?: boolean; + atpPowerOnBtn?: boolean; + doorModeAA?: boolean; + doorModeAM?: boolean; + doorModeMM?: boolean; + outerEmergentBrakeReport?: boolean; + trainDoorOutLed?: boolean; + localAtpControl?: boolean; + atoBrakeCommand?: boolean; + atoTractionCommandOut?: boolean; + atoLazyCommandOut?: boolean; + atoAlwaysBrake?: boolean; + atoOpenLeftDoor?: boolean; + atoOpenRightDoor?: boolean; + atoCloseLeftDoor?: boolean; + noSpeedSigle?: boolean; + trainStartedLed?: boolean; + mostUseBrake?: boolean; + splittingOut?: boolean; + modeRelay?: boolean; + tractionEffective?: boolean; + brakeEffective?: boolean; + brakeQuarantine?: boolean; + stopNotAllBrake?: boolean; + atoTractionCommand1?: boolean; + atoTractionCommand2?: boolean; + atoTractionCommand3?: boolean; + mockInfo?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -2462,6 +2509,147 @@ export namespace state { if ("updateTime" in data && data.updateTime != undefined) { this.updateTime = data.updateTime; } + if ("forceDoorAllow" in data && data.forceDoorAllow != undefined) { + this.forceDoorAllow = data.forceDoorAllow; + } + if ("modeLevelDownBtn" in data && data.modeLevelDownBtn != undefined) { + this.modeLevelDownBtn = data.modeLevelDownBtn; + } + if ("confirmBtn" in data && data.confirmBtn != undefined) { + this.confirmBtn = data.confirmBtn; + } + if ("modeLevelUpBtn" in data && data.modeLevelUpBtn != undefined) { + this.modeLevelUpBtn = data.modeLevelUpBtn; + } + if ("atoSendTrainBtn" in data && data.atoSendTrainBtn != undefined) { + this.atoSendTrainBtn = data.atoSendTrainBtn; + } + if ("trainIntegrity" in data && data.trainIntegrity != undefined) { + this.trainIntegrity = data.trainIntegrity; + } + if ("atpOrAtoBypassState" in data && data.atpOrAtoBypassState != undefined) { + this.atpOrAtoBypassState = data.atpOrAtoBypassState; + } + if ("obstacleCheckBtn" in data && data.obstacleCheckBtn != undefined) { + this.obstacleCheckBtn = data.obstacleCheckBtn; + } + if ("driverActiveReportBtn" in data && data.driverActiveReportBtn != undefined) { + this.driverActiveReportBtn = data.driverActiveReportBtn; + } + if ("brakeHeavyFault" in data && data.brakeHeavyFault != undefined) { + this.brakeHeavyFault = data.brakeHeavyFault; + } + if ("leftDoorStateBtn" in data && data.leftDoorStateBtn != undefined) { + this.leftDoorStateBtn = data.leftDoorStateBtn; + } + if ("rightDoorStateBtn" in data && data.rightDoorStateBtn != undefined) { + this.rightDoorStateBtn = data.rightDoorStateBtn; + } + if ("wakeUpBtn" in data && data.wakeUpBtn != undefined) { + this.wakeUpBtn = data.wakeUpBtn; + } + if ("overhaulBtn" in data && data.overhaulBtn != undefined) { + this.overhaulBtn = data.overhaulBtn; + } + if ("undervoltageBtn" in data && data.undervoltageBtn != undefined) { + this.undervoltageBtn = data.undervoltageBtn; + } + if ("sleepBtn" in data && data.sleepBtn != undefined) { + this.sleepBtn = data.sleepBtn; + } + if ("emergentHandleDown" in data && data.emergentHandleDown != undefined) { + this.emergentHandleDown = data.emergentHandleDown; + } + if ("doorLockState" in data && data.doorLockState != undefined) { + this.doorLockState = data.doorLockState; + } + if ("lifeDoorState" in data && data.lifeDoorState != undefined) { + this.lifeDoorState = data.lifeDoorState; + } + if ("trainLowPowerResetState" in data && data.trainLowPowerResetState != undefined) { + this.trainLowPowerResetState = data.trainLowPowerResetState; + } + if ("atpPowerOnBtn" in data && data.atpPowerOnBtn != undefined) { + this.atpPowerOnBtn = data.atpPowerOnBtn; + } + if ("doorModeAA" in data && data.doorModeAA != undefined) { + this.doorModeAA = data.doorModeAA; + } + if ("doorModeAM" in data && data.doorModeAM != undefined) { + this.doorModeAM = data.doorModeAM; + } + if ("doorModeMM" in data && data.doorModeMM != undefined) { + this.doorModeMM = data.doorModeMM; + } + if ("outerEmergentBrakeReport" in data && data.outerEmergentBrakeReport != undefined) { + this.outerEmergentBrakeReport = data.outerEmergentBrakeReport; + } + if ("trainDoorOutLed" in data && data.trainDoorOutLed != undefined) { + this.trainDoorOutLed = data.trainDoorOutLed; + } + if ("localAtpControl" in data && data.localAtpControl != undefined) { + this.localAtpControl = data.localAtpControl; + } + if ("atoBrakeCommand" in data && data.atoBrakeCommand != undefined) { + this.atoBrakeCommand = data.atoBrakeCommand; + } + if ("atoTractionCommandOut" in data && data.atoTractionCommandOut != undefined) { + this.atoTractionCommandOut = data.atoTractionCommandOut; + } + if ("atoLazyCommandOut" in data && data.atoLazyCommandOut != undefined) { + this.atoLazyCommandOut = data.atoLazyCommandOut; + } + if ("atoAlwaysBrake" in data && data.atoAlwaysBrake != undefined) { + this.atoAlwaysBrake = data.atoAlwaysBrake; + } + if ("atoOpenLeftDoor" in data && data.atoOpenLeftDoor != undefined) { + this.atoOpenLeftDoor = data.atoOpenLeftDoor; + } + if ("atoOpenRightDoor" in data && data.atoOpenRightDoor != undefined) { + this.atoOpenRightDoor = data.atoOpenRightDoor; + } + if ("atoCloseLeftDoor" in data && data.atoCloseLeftDoor != undefined) { + this.atoCloseLeftDoor = data.atoCloseLeftDoor; + } + if ("noSpeedSigle" in data && data.noSpeedSigle != undefined) { + this.noSpeedSigle = data.noSpeedSigle; + } + if ("trainStartedLed" in data && data.trainStartedLed != undefined) { + this.trainStartedLed = data.trainStartedLed; + } + if ("mostUseBrake" in data && data.mostUseBrake != undefined) { + this.mostUseBrake = data.mostUseBrake; + } + if ("splittingOut" in data && data.splittingOut != undefined) { + this.splittingOut = data.splittingOut; + } + if ("modeRelay" in data && data.modeRelay != undefined) { + this.modeRelay = data.modeRelay; + } + if ("tractionEffective" in data && data.tractionEffective != undefined) { + this.tractionEffective = data.tractionEffective; + } + if ("brakeEffective" in data && data.brakeEffective != undefined) { + this.brakeEffective = data.brakeEffective; + } + if ("brakeQuarantine" in data && data.brakeQuarantine != undefined) { + this.brakeQuarantine = data.brakeQuarantine; + } + if ("stopNotAllBrake" in data && data.stopNotAllBrake != undefined) { + this.stopNotAllBrake = data.stopNotAllBrake; + } + if ("atoTractionCommand1" in data && data.atoTractionCommand1 != undefined) { + this.atoTractionCommand1 = data.atoTractionCommand1; + } + if ("atoTractionCommand2" in data && data.atoTractionCommand2 != undefined) { + this.atoTractionCommand2 = data.atoTractionCommand2; + } + if ("atoTractionCommand3" in data && data.atoTractionCommand3 != undefined) { + this.atoTractionCommand3 = data.atoTractionCommand3; + } + if ("mockInfo" in data && data.mockInfo != undefined) { + this.mockInfo = data.mockInfo; + } } } get lifeSignal() { @@ -2620,6 +2808,288 @@ export namespace state { set updateTime(value: number) { pb_1.Message.setField(this, 26, value); } + get forceDoorAllow() { + return pb_1.Message.getFieldWithDefault(this, 27, false) as boolean; + } + set forceDoorAllow(value: boolean) { + pb_1.Message.setField(this, 27, value); + } + get modeLevelDownBtn() { + return pb_1.Message.getFieldWithDefault(this, 28, false) as boolean; + } + set modeLevelDownBtn(value: boolean) { + pb_1.Message.setField(this, 28, value); + } + get confirmBtn() { + return pb_1.Message.getFieldWithDefault(this, 29, false) as boolean; + } + set confirmBtn(value: boolean) { + pb_1.Message.setField(this, 29, value); + } + get modeLevelUpBtn() { + return pb_1.Message.getFieldWithDefault(this, 30, false) as boolean; + } + set modeLevelUpBtn(value: boolean) { + pb_1.Message.setField(this, 30, value); + } + get atoSendTrainBtn() { + return pb_1.Message.getFieldWithDefault(this, 31, false) as boolean; + } + set atoSendTrainBtn(value: boolean) { + pb_1.Message.setField(this, 31, value); + } + get trainIntegrity() { + return pb_1.Message.getFieldWithDefault(this, 32, false) as boolean; + } + set trainIntegrity(value: boolean) { + pb_1.Message.setField(this, 32, value); + } + get atpOrAtoBypassState() { + return pb_1.Message.getFieldWithDefault(this, 33, false) as boolean; + } + set atpOrAtoBypassState(value: boolean) { + pb_1.Message.setField(this, 33, value); + } + get obstacleCheckBtn() { + return pb_1.Message.getFieldWithDefault(this, 35, false) as boolean; + } + set obstacleCheckBtn(value: boolean) { + pb_1.Message.setField(this, 35, value); + } + get driverActiveReportBtn() { + return pb_1.Message.getFieldWithDefault(this, 36, false) as boolean; + } + set driverActiveReportBtn(value: boolean) { + pb_1.Message.setField(this, 36, value); + } + get brakeHeavyFault() { + return pb_1.Message.getFieldWithDefault(this, 37, false) as boolean; + } + set brakeHeavyFault(value: boolean) { + pb_1.Message.setField(this, 37, value); + } + get leftDoorStateBtn() { + return pb_1.Message.getFieldWithDefault(this, 38, false) as boolean; + } + set leftDoorStateBtn(value: boolean) { + pb_1.Message.setField(this, 38, value); + } + get rightDoorStateBtn() { + return pb_1.Message.getFieldWithDefault(this, 39, false) as boolean; + } + set rightDoorStateBtn(value: boolean) { + pb_1.Message.setField(this, 39, value); + } + get wakeUpBtn() { + return pb_1.Message.getFieldWithDefault(this, 40, false) as boolean; + } + set wakeUpBtn(value: boolean) { + pb_1.Message.setField(this, 40, value); + } + get overhaulBtn() { + return pb_1.Message.getFieldWithDefault(this, 41, false) as boolean; + } + set overhaulBtn(value: boolean) { + pb_1.Message.setField(this, 41, value); + } + get undervoltageBtn() { + return pb_1.Message.getFieldWithDefault(this, 42, false) as boolean; + } + set undervoltageBtn(value: boolean) { + pb_1.Message.setField(this, 42, value); + } + get sleepBtn() { + return pb_1.Message.getFieldWithDefault(this, 43, false) as boolean; + } + set sleepBtn(value: boolean) { + pb_1.Message.setField(this, 43, value); + } + get emergentHandleDown() { + return pb_1.Message.getFieldWithDefault(this, 44, false) as boolean; + } + set emergentHandleDown(value: boolean) { + pb_1.Message.setField(this, 44, value); + } + get doorLockState() { + return pb_1.Message.getFieldWithDefault(this, 45, false) as boolean; + } + set doorLockState(value: boolean) { + pb_1.Message.setField(this, 45, value); + } + get lifeDoorState() { + return pb_1.Message.getFieldWithDefault(this, 46, false) as boolean; + } + set lifeDoorState(value: boolean) { + pb_1.Message.setField(this, 46, value); + } + get trainLowPowerResetState() { + return pb_1.Message.getFieldWithDefault(this, 47, false) as boolean; + } + set trainLowPowerResetState(value: boolean) { + pb_1.Message.setField(this, 47, value); + } + get atpPowerOnBtn() { + return pb_1.Message.getFieldWithDefault(this, 48, false) as boolean; + } + set atpPowerOnBtn(value: boolean) { + pb_1.Message.setField(this, 48, value); + } + get doorModeAA() { + return pb_1.Message.getFieldWithDefault(this, 49, false) as boolean; + } + set doorModeAA(value: boolean) { + pb_1.Message.setField(this, 49, value); + } + get doorModeAM() { + return pb_1.Message.getFieldWithDefault(this, 50, false) as boolean; + } + set doorModeAM(value: boolean) { + pb_1.Message.setField(this, 50, value); + } + get doorModeMM() { + return pb_1.Message.getFieldWithDefault(this, 51, false) as boolean; + } + set doorModeMM(value: boolean) { + pb_1.Message.setField(this, 51, value); + } + get outerEmergentBrakeReport() { + return pb_1.Message.getFieldWithDefault(this, 52, false) as boolean; + } + set outerEmergentBrakeReport(value: boolean) { + pb_1.Message.setField(this, 52, value); + } + get trainDoorOutLed() { + return pb_1.Message.getFieldWithDefault(this, 53, false) as boolean; + } + set trainDoorOutLed(value: boolean) { + pb_1.Message.setField(this, 53, value); + } + get localAtpControl() { + return pb_1.Message.getFieldWithDefault(this, 54, false) as boolean; + } + set localAtpControl(value: boolean) { + pb_1.Message.setField(this, 54, value); + } + get atoBrakeCommand() { + return pb_1.Message.getFieldWithDefault(this, 55, false) as boolean; + } + set atoBrakeCommand(value: boolean) { + pb_1.Message.setField(this, 55, value); + } + get atoTractionCommandOut() { + return pb_1.Message.getFieldWithDefault(this, 56, false) as boolean; + } + set atoTractionCommandOut(value: boolean) { + pb_1.Message.setField(this, 56, value); + } + get atoLazyCommandOut() { + return pb_1.Message.getFieldWithDefault(this, 57, false) as boolean; + } + set atoLazyCommandOut(value: boolean) { + pb_1.Message.setField(this, 57, value); + } + get atoAlwaysBrake() { + return pb_1.Message.getFieldWithDefault(this, 59, false) as boolean; + } + set atoAlwaysBrake(value: boolean) { + pb_1.Message.setField(this, 59, value); + } + get atoOpenLeftDoor() { + return pb_1.Message.getFieldWithDefault(this, 60, false) as boolean; + } + set atoOpenLeftDoor(value: boolean) { + pb_1.Message.setField(this, 60, value); + } + get atoOpenRightDoor() { + return pb_1.Message.getFieldWithDefault(this, 61, false) as boolean; + } + set atoOpenRightDoor(value: boolean) { + pb_1.Message.setField(this, 61, value); + } + get atoCloseLeftDoor() { + return pb_1.Message.getFieldWithDefault(this, 62, false) as boolean; + } + set atoCloseLeftDoor(value: boolean) { + pb_1.Message.setField(this, 62, value); + } + get noSpeedSigle() { + return pb_1.Message.getFieldWithDefault(this, 63, false) as boolean; + } + set noSpeedSigle(value: boolean) { + pb_1.Message.setField(this, 63, value); + } + get trainStartedLed() { + return pb_1.Message.getFieldWithDefault(this, 64, false) as boolean; + } + set trainStartedLed(value: boolean) { + pb_1.Message.setField(this, 64, value); + } + get mostUseBrake() { + return pb_1.Message.getFieldWithDefault(this, 65, false) as boolean; + } + set mostUseBrake(value: boolean) { + pb_1.Message.setField(this, 65, value); + } + get splittingOut() { + return pb_1.Message.getFieldWithDefault(this, 66, false) as boolean; + } + set splittingOut(value: boolean) { + pb_1.Message.setField(this, 66, value); + } + get modeRelay() { + return pb_1.Message.getFieldWithDefault(this, 67, false) as boolean; + } + set modeRelay(value: boolean) { + pb_1.Message.setField(this, 67, value); + } + get tractionEffective() { + return pb_1.Message.getFieldWithDefault(this, 68, false) as boolean; + } + set tractionEffective(value: boolean) { + pb_1.Message.setField(this, 68, value); + } + get brakeEffective() { + return pb_1.Message.getFieldWithDefault(this, 69, false) as boolean; + } + set brakeEffective(value: boolean) { + pb_1.Message.setField(this, 69, value); + } + get brakeQuarantine() { + return pb_1.Message.getFieldWithDefault(this, 70, false) as boolean; + } + set brakeQuarantine(value: boolean) { + pb_1.Message.setField(this, 70, value); + } + get stopNotAllBrake() { + return pb_1.Message.getFieldWithDefault(this, 71, false) as boolean; + } + set stopNotAllBrake(value: boolean) { + pb_1.Message.setField(this, 71, value); + } + get atoTractionCommand1() { + return pb_1.Message.getFieldWithDefault(this, 72, false) as boolean; + } + set atoTractionCommand1(value: boolean) { + pb_1.Message.setField(this, 72, value); + } + get atoTractionCommand2() { + return pb_1.Message.getFieldWithDefault(this, 73, false) as boolean; + } + set atoTractionCommand2(value: boolean) { + pb_1.Message.setField(this, 73, value); + } + get atoTractionCommand3() { + return pb_1.Message.getFieldWithDefault(this, 74, false) as boolean; + } + set atoTractionCommand3(value: boolean) { + pb_1.Message.setField(this, 74, value); + } + get mockInfo() { + return pb_1.Message.getFieldWithDefault(this, 75, 0) as number; + } + set mockInfo(value: number) { + pb_1.Message.setField(this, 75, value); + } static fromObject(data: { lifeSignal?: number; tc1Active?: boolean; @@ -2647,6 +3117,53 @@ export namespace state { allDoorClose?: boolean; udpInterruption?: boolean; updateTime?: number; + forceDoorAllow?: boolean; + modeLevelDownBtn?: boolean; + confirmBtn?: boolean; + modeLevelUpBtn?: boolean; + atoSendTrainBtn?: boolean; + trainIntegrity?: boolean; + atpOrAtoBypassState?: boolean; + obstacleCheckBtn?: boolean; + driverActiveReportBtn?: boolean; + brakeHeavyFault?: boolean; + leftDoorStateBtn?: boolean; + rightDoorStateBtn?: boolean; + wakeUpBtn?: boolean; + overhaulBtn?: boolean; + undervoltageBtn?: boolean; + sleepBtn?: boolean; + emergentHandleDown?: boolean; + doorLockState?: boolean; + lifeDoorState?: boolean; + trainLowPowerResetState?: boolean; + atpPowerOnBtn?: boolean; + doorModeAA?: boolean; + doorModeAM?: boolean; + doorModeMM?: boolean; + outerEmergentBrakeReport?: boolean; + trainDoorOutLed?: boolean; + localAtpControl?: boolean; + atoBrakeCommand?: boolean; + atoTractionCommandOut?: boolean; + atoLazyCommandOut?: boolean; + atoAlwaysBrake?: boolean; + atoOpenLeftDoor?: boolean; + atoOpenRightDoor?: boolean; + atoCloseLeftDoor?: boolean; + noSpeedSigle?: boolean; + trainStartedLed?: boolean; + mostUseBrake?: boolean; + splittingOut?: boolean; + modeRelay?: boolean; + tractionEffective?: boolean; + brakeEffective?: boolean; + brakeQuarantine?: boolean; + stopNotAllBrake?: boolean; + atoTractionCommand1?: boolean; + atoTractionCommand2?: boolean; + atoTractionCommand3?: boolean; + mockInfo?: number; }): TrainVobcState { const message = new TrainVobcState({}); if (data.lifeSignal != null) { @@ -2727,6 +3244,147 @@ export namespace state { if (data.updateTime != null) { message.updateTime = data.updateTime; } + if (data.forceDoorAllow != null) { + message.forceDoorAllow = data.forceDoorAllow; + } + if (data.modeLevelDownBtn != null) { + message.modeLevelDownBtn = data.modeLevelDownBtn; + } + if (data.confirmBtn != null) { + message.confirmBtn = data.confirmBtn; + } + if (data.modeLevelUpBtn != null) { + message.modeLevelUpBtn = data.modeLevelUpBtn; + } + if (data.atoSendTrainBtn != null) { + message.atoSendTrainBtn = data.atoSendTrainBtn; + } + if (data.trainIntegrity != null) { + message.trainIntegrity = data.trainIntegrity; + } + if (data.atpOrAtoBypassState != null) { + message.atpOrAtoBypassState = data.atpOrAtoBypassState; + } + if (data.obstacleCheckBtn != null) { + message.obstacleCheckBtn = data.obstacleCheckBtn; + } + if (data.driverActiveReportBtn != null) { + message.driverActiveReportBtn = data.driverActiveReportBtn; + } + if (data.brakeHeavyFault != null) { + message.brakeHeavyFault = data.brakeHeavyFault; + } + if (data.leftDoorStateBtn != null) { + message.leftDoorStateBtn = data.leftDoorStateBtn; + } + if (data.rightDoorStateBtn != null) { + message.rightDoorStateBtn = data.rightDoorStateBtn; + } + if (data.wakeUpBtn != null) { + message.wakeUpBtn = data.wakeUpBtn; + } + if (data.overhaulBtn != null) { + message.overhaulBtn = data.overhaulBtn; + } + if (data.undervoltageBtn != null) { + message.undervoltageBtn = data.undervoltageBtn; + } + if (data.sleepBtn != null) { + message.sleepBtn = data.sleepBtn; + } + if (data.emergentHandleDown != null) { + message.emergentHandleDown = data.emergentHandleDown; + } + if (data.doorLockState != null) { + message.doorLockState = data.doorLockState; + } + if (data.lifeDoorState != null) { + message.lifeDoorState = data.lifeDoorState; + } + if (data.trainLowPowerResetState != null) { + message.trainLowPowerResetState = data.trainLowPowerResetState; + } + if (data.atpPowerOnBtn != null) { + message.atpPowerOnBtn = data.atpPowerOnBtn; + } + if (data.doorModeAA != null) { + message.doorModeAA = data.doorModeAA; + } + if (data.doorModeAM != null) { + message.doorModeAM = data.doorModeAM; + } + if (data.doorModeMM != null) { + message.doorModeMM = data.doorModeMM; + } + if (data.outerEmergentBrakeReport != null) { + message.outerEmergentBrakeReport = data.outerEmergentBrakeReport; + } + if (data.trainDoorOutLed != null) { + message.trainDoorOutLed = data.trainDoorOutLed; + } + if (data.localAtpControl != null) { + message.localAtpControl = data.localAtpControl; + } + if (data.atoBrakeCommand != null) { + message.atoBrakeCommand = data.atoBrakeCommand; + } + if (data.atoTractionCommandOut != null) { + message.atoTractionCommandOut = data.atoTractionCommandOut; + } + if (data.atoLazyCommandOut != null) { + message.atoLazyCommandOut = data.atoLazyCommandOut; + } + if (data.atoAlwaysBrake != null) { + message.atoAlwaysBrake = data.atoAlwaysBrake; + } + if (data.atoOpenLeftDoor != null) { + message.atoOpenLeftDoor = data.atoOpenLeftDoor; + } + if (data.atoOpenRightDoor != null) { + message.atoOpenRightDoor = data.atoOpenRightDoor; + } + if (data.atoCloseLeftDoor != null) { + message.atoCloseLeftDoor = data.atoCloseLeftDoor; + } + if (data.noSpeedSigle != null) { + message.noSpeedSigle = data.noSpeedSigle; + } + if (data.trainStartedLed != null) { + message.trainStartedLed = data.trainStartedLed; + } + if (data.mostUseBrake != null) { + message.mostUseBrake = data.mostUseBrake; + } + if (data.splittingOut != null) { + message.splittingOut = data.splittingOut; + } + if (data.modeRelay != null) { + message.modeRelay = data.modeRelay; + } + if (data.tractionEffective != null) { + message.tractionEffective = data.tractionEffective; + } + if (data.brakeEffective != null) { + message.brakeEffective = data.brakeEffective; + } + if (data.brakeQuarantine != null) { + message.brakeQuarantine = data.brakeQuarantine; + } + if (data.stopNotAllBrake != null) { + message.stopNotAllBrake = data.stopNotAllBrake; + } + if (data.atoTractionCommand1 != null) { + message.atoTractionCommand1 = data.atoTractionCommand1; + } + if (data.atoTractionCommand2 != null) { + message.atoTractionCommand2 = data.atoTractionCommand2; + } + if (data.atoTractionCommand3 != null) { + message.atoTractionCommand3 = data.atoTractionCommand3; + } + if (data.mockInfo != null) { + message.mockInfo = data.mockInfo; + } return message; } toObject() { @@ -2757,6 +3415,53 @@ export namespace state { allDoorClose?: boolean; udpInterruption?: boolean; updateTime?: number; + forceDoorAllow?: boolean; + modeLevelDownBtn?: boolean; + confirmBtn?: boolean; + modeLevelUpBtn?: boolean; + atoSendTrainBtn?: boolean; + trainIntegrity?: boolean; + atpOrAtoBypassState?: boolean; + obstacleCheckBtn?: boolean; + driverActiveReportBtn?: boolean; + brakeHeavyFault?: boolean; + leftDoorStateBtn?: boolean; + rightDoorStateBtn?: boolean; + wakeUpBtn?: boolean; + overhaulBtn?: boolean; + undervoltageBtn?: boolean; + sleepBtn?: boolean; + emergentHandleDown?: boolean; + doorLockState?: boolean; + lifeDoorState?: boolean; + trainLowPowerResetState?: boolean; + atpPowerOnBtn?: boolean; + doorModeAA?: boolean; + doorModeAM?: boolean; + doorModeMM?: boolean; + outerEmergentBrakeReport?: boolean; + trainDoorOutLed?: boolean; + localAtpControl?: boolean; + atoBrakeCommand?: boolean; + atoTractionCommandOut?: boolean; + atoLazyCommandOut?: boolean; + atoAlwaysBrake?: boolean; + atoOpenLeftDoor?: boolean; + atoOpenRightDoor?: boolean; + atoCloseLeftDoor?: boolean; + noSpeedSigle?: boolean; + trainStartedLed?: boolean; + mostUseBrake?: boolean; + splittingOut?: boolean; + modeRelay?: boolean; + tractionEffective?: boolean; + brakeEffective?: boolean; + brakeQuarantine?: boolean; + stopNotAllBrake?: boolean; + atoTractionCommand1?: boolean; + atoTractionCommand2?: boolean; + atoTractionCommand3?: boolean; + mockInfo?: number; } = {}; if (this.lifeSignal != null) { data.lifeSignal = this.lifeSignal; @@ -2836,6 +3541,147 @@ export namespace state { if (this.updateTime != null) { data.updateTime = this.updateTime; } + if (this.forceDoorAllow != null) { + data.forceDoorAllow = this.forceDoorAllow; + } + if (this.modeLevelDownBtn != null) { + data.modeLevelDownBtn = this.modeLevelDownBtn; + } + if (this.confirmBtn != null) { + data.confirmBtn = this.confirmBtn; + } + if (this.modeLevelUpBtn != null) { + data.modeLevelUpBtn = this.modeLevelUpBtn; + } + if (this.atoSendTrainBtn != null) { + data.atoSendTrainBtn = this.atoSendTrainBtn; + } + if (this.trainIntegrity != null) { + data.trainIntegrity = this.trainIntegrity; + } + if (this.atpOrAtoBypassState != null) { + data.atpOrAtoBypassState = this.atpOrAtoBypassState; + } + if (this.obstacleCheckBtn != null) { + data.obstacleCheckBtn = this.obstacleCheckBtn; + } + if (this.driverActiveReportBtn != null) { + data.driverActiveReportBtn = this.driverActiveReportBtn; + } + if (this.brakeHeavyFault != null) { + data.brakeHeavyFault = this.brakeHeavyFault; + } + if (this.leftDoorStateBtn != null) { + data.leftDoorStateBtn = this.leftDoorStateBtn; + } + if (this.rightDoorStateBtn != null) { + data.rightDoorStateBtn = this.rightDoorStateBtn; + } + if (this.wakeUpBtn != null) { + data.wakeUpBtn = this.wakeUpBtn; + } + if (this.overhaulBtn != null) { + data.overhaulBtn = this.overhaulBtn; + } + if (this.undervoltageBtn != null) { + data.undervoltageBtn = this.undervoltageBtn; + } + if (this.sleepBtn != null) { + data.sleepBtn = this.sleepBtn; + } + if (this.emergentHandleDown != null) { + data.emergentHandleDown = this.emergentHandleDown; + } + if (this.doorLockState != null) { + data.doorLockState = this.doorLockState; + } + if (this.lifeDoorState != null) { + data.lifeDoorState = this.lifeDoorState; + } + if (this.trainLowPowerResetState != null) { + data.trainLowPowerResetState = this.trainLowPowerResetState; + } + if (this.atpPowerOnBtn != null) { + data.atpPowerOnBtn = this.atpPowerOnBtn; + } + if (this.doorModeAA != null) { + data.doorModeAA = this.doorModeAA; + } + if (this.doorModeAM != null) { + data.doorModeAM = this.doorModeAM; + } + if (this.doorModeMM != null) { + data.doorModeMM = this.doorModeMM; + } + if (this.outerEmergentBrakeReport != null) { + data.outerEmergentBrakeReport = this.outerEmergentBrakeReport; + } + if (this.trainDoorOutLed != null) { + data.trainDoorOutLed = this.trainDoorOutLed; + } + if (this.localAtpControl != null) { + data.localAtpControl = this.localAtpControl; + } + if (this.atoBrakeCommand != null) { + data.atoBrakeCommand = this.atoBrakeCommand; + } + if (this.atoTractionCommandOut != null) { + data.atoTractionCommandOut = this.atoTractionCommandOut; + } + if (this.atoLazyCommandOut != null) { + data.atoLazyCommandOut = this.atoLazyCommandOut; + } + if (this.atoAlwaysBrake != null) { + data.atoAlwaysBrake = this.atoAlwaysBrake; + } + if (this.atoOpenLeftDoor != null) { + data.atoOpenLeftDoor = this.atoOpenLeftDoor; + } + if (this.atoOpenRightDoor != null) { + data.atoOpenRightDoor = this.atoOpenRightDoor; + } + if (this.atoCloseLeftDoor != null) { + data.atoCloseLeftDoor = this.atoCloseLeftDoor; + } + if (this.noSpeedSigle != null) { + data.noSpeedSigle = this.noSpeedSigle; + } + if (this.trainStartedLed != null) { + data.trainStartedLed = this.trainStartedLed; + } + if (this.mostUseBrake != null) { + data.mostUseBrake = this.mostUseBrake; + } + if (this.splittingOut != null) { + data.splittingOut = this.splittingOut; + } + if (this.modeRelay != null) { + data.modeRelay = this.modeRelay; + } + if (this.tractionEffective != null) { + data.tractionEffective = this.tractionEffective; + } + if (this.brakeEffective != null) { + data.brakeEffective = this.brakeEffective; + } + if (this.brakeQuarantine != null) { + data.brakeQuarantine = this.brakeQuarantine; + } + if (this.stopNotAllBrake != null) { + data.stopNotAllBrake = this.stopNotAllBrake; + } + if (this.atoTractionCommand1 != null) { + data.atoTractionCommand1 = this.atoTractionCommand1; + } + if (this.atoTractionCommand2 != null) { + data.atoTractionCommand2 = this.atoTractionCommand2; + } + if (this.atoTractionCommand3 != null) { + data.atoTractionCommand3 = this.atoTractionCommand3; + } + if (this.mockInfo != null) { + data.mockInfo = this.mockInfo; + } return data; } serialize(): Uint8Array; @@ -2894,6 +3740,100 @@ export namespace state { writer.writeBool(25, this.udpInterruption); if (this.updateTime != 0) writer.writeInt64(26, this.updateTime); + if (this.forceDoorAllow != false) + writer.writeBool(27, this.forceDoorAllow); + if (this.modeLevelDownBtn != false) + writer.writeBool(28, this.modeLevelDownBtn); + if (this.confirmBtn != false) + writer.writeBool(29, this.confirmBtn); + if (this.modeLevelUpBtn != false) + writer.writeBool(30, this.modeLevelUpBtn); + if (this.atoSendTrainBtn != false) + writer.writeBool(31, this.atoSendTrainBtn); + if (this.trainIntegrity != false) + writer.writeBool(32, this.trainIntegrity); + if (this.atpOrAtoBypassState != false) + writer.writeBool(33, this.atpOrAtoBypassState); + if (this.obstacleCheckBtn != false) + writer.writeBool(35, this.obstacleCheckBtn); + if (this.driverActiveReportBtn != false) + writer.writeBool(36, this.driverActiveReportBtn); + if (this.brakeHeavyFault != false) + writer.writeBool(37, this.brakeHeavyFault); + if (this.leftDoorStateBtn != false) + writer.writeBool(38, this.leftDoorStateBtn); + if (this.rightDoorStateBtn != false) + writer.writeBool(39, this.rightDoorStateBtn); + if (this.wakeUpBtn != false) + writer.writeBool(40, this.wakeUpBtn); + if (this.overhaulBtn != false) + writer.writeBool(41, this.overhaulBtn); + if (this.undervoltageBtn != false) + writer.writeBool(42, this.undervoltageBtn); + if (this.sleepBtn != false) + writer.writeBool(43, this.sleepBtn); + if (this.emergentHandleDown != false) + writer.writeBool(44, this.emergentHandleDown); + if (this.doorLockState != false) + writer.writeBool(45, this.doorLockState); + if (this.lifeDoorState != false) + writer.writeBool(46, this.lifeDoorState); + if (this.trainLowPowerResetState != false) + writer.writeBool(47, this.trainLowPowerResetState); + if (this.atpPowerOnBtn != false) + writer.writeBool(48, this.atpPowerOnBtn); + if (this.doorModeAA != false) + writer.writeBool(49, this.doorModeAA); + if (this.doorModeAM != false) + writer.writeBool(50, this.doorModeAM); + if (this.doorModeMM != false) + writer.writeBool(51, this.doorModeMM); + if (this.outerEmergentBrakeReport != false) + writer.writeBool(52, this.outerEmergentBrakeReport); + if (this.trainDoorOutLed != false) + writer.writeBool(53, this.trainDoorOutLed); + if (this.localAtpControl != false) + writer.writeBool(54, this.localAtpControl); + if (this.atoBrakeCommand != false) + writer.writeBool(55, this.atoBrakeCommand); + if (this.atoTractionCommandOut != false) + writer.writeBool(56, this.atoTractionCommandOut); + if (this.atoLazyCommandOut != false) + writer.writeBool(57, this.atoLazyCommandOut); + if (this.atoAlwaysBrake != false) + writer.writeBool(59, this.atoAlwaysBrake); + if (this.atoOpenLeftDoor != false) + writer.writeBool(60, this.atoOpenLeftDoor); + if (this.atoOpenRightDoor != false) + writer.writeBool(61, this.atoOpenRightDoor); + if (this.atoCloseLeftDoor != false) + writer.writeBool(62, this.atoCloseLeftDoor); + if (this.noSpeedSigle != false) + writer.writeBool(63, this.noSpeedSigle); + if (this.trainStartedLed != false) + writer.writeBool(64, this.trainStartedLed); + if (this.mostUseBrake != false) + writer.writeBool(65, this.mostUseBrake); + if (this.splittingOut != false) + writer.writeBool(66, this.splittingOut); + if (this.modeRelay != false) + writer.writeBool(67, this.modeRelay); + if (this.tractionEffective != false) + writer.writeBool(68, this.tractionEffective); + if (this.brakeEffective != false) + writer.writeBool(69, this.brakeEffective); + if (this.brakeQuarantine != false) + writer.writeBool(70, this.brakeQuarantine); + if (this.stopNotAllBrake != false) + writer.writeBool(71, this.stopNotAllBrake); + if (this.atoTractionCommand1 != false) + writer.writeBool(72, this.atoTractionCommand1); + if (this.atoTractionCommand2 != false) + writer.writeBool(73, this.atoTractionCommand2); + if (this.atoTractionCommand3 != false) + writer.writeBool(74, this.atoTractionCommand3); + if (this.mockInfo != 0) + writer.writeUint32(75, this.mockInfo); if (!w) return writer.getResultBuffer(); } @@ -2981,6 +3921,147 @@ export namespace state { case 26: message.updateTime = reader.readInt64(); break; + case 27: + message.forceDoorAllow = reader.readBool(); + break; + case 28: + message.modeLevelDownBtn = reader.readBool(); + break; + case 29: + message.confirmBtn = reader.readBool(); + break; + case 30: + message.modeLevelUpBtn = reader.readBool(); + break; + case 31: + message.atoSendTrainBtn = reader.readBool(); + break; + case 32: + message.trainIntegrity = reader.readBool(); + break; + case 33: + message.atpOrAtoBypassState = reader.readBool(); + break; + case 35: + message.obstacleCheckBtn = reader.readBool(); + break; + case 36: + message.driverActiveReportBtn = reader.readBool(); + break; + case 37: + message.brakeHeavyFault = reader.readBool(); + break; + case 38: + message.leftDoorStateBtn = reader.readBool(); + break; + case 39: + message.rightDoorStateBtn = reader.readBool(); + break; + case 40: + message.wakeUpBtn = reader.readBool(); + break; + case 41: + message.overhaulBtn = reader.readBool(); + break; + case 42: + message.undervoltageBtn = reader.readBool(); + break; + case 43: + message.sleepBtn = reader.readBool(); + break; + case 44: + message.emergentHandleDown = reader.readBool(); + break; + case 45: + message.doorLockState = reader.readBool(); + break; + case 46: + message.lifeDoorState = reader.readBool(); + break; + case 47: + message.trainLowPowerResetState = reader.readBool(); + break; + case 48: + message.atpPowerOnBtn = reader.readBool(); + break; + case 49: + message.doorModeAA = reader.readBool(); + break; + case 50: + message.doorModeAM = reader.readBool(); + break; + case 51: + message.doorModeMM = reader.readBool(); + break; + case 52: + message.outerEmergentBrakeReport = reader.readBool(); + break; + case 53: + message.trainDoorOutLed = reader.readBool(); + break; + case 54: + message.localAtpControl = reader.readBool(); + break; + case 55: + message.atoBrakeCommand = reader.readBool(); + break; + case 56: + message.atoTractionCommandOut = reader.readBool(); + break; + case 57: + message.atoLazyCommandOut = reader.readBool(); + break; + case 59: + message.atoAlwaysBrake = reader.readBool(); + break; + case 60: + message.atoOpenLeftDoor = reader.readBool(); + break; + case 61: + message.atoOpenRightDoor = reader.readBool(); + break; + case 62: + message.atoCloseLeftDoor = reader.readBool(); + break; + case 63: + message.noSpeedSigle = reader.readBool(); + break; + case 64: + message.trainStartedLed = reader.readBool(); + break; + case 65: + message.mostUseBrake = reader.readBool(); + break; + case 66: + message.splittingOut = reader.readBool(); + break; + case 67: + message.modeRelay = reader.readBool(); + break; + case 68: + message.tractionEffective = reader.readBool(); + break; + case 69: + message.brakeEffective = reader.readBool(); + break; + case 70: + message.brakeQuarantine = reader.readBool(); + break; + case 71: + message.stopNotAllBrake = reader.readBool(); + break; + case 72: + message.atoTractionCommand1 = reader.readBool(); + break; + case 73: + message.atoTractionCommand2 = reader.readBool(); + break; + case 74: + message.atoTractionCommand3 = reader.readBool(); + break; + case 75: + message.mockInfo = reader.readUint32(); + break; default: reader.skipField(); } } @@ -4669,6 +5750,9 @@ export namespace state { baliseCount?: number; messageCounter?: number; telegram?: string; + distance?: number; + aboveBalise?: boolean; + baliseTelegramForPcSimResend?: string; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -4685,6 +5769,15 @@ export namespace state { 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; + } + if ("baliseTelegramForPcSimResend" in data && data.baliseTelegramForPcSimResend != undefined) { + this.baliseTelegramForPcSimResend = data.baliseTelegramForPcSimResend; + } } } get dataSerialNumber() { @@ -4711,11 +5804,32 @@ export namespace state { 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); + } + get aboveBalise() { + return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; + } + set aboveBalise(value: boolean) { + pb_1.Message.setField(this, 6, value); + } + get baliseTelegramForPcSimResend() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set baliseTelegramForPcSimResend(value: string) { + pb_1.Message.setField(this, 7, value); + } static fromObject(data: { dataSerialNumber?: number; baliseCount?: number; messageCounter?: number; telegram?: string; + distance?: number; + aboveBalise?: boolean; + baliseTelegramForPcSimResend?: string; }): BTMState { const message = new BTMState({}); if (data.dataSerialNumber != null) { @@ -4730,6 +5844,15 @@ export namespace state { if (data.telegram != null) { message.telegram = data.telegram; } + if (data.distance != null) { + message.distance = data.distance; + } + if (data.aboveBalise != null) { + message.aboveBalise = data.aboveBalise; + } + if (data.baliseTelegramForPcSimResend != null) { + message.baliseTelegramForPcSimResend = data.baliseTelegramForPcSimResend; + } return message; } toObject() { @@ -4738,6 +5861,9 @@ export namespace state { baliseCount?: number; messageCounter?: number; telegram?: string; + distance?: number; + aboveBalise?: boolean; + baliseTelegramForPcSimResend?: string; } = {}; if (this.dataSerialNumber != null) { data.dataSerialNumber = this.dataSerialNumber; @@ -4751,6 +5877,15 @@ export namespace state { if (this.telegram != null) { data.telegram = this.telegram; } + if (this.distance != null) { + data.distance = this.distance; + } + if (this.aboveBalise != null) { + data.aboveBalise = this.aboveBalise; + } + if (this.baliseTelegramForPcSimResend != null) { + data.baliseTelegramForPcSimResend = this.baliseTelegramForPcSimResend; + } return data; } serialize(): Uint8Array; @@ -4765,6 +5900,12 @@ export namespace state { writer.writeUint32(3, this.messageCounter); if (this.telegram.length) writer.writeString(4, this.telegram); + if (this.distance != 0) + writer.writeInt64(5, this.distance); + if (this.aboveBalise != false) + writer.writeBool(6, this.aboveBalise); + if (this.baliseTelegramForPcSimResend.length) + writer.writeString(7, this.baliseTelegramForPcSimResend); if (!w) return writer.getResultBuffer(); } @@ -4786,6 +5927,15 @@ export namespace state { case 4: message.telegram = reader.readString(); break; + case 5: + message.distance = reader.readInt64(); + break; + case 6: + message.aboveBalise = reader.readBool(); + break; + case 7: + message.baliseTelegramForPcSimResend = reader.readString(); + break; default: reader.skipField(); } } @@ -6879,6 +8029,7 @@ export namespace state { id?: number; mgj?: boolean; param?: dependency_3.request.CkmParam; + local?: boolean; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -6892,6 +8043,9 @@ export namespace state { if ("param" in data && data.param != undefined) { this.param = data.param; } + if ("local" in data && data.local != undefined) { + this.local = data.local; + } } } get id() { @@ -6915,10 +8069,17 @@ export namespace state { get has_param() { return pb_1.Message.getField(this, 3) != null; } + get local() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set local(value: boolean) { + pb_1.Message.setField(this, 4, value); + } static fromObject(data: { id?: number; mgj?: boolean; param?: ReturnType; + local?: boolean; }): CkmState { const message = new CkmState({}); if (data.id != null) { @@ -6930,6 +8091,9 @@ export namespace state { if (data.param != null) { message.param = dependency_3.request.CkmParam.fromObject(data.param); } + if (data.local != null) { + message.local = data.local; + } return message; } toObject() { @@ -6937,6 +8101,7 @@ export namespace state { id?: number; mgj?: boolean; param?: ReturnType; + local?: boolean; } = {}; if (this.id != null) { data.id = this.id; @@ -6947,6 +8112,9 @@ export namespace state { if (this.param != null) { data.param = this.param.toObject(); } + if (this.local != null) { + data.local = this.local; + } return data; } serialize(): Uint8Array; @@ -6959,6 +8127,8 @@ export namespace state { writer.writeBool(2, this.mgj); if (this.has_param) writer.writeMessage(3, this.param, () => this.param.serialize(writer)); + if (this.local != false) + writer.writeBool(4, this.local); if (!w) return writer.getResultBuffer(); } @@ -6977,6 +8147,9 @@ export namespace state { case 3: reader.readMessage(message.param, () => message.param = dependency_3.request.CkmParam.deserialize(reader)); break; + case 4: + message.local = reader.readBool(); + break; default: reader.skipField(); } } @@ -8467,7 +9640,6 @@ export namespace state { constructor(data?: any[] | { id?: number; val?: boolean; - dt?: dependency_3.request.DriverType; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); @@ -8478,9 +9650,6 @@ export namespace state { if ("val" in data && data.val != undefined) { this.val = data.val; } - if ("dt" in data && data.dt != undefined) { - this.dt = data.dt; - } } } get id() { @@ -8495,16 +9664,9 @@ export namespace state { set val(value: boolean) { pb_1.Message.setField(this, 2, value); } - get dt() { - return pb_1.Message.getFieldWithDefault(this, 3, dependency_3.request.DriverType.ONE_END) as dependency_3.request.DriverType; - } - set dt(value: dependency_3.request.DriverType) { - pb_1.Message.setField(this, 3, value); - } static fromObject(data: { id?: number; val?: boolean; - dt?: dependency_3.request.DriverType; }): DriverKeySwitch { const message = new DriverKeySwitch({}); if (data.id != null) { @@ -8513,16 +9675,12 @@ export namespace state { if (data.val != null) { message.val = data.val; } - if (data.dt != null) { - message.dt = data.dt; - } return message; } toObject() { const data: { id?: number; val?: boolean; - dt?: dependency_3.request.DriverType; } = {}; if (this.id != null) { data.id = this.id; @@ -8530,9 +9688,6 @@ export namespace state { if (this.val != null) { data.val = this.val; } - if (this.dt != null) { - data.dt = this.dt; - } return data; } serialize(): Uint8Array; @@ -8543,8 +9698,6 @@ export namespace state { writer.writeUint32(1, this.id); if (this.val != false) writer.writeBool(2, this.val); - if (this.dt != dependency_3.request.DriverType.ONE_END) - writer.writeEnum(3, this.dt); if (!w) return writer.getResultBuffer(); } @@ -8560,9 +9713,6 @@ export namespace state { case 2: message.val = reader.readBool(); break; - case 3: - message.dt = reader.readEnum(); - break; default: reader.skipField(); } } diff --git a/src/protos/stationLayoutGraphics.ts b/src/protos/stationLayoutGraphics.ts index 5a920de..2dbb09c 100644 --- a/src/protos/stationLayoutGraphics.ts +++ b/src/protos/stationLayoutGraphics.ts @@ -7529,6 +7529,7 @@ export namespace graphicData { linkSection?: number; centralizedStations?: number[]; duanNum?: number; + width?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); @@ -7548,6 +7549,9 @@ export namespace graphicData { if ("duanNum" in data && data.duanNum != undefined) { this.duanNum = data.duanNum; } + if ("width" in data && data.width != undefined) { + this.width = data.width; + } } } get common() { @@ -7583,12 +7587,19 @@ export namespace graphicData { set duanNum(value: number) { pb_1.Message.setField(this, 5, value); } + get width() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set width(value: number) { + pb_1.Message.setField(this, 6, value); + } static fromObject(data: { common?: ReturnType; code?: string; linkSection?: number; centralizedStations?: number[]; duanNum?: number; + width?: number; }): CarWashing { const message = new CarWashing({}); if (data.common != null) { @@ -7606,6 +7617,9 @@ export namespace graphicData { if (data.duanNum != null) { message.duanNum = data.duanNum; } + if (data.width != null) { + message.width = data.width; + } return message; } toObject() { @@ -7615,6 +7629,7 @@ export namespace graphicData { linkSection?: number; centralizedStations?: number[]; duanNum?: number; + width?: number; } = {}; if (this.common != null) { data.common = this.common.toObject(); @@ -7631,6 +7646,9 @@ export namespace graphicData { if (this.duanNum != null) { data.duanNum = this.duanNum; } + if (this.width != null) { + data.width = this.width; + } return data; } serialize(): Uint8Array; @@ -7647,6 +7665,8 @@ export namespace graphicData { writer.writePackedUint32(4, this.centralizedStations); if (this.duanNum != 0) writer.writeUint32(5, this.duanNum); + if (this.width != 0) + writer.writeUint32(6, this.width); if (!w) return writer.getResultBuffer(); } @@ -7671,6 +7691,9 @@ export namespace graphicData { case 5: message.duanNum = reader.readUint32(); break; + case 6: + message.width = reader.readUint32(); + break; default: reader.skipField(); } } From 7c8bd92030db50ad88067c2250949c79686e88b8 Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Wed, 3 Apr 2024 16:43:53 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A5=E5=BF=97&?= =?UTF-8?q?=E6=B4=97=E8=BD=A6=E6=9C=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/draw-app/properties/CarWashingProperty.vue | 2 +- src/drawApp/lineScene.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/draw-app/properties/CarWashingProperty.vue b/src/components/draw-app/properties/CarWashingProperty.vue index eacfcbf..dfd01a2 100644 --- a/src/components/draw-app/properties/CarWashingProperty.vue +++ b/src/components/draw-app/properties/CarWashingProperty.vue @@ -25,7 +25,7 @@ { if (item.id) { states.push(new CarWashingState(item));