2024-01-10 15:46:15 +08:00
|
|
|
var StyleType;
|
|
|
|
(function (StyleType) {
|
|
|
|
StyleType["GP"] = "GP";
|
|
|
|
StyleType["TH"] = "TH";
|
|
|
|
StyleType["KSK"] = "KSK";
|
|
|
|
StyleType["ZDWX"] = "ZDWX";
|
|
|
|
StyleType["KSSSSK"] = "SSS";
|
|
|
|
StyleType["TLZ"] = "TLZ";
|
|
|
|
})(StyleType || (StyleType = {}));
|
2024-01-04 10:40:55 +08:00
|
|
|
var DevicePort;
|
|
|
|
(function (DevicePort) {
|
2024-01-04 18:02:38 +08:00
|
|
|
DevicePort[DevicePort["A"] = 0] = "A";
|
|
|
|
DevicePort[DevicePort["B"] = 1] = "B";
|
|
|
|
DevicePort[DevicePort["C"] = 2] = "C";
|
2024-01-04 10:40:55 +08:00
|
|
|
})(DevicePort || (DevicePort = {}));
|
|
|
|
var DeviceType;
|
|
|
|
(function (DeviceType) {
|
|
|
|
DeviceType[DeviceType["Section"] = 0] = "Section";
|
|
|
|
DeviceType[DeviceType["Turnout"] = 1] = "Turnout";
|
|
|
|
DeviceType[DeviceType["TrainWindow"] = 2] = "TrainWindow";
|
|
|
|
DeviceType[DeviceType["AxleCounting"] = 3] = "AxleCounting";
|
|
|
|
DeviceType[DeviceType["SectionLink"] = 4] = "SectionLink";
|
2024-01-22 10:30:43 +08:00
|
|
|
DeviceType[DeviceType["signal"] = 5] = "signal";
|
|
|
|
DeviceType[DeviceType["station"] = 6] = "station";
|
2024-01-04 10:40:55 +08:00
|
|
|
DeviceType[DeviceType["ScreenDoor"] = 7] = "ScreenDoor";
|
|
|
|
DeviceType[DeviceType["SignalFaultAlarm"] = 8] = "SignalFaultAlarm";
|
|
|
|
DeviceType[DeviceType["Breakers"] = 9] = "Breakers";
|
|
|
|
DeviceType[DeviceType["PowerScreen"] = 10] = "PowerScreen";
|
|
|
|
})(DeviceType || (DeviceType = {}));
|
|
|
|
var Direction;
|
|
|
|
(function (Direction) {
|
|
|
|
Direction[Direction["LEFT"] = 0] = "LEFT";
|
|
|
|
Direction[Direction["RIGHT"] = 1] = "RIGHT";
|
|
|
|
})(Direction || (Direction = {}));
|
|
|
|
var IRelatedRef;
|
|
|
|
(function (IRelatedRef) {
|
|
|
|
function create(type, id, port) {
|
|
|
|
const typeNum = Object.keys(DeviceType).indexOf(type);
|
|
|
|
if (typeNum < 0)
|
|
|
|
throw Error('Invalid device type');
|
|
|
|
return {
|
|
|
|
deviceType: typeNum,
|
|
|
|
id,
|
|
|
|
devicePort: port,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
IRelatedRef.create = create;
|
|
|
|
})(IRelatedRef || (IRelatedRef = {}));
|
|
|
|
|
2024-01-10 15:46:15 +08:00
|
|
|
export { DevicePort, DeviceType, Direction, IRelatedRef, StyleType };
|