This commit is contained in:
fan 2023-12-13 17:56:29 +08:00
commit 10270afd02
7 changed files with 196 additions and 513 deletions

View File

@ -87,7 +87,7 @@ const sectionRelations = computed(() => {
const concentrationDividingLine =
drawStore.selectedGraphic as ConcentrationDividingLine;
concentrationDividingLine.datas.nodeConWithSecs.forEach((nodeConWithSec) => {
const refleftSection = nodeConWithSec.leftSection.id
const refleftSection = nodeConWithSec.leftSection?.id
? `${
drawStore
.getDrawApp()
@ -96,7 +96,7 @@ const sectionRelations = computed(() => {
}(${devicePort[nodeConWithSec.leftSection.devicePort]})`
: '边界';
refSectionInfo[0].refSectionInfo.push(refleftSection);
const refRightSection = nodeConWithSec.rightSection.id
const refRightSection = nodeConWithSec.rightSection?.id
? `${
drawStore
.getDrawApp()
@ -113,7 +113,7 @@ onMounted(() => {
const stations = drawStore
.getDrawApp()
.queryStore.queryByType<Station>(Station.Type);
centralizedStations.value = [];
centralizedStations.value = [{ label: '', value: 0 }];
stations.forEach((station) => {
if (station.datas.concentrationStations || station.datas.depots) {
centralizedStations.value.push({

View File

@ -291,7 +291,7 @@ watch(
if (commonElements.length) {
commonElements.forEach((commonElement) => {
commonSetPropertys.forEach((commonProperty) => {
if (commonElement.includes(commonProperty.type)) {
if (commonElement == commonProperty.type) {
commonProperty.manyDevise();
}
});
@ -511,8 +511,8 @@ function setPlatformRefEsbRelayCode() {
}
//-
const stationName = ref<string[]>([]);
const centralizedStations = ref<{ label: string; value: string }[]>([]);
const stationName = ref<number[]>([]);
const centralizedStations = ref<{ label: string; value: number }[]>([]);
function addCentralizedStation() {
const devices = drawStore.selectedGraphics;
if (devices && devices.length && stationName.value.length) {

View File

@ -164,31 +164,40 @@ export class ConcentrationDividingLine
);
} else if (!hasNodeSection.get(section.id) && !portRefOtherDevice?.id) {
const [leftSectionId, rightSectionId] =
relationParam === 'A' ? [0, section.id] : [section.id, 0];
relationParam === 'A'
? [undefined, section.id]
: [section.id, undefined];
hasNodeSection.set(section.id, '1');
nodeConWithSecs.push(
new graphicData.NodeConWithSec({
leftSection: createRelatedRefProto(
Section.Type,
leftSectionId,
DevicePort.B
),
rightSection: createRelatedRefProto(
Section.Type,
rightSectionId,
DevicePort.A
),
})
);
if (leftSectionId == undefined) {
nodeConWithSecs.push(
new graphicData.NodeConWithSec({
leftSection: undefined,
rightSection: createRelatedRefProto(
Section.Type,
rightSectionId,
DevicePort.A
),
})
);
} else {
nodeConWithSecs.push(
new graphicData.NodeConWithSec({
leftSection: createRelatedRefProto(
Section.Type,
leftSectionId,
DevicePort.B
),
rightSection: undefined,
})
);
}
}
}
});
nodeConWithSecs.sort((a, b) => {
const sectionAId =
a.leftSection.id !== 0 ? a.leftSection.id : a.rightSection.id;
const sectionAId = a.leftSection ? a.leftSection.id : a.rightSection.id;
const sectionA = this.queryStore.queryById<Section | Turnout>(sectionAId);
const sectionBId =
b.leftSection.id !== 0 ? b.leftSection.id : b.rightSection.id;
const sectionBId = b.leftSection ? b.leftSection.id : b.rightSection.id;
const sectionB = this.queryStore.queryById<Section | Turnout>(sectionBId);
return (
sectionA.localToCanvasPoint(

View File

@ -183,11 +183,12 @@ export function handleCentralizedStationsData(
}
//找到公共的元素
export function findCommonElements(arrays: number[][]) {
type findType = string | number;
export function findCommonElements(arrays: findType[][]) {
if (arrays.length === 0) {
return [];
}
const commonElements: number[] = [];
const commonElements: findType[] = [];
arrays[0].forEach((element) => {
if (arrays.every((arr) => arr.includes(element))) {
commonElements.push(element);

View File

@ -46,7 +46,7 @@
>
<q-input
color="accent"
v-model="scope.value"
v-model.number="scope.value"
label="设备Id"
dense
autofocus
@ -265,7 +265,7 @@ import { ciQdMap } from './GeneraterCiQdConfig';
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
const searchId = ref('');
const searchId = ref<number>();
const relayCabinetStore = useRelayCabinetStore();
const rightDrawerOpen = ref(false);
@ -468,11 +468,13 @@ function batchBuild() {
const generaterRelayLayoutDialog = ref(false);
const generaterRelayLayout = ref<{
publishId: string;
centralizedStation: string;
}>({ publishId: '', centralizedStation: '' });
centralizedStation: number;
}>({ publishId: '', centralizedStation: 0 });
let publishIdOption = ref<{ label: string; value: number }[]>();
let centralizedStationsOption = ref<{ label: string; value: string }[]>([]);
let centralizedStationsOption = ref<{ label: string; value: number }[]>([
{ label: '', value: 0 },
]);
async function openGeneraterRelayLayoutDialog() {
generaterRelayLayoutDialog.value = true;
@ -536,7 +538,7 @@ function oneClickGeneraterRelayLayout() {
const concentrationStation =
generaterRelayLayout.value.centralizedStation;
const generateRelays: GenerateRelaysCongig[] = [];
const generateRelaysMap = new Map<string, string>();
const generateRelaysMap = new Map<string, number>();
const DeviceType = graphicData.RelatedRef.DeviceType;
//
storage.turnouts.forEach((turnout) => {
@ -583,7 +585,7 @@ function oneClickGeneraterRelayLayout() {
}
});
//--/EMP(esbButton)/MKX(gateBox)/SPKS(spksSwitch)
let manageStations: string[] = [];
let manageStations: number[] = [];
for (let i = 0; i < storage.stations.length; i++) {
if (storage.stations[i].common.id == concentrationStation) {
manageStations = storage.stations[i].manageStations;
@ -599,7 +601,7 @@ function oneClickGeneraterRelayLayout() {
const deviceCombinations = combinationsMap.get(`${DeviceType.station}`);
if (manageStations.includes(station.common.id) && deviceCombinations) {
const handleDeviceCombinations: Combinationtype[] = [];
const stationManagePlatformsId: string[] = [];
const stationManagePlatformsId: number[] = [];
let stationManagePlatformsRefEsb: string[] = [];
storage.Platforms.forEach((platform) => {
if (platform.refStationId == station.common.id) {
@ -610,7 +612,7 @@ function oneClickGeneraterRelayLayout() {
);
}
});
const stationManageScreenDoor: string[] = [];
const stationManageScreenDoor: number[] = [];
storage.screenDoors.forEach((screenDoor) => {
if (stationManagePlatformsId.includes(screenDoor.refPlatformId)) {
stationManageScreenDoor.push(screenDoor.common.id);
@ -691,7 +693,7 @@ function oneClickGeneraterRelayLayout() {
? combinationsMap.get(`${DeviceType.ScreenDoor}+down`)
: combinationsMap.get(`${DeviceType.ScreenDoor}+up`);
if (
manageStations.includes(screenDoorRefStation?.common.id as string) &&
manageStations.includes(screenDoorRefStation?.common.id as number) &&
deviceCombinations
) {
creatDeviceRelateRelays(
@ -826,12 +828,12 @@ function oneClickGeneraterRelayLayout() {
);
deviceCiQdConfig?.forEach((combinationtype) => {
combinationtype.refDeviceCodes.forEach((items) => {
const qdData: string[] = [];
const qdData: number[] = [];
items.forEach((relayCode) => {
qdData.push(
generateRelaysMap.get(
`${deviceRelateRelay.deviceType}+${deviceRelateRelay.code}+${combinationtype.code}+${relayCode}`
) as string
) as number
);
});
allQdData.push(
@ -859,7 +861,7 @@ function oneClickGeneraterRelayLayout() {
const combinationtypes: relayCabinetGraphicData.Combinationtype[] = [];
deviceCombinations?.forEach((combinationtype) => {
//
const refRelayIds: string[] = [];
const refRelayIds: number[] = [];
combinationtype.refDeviceCodesAndModel.forEach((relay) => {
const id = GraphicIdGenerator.next();
refRelayIds.push(id);

View File

@ -14,7 +14,7 @@ export namespace state {
export class LinkState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
trainId?: string[];
}) {
super();
@ -29,9 +29,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get trainId() {
@ -41,7 +41,7 @@ export namespace state {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
id?: string;
id?: number;
trainId?: string[];
}): LinkState {
const message = new LinkState({});
@ -55,7 +55,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
trainId?: string[];
} = {};
if (this.id != null) {
@ -70,8 +70,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.trainId.length)
writer.writeRepeatedString(2, this.trainId);
if (!w)
@ -84,7 +84,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
pb_1.Message.addToRepeatedField(message, 2, reader.readString());
@ -104,7 +104,7 @@ export namespace state {
export class SectionState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
occupied?: boolean;
axleFault?: boolean;
}) {
@ -123,9 +123,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get occupied() {
@ -141,7 +141,7 @@ export namespace state {
pb_1.Message.setField(this, 4, value);
}
static fromObject(data: {
id?: string;
id?: number;
occupied?: boolean;
axleFault?: boolean;
}): SectionState {
@ -159,7 +159,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
occupied?: boolean;
axleFault?: boolean;
} = {};
@ -178,8 +178,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.occupied != false)
writer.writeBool(3, this.occupied);
if (this.axleFault != false)
@ -194,7 +194,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 3:
message.occupied = reader.readBool();
@ -217,7 +217,7 @@ export namespace state {
export class SwitchState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
normal?: boolean;
reverse?: boolean;
dw?: boolean;
@ -292,9 +292,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get normal() {
@ -394,7 +394,7 @@ export namespace state {
pb_1.Message.setField(this, 17, value);
}
static fromObject(data: {
id?: string;
id?: number;
normal?: boolean;
reverse?: boolean;
dw?: boolean;
@ -468,7 +468,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
normal?: boolean;
reverse?: boolean;
dw?: boolean;
@ -543,8 +543,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.normal != false)
writer.writeBool(2, this.normal);
if (this.reverse != false)
@ -587,7 +587,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.normal = reader.readBool();
@ -652,7 +652,7 @@ export namespace state {
export class SignalState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
aspect?: Signal.Aspect;
}) {
super();
@ -667,9 +667,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get aspect() {
@ -679,7 +679,7 @@ export namespace state {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
id?: string;
id?: number;
aspect?: Signal.Aspect;
}): SignalState {
const message = new SignalState({});
@ -693,7 +693,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
aspect?: Signal.Aspect;
} = {};
if (this.id != null) {
@ -708,8 +708,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.aspect != Signal.Aspect.Non)
writer.writeEnum(2, this.aspect);
if (!w)
@ -722,7 +722,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.aspect = reader.readEnum();
@ -794,7 +794,7 @@ export namespace state {
export class PlatformState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
empj?: boolean;
spksState?: ReplyState[];
mkxJState?: MkxJState;
@ -817,9 +817,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get empj() {
@ -844,7 +844,7 @@ export namespace state {
return pb_1.Message.getField(this, 4) != null;
}
static fromObject(data: {
id?: string;
id?: number;
empj?: boolean;
spksState?: ReturnType<typeof ReplyState.prototype.toObject>[];
mkxJState?: ReturnType<typeof MkxJState.prototype.toObject>;
@ -866,7 +866,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
empj?: boolean;
spksState?: ReturnType<typeof ReplyState.prototype.toObject>[];
mkxJState?: ReturnType<typeof MkxJState.prototype.toObject>;
@ -889,8 +889,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.empj != false)
writer.writeBool(2, this.empj);
if (this.spksState.length)
@ -907,7 +907,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.empj = reader.readBool();
@ -933,7 +933,7 @@ export namespace state {
export class StationState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
@ -944,13 +944,13 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
static fromObject(data: {
id?: string;
id?: number;
}): StationState {
const message = new StationState({});
if (data.id != null) {
@ -960,7 +960,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
} = {};
if (this.id != null) {
data.id = this.id;
@ -971,8 +971,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (!w)
return writer.getResultBuffer();
}
@ -983,7 +983,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
default: reader.skipField();
}
@ -1005,7 +1005,7 @@ export namespace state {
speed?: number;
trainLength?: number;
show?: boolean;
headDeviceId?: string;
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
@ -1101,9 +1101,9 @@ export namespace state {
pb_1.Message.setField(this, 5, value);
}
get headDeviceId() {
return pb_1.Message.getFieldWithDefault(this, 6, "") as string;
return pb_1.Message.getFieldWithDefault(this, 6, 0) as number;
}
set headDeviceId(value: string) {
set headDeviceId(value: number) {
pb_1.Message.setField(this, 6, value);
}
get headOffset() {
@ -1178,7 +1178,7 @@ export namespace state {
speed?: number;
trainLength?: number;
show?: boolean;
headDeviceId?: string;
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
@ -1248,7 +1248,7 @@ export namespace state {
speed?: number;
trainLength?: number;
show?: boolean;
headDeviceId?: string;
headDeviceId?: number;
headOffset?: number;
devicePort?: string;
pointTo?: boolean;
@ -1324,8 +1324,8 @@ export namespace state {
writer.writeInt64(4, this.trainLength);
if (this.show != false)
writer.writeBool(5, this.show);
if (this.headDeviceId.length)
writer.writeString(6, this.headDeviceId);
if (this.headDeviceId != 0)
writer.writeUint32(6, this.headDeviceId);
if (this.headOffset != 0)
writer.writeInt64(7, this.headOffset);
if (this.devicePort.length)
@ -1371,7 +1371,7 @@ export namespace state {
message.show = reader.readBool();
break;
case 6:
message.headDeviceId = reader.readString();
message.headDeviceId = reader.readUint32();
break;
case 7:
message.headOffset = reader.readInt64();
@ -2610,7 +2610,7 @@ export namespace state {
export class ReplyState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
xh?: boolean;
code?: string;
}) {
@ -2629,9 +2629,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get xh() {
@ -2647,7 +2647,7 @@ export namespace state {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
id?: string;
id?: number;
xh?: boolean;
code?: string;
}): ReplyState {
@ -2665,7 +2665,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
xh?: boolean;
code?: string;
} = {};
@ -2684,8 +2684,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.xh != false)
writer.writeBool(2, this.xh);
if (this.code.length)
@ -2700,7 +2700,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.xh = reader.readBool();
@ -2723,7 +2723,7 @@ export namespace state {
export class ButtonState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
down?: boolean;
active?: boolean;
}) {
@ -2742,9 +2742,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get down() {
@ -2760,7 +2760,7 @@ export namespace state {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
id?: string;
id?: number;
down?: boolean;
active?: boolean;
}): ButtonState {
@ -2778,7 +2778,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
down?: boolean;
active?: boolean;
} = {};
@ -2797,8 +2797,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.down != false)
writer.writeBool(2, this.down);
if (this.active != false)
@ -2813,7 +2813,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.down = reader.readBool();
@ -2836,7 +2836,7 @@ export namespace state {
export class AlarmState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
active?: boolean;
}) {
super();
@ -2851,9 +2851,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get active() {
@ -2863,7 +2863,7 @@ export namespace state {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
id?: string;
id?: number;
active?: boolean;
}): AlarmState {
const message = new AlarmState({});
@ -2877,7 +2877,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
active?: boolean;
} = {};
if (this.id != null) {
@ -2892,8 +2892,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.active != false)
writer.writeBool(2, this.active);
if (!w)
@ -2906,7 +2906,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.active = reader.readBool();
@ -2926,7 +2926,7 @@ export namespace state {
export class LightState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
active?: boolean;
}) {
super();
@ -2941,9 +2941,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get active() {
@ -2953,7 +2953,7 @@ export namespace state {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
id?: string;
id?: number;
active?: boolean;
}): LightState {
const message = new LightState({});
@ -2967,7 +2967,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
active?: boolean;
} = {};
if (this.id != null) {
@ -2982,8 +2982,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.active != false)
writer.writeBool(2, this.active);
if (!w)
@ -2996,7 +2996,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.active = reader.readBool();
@ -3016,7 +3016,7 @@ export namespace state {
export class PsdState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
asdStates?: AsdState[];
mgj?: boolean;
}) {
@ -3035,9 +3035,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get asdStates() {
@ -3053,7 +3053,7 @@ export namespace state {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
id?: string;
id?: number;
asdStates?: ReturnType<typeof AsdState.prototype.toObject>[];
mgj?: boolean;
}): PsdState {
@ -3071,7 +3071,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
asdStates?: ReturnType<typeof AsdState.prototype.toObject>[];
mgj?: boolean;
} = {};
@ -3090,8 +3090,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.asdStates.length)
writer.writeRepeatedMessage(2, this.asdStates, (item: AsdState) => item.serialize(writer));
if (this.mgj != false)
@ -3106,7 +3106,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
reader.readMessage(message.asdStates, () => pb_1.Message.addToRepeatedWrapperField(message, 2, AsdState.deserialize(reader), AsdState));
@ -3265,7 +3265,7 @@ export namespace state {
export class KeyState extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
id?: string;
id?: number;
gear?: number;
}) {
super();
@ -3280,9 +3280,9 @@ export namespace state {
}
}
get id() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set id(value: string) {
set id(value: number) {
pb_1.Message.setField(this, 1, value);
}
get gear() {
@ -3292,7 +3292,7 @@ export namespace state {
pb_1.Message.setField(this, 2, value);
}
static fromObject(data: {
id?: string;
id?: number;
gear?: number;
}): KeyState {
const message = new KeyState({});
@ -3306,7 +3306,7 @@ export namespace state {
}
toObject() {
const data: {
id?: string;
id?: number;
gear?: number;
} = {};
if (this.id != null) {
@ -3321,8 +3321,8 @@ export namespace state {
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.id.length)
writer.writeString(1, this.id);
if (this.id != 0)
writer.writeUint32(1, this.id);
if (this.gear != 0)
writer.writeInt32(2, this.gear);
if (!w)
@ -3335,7 +3335,7 @@ export namespace state {
break;
switch (reader.getFieldNumber()) {
case 1:
message.id = reader.readString();
message.id = reader.readUint32();
break;
case 2:
message.gear = reader.readInt32();

View File

@ -32,7 +32,6 @@ export namespace graphicData {
gateBoxs?: GatedBox[];
transponders?: Transponder[];
slopes?: Slope[];
CalculateLink?: CalculateLink[];
slopeKiloMarker?: SlopeKiloMarker[];
curvatureKiloMarker?: CurvatureKiloMarker[];
curvatures?: Curvature[];
@ -52,7 +51,7 @@ export namespace graphicData {
otherLineList?: OtherLine[];
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42], this.#one_of_decls);
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 32, 33, 34, 35, 37, 39, 40, 41, 42], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("canvas" in data && data.canvas != undefined) {
this.canvas = data.canvas;
@ -114,9 +113,6 @@ export namespace graphicData {
if ("slopes" in data && data.slopes != undefined) {
this.slopes = data.slopes;
}
if ("CalculateLink" in data && data.CalculateLink != undefined) {
this.CalculateLink = data.CalculateLink;
}
if ("slopeKiloMarker" in data && data.slopeKiloMarker != undefined) {
this.slopeKiloMarker = data.slopeKiloMarker;
}
@ -293,12 +289,6 @@ export namespace graphicData {
set slopes(value: Slope[]) {
pb_1.Message.setRepeatedWrapperField(this, 23, value);
}
get CalculateLink() {
return pb_1.Message.getRepeatedWrapperField(this, CalculateLink, 24) as CalculateLink[];
}
set CalculateLink(value: CalculateLink[]) {
pb_1.Message.setRepeatedWrapperField(this, 24, value);
}
get slopeKiloMarker() {
return pb_1.Message.getRepeatedWrapperField(this, SlopeKiloMarker, 25) as SlopeKiloMarker[];
}
@ -431,7 +421,6 @@ export namespace graphicData {
gateBoxs?: ReturnType<typeof GatedBox.prototype.toObject>[];
transponders?: ReturnType<typeof Transponder.prototype.toObject>[];
slopes?: ReturnType<typeof Slope.prototype.toObject>[];
CalculateLink?: ReturnType<typeof CalculateLink.prototype.toObject>[];
slopeKiloMarker?: ReturnType<typeof SlopeKiloMarker.prototype.toObject>[];
curvatureKiloMarker?: ReturnType<typeof CurvatureKiloMarker.prototype.toObject>[];
curvatures?: ReturnType<typeof Curvature.prototype.toObject>[];
@ -511,9 +500,6 @@ export namespace graphicData {
if (data.slopes != null) {
message.slopes = data.slopes.map(item => Slope.fromObject(item));
}
if (data.CalculateLink != null) {
message.CalculateLink = data.CalculateLink.map(item => CalculateLink.fromObject(item));
}
if (data.slopeKiloMarker != null) {
message.slopeKiloMarker = data.slopeKiloMarker.map(item => SlopeKiloMarker.fromObject(item));
}
@ -589,7 +575,6 @@ export namespace graphicData {
gateBoxs?: ReturnType<typeof GatedBox.prototype.toObject>[];
transponders?: ReturnType<typeof Transponder.prototype.toObject>[];
slopes?: ReturnType<typeof Slope.prototype.toObject>[];
CalculateLink?: ReturnType<typeof CalculateLink.prototype.toObject>[];
slopeKiloMarker?: ReturnType<typeof SlopeKiloMarker.prototype.toObject>[];
curvatureKiloMarker?: ReturnType<typeof CurvatureKiloMarker.prototype.toObject>[];
curvatures?: ReturnType<typeof Curvature.prototype.toObject>[];
@ -668,9 +653,6 @@ export namespace graphicData {
if (this.slopes != null) {
data.slopes = this.slopes.map((item: Slope) => item.toObject());
}
if (this.CalculateLink != null) {
data.CalculateLink = this.CalculateLink.map((item: CalculateLink) => item.toObject());
}
if (this.slopeKiloMarker != null) {
data.slopeKiloMarker = this.slopeKiloMarker.map((item: SlopeKiloMarker) => item.toObject());
}
@ -768,8 +750,6 @@ export namespace graphicData {
writer.writeRepeatedMessage(22, this.transponders, (item: Transponder) => item.serialize(writer));
if (this.slopes.length)
writer.writeRepeatedMessage(23, this.slopes, (item: Slope) => item.serialize(writer));
if (this.CalculateLink.length)
writer.writeRepeatedMessage(24, this.CalculateLink, (item: CalculateLink) => item.serialize(writer));
if (this.slopeKiloMarker.length)
writer.writeRepeatedMessage(25, this.slopeKiloMarker, (item: SlopeKiloMarker) => item.serialize(writer));
if (this.curvatureKiloMarker.length)
@ -873,9 +853,6 @@ export namespace graphicData {
case 23:
reader.readMessage(message.slopes, () => pb_1.Message.addToRepeatedWrapperField(message, 23, Slope.deserialize(reader), Slope));
break;
case 24:
reader.readMessage(message.CalculateLink, () => pb_1.Message.addToRepeatedWrapperField(message, 24, CalculateLink.deserialize(reader), CalculateLink));
break;
case 25:
reader.readMessage(message.slopeKiloMarker, () => pb_1.Message.addToRepeatedWrapperField(message, 25, SlopeKiloMarker.deserialize(reader), SlopeKiloMarker));
break;
@ -7936,335 +7913,6 @@ export namespace graphicData {
return Curvature.deserialize(bytes);
}
}
export class CalculateLink extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
common?: CommonInfo;
points?: Point[];
length?: number;
aRelatedRef?: RelatedRef;
bRelatedRef?: RelatedRef;
devicePositions?: CalculateLink.DevicePosition[];
index?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 6], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("common" in data && data.common != undefined) {
this.common = data.common;
}
if ("points" in data && data.points != undefined) {
this.points = data.points;
}
if ("length" in data && data.length != undefined) {
this.length = data.length;
}
if ("aRelatedRef" in data && data.aRelatedRef != undefined) {
this.aRelatedRef = data.aRelatedRef;
}
if ("bRelatedRef" in data && data.bRelatedRef != undefined) {
this.bRelatedRef = data.bRelatedRef;
}
if ("devicePositions" in data && data.devicePositions != undefined) {
this.devicePositions = data.devicePositions;
}
if ("index" in data && data.index != undefined) {
this.index = data.index;
}
}
}
get common() {
return pb_1.Message.getWrapperField(this, CommonInfo, 1) as CommonInfo;
}
set common(value: CommonInfo) {
pb_1.Message.setWrapperField(this, 1, value);
}
get has_common() {
return pb_1.Message.getField(this, 1) != null;
}
get points() {
return pb_1.Message.getRepeatedWrapperField(this, Point, 2) as Point[];
}
set points(value: Point[]) {
pb_1.Message.setRepeatedWrapperField(this, 2, value);
}
get length() {
return pb_1.Message.getFieldWithDefault(this, 3, 0) as number;
}
set length(value: number) {
pb_1.Message.setField(this, 3, value);
}
get aRelatedRef() {
return pb_1.Message.getWrapperField(this, RelatedRef, 4) as RelatedRef;
}
set aRelatedRef(value: RelatedRef) {
pb_1.Message.setWrapperField(this, 4, value);
}
get has_aRelatedRef() {
return pb_1.Message.getField(this, 4) != null;
}
get bRelatedRef() {
return pb_1.Message.getWrapperField(this, RelatedRef, 5) as RelatedRef;
}
set bRelatedRef(value: RelatedRef) {
pb_1.Message.setWrapperField(this, 5, value);
}
get has_bRelatedRef() {
return pb_1.Message.getField(this, 5) != null;
}
get devicePositions() {
return pb_1.Message.getRepeatedWrapperField(this, CalculateLink.DevicePosition, 6) as CalculateLink.DevicePosition[];
}
set devicePositions(value: CalculateLink.DevicePosition[]) {
pb_1.Message.setRepeatedWrapperField(this, 6, value);
}
get index() {
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
}
set index(value: number) {
pb_1.Message.setField(this, 7, value);
}
static fromObject(data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
points?: ReturnType<typeof Point.prototype.toObject>[];
length?: number;
aRelatedRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
bRelatedRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
devicePositions?: ReturnType<typeof CalculateLink.DevicePosition.prototype.toObject>[];
index?: number;
}): CalculateLink {
const message = new CalculateLink({});
if (data.common != null) {
message.common = CommonInfo.fromObject(data.common);
}
if (data.points != null) {
message.points = data.points.map(item => Point.fromObject(item));
}
if (data.length != null) {
message.length = data.length;
}
if (data.aRelatedRef != null) {
message.aRelatedRef = RelatedRef.fromObject(data.aRelatedRef);
}
if (data.bRelatedRef != null) {
message.bRelatedRef = RelatedRef.fromObject(data.bRelatedRef);
}
if (data.devicePositions != null) {
message.devicePositions = data.devicePositions.map(item => CalculateLink.DevicePosition.fromObject(item));
}
if (data.index != null) {
message.index = data.index;
}
return message;
}
toObject() {
const data: {
common?: ReturnType<typeof CommonInfo.prototype.toObject>;
points?: ReturnType<typeof Point.prototype.toObject>[];
length?: number;
aRelatedRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
bRelatedRef?: ReturnType<typeof RelatedRef.prototype.toObject>;
devicePositions?: ReturnType<typeof CalculateLink.DevicePosition.prototype.toObject>[];
index?: number;
} = {};
if (this.common != null) {
data.common = this.common.toObject();
}
if (this.points != null) {
data.points = this.points.map((item: Point) => item.toObject());
}
if (this.length != null) {
data.length = this.length;
}
if (this.aRelatedRef != null) {
data.aRelatedRef = this.aRelatedRef.toObject();
}
if (this.bRelatedRef != null) {
data.bRelatedRef = this.bRelatedRef.toObject();
}
if (this.devicePositions != null) {
data.devicePositions = this.devicePositions.map((item: CalculateLink.DevicePosition) => item.toObject());
}
if (this.index != null) {
data.index = this.index;
}
return data;
}
serialize(): Uint8Array;
serialize(w: pb_1.BinaryWriter): void;
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
const writer = w || new pb_1.BinaryWriter();
if (this.has_common)
writer.writeMessage(1, this.common, () => this.common.serialize(writer));
if (this.points.length)
writer.writeRepeatedMessage(2, this.points, (item: Point) => item.serialize(writer));
if (this.length != 0)
writer.writeInt32(3, this.length);
if (this.has_aRelatedRef)
writer.writeMessage(4, this.aRelatedRef, () => this.aRelatedRef.serialize(writer));
if (this.has_bRelatedRef)
writer.writeMessage(5, this.bRelatedRef, () => this.bRelatedRef.serialize(writer));
if (this.devicePositions.length)
writer.writeRepeatedMessage(6, this.devicePositions, (item: CalculateLink.DevicePosition) => item.serialize(writer));
if (this.index != 0)
writer.writeInt32(7, this.index);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CalculateLink {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CalculateLink();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
reader.readMessage(message.common, () => message.common = CommonInfo.deserialize(reader));
break;
case 2:
reader.readMessage(message.points, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Point.deserialize(reader), Point));
break;
case 3:
message.length = reader.readInt32();
break;
case 4:
reader.readMessage(message.aRelatedRef, () => message.aRelatedRef = RelatedRef.deserialize(reader));
break;
case 5:
reader.readMessage(message.bRelatedRef, () => message.bRelatedRef = RelatedRef.deserialize(reader));
break;
case 6:
reader.readMessage(message.devicePositions, () => pb_1.Message.addToRepeatedWrapperField(message, 6, CalculateLink.DevicePosition.deserialize(reader), CalculateLink.DevicePosition));
break;
case 7:
message.index = reader.readInt32();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): CalculateLink {
return CalculateLink.deserialize(bytes);
}
}
export namespace CalculateLink {
export class DevicePosition extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
offset?: number;
deviceId?: string;
deviceType?: string;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("offset" in data && data.offset != undefined) {
this.offset = data.offset;
}
if ("deviceId" in data && data.deviceId != undefined) {
this.deviceId = data.deviceId;
}
if ("deviceType" in data && data.deviceType != undefined) {
this.deviceType = data.deviceType;
}
}
}
get offset() {
return pb_1.Message.getFieldWithDefault(this, 1, 0) as number;
}
set offset(value: number) {
pb_1.Message.setField(this, 1, value);
}
get deviceId() {
return pb_1.Message.getFieldWithDefault(this, 2, "") as string;
}
set deviceId(value: string) {
pb_1.Message.setField(this, 2, value);
}
get deviceType() {
return pb_1.Message.getFieldWithDefault(this, 3, "") as string;
}
set deviceType(value: string) {
pb_1.Message.setField(this, 3, value);
}
static fromObject(data: {
offset?: number;
deviceId?: string;
deviceType?: string;
}): DevicePosition {
const message = new DevicePosition({});
if (data.offset != null) {
message.offset = data.offset;
}
if (data.deviceId != null) {
message.deviceId = data.deviceId;
}
if (data.deviceType != null) {
message.deviceType = data.deviceType;
}
return message;
}
toObject() {
const data: {
offset?: number;
deviceId?: string;
deviceType?: string;
} = {};
if (this.offset != null) {
data.offset = this.offset;
}
if (this.deviceId != null) {
data.deviceId = this.deviceId;
}
if (this.deviceType != null) {
data.deviceType = this.deviceType;
}
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.offset != 0)
writer.writeInt32(1, this.offset);
if (this.deviceId.length)
writer.writeString(2, this.deviceId);
if (this.deviceType.length)
writer.writeString(3, this.deviceType);
if (!w)
return writer.getResultBuffer();
}
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): DevicePosition {
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new DevicePosition();
while (reader.nextField()) {
if (reader.isEndGroup())
break;
switch (reader.getFieldNumber()) {
case 1:
message.offset = reader.readInt32();
break;
case 2:
message.deviceId = reader.readString();
break;
case 3:
message.deviceType = reader.readString();
break;
default: reader.skipField();
}
}
return message;
}
serializeBinary(): Uint8Array {
return this.serialize();
}
static deserializeBinary(bytes: Uint8Array): DevicePosition {
return DevicePosition.deserialize(bytes);
}
}
}
export class DepartureTimer extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
@ -9039,7 +8687,7 @@ export namespace graphicData {
if (this.oldrefDevices.length)
writer.writeRepeatedString(2, this.oldrefDevices);
if (this.refDevices.length)
writer.writePackedInt32(3, this.refDevices);
writer.writePackedUint32(3, this.refDevices);
if (!w)
return writer.getResultBuffer();
}
@ -9056,7 +8704,7 @@ export namespace graphicData {
pb_1.Message.addToRepeatedField(message, 2, reader.readString());
break;
case 3:
message.refDevices = reader.readPackedInt32();
message.refDevices = reader.readPackedUint32();
break;
default: reader.skipField();
}
@ -9073,15 +8721,16 @@ export namespace graphicData {
export class SectionCodePoint extends pb_1.Message {
#one_of_decls: number[][] = [];
constructor(data?: any[] | {
centralizedStation?: string;
oldCentralizedStation?: string;
oldsectionIds?: string[];
sectionIds?: number[];
centralizedStation?: number;
}) {
super();
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2, 3], this.#one_of_decls);
if (!Array.isArray(data) && typeof data == "object") {
if ("centralizedStation" in data && data.centralizedStation != undefined) {
this.centralizedStation = data.centralizedStation;
if ("oldCentralizedStation" in data && data.oldCentralizedStation != undefined) {
this.oldCentralizedStation = data.oldCentralizedStation;
}
if ("oldsectionIds" in data && data.oldsectionIds != undefined) {
this.oldsectionIds = data.oldsectionIds;
@ -9089,12 +8738,15 @@ export namespace graphicData {
if ("sectionIds" in data && data.sectionIds != undefined) {
this.sectionIds = data.sectionIds;
}
if ("centralizedStation" in data && data.centralizedStation != undefined) {
this.centralizedStation = data.centralizedStation;
}
}
}
get centralizedStation() {
get oldCentralizedStation() {
return pb_1.Message.getFieldWithDefault(this, 1, "") as string;
}
set centralizedStation(value: string) {
set oldCentralizedStation(value: string) {
pb_1.Message.setField(this, 1, value);
}
get oldsectionIds() {
@ -9109,14 +8761,21 @@ export namespace graphicData {
set sectionIds(value: number[]) {
pb_1.Message.setField(this, 3, value);
}
get centralizedStation() {
return pb_1.Message.getFieldWithDefault(this, 4, 0) as number;
}
set centralizedStation(value: number) {
pb_1.Message.setField(this, 4, value);
}
static fromObject(data: {
centralizedStation?: string;
oldCentralizedStation?: string;
oldsectionIds?: string[];
sectionIds?: number[];
centralizedStation?: number;
}): SectionCodePoint {
const message = new SectionCodePoint({});
if (data.centralizedStation != null) {
message.centralizedStation = data.centralizedStation;
if (data.oldCentralizedStation != null) {
message.oldCentralizedStation = data.oldCentralizedStation;
}
if (data.oldsectionIds != null) {
message.oldsectionIds = data.oldsectionIds;
@ -9124,16 +8783,20 @@ export namespace graphicData {
if (data.sectionIds != null) {
message.sectionIds = data.sectionIds;
}
if (data.centralizedStation != null) {
message.centralizedStation = data.centralizedStation;
}
return message;
}
toObject() {
const data: {
centralizedStation?: string;
oldCentralizedStation?: string;
oldsectionIds?: string[];
sectionIds?: number[];
centralizedStation?: number;
} = {};
if (this.centralizedStation != null) {
data.centralizedStation = this.centralizedStation;
if (this.oldCentralizedStation != null) {
data.oldCentralizedStation = this.oldCentralizedStation;
}
if (this.oldsectionIds != null) {
data.oldsectionIds = this.oldsectionIds;
@ -9141,18 +8804,23 @@ export namespace graphicData {
if (this.sectionIds != null) {
data.sectionIds = this.sectionIds;
}
if (this.centralizedStation != null) {
data.centralizedStation = this.centralizedStation;
}
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.centralizedStation.length)
writer.writeString(1, this.centralizedStation);
if (this.oldCentralizedStation.length)
writer.writeString(1, this.oldCentralizedStation);
if (this.oldsectionIds.length)
writer.writeRepeatedString(2, this.oldsectionIds);
if (this.sectionIds.length)
writer.writePackedUint32(3, this.sectionIds);
if (this.centralizedStation != 0)
writer.writeUint32(4, this.centralizedStation);
if (!w)
return writer.getResultBuffer();
}
@ -9163,7 +8831,7 @@ export namespace graphicData {
break;
switch (reader.getFieldNumber()) {
case 1:
message.centralizedStation = reader.readString();
message.oldCentralizedStation = reader.readString();
break;
case 2:
pb_1.Message.addToRepeatedField(message, 2, reader.readString());
@ -9171,6 +8839,9 @@ export namespace graphicData {
case 3:
message.sectionIds = reader.readPackedUint32();
break;
case 4:
message.centralizedStation = reader.readUint32();
break;
default: reader.skipField();
}
}