protobuf同步
This commit is contained in:
parent
4e72128bbd
commit
030bea1293
@ -30,6 +30,6 @@ export namespace alert {
|
|||||||
AXLE_LED_ORANGE = 15,
|
AXLE_LED_ORANGE = 15,
|
||||||
AXLE_LED_ORANGE_MOST = 16,
|
AXLE_LED_ORANGE_MOST = 16,
|
||||||
SWITCH_LOST_MOST = 17,
|
SWITCH_LOST_MOST = 17,
|
||||||
TRAIN_SIGNAL = 18
|
TRAIN_EB_ATP = 18
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,7 @@ export namespace alert {
|
|||||||
alert_object?: string;
|
alert_object?: string;
|
||||||
alert_type?: dependency_1.alert.AlertType;
|
alert_type?: dependency_1.alert.AlertType;
|
||||||
locator_device_id?: string;
|
locator_device_id?: string;
|
||||||
|
alert_location_id?: number;
|
||||||
mock?: boolean;
|
mock?: boolean;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
@ -114,6 +115,9 @@ export namespace alert {
|
|||||||
if ("locator_device_id" in data && data.locator_device_id != undefined) {
|
if ("locator_device_id" in data && data.locator_device_id != undefined) {
|
||||||
this.locator_device_id = data.locator_device_id;
|
this.locator_device_id = data.locator_device_id;
|
||||||
}
|
}
|
||||||
|
if ("alert_location_id" in data && data.alert_location_id != undefined) {
|
||||||
|
this.alert_location_id = data.alert_location_id;
|
||||||
|
}
|
||||||
if ("mock" in data && data.mock != undefined) {
|
if ("mock" in data && data.mock != undefined) {
|
||||||
this.mock = data.mock;
|
this.mock = data.mock;
|
||||||
}
|
}
|
||||||
@ -167,11 +171,17 @@ export namespace alert {
|
|||||||
set locator_device_id(value: string) {
|
set locator_device_id(value: string) {
|
||||||
pb_1.Message.setField(this, 8, value);
|
pb_1.Message.setField(this, 8, value);
|
||||||
}
|
}
|
||||||
|
get alert_location_id() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 9, 0) as number;
|
||||||
|
}
|
||||||
|
set alert_location_id(value: number) {
|
||||||
|
pb_1.Message.setField(this, 9, value);
|
||||||
|
}
|
||||||
get mock() {
|
get mock() {
|
||||||
return pb_1.Message.getFieldWithDefault(this, 9, false) as boolean;
|
return pb_1.Message.getFieldWithDefault(this, 10, false) as boolean;
|
||||||
}
|
}
|
||||||
set mock(value: boolean) {
|
set mock(value: boolean) {
|
||||||
pb_1.Message.setField(this, 9, value);
|
pb_1.Message.setField(this, 10, value);
|
||||||
}
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
id?: string;
|
id?: string;
|
||||||
@ -182,6 +192,7 @@ export namespace alert {
|
|||||||
alert_object?: string;
|
alert_object?: string;
|
||||||
alert_type?: dependency_1.alert.AlertType;
|
alert_type?: dependency_1.alert.AlertType;
|
||||||
locator_device_id?: string;
|
locator_device_id?: string;
|
||||||
|
alert_location_id?: number;
|
||||||
mock?: boolean;
|
mock?: boolean;
|
||||||
}): Message {
|
}): Message {
|
||||||
const message = new Message({});
|
const message = new Message({});
|
||||||
@ -209,6 +220,9 @@ export namespace alert {
|
|||||||
if (data.locator_device_id != null) {
|
if (data.locator_device_id != null) {
|
||||||
message.locator_device_id = data.locator_device_id;
|
message.locator_device_id = data.locator_device_id;
|
||||||
}
|
}
|
||||||
|
if (data.alert_location_id != null) {
|
||||||
|
message.alert_location_id = data.alert_location_id;
|
||||||
|
}
|
||||||
if (data.mock != null) {
|
if (data.mock != null) {
|
||||||
message.mock = data.mock;
|
message.mock = data.mock;
|
||||||
}
|
}
|
||||||
@ -224,6 +238,7 @@ export namespace alert {
|
|||||||
alert_object?: string;
|
alert_object?: string;
|
||||||
alert_type?: dependency_1.alert.AlertType;
|
alert_type?: dependency_1.alert.AlertType;
|
||||||
locator_device_id?: string;
|
locator_device_id?: string;
|
||||||
|
alert_location_id?: number;
|
||||||
mock?: boolean;
|
mock?: boolean;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.id != null) {
|
if (this.id != null) {
|
||||||
@ -250,6 +265,9 @@ export namespace alert {
|
|||||||
if (this.locator_device_id != null) {
|
if (this.locator_device_id != null) {
|
||||||
data.locator_device_id = this.locator_device_id;
|
data.locator_device_id = this.locator_device_id;
|
||||||
}
|
}
|
||||||
|
if (this.alert_location_id != null) {
|
||||||
|
data.alert_location_id = this.alert_location_id;
|
||||||
|
}
|
||||||
if (this.mock != null) {
|
if (this.mock != null) {
|
||||||
data.mock = this.mock;
|
data.mock = this.mock;
|
||||||
}
|
}
|
||||||
@ -275,8 +293,10 @@ export namespace alert {
|
|||||||
writer.writeEnum(7, this.alert_type);
|
writer.writeEnum(7, this.alert_type);
|
||||||
if (this.locator_device_id.length)
|
if (this.locator_device_id.length)
|
||||||
writer.writeString(8, this.locator_device_id);
|
writer.writeString(8, this.locator_device_id);
|
||||||
|
if (this.alert_location_id != 0)
|
||||||
|
writer.writeInt64(9, this.alert_location_id);
|
||||||
if (this.mock != false)
|
if (this.mock != false)
|
||||||
writer.writeBool(9, this.mock);
|
writer.writeBool(10, this.mock);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -311,6 +331,9 @@ export namespace alert {
|
|||||||
message.locator_device_id = reader.readString();
|
message.locator_device_id = reader.readString();
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
|
message.alert_location_id = reader.readInt64();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
message.mock = reader.readBool();
|
message.mock = reader.readBool();
|
||||||
break;
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
|
Loading…
Reference in New Issue
Block a user