区段状态

This commit is contained in:
Yuan 2023-11-01 13:59:02 +08:00
parent f991d849fc
commit 9bb34e73b4
6 changed files with 375 additions and 379 deletions

@ -1 +1 @@
Subproject commit df9ed054c0bb76f7de1f188ef7fb8c31a6513509 Subproject commit 2a14cd39d1e50848eff33df9cb163a453cde0668

View File

@ -19,22 +19,43 @@
</q-btn-dropdown> </q-btn-dropdown>
</q-card-section> </q-card-section>
<q-separator inset /> <q-separator inset />
<q-form> <q-card-section>
<q-input outlined readonly v-model="sectionState.id" label="id" hint="" /> <q-form>
<q-input <q-input
outlined outlined
readonly readonly
v-model="sectionState.index" v-model="sectionState.id"
label="索引" label="id"
hint="" hint=""
/> />
<q-input <q-input
outlined outlined
readonly readonly
v-model.number="sectionState.code" v-model="sectionState.index"
label="名称" label="索引"
/> hint=""
</q-form> />
<q-input
outlined
readonly
v-model.number="sectionState.code"
label="名称"
/>
</q-form>
<q-list dense bordered padding class="rounded-borders q-my-sm">
<q-item>
<q-item-section>
<q-checkbox
dense
v-model="sectionState.axleFault"
outlined
label="是否故障占用"
:disable="true"
/>
</q-item-section>
</q-item>
</q-list>
</q-card-section>
<q-card-actions align="center"> <q-card-actions align="center">
<q-btn label="修改" type="submit" color="primary" @click="submitState" /> <q-btn label="修改" type="submit" color="primary" @click="submitState" />
<q-btn <q-btn
@ -51,15 +72,16 @@
<script setup lang="ts"> <script setup lang="ts">
import { useLineStore } from 'src/stores/line-store'; import { useLineStore } from 'src/stores/line-store';
import { ref, watch, onMounted } from 'vue'; import { ref, watch, onMounted } from 'vue';
import { Section } from 'src/graphics/section/Section'; import { Section, type ISectionState } from 'src/graphics/section/Section';
import { request } from 'src/protos/request'; import { request } from 'src/protos/request';
import { setAxleSectionState } from 'src/api/Simulation'; import { setAxleSectionState } from 'src/api/Simulation';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import { ApiError } from 'src/boot/axios'; import { ApiError } from 'src/boot/axios';
import { SectionStates } from 'src/drawApp/graphics/SectionInteraction';
const $q = useQuasar(); const $q = useQuasar();
const lineStore = useLineStore(); const lineStore = useLineStore();
const sectionState = ref({ id: '', index: 0, code: '' }); const sectionState = ref({ id: '', index: 0, code: '', axleFault: false });
watch( watch(
() => lineStore.selectedGraphics, () => lineStore.selectedGraphics,
@ -71,6 +93,7 @@ watch(
id: '', id: '',
index: 0, index: 0,
code: '', code: '',
axleFault: false,
}; };
} }
} }
@ -84,6 +107,7 @@ function setSectionState(section: Section) {
id: section.datas.id, id: section.datas.id,
index: section.datas.index, index: section.datas.index,
code: section.datas.code, code: section.datas.code,
axleFault: section.states.axleFault ?? false,
}; };
} }
function submitState() { function submitState() {
@ -148,4 +172,25 @@ function toDo(item: { label: string; value: number }) {
}); });
}); });
} }
watch(
() => lineStore.socketStates,
(val) => {
if (val && sectionState.value.id) {
const find = val.find((item): item is SectionStates => {
return (
item.graphicType == Section.Type &&
(item as ISectionState).id == sectionState.value.id
);
});
if (find) {
sectionState.value = {
index: sectionState.value.index,
id: find.id,
code: find.code,
axleFault: find.axleFault,
};
}
}
}
);
</script> </script>

View File

@ -138,18 +138,18 @@ export class SectionStates extends GraphicStateBase implements ISectionState {
set id(id: string) { set id(id: string) {
this.states.id = id; this.states.id = id;
} }
get type(): state.SectionType {
return this.states.type;
}
set type(v: state.SectionType) {
this.states.type = v;
}
get occupied(): boolean { get occupied(): boolean {
return this.states.occupied; return this.states.occupied;
} }
set occupied(occupied: boolean) { set occupied(occupied: boolean) {
this.states.occupied = occupied; this.states.occupied = occupied;
} }
get axleFault(): boolean {
return this.states.axleFault;
}
set axleFault(axleFault: boolean) {
this.states.axleFault = axleFault;
}
get states(): state.SectionState { get states(): state.SectionState {
return this.getState<state.SectionState>(); return this.getState<state.SectionState>();
} }

View File

@ -67,6 +67,7 @@ export interface ISectionState extends GraphicState {
id: string; id: string;
type?: state.SectionType; type?: state.SectionType;
occupied?: boolean; occupied?: boolean;
axleFault?: boolean;
} }
export const SectionConsts = { export const SectionConsts = {

View File

@ -105,8 +105,8 @@ export namespace state {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | { constructor(data?: any[] | {
id?: string; id?: string;
type?: SectionType;
occupied?: boolean; occupied?: boolean;
axleFault?: 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);
@ -114,12 +114,12 @@ export namespace state {
if ("id" in data && data.id != undefined) { if ("id" in data && data.id != undefined) {
this.id = data.id; this.id = data.id;
} }
if ("type" in data && data.type != undefined) {
this.type = data.type;
}
if ("occupied" in data && data.occupied != undefined) { if ("occupied" in data && data.occupied != undefined) {
this.occupied = data.occupied; this.occupied = data.occupied;
} }
if ("axleFault" in data && data.axleFault != undefined) {
this.axleFault = data.axleFault;
}
} }
} }
get id() { get id() {
@ -128,50 +128,50 @@ export namespace state {
set id(value: string) { set id(value: string) {
pb_1.Message.setField(this, 1, value); pb_1.Message.setField(this, 1, value);
} }
get type() {
return pb_1.Message.getFieldWithDefault(this, 2, SectionType.Any) as SectionType;
}
set type(value: SectionType) {
pb_1.Message.setField(this, 2, value);
}
get occupied() { get occupied() {
return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean;
} }
set occupied(value: boolean) { set occupied(value: boolean) {
pb_1.Message.setField(this, 3, value); pb_1.Message.setField(this, 3, value);
} }
get axleFault() {
return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean;
}
set axleFault(value: boolean) {
pb_1.Message.setField(this, 4, value);
}
static fromObject(data: { static fromObject(data: {
id?: string; id?: string;
type?: SectionType;
occupied?: boolean; occupied?: boolean;
axleFault?: boolean;
}): SectionState { }): SectionState {
const message = new SectionState({}); const message = new SectionState({});
if (data.id != null) { if (data.id != null) {
message.id = data.id; message.id = data.id;
} }
if (data.type != null) {
message.type = data.type;
}
if (data.occupied != null) { if (data.occupied != null) {
message.occupied = data.occupied; message.occupied = data.occupied;
} }
if (data.axleFault != null) {
message.axleFault = data.axleFault;
}
return message; return message;
} }
toObject() { toObject() {
const data: { const data: {
id?: string; id?: string;
type?: SectionType;
occupied?: boolean; occupied?: boolean;
axleFault?: boolean;
} = {}; } = {};
if (this.id != null) { if (this.id != null) {
data.id = this.id; data.id = this.id;
} }
if (this.type != null) {
data.type = this.type;
}
if (this.occupied != null) { if (this.occupied != null) {
data.occupied = this.occupied; data.occupied = this.occupied;
} }
if (this.axleFault != null) {
data.axleFault = this.axleFault;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -180,10 +180,10 @@ export namespace state {
const writer = w || new pb_1.BinaryWriter(); const writer = w || new pb_1.BinaryWriter();
if (this.id.length) if (this.id.length)
writer.writeString(1, this.id); writer.writeString(1, this.id);
if (this.type != SectionType.Any)
writer.writeEnum(2, this.type);
if (this.occupied != false) if (this.occupied != false)
writer.writeBool(3, this.occupied); writer.writeBool(3, this.occupied);
if (this.axleFault != false)
writer.writeBool(4, this.axleFault);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -196,12 +196,12 @@ export namespace state {
case 1: case 1:
message.id = reader.readString(); message.id = reader.readString();
break; break;
case 2:
message.type = reader.readEnum();
break;
case 3: case 3:
message.occupied = reader.readBool(); message.occupied = reader.readBool();
break; break;
case 4:
message.axleFault = reader.readBool();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }

View File

@ -3,354 +3,304 @@
* compiler version: 4.23.1 * compiler version: 4.23.1
* source: request.proto * source: request.proto
* git: https://github.com/thesayyn/protoc-gen-ts */ * git: https://github.com/thesayyn/protoc-gen-ts */
import * as pb_1 from 'google-protobuf'; import * as pb_1 from "google-protobuf";
export namespace request { export namespace request {
export class Turnout extends pb_1.Message { export class Turnout extends pb_1.Message {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | {}) { constructor(data?: any[] | {}) {
super(); super();
pb_1.Message.initialize( pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
this, if (!Array.isArray(data) && typeof data == "object") { }
Array.isArray(data) ? data : [], }
0, static fromObject(data: {}): Turnout {
-1, const message = new Turnout({});
[], return message;
this.#one_of_decls }
); toObject() {
if (!Array.isArray(data) && typeof data == 'object') { const data: {} = {};
} return data;
} }
static fromObject(data: {}): Turnout { serialize(): Uint8Array;
const message = new Turnout({}); serialize(w: pb_1.BinaryWriter): void;
return message; serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
} const writer = w || new pb_1.BinaryWriter();
toObject() { if (!w)
const data: {} = {}; return writer.getResultBuffer();
return data; }
} static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Turnout {
serialize(): Uint8Array; const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Turnout();
serialize(w: pb_1.BinaryWriter): void; while (reader.nextField()) {
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { if (reader.isEndGroup())
const writer = w || new pb_1.BinaryWriter(); break;
if (!w) return writer.getResultBuffer(); switch (reader.getFieldNumber()) {
} default: reader.skipField();
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Turnout { }
const reader = }
bytes instanceof pb_1.BinaryReader return message;
? bytes }
: new pb_1.BinaryReader(bytes), serializeBinary(): Uint8Array {
message = new Turnout(); return this.serialize();
while (reader.nextField()) { }
if (reader.isEndGroup()) break; static deserializeBinary(bytes: Uint8Array): Turnout {
switch (reader.getFieldNumber()) { return Turnout.deserialize(bytes);
default:
reader.skipField();
} }
}
return message;
} }
serializeBinary(): Uint8Array { export namespace Turnout {
return this.serialize(); export enum Operation {
Undefined = 0,
DC = 1,
CancelDC = 2,
FC = 3,
CancelFC = 4,
SetSB = 5,
CancelSB = 6,
SetJC = 7,
CancelJC = 8,
ForceDw = 9,
ForceFw = 10,
CancelForce = 11
}
} }
static deserializeBinary(bytes: Uint8Array): Turnout { export class TurnoutOperationReq extends pb_1.Message {
return Turnout.deserialize(bytes); #one_of_decls: number[][] = [];
} constructor(data?: any[] | {
}
export namespace Turnout {
export enum Operation {
Undefined = 0,
DC = 1,
CancelDC = 2,
FC = 3,
CancelFC = 4,
SetSB = 5,
CancelSB = 6,
SetJC = 7,
CancelJC = 8,
ForceDw = 9,
ForceFw = 10,
CancelForce = 11,
}
}
export class TurnoutOperationReq extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(
data?:
| any[]
| {
simulationId?: string; simulationId?: string;
mapId?: number; mapId?: number;
deviceId?: string; deviceId?: string;
operation?: Turnout.Operation; operation?: Turnout.Operation;
} }) {
) { super();
super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
pb_1.Message.initialize( if (!Array.isArray(data) && typeof data == "object") {
this, if ("simulationId" in data && data.simulationId != undefined) {
Array.isArray(data) ? data : [], this.simulationId = data.simulationId;
0, }
-1, if ("mapId" in data && data.mapId != undefined) {
[], this.mapId = data.mapId;
this.#one_of_decls }
); if ("deviceId" in data && data.deviceId != undefined) {
if (!Array.isArray(data) && typeof data == 'object') { this.deviceId = data.deviceId;
if ('simulationId' in data && data.simulationId != undefined) { }
this.simulationId = data.simulationId; if ("operation" in data && data.operation != undefined) {
this.operation = data.operation;
}
}
} }
if ('mapId' in data && data.mapId != undefined) { get simulationId() {
this.mapId = data.mapId; return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
} }
if ('deviceId' in data && data.deviceId != undefined) { set simulationId(value: string) {
this.deviceId = data.deviceId; pb_1.Message.setField(this, 1, value);
} }
if ('operation' in data && data.operation != undefined) { get mapId() {
this.operation = data.operation; return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
} }
} set mapId(value: number) {
} pb_1.Message.setField(this, 2, value);
get simulationId() {
return pb_1.Message.getFieldWithDefault(this, 1, '') as string;
}
set simulationId(value: string) {
pb_1.Message.setField(this, 1, value);
}
get mapId() {
return pb_1.Message.getFieldWithDefault(this, 2, 0) as number;
}
set mapId(value: number) {
pb_1.Message.setField(this, 2, value);
}
get deviceId() {
return pb_1.Message.getFieldWithDefault(this, 3, '') as string;
}
set deviceId(value: string) {
pb_1.Message.setField(this, 3, value);
}
get operation() {
return pb_1.Message.getFieldWithDefault(
this,
4,
Turnout.Operation.Undefined
) as Turnout.Operation;
}
set operation(value: Turnout.Operation) {
pb_1.Message.setField(this, 4, value);
}
static fromObject(data: {
simulationId?: string;
mapId?: number;
deviceId?: string;
operation?: Turnout.Operation;
}): TurnoutOperationReq {
const message = new TurnoutOperationReq({});
if (data.simulationId != null) {
message.simulationId = data.simulationId;
}
if (data.mapId != null) {
message.mapId = data.mapId;
}
if (data.deviceId != null) {
message.deviceId = data.deviceId;
}
if (data.operation != null) {
message.operation = data.operation;
}
return message;
}
toObject() {
const data: {
simulationId?: string;
mapId?: number;
deviceId?: string;
operation?: Turnout.Operation;
} = {};
if (this.simulationId != null) {
data.simulationId = this.simulationId;
}
if (this.mapId != null) {
data.mapId = this.mapId;
}
if (this.deviceId != null) {
data.deviceId = this.deviceId;
}
if (this.operation != null) {
data.operation = this.operation;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.simulationId.length) writer.writeString(1, this.simulationId);
if (this.mapId != 0) writer.writeInt32(2, this.mapId);
if (this.deviceId.length) writer.writeString(3, this.deviceId);
if (this.operation != Turnout.Operation.Undefined)
writer.writeEnum(4, this.operation);
if (!w) return writer.getResultBuffer();
}
static deserialize(
bytes: Uint8Array | pb_1.BinaryReader
): TurnoutOperationReq {
const reader =
bytes instanceof pb_1.BinaryReader
? bytes
: new pb_1.BinaryReader(bytes),
message = new TurnoutOperationReq();
while (reader.nextField()) {
if (reader.isEndGroup()) break;
switch (reader.getFieldNumber()) {
case 1:
message.simulationId = reader.readString();
break;
case 2:
message.mapId = reader.readInt32();
break;
case 3:
message.deviceId = reader.readString();
break;
case 4:
message.operation = reader.readEnum();
break;
default:
reader.skipField();
} }
} get deviceId() {
return message; return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): TurnoutOperationReq {
return TurnoutOperationReq.deserialize(bytes);
}
}
export class Signal extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(
this,
Array.isArray(data) ? data : [],
0,
-1,
[],
this.#one_of_decls
);
if (!Array.isArray(data) && typeof data == 'object') {
}
}
static fromObject(data: {}): Signal {
const message = new Signal({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w) return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signal {
const reader =
bytes instanceof pb_1.BinaryReader
? bytes
: new pb_1.BinaryReader(bytes),
message = new Signal();
while (reader.nextField()) {
if (reader.isEndGroup()) break;
switch (reader.getFieldNumber()) {
default:
reader.skipField();
} }
} set deviceId(value: string) {
return message; pb_1.Message.setField(this, 3, value);
} }
serializeBinary(): Uint8Array { get operation() {
return this.serialize(); return pb_1.Message.getFieldWithDefault(this, 4, Turnout.Operation.Undefined) as Turnout.Operation;
} }
static deserializeBinary(bytes: Uint8Array): Signal { set operation(value: Turnout.Operation) {
return Signal.deserialize(bytes); pb_1.Message.setField(this, 4, value);
} }
} static fromObject(data: {
export namespace Signal { simulationId?: string;
export enum Operation { mapId?: number;
Undefined = 0, deviceId?: string;
Display = 1, operation?: Turnout.Operation;
LightHFaultDs = 2, }): TurnoutOperationReq {
LightUFaultDs = 3, const message = new TurnoutOperationReq({});
LightLFaultDs = 4, if (data.simulationId != null) {
LightAFaultDs = 5, message.simulationId = data.simulationId;
LightBFaultDs = 6, }
LightHCancelDs = 7, if (data.mapId != null) {
LightUCancelDs = 8, message.mapId = data.mapId;
LightLCancelDs = 9, }
LightACancelDs = 10, if (data.deviceId != null) {
LightBCancelDs = 11, message.deviceId = data.deviceId;
} }
} if (data.operation != null) {
export class Section extends pb_1.Message { message.operation = data.operation;
#one_of_decls: number[][] = []; }
constructor(data?: any[] | {}) { return message;
super(); }
pb_1.Message.initialize( toObject() {
this, const data: {
Array.isArray(data) ? data : [], simulationId?: string;
0, mapId?: number;
-1, deviceId?: string;
[], operation?: Turnout.Operation;
this.#one_of_decls } = {};
); if (this.simulationId != null) {
if (!Array.isArray(data) && typeof data == 'object') { data.simulationId = this.simulationId;
} }
} if (this.mapId != null) {
static fromObject(data: {}): Section { data.mapId = this.mapId;
const message = new Section({}); }
return message; if (this.deviceId != null) {
} data.deviceId = this.deviceId;
toObject() { }
const data: {} = {}; if (this.operation != null) {
return data; data.operation = this.operation;
} }
serialize(): Uint8Array; return data;
serialize(w: pb_1.BinaryWriter): void; }
serialize(w?: pb_1.BinaryWriter): Uint8Array | void { serialize(): Uint8Array;
const writer = w || new pb_1.BinaryWriter(); serialize(w: pb_1.BinaryWriter): void;
if (!w) return writer.getResultBuffer(); serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
} const writer = w || new pb_1.BinaryWriter();
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Section { if (this.simulationId.length)
const reader = writer.writeString(1, this.simulationId);
bytes instanceof pb_1.BinaryReader if (this.mapId != 0)
? bytes writer.writeInt32(2, this.mapId);
: new pb_1.BinaryReader(bytes), if (this.deviceId.length)
message = new Section(); writer.writeString(3, this.deviceId);
while (reader.nextField()) { if (this.operation != Turnout.Operation.Undefined)
if (reader.isEndGroup()) break; writer.writeEnum(4, this.operation);
switch (reader.getFieldNumber()) { if (!w)
default: return writer.getResultBuffer();
reader.skipField(); }
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TurnoutOperationReq {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TurnoutOperationReq();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.simulationId = reader.readString();
break;
case 2:
message.mapId = reader.readInt32();
break;
case 3:
message.deviceId = reader.readString();
break;
case 4:
message.operation = reader.readEnum();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): TurnoutOperationReq {
return TurnoutOperationReq.deserialize(bytes);
} }
}
return message;
} }
serializeBinary(): Uint8Array { export class Signal extends pb_1.Message {
return this.serialize(); #one_of_decls: number[][] = [];
constructor(data?: any[] | {}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") { }
}
static fromObject(data: {}): Signal {
const message = new Signal({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Signal {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Signal();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Signal {
return Signal.deserialize(bytes);
}
} }
static deserializeBinary(bytes: Uint8Array): Section { export namespace Signal {
return Section.deserialize(bytes); export enum Operation {
Undefined = 0,
Display = 1,
LightHFaultDs = 2,
LightUFaultDs = 3,
LightLFaultDs = 4,
LightAFaultDs = 5,
LightBFaultDs = 6,
LightHCancelDs = 7,
LightUCancelDs = 8,
LightLCancelDs = 9,
LightACancelDs = 10,
LightBCancelDs = 11
}
} }
} export class Section extends pb_1.Message {
export namespace Section { #one_of_decls: number[][] = [];
export enum Operation { constructor(data?: any[] | {}) {
SetDrst = 0, super();
CancelDrst = 1, pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
SetPdrst = 2, if (!Array.isArray(data) && typeof data == "object") { }
CancelPdrst = 3, }
SetFaultOcc = 4, static fromObject(data: {}): Section {
CancelFaultOcc = 5, const message = new Section({});
return message;
}
toObject() {
const data: {} = {};
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Section {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Section();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): Section {
return Section.deserialize(bytes);
}
}
export namespace Section {
export enum Operation {
SetDrst = 0,
CancelDrst = 1,
SetPdrst = 2,
CancelPdrst = 3,
SetFaultOcc = 4,
CancelFaultOcc = 5
}
} }
}
} }