|
|
@@ -1,4 +1,20 @@
|
|
|
-export interface deviceType {
|
|
|
+
|
|
|
+export interface DeviceItem {
|
|
|
+ // 唯一标识
|
|
|
+ id: string;
|
|
|
+ // 指令
|
|
|
+ command: number;
|
|
|
+ // 标识编码
|
|
|
+ code: number;
|
|
|
+ // 状态
|
|
|
+ status: number;
|
|
|
+ // 其他信息
|
|
|
+ jsonStr: string;
|
|
|
+ // 所属站台
|
|
|
+ stationId: number;
|
|
|
+}
|
|
|
+
|
|
|
+export interface DeviceType {
|
|
|
name: string;
|
|
|
description: string;
|
|
|
command: number;
|
|
|
@@ -7,50 +23,78 @@ export interface deviceType {
|
|
|
}
|
|
|
|
|
|
// 列车车门控制 | 列车编号 | 车门状态 (0关 1开)
|
|
|
-export const TRAIN_OPEN_DOOR: deviceType = { command: 10105, name: "TRAIN_OPEN_DOOR", description: "列车车门控制", nameStr: "trainNo", statusStr: "state" };
|
|
|
+export const TRAIN_OPEN_DOOR: DeviceType = { command: 10105, name: "TRAIN_OPEN_DOOR", description: "列车车门控制", nameStr: "trainNo", statusStr: "state" };
|
|
|
// 站台紧急停车操作指令 | 站台编号 | 运行方向 (1下行 2上行) 状态 (0弹起/复位 1按下)
|
|
|
-export const PLATFORM_PRESSING_STOP: deviceType = { command: 20104, name: "PLATFORM_PRESSING_STOP", description: "站台紧急停车操作指令", nameStr: "platformNo", statusStr: "isPressed" };
|
|
|
+export const PLATFORM_PRESSING_STOP: DeviceType = { command: 20104, name: "PLATFORM_PRESSING_STOP", description: "站台紧急停车操作指令", nameStr: "platformNo", statusStr: "isPressed" };
|
|
|
// AFC闸机信息 | 闸机编号 | 闸机状态 (0关闭 1开启 2暂停服务 3故障) | 闸机方向状态 (0进站 1出站)
|
|
|
-export const AFC_GATE_MACHINE: deviceType = { command: 10201, name: "AFC_GATE_MACHINE", description: "AFC闸机信息", nameStr: "gateMachineNo", statusStr: "state" };
|
|
|
+export const AFC_GATE_MACHINE: DeviceType = { command: 10201, name: "AFC_GATE_MACHINE", description: "AFC闸机信息", nameStr: "gateMachineNo", statusStr: "state" };
|
|
|
// AFC自动售票机信息 | 售票机编号 | 状态 (0正常服务 1暂停服务 2故障)
|
|
|
-export const AFC_TICKETING_AUTO: deviceType = { command: 10202, name: "AFC_TICKETING_AUTO", description: "AFC自动售票机信息", nameStr: "tvmNo", statusStr: "state" };
|
|
|
+export const AFC_TICKETING_AUTO: DeviceType = { command: 10202, name: "AFC_TICKETING_AUTO", description: "AFC自动售票机信息", nameStr: "tvmNo", statusStr: "state" };
|
|
|
// AFC半自动售票机信息
|
|
|
-export const AFC_TICKETING_SEMI: deviceType = { command: 10203, name: "AFC_TICKETING_SEMI", description: "AFC半自动售票机信息", nameStr: "ticketNo", statusStr: "state" };
|
|
|
+export const AFC_TICKETING_SEMI: DeviceType = { command: 10203, name: "AFC_TICKETING_SEMI", description: "AFC半自动售票机信息", nameStr: "ticketNo", statusStr: "state" };
|
|
|
// AFC闸机操作指令 | 闸机编号 | 闸机状态 (0关闭 1开启 2暂停服务 3故障)
|
|
|
-export const AFC_GATE_MACHINE_STATUS: deviceType = { command: 20201, name: "AFC_GATE_MACHINE_STATUS", description: "AFC闸机操作指令", nameStr: "gateMachineNo", statusStr: "state" };
|
|
|
+export const AFC_GATE_MACHINE_STATUS: DeviceType = { command: 20201, name: "AFC_GATE_MACHINE_STATUS", description: "AFC闸机操作指令", nameStr: "gateMachineNo", statusStr: "state" };
|
|
|
// AFC自动售票机操作指令 | 售票机编号 | 状态 (0正常服务 1暂停服务 2故障)
|
|
|
-export const AFC_TICKETING_AUTO_STATUS: deviceType = { command: 20202, name: "AFC_TICKETING_AUTO_STATUS", description: "AFC自动售票机操作指令", nameStr: "tvmNo", statusStr: "state" };
|
|
|
+export const AFC_TICKETING_AUTO_STATUS: DeviceType = { command: 20202, name: "AFC_TICKETING_AUTO_STATUS", description: "AFC自动售票机操作指令", nameStr: "tvmNo", statusStr: "state" };
|
|
|
// AFC半自动售票机操作指令
|
|
|
-export const AFC_TICKETING_SEMI_STATUS: deviceType = { command: 20203, name: "AFC_TICKETING_SEMI_STATUS", description: "AFC半自动售票机操作指令", nameStr: "ticketNo", statusStr: "state" };
|
|
|
+export const AFC_TICKETING_SEMI_STATUS: DeviceType = { command: 20203, name: "AFC_TICKETING_SEMI_STATUS", description: "AFC半自动售票机操作指令", nameStr: "ticketNo", statusStr: "state" };
|
|
|
// AFC IBP盘操作指令 | 车站编号 | 紧急释放状态 (0释放 | 1按下)
|
|
|
-export const AFC_IBP: deviceType = { command: 20204, name: "AFC_IBP", description: "AFC IBP盘操作指令", nameStr: "stationNo", statusStr: "emergency_release" };
|
|
|
+export const AFC_IBP: DeviceType = { command: 20204, name: "AFC_IBP", description: "AFC IBP盘操作指令", nameStr: "stationNo", statusStr: "emergency_release" };
|
|
|
|
|
|
// ------ 站台名设备
|
|
|
// 单活动门锁闭状态状态 | 活动门编号 | 锁闭状态 (0关闭锁紧 | 1未关闭锁紧)
|
|
|
-export const PLATFORM_DOOR_LOCK: deviceType = { command: 10301, name: "PLATFORM_DOOR_LOCK", description: "单活动门锁闭状态", nameStr: "platformDoorNo", statusStr: "state" };
|
|
|
+export const PLATFORM_DOOR_LOCK: DeviceType = { command: 10301, name: "PLATFORM_DOOR_LOCK", description: "单活动门锁闭状态", nameStr: "platformDoorNo", statusStr: "state" };
|
|
|
// 单活动门控制状态 | 活动门编号 | 控制状态 (0自动 1手动开 2手动关 3隔离)
|
|
|
-export const PLATFORM_DOOR_CONTROL: deviceType = { command: 10302, name: "PLATFORM_DOOR_CONTROL", description: "单活动门控制状态", nameStr: "platformDoorNo", statusStr: "state" };
|
|
|
+export const PLATFORM_DOOR_CONTROL: DeviceType = { command: 10302, name: "PLATFORM_DOOR_CONTROL", description: "单活动门控制状态", nameStr: "platformDoorNo", statusStr: "state" };
|
|
|
// LCW操作指令 | 活动门编号 | 操作指令 (0自动 1手动开 2手动关 3隔离)
|
|
|
-export const PLATFORM_DOOR_LCW: deviceType = { command: 20301, name: "PLATFORM_DOOR_LCW", description: "LCW操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
+export const PLATFORM_DOOR_LCW: DeviceType = { command: 20301, name: "PLATFORM_DOOR_LCW", description: "LCW操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
// PSL互锁解除操作指令 | PSL编号 | 操作指令 (0正常 | 1互锁解除)
|
|
|
-export const PSL_LOCK: deviceType = { command: 20302, name: "PSL_LOCK", description: "PSL互锁解除操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
+export const PSL_LOCK: DeviceType = { command: 20302, name: "PSL_LOCK", description: "PSL互锁解除操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
// PSL允许操作指令 | PSL编号 | 操作指令 (0允许 | 1未允许)
|
|
|
-export const PSL_CONTROL: deviceType = { command: 20303, name: "PSL_CONTROL", description: "PSL允许操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
+export const PSL_CONTROL: DeviceType = { command: 20303, name: "PSL_CONTROL", description: "PSL允许操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
// PSL开门操作指令 | PSL编号 | 操作指令 (0关门 | 1未关门)
|
|
|
-export const PSL_DOOR_OPEN: deviceType = { command: 20304, name: "PSL_DOOR_OPEN", description: "PSL开门操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
+export const PSL_DOOR_OPEN: DeviceType = { command: 20304, name: "PSL_DOOR_OPEN", description: "PSL开门操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
// PSL关门操作指令 | PSL编号 | 操作指令 (0关门 | 1未关门)
|
|
|
-export const PSL_DOOR_CLOSE: deviceType = { command: 20305, name: "PSL_DOOR_CLOSE", description: "PSL关门操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
+export const PSL_DOOR_CLOSE: DeviceType = { command: 20305, name: "PSL_DOOR_CLOSE", description: "PSL关门操作指令", nameStr: "pslNo", statusStr: "optCmd" };
|
|
|
// IBP允许操作指令 | 站台门编号 | 操作指令 (0允许 1未允许)
|
|
|
-export const IBP_CONTROL: deviceType = { command: 20306, name: "IBP_CONTROL", description: "IBP允许操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
+export const IBP_CONTROL: DeviceType = { command: 20306, name: "IBP_CONTROL", description: "IBP允许操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
// IBP开门操作指令 | 站台门编号 | 操作指令 (0开门 1未开门)
|
|
|
-export const IBP_DOOR_OPEN: deviceType = { command: 20307, name: "IBP_DOOR_OPEN", description: "IBP开门操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
+export const IBP_DOOR_OPEN: DeviceType = { command: 20307, name: "IBP_DOOR_OPEN", description: "IBP开门操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
// IBP关门操作指令 | 站台门编号 | 操作指令 (0关门 1未关门)
|
|
|
-export const IBP_DOOR_CLOSE: deviceType = { command: 20308, name: "IBP_DOOR_CLOSE", description: "IBP关门操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
+export const IBP_DOOR_CLOSE: DeviceType = { command: 20308, name: "IBP_DOOR_CLOSE", description: "IBP关门操作指令", nameStr: "platformDoorNo", statusStr: "optCmd" };
|
|
|
// 垂直电梯运行状态 | 垂直电梯编号 | 状态 (0运行 1停止 2禁用)
|
|
|
-export const ELEVATOR_VERTICAL: deviceType = { command: 10401, name: "ELEVATOR_VERTICAL", description: "垂直电梯运行状态", nameStr: "verticalElevatorNo", statusStr: "state" };
|
|
|
+export const ELEVATOR_VERTICAL: DeviceType = { command: 10401, name: "ELEVATOR_VERTICAL", description: "垂直电梯运行状态", nameStr: "verticalElevatorNo", statusStr: "state" };
|
|
|
// 电扶梯运行状态 | 电扶梯编号 | state (0上行 1下行 2停止 3禁用)
|
|
|
-export const ELEVATOR_HAND: deviceType = { command: 10402, name: "ELEVATOR_HAND", description: "电扶梯运行状态", nameStr: "elevatorNo", statusStr: "state" };
|
|
|
+export const ELEVATOR_HAND: DeviceType = { command: 10402, name: "ELEVATOR_HAND", description: "电扶梯运行状态", nameStr: "elevatorNo", statusStr: "state" };
|
|
|
// 垂直电梯操作指令 | 垂直电梯编号 | 状态 (0运行 1停止 2禁用)
|
|
|
-export const ELEVATOR_VERTICAL_COMMAND: deviceType = { command: 20401, name: "ELEVATOR_VERTICAL_COMMAND", description: "垂直电梯操作指令", nameStr: "verticalElevatorNo", statusStr: "state" };
|
|
|
+export const ELEVATOR_VERTICAL_COMMAND: DeviceType = { command: 20401, name: "ELEVATOR_VERTICAL_COMMAND", description: "垂直电梯操作指令", nameStr: "verticalElevatorNo", statusStr: "state" };
|
|
|
// 电扶梯操作指令 | 电扶梯编号 | 状态 (0上行 1下行 2停止 3禁用)
|
|
|
-export const ELEVATOR_HAND_COMMAND: deviceType = { command: 20402, name: "ELEVATOR_HAND_COMMAND", description: "电扶梯操作指令", nameStr: "elevatorNo", statusStr: "state" };
|
|
|
+export const ELEVATOR_HAND_COMMAND: DeviceType = { command: 20402, name: "ELEVATOR_HAND_COMMAND", description: "电扶梯操作指令", nameStr: "elevatorNo", statusStr: "state" };
|
|
|
+
|
|
|
+const deviceTypeArray: DeviceType[] = [
|
|
|
+ TRAIN_OPEN_DOOR,
|
|
|
+ PLATFORM_PRESSING_STOP,
|
|
|
+ AFC_GATE_MACHINE,
|
|
|
+ AFC_TICKETING_AUTO,
|
|
|
+ AFC_TICKETING_SEMI,
|
|
|
+ AFC_GATE_MACHINE_STATUS,
|
|
|
+ AFC_TICKETING_AUTO_STATUS,
|
|
|
+ AFC_TICKETING_SEMI_STATUS,
|
|
|
+ AFC_IBP,
|
|
|
+ PLATFORM_DOOR_LOCK,
|
|
|
+ PLATFORM_DOOR_CONTROL,
|
|
|
+ PLATFORM_DOOR_LCW,
|
|
|
+ PSL_LOCK,
|
|
|
+ PSL_CONTROL,
|
|
|
+ PSL_DOOR_OPEN,
|
|
|
+ PSL_DOOR_CLOSE,
|
|
|
+ IBP_CONTROL,
|
|
|
+ IBP_DOOR_OPEN,
|
|
|
+ IBP_DOOR_CLOSE,
|
|
|
+ ELEVATOR_VERTICAL,
|
|
|
+ ELEVATOR_HAND,
|
|
|
+ ELEVATOR_VERTICAL_COMMAND,
|
|
|
+ ELEVATOR_HAND_COMMAND
|
|
|
+]
|
|
|
+
|
|
|
+export const deviceTypeSocket = deviceTypeArray.filter(item => item.command.toString().startsWith("2"));
|