报警故障阈值配置新增项
This commit is contained in:
parent
be5408aedc
commit
c0d55ccee6
@ -95,4 +95,9 @@ export const GuardConfigTypeData = {
|
||||
unit: '秒',
|
||||
deviceType: '屏蔽门',
|
||||
},
|
||||
trainAtpCutTimes: {
|
||||
label: '列车制动后导致atp切除的超时时间',
|
||||
unit: '秒',
|
||||
deviceType: '列车',
|
||||
},
|
||||
};
|
||||
|
@ -14,6 +14,7 @@ export namespace alert {
|
||||
orangeLedMostNums?: number;
|
||||
canNotOpenTimes?: number;
|
||||
canNotCloseTimes?: number;
|
||||
trainAtpCutTimes?: number;
|
||||
}) {
|
||||
super();
|
||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||
@ -36,6 +37,9 @@ export namespace alert {
|
||||
if ("canNotCloseTimes" in data && data.canNotCloseTimes != undefined) {
|
||||
this.canNotCloseTimes = data.canNotCloseTimes;
|
||||
}
|
||||
if ("trainAtpCutTimes" in data && data.trainAtpCutTimes != undefined) {
|
||||
this.trainAtpCutTimes = data.trainAtpCutTimes;
|
||||
}
|
||||
}
|
||||
}
|
||||
get switchLostTimes() {
|
||||
@ -74,6 +78,12 @@ export namespace alert {
|
||||
set canNotCloseTimes(value: number) {
|
||||
pb_1.Message.setField(this, 6, value);
|
||||
}
|
||||
get trainAtpCutTimes() {
|
||||
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
|
||||
}
|
||||
set trainAtpCutTimes(value: number) {
|
||||
pb_1.Message.setField(this, 7, value);
|
||||
}
|
||||
static fromObject(data: {
|
||||
switchLostTimes?: number;
|
||||
switchLostMostNums?: number;
|
||||
@ -81,6 +91,7 @@ export namespace alert {
|
||||
orangeLedMostNums?: number;
|
||||
canNotOpenTimes?: number;
|
||||
canNotCloseTimes?: number;
|
||||
trainAtpCutTimes?: number;
|
||||
}): GuardConfig {
|
||||
const message = new GuardConfig({});
|
||||
if (data.switchLostTimes != null) {
|
||||
@ -101,6 +112,9 @@ export namespace alert {
|
||||
if (data.canNotCloseTimes != null) {
|
||||
message.canNotCloseTimes = data.canNotCloseTimes;
|
||||
}
|
||||
if (data.trainAtpCutTimes != null) {
|
||||
message.trainAtpCutTimes = data.trainAtpCutTimes;
|
||||
}
|
||||
return message;
|
||||
}
|
||||
toObject() {
|
||||
@ -111,6 +125,7 @@ export namespace alert {
|
||||
orangeLedMostNums?: number;
|
||||
canNotOpenTimes?: number;
|
||||
canNotCloseTimes?: number;
|
||||
trainAtpCutTimes?: number;
|
||||
} = {};
|
||||
if (this.switchLostTimes != null) {
|
||||
data.switchLostTimes = this.switchLostTimes;
|
||||
@ -130,6 +145,9 @@ export namespace alert {
|
||||
if (this.canNotCloseTimes != null) {
|
||||
data.canNotCloseTimes = this.canNotCloseTimes;
|
||||
}
|
||||
if (this.trainAtpCutTimes != null) {
|
||||
data.trainAtpCutTimes = this.trainAtpCutTimes;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
serialize(): Uint8Array;
|
||||
@ -148,6 +166,8 @@ export namespace alert {
|
||||
writer.writeInt32(5, this.canNotOpenTimes);
|
||||
if (this.canNotCloseTimes != 0)
|
||||
writer.writeInt32(6, this.canNotCloseTimes);
|
||||
if (this.trainAtpCutTimes != 0)
|
||||
writer.writeInt32(7, this.trainAtpCutTimes);
|
||||
if (!w)
|
||||
return writer.getResultBuffer();
|
||||
}
|
||||
@ -175,6 +195,9 @@ export namespace alert {
|
||||
case 6:
|
||||
message.canNotCloseTimes = reader.readInt32();
|
||||
break;
|
||||
case 7:
|
||||
message.trainAtpCutTimes = reader.readInt32();
|
||||
break;
|
||||
default: reader.skipField();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user