rt-graphic-component/components/Signal/bjRtss/Signal.d.ts
2024-01-02 14:36:14 +08:00

155 lines
4.1 KiB
TypeScript

import { Graphics } from 'pixi.js';
import { GraphicData, JlGraphic, GraphicState, JlGraphicTemplate } from 'jl-graphic';
import { LampMainBody } from './LampMainBody';
import { SignalCode } from '../common/SignalCode';
/** 信号机类型 */
export declare enum Model {
HL = 0,// 红绿灯
HLU_FU = 1,// 红绿黄,封黄灯,无引导
HLU_DU_YY = 2,// 红绿黄,不封灯,有单黄,带引导
HLU_YY = 3,// 红绿黄,不封灯,无单黄,带引导
HLU_FL_DU_YY = 4,// 红绿黄,封绿灯,有单黄,带引导
HLU_DU = 5,// 红绿黄,不封灯,有单黄,无引导
AB = 6,// 蓝白
HBU_DU = 7
}
export declare enum Direction {
LEFT = 0,
RIGHT = 1
}
export declare enum DeviceType {
Section = 0,
Turnout = 1,
TrainWindow = 2,
AxleCounting = 3,
SectionLink = 4,
signal = 5,
station = 6,
ScreenDoor = 7,
SignalFaultAlarm = 8,
Breakers = 9,
PowerScreen = 10
}
export declare enum Aspect {
Non = 0,
OFF = 1,
L = 2,
H = 3,
U = 4,
HU = 5,
B = 6,
A = 7
}
export declare enum DevicePort {
A = 0,
B = 1,
C = 2
}
export interface KilometerSystem {
get coordinateSystem(): string;
set coordinateSystem(v: string);
get kilometer(): number;
set kilometer(v: number);
get direction(): Direction;
set direction(v: Direction);
}
export interface IRelatedRefData {
deviceType: DeviceType;
id: number;
devicePort: DevicePort;
}
export interface ISignalData extends GraphicData {
get code(): string;
set code(v: string);
get mirror(): boolean;
set mirror(v: boolean);
get kilometerSystem(): KilometerSystem;
set kilometerSystem(v: KilometerSystem);
get refDev(): IRelatedRefData;
set refDev(v: IRelatedRefData);
get centralizedStations(): number[];
set centralizedStations(v: number[]);
get mt(): Model;
set mt(v: Model);
get direction(): Direction;
set direction(v: Direction);
clone(): ISignalData;
copyFrom(data: ISignalData): void;
eq(other: ISignalData): boolean;
}
export interface ISignalState extends GraphicState {
id?: string;
get aspect(): number;
set aspect(v: number);
}
export declare enum SignalColorEnum {
humanControlColor = "0xffff00",
fleetModeColor = "0x00ff00",
blockedColor = "0XFF0000",
defaultCodeColor = "0XFFFFFF",
lampPostColor = "0xFFFFFF",
redLamp = "0XFF0000",
greenLamp = "0X00FF00",
yellowLamp = "0XFFFF00",
whiteLamp = "0XFFFFFF",
blueLamp = "0X0033FF",
closeLamp = "0X000000",
logicModeColor = "0x000000",
lampLineColor = "0x3149c3"
}
export declare const signalConsts: {
fleetModeLength: number;
fleetModeRadius: number;
fleetModeLineWidth: number;
humanControlRadius: number;
codeOffset: number;
codeFontSize: number;
blockedLineWidth: number;
verticalLampPostLength: number;
levelLampPostLength: number;
postLineWidth: number;
lampRadius: number;
logicModeLineWidth: number;
logicModeDistance: number;
lampLineWidth: number;
};
export declare class Signal extends JlGraphic {
static Type: string;
signalCode: SignalCode;
humanControl: Graphics;
fleetMode: Graphics;
lampMainBody: LampMainBody;
blockedMode: Graphics;
constructor();
get datas(): ISignalData;
get mirror(): boolean;
set mirror(v: boolean);
get states(): ISignalState;
paint(): void;
doRepaint(): void;
chagneState(): void;
/** 设置状态自动进路 */
/** 设置状态人工控 */
/** 设置状态封锁 */
/** 设置状态红灯 */
setStateH(): void;
/** 设置状态绿灯 */
setStateL(): void;
/** 设置状态黄灯 */
setStateU(): void;
/** 设置状态红黄灯 */
setStateHu(): void;
/** 设置状态白灯 */
setStateA(): void;
/** 设置状态蓝灯 */
setStateB(): void;
/** 设置状态灯位关闭 */
setStateOff(): void;
buildRelation(): void;
loadRelations(): void;
}
export declare class SignalTemplate extends JlGraphicTemplate<Signal> {
constructor(dataTemplate: ISignalData, stateTemplate: ISignalState);
new(): Signal;
}