1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
| // 实例状态枚举
| export enum InstanceStatus {
| Stopped = 'Stopped',
| Starting = 'Starting',
| Running = 'Running',
| Stopping = 'Stopping',
| Error = 'Error'
| }
|
| // PLC 型号枚举
| export enum SiemensPLCType {
| S7200Smart = 'S7200Smart',
| S71200 = 'S71200',
| S71500 = 'S71500',
| S7300 = 'S7300',
| S7400 = 'S7400'
| }
|
| // 内存区域配置
| export interface MemoryRegionConfig {
| mRegionSize: number
| dbBlockCount: number
| dbBlockSize: number
| iRegionSize: number
| qRegionSize: number
| tRegionCount: number
| cRegionCount: number
| }
|
| // 实例配置
| export interface InstanceConfig {
| id: string
| name: string
| plcType: SiemensPLCType
| port: number
| activationKey: string
| autoStart: boolean
| memoryConfig: MemoryRegionConfig
| }
|
| // 客户端连接信息
| export interface ClientConnection {
| endpoint: string
| connectTime: string
| lastActivityTime: string
| }
|
| // 实例状态
| export interface InstanceState {
| instanceId: string
| name: string
| plcType: string
| port: number
| status: InstanceStatus
| clientCount: number
| totalRequests: number
| startTime: string | null
| lastActivityTime: string | null
| errorMessage: string | null
| }
|
| // 实例列表项
| export interface InstanceListItem {
| instanceId: string
| name: string
| plcType: string
| port: number
| status: string
| clientCount: number
| totalRequests: number
| startTime: string | null
| lastActivityTime: string | null
| errorMessage: string | null
| }
|
| // 创建实例输入
| export interface CreateInstanceInput {
| id: string
| name: string
| plcType: SiemensPLCType
| port: number
| activationKey?: string
| autoStart: boolean
| mRegionSize: number
| dbBlockCount: number
| dbBlockSize: number
| iRegionSize: number
| qRegionSize: number
| tRegionCount: number
| cRegionCount: number
| }
|
|