zhanghaijun 2 éve%!(EXTRA string=óta)
szülő
commit
9a400768ab

+ 4 - 0
train-web/src/pages/socket/index.vue

@@ -0,0 +1,4 @@
+<template>
+  <h1>socket test</h1>
+</template>
+<script setup lang="ts"></script>

+ 56 - 0
train-web/src/pages/socket/socket.ts

@@ -0,0 +1,56 @@
+export interface deviceType {
+  name: string;
+  description: string;
+  command: number;
+  nameStr: string;
+  statusStr: string;
+}
+
+// 列车车门控制 | 列车编号 | 车门状态 (0关 1开)
+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" };
+// 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" };
+// AFC自动售票机信息 | 售票机编号 | 状态 (0正常服务 1暂停服务 2故障)
+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" };
+// 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" };
+// AFC自动售票机操作指令 | 售票机编号 | 状态 (0正常服务 1暂停服务 2故障)
+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" };
+// AFC IBP盘操作指令 | 车站编号 | 紧急释放状态 (0释放 | 1按下)
+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" };
+// 单活动门控制状态 | 活动门编号 | 控制状态 (0自动 1手动开 2手动关 3隔离)
+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" };
+// PSL互锁解除操作指令 | PSL编号 | 操作指令 (0正常 | 1互锁解除)
+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" };
+// PSL开门操作指令 | PSL编号 | 操作指令 (0关门 | 1未关门)
+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" };
+// IBP允许操作指令 | 站台门编号 | 操作指令 (0允许 1未允许)
+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" };
+// IBP关门操作指令 | 站台门编号 | 操作指令 (0关门 1未关门)
+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" };
+// 电扶梯运行状态 | 电扶梯编号 | state (0上行 1下行 2停止 3禁用)
+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" };
+// 电扶梯操作指令 | 电扶梯编号 | 状态 (0上行 1下行 2停止 3禁用)
+export const ELEVATOR_HAND_COMMAND: deviceType = { command: 20402, name: "ELEVATOR_HAND_COMMAND", description: "电扶梯操作指令", nameStr: "elevatorNo", statusStr: "state" };