51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
var StyleType;
|
|
(function (StyleType) {
|
|
StyleType["GP"] = "GP";
|
|
StyleType["TH"] = "TH";
|
|
StyleType["KSK"] = "KSK";
|
|
StyleType["ZDWX"] = "ZDWX";
|
|
StyleType["KSSSSK"] = "SSS";
|
|
StyleType["TLZ"] = "TLZ";
|
|
})(StyleType || (StyleType = {}));
|
|
var DevicePort;
|
|
(function (DevicePort) {
|
|
DevicePort[DevicePort["A"] = 0] = "A";
|
|
DevicePort[DevicePort["B"] = 1] = "B";
|
|
DevicePort[DevicePort["C"] = 2] = "C";
|
|
})(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";
|
|
DeviceType[DeviceType["signal"] = 5] = "signal";
|
|
DeviceType[DeviceType["station"] = 6] = "station";
|
|
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 = {}));
|
|
|
|
export { DevicePort, DeviceType, Direction, IRelatedRef, StyleType };
|