车站和站台状态数据

This commit is contained in:
joylink_zhaoerwei 2023-07-03 14:38:15 +08:00
parent 104dfdec3b
commit edb93a32e9
2 changed files with 18 additions and 1 deletions

View File

@ -74,6 +74,9 @@ export class PlatformState extends GraphicStateBase implements IPlatformState {
super(states, Platform.Type);
}
get code(): string {
return this.states.id;
}
get emergstop(): boolean {
return this.states.emergstop;
}
@ -177,6 +180,12 @@ export class PlatformState extends GraphicStateBase implements IPlatformState {
clone(): PlatformState {
return new PlatformState(this.states.cloneMessage());
}
copyFrom(data: GraphicStateBase): void {
pb_1.Message.copyInto(data._state, this._state);
}
eq(data: GraphicStateBase): boolean {
return pb_1.Message.equals(this._state, data._state);
}
}
const holdConfig: MenuItemOptions = {

View File

@ -79,6 +79,9 @@ export class StationState extends GraphicStateBase implements IStationState {
super(states, Station.Type);
}
get code(): string {
return this.states.id;
}
get ipRtuStusDown(): boolean {
return this.states.ipRtuStusDown;
}
@ -106,10 +109,15 @@ export class StationState extends GraphicStateBase implements IStationState {
get states(): state.Rtu {
return this.getState<state.Rtu>();
}
clone(): StationState {
return new StationState(this.states.cloneMessage());
}
copyFrom(data: GraphicStateBase): void {
pb_1.Message.copyInto(data._state, this._state);
}
eq(data: GraphicStateBase): boolean {
return pb_1.Message.equals(this._state, data._state);
}
}
const powerUnlockConfig: MenuItemOptions = {