道岔状态面板和继电器状态面板
This commit is contained in:
parent
94fe367687
commit
71612e4613
@ -21,6 +21,7 @@
|
|||||||
<q-input outlined readonly v-model="relayState.id" label="id" />
|
<q-input outlined readonly v-model="relayState.id" label="id" />
|
||||||
<q-input outlined readonly v-model="relayState.code" label="名称" />
|
<q-input outlined readonly v-model="relayState.code" label="名称" />
|
||||||
<q-checkbox disable v-model="relayState.xh" label="是否吸合" />
|
<q-checkbox disable v-model="relayState.xh" label="是否吸合" />
|
||||||
|
<q-checkbox disable v-model="relayState.force" label="是否强制" />
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
@ -40,6 +41,7 @@ const relayState = ref({
|
|||||||
id: 0,
|
id: 0,
|
||||||
code: '',
|
code: '',
|
||||||
xh: false,
|
xh: false,
|
||||||
|
force: false,
|
||||||
});
|
});
|
||||||
let operateOptions: {
|
let operateOptions: {
|
||||||
label: string;
|
label: string;
|
||||||
@ -77,6 +79,7 @@ function setNewRelayState(relay: Relay) {
|
|||||||
id: relay.datas.id,
|
id: relay.datas.id,
|
||||||
code: relay.datas.code,
|
code: relay.datas.code,
|
||||||
xh: relay.states.xh || false,
|
xh: relay.states.xh || false,
|
||||||
|
force: relay.states.force || false,
|
||||||
};
|
};
|
||||||
subscribeState(relay);
|
subscribeState(relay);
|
||||||
}
|
}
|
||||||
|
@ -76,17 +76,6 @@
|
|||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
<q-list dense bordered padding class="rounded-borders q-my-sm">
|
<q-list dense bordered padding class="rounded-borders q-my-sm">
|
||||||
<q-item>
|
|
||||||
<q-item-section>
|
|
||||||
<q-checkbox
|
|
||||||
dense
|
|
||||||
v-model="turnoutState.force"
|
|
||||||
outlined
|
|
||||||
label="是否强制(屏蔽联锁驱动)"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
@ -126,7 +115,7 @@
|
|||||||
dense
|
dense
|
||||||
v-model="turnoutState.dc"
|
v-model="turnoutState.dc"
|
||||||
outlined
|
outlined
|
||||||
label="是否定操"
|
label="是否定操采集"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@ -137,7 +126,7 @@
|
|||||||
dense
|
dense
|
||||||
v-model="turnoutState.fc"
|
v-model="turnoutState.fc"
|
||||||
outlined
|
outlined
|
||||||
label="是否反操"
|
label="是否反操采集"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@ -148,58 +137,21 @@
|
|||||||
dense
|
dense
|
||||||
v-model="turnoutState.yc"
|
v-model="turnoutState.yc"
|
||||||
outlined
|
outlined
|
||||||
label="是否允许操作"
|
label="是否允许操作采集"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
<q-list dense bordered padding class="rounded-borders q-my-sm">
|
<q-select
|
||||||
<q-item>
|
|
||||||
<q-item-section>
|
|
||||||
<q-checkbox
|
|
||||||
dense
|
|
||||||
v-model="turnoutState.sb"
|
|
||||||
outlined
|
outlined
|
||||||
label="是否有失表故障"
|
v-model="forcePosition"
|
||||||
|
:options="turnoutForceOption"
|
||||||
|
:map-options="true"
|
||||||
|
:emit-value="true"
|
||||||
|
label="道岔设置参数"
|
||||||
:disable="true"
|
:disable="true"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<!-- <q-item>
|
|
||||||
<q-item-section>
|
|
||||||
<q-checkbox
|
|
||||||
dense
|
|
||||||
v-model="turnoutState.dwsb"
|
|
||||||
outlined
|
|
||||||
label="是否有定位失表故障"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item> -->
|
|
||||||
<!-- <q-item>
|
|
||||||
<q-item-section>
|
|
||||||
<q-checkbox
|
|
||||||
dense
|
|
||||||
v-model="turnoutState.fwsb"
|
|
||||||
outlined
|
|
||||||
label="是否有反位失表故障"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item> -->
|
|
||||||
<q-item>
|
|
||||||
<q-item-section>
|
|
||||||
<q-checkbox
|
|
||||||
dense
|
|
||||||
v-model="turnoutState.jc"
|
|
||||||
outlined
|
|
||||||
label="是否有挤岔故障"
|
|
||||||
:disable="true"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</q-list>
|
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
@ -213,11 +165,31 @@ import { TurnoutStates } from 'src/drawApp/graphics/TurnoutInteraction';
|
|||||||
import TurnoutOperation from 'src/components/draw-app/dialogs/TurnoutOperation.vue';
|
import TurnoutOperation from 'src/components/draw-app/dialogs/TurnoutOperation.vue';
|
||||||
import { JlGraphic } from 'jl-graphic';
|
import { JlGraphic } from 'jl-graphic';
|
||||||
import { errorNotify } from 'src/utils/CommonNotify';
|
import { errorNotify } from 'src/utils/CommonNotify';
|
||||||
|
import { request } from 'src/protos/request';
|
||||||
|
|
||||||
const lineStore = useLineStore();
|
const lineStore = useLineStore();
|
||||||
const turnoutState = ref<TurnoutStates>(new TurnoutStates());
|
const turnoutState = ref<TurnoutStates>(new TurnoutStates());
|
||||||
const name = ref('');
|
const name = ref('');
|
||||||
|
const forcePosition = ref<request.Points.Force>(0);
|
||||||
const graphic = ref();
|
const graphic = ref();
|
||||||
|
const turnoutForceOption = [
|
||||||
|
{
|
||||||
|
label: '无强制',
|
||||||
|
value: request.Points.Force.FP_NONE,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '定位',
|
||||||
|
value: request.Points.Force.FP_DW,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '反位',
|
||||||
|
value: request.Points.Force.FP_FW,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '失表',
|
||||||
|
value: request.Points.Force.FP_SB,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => lineStore.selectedGraphics,
|
() => lineStore.selectedGraphics,
|
||||||
@ -238,6 +210,7 @@ watch(
|
|||||||
function setTurnoutState(turnout: Turnout) {
|
function setTurnoutState(turnout: Turnout) {
|
||||||
graphic.value = turnout;
|
graphic.value = turnout;
|
||||||
turnoutState.value = turnout.states.clone() as TurnoutStates;
|
turnoutState.value = turnout.states.clone() as TurnoutStates;
|
||||||
|
forcePosition.value = turnoutState.value.param.forcePosition;
|
||||||
name.value = turnout.datas.code;
|
name.value = turnout.datas.code;
|
||||||
subscribeState(turnout as JlGraphic);
|
subscribeState(turnout as JlGraphic);
|
||||||
}
|
}
|
||||||
@ -293,5 +266,6 @@ function unSubscribeState(g: JlGraphic) {
|
|||||||
}
|
}
|
||||||
function updateState(newVal: TurnoutStates) {
|
function updateState(newVal: TurnoutStates) {
|
||||||
turnoutState.value = newVal.clone() as TurnoutStates;
|
turnoutState.value = newVal.clone() as TurnoutStates;
|
||||||
|
forcePosition.value = turnoutState.value.param.forcePosition;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -32,6 +32,7 @@ import TurnoutOperation from 'src/components/draw-app/dialogs/TurnoutOperation.v
|
|||||||
import { ApiError } from 'src/boot/axios';
|
import { ApiError } from 'src/boot/axios';
|
||||||
import { getKmDistance } from '../lineScene';
|
import { getKmDistance } from '../lineScene';
|
||||||
import { TrainConfigData } from 'src/api/TrainModelApi';
|
import { TrainConfigData } from 'src/api/TrainModelApi';
|
||||||
|
import { request } from 'src/protos/request';
|
||||||
|
|
||||||
function getDefaultEndPoint() {
|
function getDefaultEndPoint() {
|
||||||
return {
|
return {
|
||||||
@ -189,15 +190,15 @@ export class TurnoutOperationPlugin extends GraphicInteractionPlugin<Turnout> {
|
|||||||
radarCheckTime: 0,
|
radarCheckTime: 0,
|
||||||
radarEnable: true,
|
radarEnable: true,
|
||||||
speedSensorEnableA: true,
|
speedSensorEnableA: true,
|
||||||
speedSensorEnableB: true
|
speedSensorEnableB: true,
|
||||||
},
|
},
|
||||||
trainEndsB: {
|
trainEndsB: {
|
||||||
radarCheckSpeed: 0,
|
radarCheckSpeed: 0,
|
||||||
radarCheckTime: 0,
|
radarCheckTime: 0,
|
||||||
radarEnable: true,
|
radarEnable: true,
|
||||||
speedSensorEnableA: true,
|
speedSensorEnableA: true,
|
||||||
speedSensorEnableB: true
|
speedSensorEnableB: true,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
if (data.trainLength) {
|
if (data.trainLength) {
|
||||||
Object.assign(params, { trainLength: +data.trainLength });
|
Object.assign(params, { trainLength: +data.trainLength });
|
||||||
@ -373,35 +374,11 @@ export class TurnoutStates extends GraphicStateBase implements ITurnoutState {
|
|||||||
set fw(v: boolean) {
|
set fw(v: boolean) {
|
||||||
this.states.fw = v;
|
this.states.fw = v;
|
||||||
}
|
}
|
||||||
get force(): boolean {
|
get param(): request.PointsParam {
|
||||||
return this.states.force;
|
return this.states.param;
|
||||||
}
|
}
|
||||||
set force(v: boolean) {
|
set param(param: request.PointsParam) {
|
||||||
this.states.force = v;
|
this.states.param = param;
|
||||||
}
|
|
||||||
get sb(): boolean {
|
|
||||||
return this.states.sb;
|
|
||||||
}
|
|
||||||
set sb(v: boolean) {
|
|
||||||
this.states.sb = v;
|
|
||||||
}
|
|
||||||
get dwsb(): boolean {
|
|
||||||
return this.states.dwsb;
|
|
||||||
}
|
|
||||||
set dwsb(v: boolean) {
|
|
||||||
this.states.dwsb = v;
|
|
||||||
}
|
|
||||||
get fwsb(): boolean {
|
|
||||||
return this.states.fwsb;
|
|
||||||
}
|
|
||||||
set fwsb(v: boolean) {
|
|
||||||
this.states.fwsb = v;
|
|
||||||
}
|
|
||||||
get jc(): boolean {
|
|
||||||
return this.states.jc;
|
|
||||||
}
|
|
||||||
set jc(v: boolean) {
|
|
||||||
this.states.jc = v;
|
|
||||||
}
|
}
|
||||||
get qdc(): boolean {
|
get qdc(): boolean {
|
||||||
return this.states.qdc;
|
return this.states.qdc;
|
||||||
|
@ -79,6 +79,12 @@ export class RelayState extends GraphicStateBase implements IRelayState {
|
|||||||
set xh(xh: boolean) {
|
set xh(xh: boolean) {
|
||||||
this.states.xh = xh;
|
this.states.xh = xh;
|
||||||
}
|
}
|
||||||
|
get force(): boolean {
|
||||||
|
return this.states.force;
|
||||||
|
}
|
||||||
|
set force(force: boolean) {
|
||||||
|
this.states.force = force;
|
||||||
|
}
|
||||||
get states(): state.ReplyState {
|
get states(): state.ReplyState {
|
||||||
return this.getState<state.ReplyState>();
|
return this.getState<state.ReplyState>();
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,8 @@ export interface IRelayState extends GraphicState {
|
|||||||
get id(): number; //继电器id
|
get id(): number; //继电器id
|
||||||
get xh(): boolean; //继电器吸合
|
get xh(): boolean; //继电器吸合
|
||||||
set xh(v: boolean);
|
set xh(v: boolean);
|
||||||
|
get force(): boolean; //是否强制
|
||||||
|
set force(v: boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const relayConsts = {
|
export const relayConsts = {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
* git: https://github.com/thesayyn/protoc-gen-ts */
|
* git: https://github.com/thesayyn/protoc-gen-ts */
|
||||||
import * as dependency_1 from "./stationLayoutGraphics";
|
import * as dependency_1 from "./stationLayoutGraphics";
|
||||||
import * as dependency_2 from "./common_data";
|
import * as dependency_2 from "./common_data";
|
||||||
|
import * as dependency_3 from "./request";
|
||||||
import * as pb_1 from "google-protobuf";
|
import * as pb_1 from "google-protobuf";
|
||||||
export namespace state {
|
export namespace state {
|
||||||
export enum SectionType {
|
export enum SectionType {
|
||||||
@ -224,11 +225,7 @@ export namespace state {
|
|||||||
reverse?: boolean;
|
reverse?: boolean;
|
||||||
dw?: boolean;
|
dw?: boolean;
|
||||||
fw?: boolean;
|
fw?: boolean;
|
||||||
force?: boolean;
|
param?: dependency_3.request.PointsParam;
|
||||||
sb?: boolean;
|
|
||||||
dwsb?: boolean;
|
|
||||||
fwsb?: boolean;
|
|
||||||
jc?: boolean;
|
|
||||||
qdc?: boolean;
|
qdc?: boolean;
|
||||||
qfc?: boolean;
|
qfc?: boolean;
|
||||||
qyc?: boolean;
|
qyc?: boolean;
|
||||||
@ -255,20 +252,8 @@ export namespace state {
|
|||||||
if ("fw" in data && data.fw != undefined) {
|
if ("fw" in data && data.fw != undefined) {
|
||||||
this.fw = data.fw;
|
this.fw = data.fw;
|
||||||
}
|
}
|
||||||
if ("force" in data && data.force != undefined) {
|
if ("param" in data && data.param != undefined) {
|
||||||
this.force = data.force;
|
this.param = data.param;
|
||||||
}
|
|
||||||
if ("sb" in data && data.sb != undefined) {
|
|
||||||
this.sb = data.sb;
|
|
||||||
}
|
|
||||||
if ("dwsb" in data && data.dwsb != undefined) {
|
|
||||||
this.dwsb = data.dwsb;
|
|
||||||
}
|
|
||||||
if ("fwsb" in data && data.fwsb != undefined) {
|
|
||||||
this.fwsb = data.fwsb;
|
|
||||||
}
|
|
||||||
if ("jc" in data && data.jc != undefined) {
|
|
||||||
this.jc = data.jc;
|
|
||||||
}
|
}
|
||||||
if ("qdc" in data && data.qdc != undefined) {
|
if ("qdc" in data && data.qdc != undefined) {
|
||||||
this.qdc = data.qdc;
|
this.qdc = data.qdc;
|
||||||
@ -323,77 +308,56 @@ export namespace state {
|
|||||||
set fw(value: boolean) {
|
set fw(value: boolean) {
|
||||||
pb_1.Message.setField(this, 5, value);
|
pb_1.Message.setField(this, 5, value);
|
||||||
}
|
}
|
||||||
get force() {
|
get param() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
|
return pb_1.Message.getWrapperField(this, dependency_3.request.PointsParam, 6) as dependency_3.request.PointsParam;
|
||||||
}
|
}
|
||||||
set force(value: boolean) {
|
set param(value: dependency_3.request.PointsParam) {
|
||||||
pb_1.Message.setField(this, 6, value);
|
pb_1.Message.setWrapperField(this, 6, value);
|
||||||
}
|
}
|
||||||
get sb() {
|
get has_param() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
|
return pb_1.Message.getField(this, 6) != null;
|
||||||
}
|
|
||||||
set sb(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 7, value);
|
|
||||||
}
|
|
||||||
get dwsb() {
|
|
||||||
return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean;
|
|
||||||
}
|
|
||||||
set dwsb(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 8, value);
|
|
||||||
}
|
|
||||||
get fwsb() {
|
|
||||||
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
|
|
||||||
}
|
|
||||||
set fwsb(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 9, value);
|
|
||||||
}
|
|
||||||
get jc() {
|
|
||||||
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
|
|
||||||
}
|
|
||||||
set jc(value: boolean) {
|
|
||||||
pb_1.Message.setField(this, 10, value);
|
|
||||||
}
|
}
|
||||||
get qdc() {
|
get qdc() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 7, false) as boolean;
|
||||||
}
|
}
|
||||||
set qdc(value: boolean) {
|
set qdc(value: boolean) {
|
||||||
pb_1.Message.setField(this, 11, value);
|
pb_1.Message.setField(this, 7, value);
|
||||||
}
|
}
|
||||||
get qfc() {
|
get qfc() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 12, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 8, false) as boolean;
|
||||||
}
|
}
|
||||||
set qfc(value: boolean) {
|
set qfc(value: boolean) {
|
||||||
pb_1.Message.setField(this, 12, value);
|
pb_1.Message.setField(this, 8, value);
|
||||||
}
|
}
|
||||||
get qyc() {
|
get qyc() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 13, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
|
||||||
}
|
}
|
||||||
set qyc(value: boolean) {
|
set qyc(value: boolean) {
|
||||||
pb_1.Message.setField(this, 13, value);
|
pb_1.Message.setField(this, 9, value);
|
||||||
}
|
}
|
||||||
get dc() {
|
get dc() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 14, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
|
||||||
}
|
}
|
||||||
set dc(value: boolean) {
|
set dc(value: boolean) {
|
||||||
pb_1.Message.setField(this, 14, value);
|
pb_1.Message.setField(this, 10, value);
|
||||||
}
|
}
|
||||||
get fc() {
|
get fc() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 15, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 11, false) as boolean;
|
||||||
}
|
}
|
||||||
set fc(value: boolean) {
|
set fc(value: boolean) {
|
||||||
pb_1.Message.setField(this, 15, value);
|
pb_1.Message.setField(this, 11, value);
|
||||||
}
|
}
|
||||||
get yc() {
|
get yc() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 16, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 12, false) as boolean;
|
||||||
}
|
}
|
||||||
set yc(value: boolean) {
|
set yc(value: boolean) {
|
||||||
pb_1.Message.setField(this, 16, value);
|
pb_1.Message.setField(this, 12, value);
|
||||||
}
|
}
|
||||||
get occupied() {
|
get occupied() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 17, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 13, false) as boolean;
|
||||||
}
|
}
|
||||||
set occupied(value: boolean) {
|
set occupied(value: boolean) {
|
||||||
pb_1.Message.setField(this, 17, value);
|
pb_1.Message.setField(this, 13, value);
|
||||||
}
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
id?: number;
|
id?: number;
|
||||||
@ -401,11 +365,7 @@ export namespace state {
|
|||||||
reverse?: boolean;
|
reverse?: boolean;
|
||||||
dw?: boolean;
|
dw?: boolean;
|
||||||
fw?: boolean;
|
fw?: boolean;
|
||||||
force?: boolean;
|
param?: ReturnType<typeof dependency_3.request.PointsParam.prototype.toObject>;
|
||||||
sb?: boolean;
|
|
||||||
dwsb?: boolean;
|
|
||||||
fwsb?: boolean;
|
|
||||||
jc?: boolean;
|
|
||||||
qdc?: boolean;
|
qdc?: boolean;
|
||||||
qfc?: boolean;
|
qfc?: boolean;
|
||||||
qyc?: boolean;
|
qyc?: boolean;
|
||||||
@ -430,20 +390,8 @@ export namespace state {
|
|||||||
if (data.fw != null) {
|
if (data.fw != null) {
|
||||||
message.fw = data.fw;
|
message.fw = data.fw;
|
||||||
}
|
}
|
||||||
if (data.force != null) {
|
if (data.param != null) {
|
||||||
message.force = data.force;
|
message.param = dependency_3.request.PointsParam.fromObject(data.param);
|
||||||
}
|
|
||||||
if (data.sb != null) {
|
|
||||||
message.sb = data.sb;
|
|
||||||
}
|
|
||||||
if (data.dwsb != null) {
|
|
||||||
message.dwsb = data.dwsb;
|
|
||||||
}
|
|
||||||
if (data.fwsb != null) {
|
|
||||||
message.fwsb = data.fwsb;
|
|
||||||
}
|
|
||||||
if (data.jc != null) {
|
|
||||||
message.jc = data.jc;
|
|
||||||
}
|
}
|
||||||
if (data.qdc != null) {
|
if (data.qdc != null) {
|
||||||
message.qdc = data.qdc;
|
message.qdc = data.qdc;
|
||||||
@ -475,11 +423,7 @@ export namespace state {
|
|||||||
reverse?: boolean;
|
reverse?: boolean;
|
||||||
dw?: boolean;
|
dw?: boolean;
|
||||||
fw?: boolean;
|
fw?: boolean;
|
||||||
force?: boolean;
|
param?: ReturnType<typeof dependency_3.request.PointsParam.prototype.toObject>;
|
||||||
sb?: boolean;
|
|
||||||
dwsb?: boolean;
|
|
||||||
fwsb?: boolean;
|
|
||||||
jc?: boolean;
|
|
||||||
qdc?: boolean;
|
qdc?: boolean;
|
||||||
qfc?: boolean;
|
qfc?: boolean;
|
||||||
qyc?: boolean;
|
qyc?: boolean;
|
||||||
@ -503,20 +447,8 @@ export namespace state {
|
|||||||
if (this.fw != null) {
|
if (this.fw != null) {
|
||||||
data.fw = this.fw;
|
data.fw = this.fw;
|
||||||
}
|
}
|
||||||
if (this.force != null) {
|
if (this.param != null) {
|
||||||
data.force = this.force;
|
data.param = this.param.toObject();
|
||||||
}
|
|
||||||
if (this.sb != null) {
|
|
||||||
data.sb = this.sb;
|
|
||||||
}
|
|
||||||
if (this.dwsb != null) {
|
|
||||||
data.dwsb = this.dwsb;
|
|
||||||
}
|
|
||||||
if (this.fwsb != null) {
|
|
||||||
data.fwsb = this.fwsb;
|
|
||||||
}
|
|
||||||
if (this.jc != null) {
|
|
||||||
data.jc = this.jc;
|
|
||||||
}
|
}
|
||||||
if (this.qdc != null) {
|
if (this.qdc != null) {
|
||||||
data.qdc = this.qdc;
|
data.qdc = this.qdc;
|
||||||
@ -555,30 +487,22 @@ export namespace state {
|
|||||||
writer.writeBool(4, this.dw);
|
writer.writeBool(4, this.dw);
|
||||||
if (this.fw != false)
|
if (this.fw != false)
|
||||||
writer.writeBool(5, this.fw);
|
writer.writeBool(5, this.fw);
|
||||||
if (this.force != false)
|
if (this.has_param)
|
||||||
writer.writeBool(6, this.force);
|
writer.writeMessage(6, this.param, () => this.param.serialize(writer));
|
||||||
if (this.sb != false)
|
|
||||||
writer.writeBool(7, this.sb);
|
|
||||||
if (this.dwsb != false)
|
|
||||||
writer.writeBool(8, this.dwsb);
|
|
||||||
if (this.fwsb != false)
|
|
||||||
writer.writeBool(9, this.fwsb);
|
|
||||||
if (this.jc != false)
|
|
||||||
writer.writeBool(10, this.jc);
|
|
||||||
if (this.qdc != false)
|
if (this.qdc != false)
|
||||||
writer.writeBool(11, this.qdc);
|
writer.writeBool(7, this.qdc);
|
||||||
if (this.qfc != false)
|
if (this.qfc != false)
|
||||||
writer.writeBool(12, this.qfc);
|
writer.writeBool(8, this.qfc);
|
||||||
if (this.qyc != false)
|
if (this.qyc != false)
|
||||||
writer.writeBool(13, this.qyc);
|
writer.writeBool(9, this.qyc);
|
||||||
if (this.dc != false)
|
if (this.dc != false)
|
||||||
writer.writeBool(14, this.dc);
|
writer.writeBool(10, this.dc);
|
||||||
if (this.fc != false)
|
if (this.fc != false)
|
||||||
writer.writeBool(15, this.fc);
|
writer.writeBool(11, this.fc);
|
||||||
if (this.yc != false)
|
if (this.yc != false)
|
||||||
writer.writeBool(16, this.yc);
|
writer.writeBool(12, this.yc);
|
||||||
if (this.occupied != false)
|
if (this.occupied != false)
|
||||||
writer.writeBool(17, this.occupied);
|
writer.writeBool(13, this.occupied);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -604,39 +528,27 @@ export namespace state {
|
|||||||
message.fw = reader.readBool();
|
message.fw = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
message.force = reader.readBool();
|
reader.readMessage(message.param, () => message.param = dependency_3.request.PointsParam.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
message.sb = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
message.dwsb = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 9:
|
|
||||||
message.fwsb = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
message.jc = reader.readBool();
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
message.qdc = reader.readBool();
|
message.qdc = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 8:
|
||||||
message.qfc = reader.readBool();
|
message.qfc = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 13:
|
case 9:
|
||||||
message.qyc = reader.readBool();
|
message.qyc = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 14:
|
case 10:
|
||||||
message.dc = reader.readBool();
|
message.dc = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 15:
|
case 11:
|
||||||
message.fc = reader.readBool();
|
message.fc = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 16:
|
case 12:
|
||||||
message.yc = reader.readBool();
|
message.yc = reader.readBool();
|
||||||
break;
|
break;
|
||||||
case 17:
|
case 13:
|
||||||
message.occupied = reader.readBool();
|
message.occupied = reader.readBool();
|
||||||
break;
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
@ -656,6 +568,8 @@ export namespace state {
|
|||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
id?: number;
|
id?: number;
|
||||||
aspect?: Signal.Aspect;
|
aspect?: Signal.Aspect;
|
||||||
|
param?: dependency_3.request.SignalParam;
|
||||||
|
relayStateMap?: Map<string, boolean>;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -666,7 +580,15 @@ export namespace state {
|
|||||||
if ("aspect" in data && data.aspect != undefined) {
|
if ("aspect" in data && data.aspect != undefined) {
|
||||||
this.aspect = data.aspect;
|
this.aspect = data.aspect;
|
||||||
}
|
}
|
||||||
|
if ("param" in data && data.param != undefined) {
|
||||||
|
this.param = data.param;
|
||||||
}
|
}
|
||||||
|
if ("relayStateMap" in data && data.relayStateMap != undefined) {
|
||||||
|
this.relayStateMap = data.relayStateMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!this.relayStateMap)
|
||||||
|
this.relayStateMap = new Map();
|
||||||
}
|
}
|
||||||
get id() {
|
get id() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
|
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
|
||||||
@ -680,9 +602,28 @@ export namespace state {
|
|||||||
set aspect(value: Signal.Aspect) {
|
set aspect(value: Signal.Aspect) {
|
||||||
pb_1.Message.setField(this, 2, value);
|
pb_1.Message.setField(this, 2, value);
|
||||||
}
|
}
|
||||||
|
get param() {
|
||||||
|
return pb_1.Message.getWrapperField(this, dependency_3.request.SignalParam, 3) as dependency_3.request.SignalParam;
|
||||||
|
}
|
||||||
|
set param(value: dependency_3.request.SignalParam) {
|
||||||
|
pb_1.Message.setWrapperField(this, 3, value);
|
||||||
|
}
|
||||||
|
get has_param() {
|
||||||
|
return pb_1.Message.getField(this, 3) != null;
|
||||||
|
}
|
||||||
|
get relayStateMap() {
|
||||||
|
return pb_1.Message.getField(this, 4) as any as Map<string, boolean>;
|
||||||
|
}
|
||||||
|
set relayStateMap(value: Map<string, boolean>) {
|
||||||
|
pb_1.Message.setField(this, 4, value as any);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
id?: number;
|
id?: number;
|
||||||
aspect?: Signal.Aspect;
|
aspect?: Signal.Aspect;
|
||||||
|
param?: ReturnType<typeof dependency_3.request.SignalParam.prototype.toObject>;
|
||||||
|
relayStateMap?: {
|
||||||
|
[key: string]: boolean;
|
||||||
|
};
|
||||||
}): SignalState {
|
}): SignalState {
|
||||||
const message = new SignalState({});
|
const message = new SignalState({});
|
||||||
if (data.id != null) {
|
if (data.id != null) {
|
||||||
@ -691,12 +632,22 @@ export namespace state {
|
|||||||
if (data.aspect != null) {
|
if (data.aspect != null) {
|
||||||
message.aspect = data.aspect;
|
message.aspect = data.aspect;
|
||||||
}
|
}
|
||||||
|
if (data.param != null) {
|
||||||
|
message.param = dependency_3.request.SignalParam.fromObject(data.param);
|
||||||
|
}
|
||||||
|
if (typeof data.relayStateMap == "object") {
|
||||||
|
message.relayStateMap = new Map(Object.entries(data.relayStateMap));
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
const data: {
|
const data: {
|
||||||
id?: number;
|
id?: number;
|
||||||
aspect?: Signal.Aspect;
|
aspect?: Signal.Aspect;
|
||||||
|
param?: ReturnType<typeof dependency_3.request.SignalParam.prototype.toObject>;
|
||||||
|
relayStateMap?: {
|
||||||
|
[key: string]: boolean;
|
||||||
|
};
|
||||||
} = {};
|
} = {};
|
||||||
if (this.id != null) {
|
if (this.id != null) {
|
||||||
data.id = this.id;
|
data.id = this.id;
|
||||||
@ -704,6 +655,12 @@ export namespace state {
|
|||||||
if (this.aspect != null) {
|
if (this.aspect != null) {
|
||||||
data.aspect = this.aspect;
|
data.aspect = this.aspect;
|
||||||
}
|
}
|
||||||
|
if (this.param != null) {
|
||||||
|
data.param = this.param.toObject();
|
||||||
|
}
|
||||||
|
if (this.relayStateMap != null) {
|
||||||
|
data.relayStateMap = (Object.fromEntries)(this.relayStateMap);
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -714,6 +671,14 @@ export namespace state {
|
|||||||
writer.writeUint32(1, this.id);
|
writer.writeUint32(1, this.id);
|
||||||
if (this.aspect != Signal.Aspect.Non)
|
if (this.aspect != Signal.Aspect.Non)
|
||||||
writer.writeEnum(2, this.aspect);
|
writer.writeEnum(2, this.aspect);
|
||||||
|
if (this.has_param)
|
||||||
|
writer.writeMessage(3, this.param, () => this.param.serialize(writer));
|
||||||
|
for (const [key, value] of this.relayStateMap) {
|
||||||
|
writer.writeMessage(4, this.relayStateMap, () => {
|
||||||
|
writer.writeString(1, key);
|
||||||
|
writer.writeBool(2, value);
|
||||||
|
});
|
||||||
|
}
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -729,6 +694,12 @@ export namespace state {
|
|||||||
case 2:
|
case 2:
|
||||||
message.aspect = reader.readEnum();
|
message.aspect = reader.readEnum();
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
reader.readMessage(message.param, () => message.param = dependency_3.request.SignalParam.deserialize(reader));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.relayStateMap as any, reader, reader.readString, reader.readBool));
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user