-
Notifications
You must be signed in to change notification settings - Fork 21
/
iec104_tcp_packets.py
400 lines (395 loc) · 22.6 KB
/
iec104_tcp_packets.py
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
# u frame types
STARTDT_ACT=0x07
STARTDT_CON=0x0b
STOPDT_ACT=0x13
STOPDT_CON=0x23
TESTFR_ACT=0x43
TESTFR_CON=0x83
#Sending Reasons
Cause_Act=0x06
Cause_Deact=0x08
#Control values
SCO_Off_Np_Ex=0x00
SCO_On_Np_Ex=0x01
SCO_Off_Sp_Ex=0x04
SCO_On_Sp_Ex=0x05
SCO_Off_Np_Se=0x80
SCO_On_Np_Se=0x81
DCO_Off_Np_Se=0x81
DCO_On_Np_Se=0x82
RCO_Down_Np_Se=0x81
RCO_Up_Np_Se=0x82
plist=[
# yaotiao ----------------------------------------------------------
('START','auto','if',[45,1,Cause_Act,4,3,(45000,SCO_Off_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(45100,SCO_On_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(45200,SCO_Off_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(45300,SCO_On_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(45400,SCO_Off_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(45500,SCO_On_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(45150,SCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46000,DCO_Off_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46100,DCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46200,DCO_Off_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46300,DCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46400,DCO_Off_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46500,DCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(46150,DCO_Off_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47000,RCO_Down_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47100,RCO_Up_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47200,RCO_Down_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47300,RCO_Up_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47400,RCO_Down_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47500,RCO_Up_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(47150,RCO_Up_Np_Se)]),
# yaotiao with CTPTime -----------------------------------------------
('START','auto','if',[58,1,Cause_Act,4,3,(45000,SCO_Off_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(45100,SCO_On_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(45200,SCO_Off_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(45300,SCO_On_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(45400,SCO_Off_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(45500,SCO_On_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(45150,SCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46000,DCO_Off_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46100,DCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46200,DCO_Off_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46300,DCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46400,DCO_Off_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46500,DCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(46150,DCO_Off_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47000,RCO_Down_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47100,RCO_Up_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47200,RCO_Down_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47300,RCO_Up_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47400,RCO_Down_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47500,RCO_Up_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(47150,RCO_Up_Np_Se)]),
# asdu 48: -100 - 0 --------------------------------------------------
('START','auto','if',[48,1,Cause_Deact,4,3,(48150,-23,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48000,-101,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48000,-100,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48050,-10,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48100,0,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48100,1,0x80)]),
# asdu 48: 0 - 100
('START','auto','if',[48,1,Cause_Deact,4,3,(48200,-1,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48200,0,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48250,10,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48300,100,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48300,101,0x80)]),
# asdu 48: -100 - 100
('START','auto','if',[48,1,Cause_Deact,4,3,(48400,-101,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48400,-100,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48450,-10,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48450,10,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48500,100,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48500,101,0x80)]),
# asdu 48: -32768 - -32767
('START','auto','if',[48,1,Cause_Deact,4,3,(48600,-32768,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48650,-32767,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48700,-32766,0x80)]),
# asdu 48: 32766 - 32767
('START','auto','if',[48,1,Cause_Deact,4,3,(48800,32766,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48850,32767,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(48900,32765,0x80)]),
# asdu 61: -100 - 0 --------------------------------------------------
('START','auto','if',[61,1,Cause_Deact,4,3,(48150,-23,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48000,-101,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48000,-100,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48050,-10,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48100,0,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48100,1,0x80)]),
# asdu 61: 0 - 100
('START','auto','if',[61,1,Cause_Deact,4,3,(48200,-1,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48200,0,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48250,10,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48300,100,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48300,101,0x80)]),
# asdu 61: -100 - 100
('START','auto','if',[61,1,Cause_Deact,4,3,(48400,-101,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48400,-100,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48450,-10,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48450,10,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48500,100,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48500,101,0x80)]),
# asdu 61: -32768 - -32767
('START','auto','if',[61,1,Cause_Deact,4,3,(48600,-32768,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48650,-32767,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48700,-32766,0x80)]),
# asdu 61: 32766 - 32767
('START','auto','if',[61,1,Cause_Deact,4,3,(48800,32766,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48850,32767,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(48900,32765,0x80)]),
# asdu 49: -100 - 0 -----------------------------------------------
('START','auto','if',[49,1,Cause_Deact,4,3,(49150,-23,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49000,-101,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49000,-100,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49050,-10,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49100,0,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49100,1,0x80)]),
# asdu 49: 0 - 100
('START','auto','if',[49,1,Cause_Deact,4,3,(49200,-1,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49200,0,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49250,10,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49300,100,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49300,101,0x80)]),
# asdu 49: -100 - 100
('START','auto','if',[49,1,Cause_Deact,4,3,(49400,-101,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49400,-100,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49450,-10,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49450,10,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49500,100,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49500,101,0x80)]),
# asdu 49: -32768 - -32767
('START','auto','if',[49,1,Cause_Deact,4,3,(49600,-32768,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49650,-32767,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49700,-32766,0x80)]),
# asdu 49: 32766 - 32767
('START','auto','if',[49,1,Cause_Deact,4,3,(49800,32766,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49850,32767,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(49900,32765,0x80)]),
# asdu 62: -100 - 0 -----------------------------------------------
('START','auto','if',[62,1,Cause_Deact,4,3,(49150,-23,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49000,-101,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49000,-100,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49050,-10,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49100,0,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49100,1,0x80)]),
# asdu 62: 0 - 100
('START','auto','if',[62,1,Cause_Deact,4,3,(49200,-1,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49200,0,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49250,10,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49300,100,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49300,101,0x80)]),
# asdu 62: -100 - 100
('START','auto','if',[62,1,Cause_Deact,4,3,(49400,-101,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49400,-100,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49450,-10,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49450,10,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49500,100,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49500,101,0x80)]),
# asdu 62: -32768 - -32767
('START','auto','if',[62,1,Cause_Deact,4,3,(49600,-32768,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49650,-32767,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49700,-32766,0x80)]),
# asdu 62: 32766 - 32767
('START','auto','if',[62,1,Cause_Deact,4,3,(49800,32766,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49850,32767,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(49900,32765,0x80)]),
# asdu 50: -3.141 - 0 ----------------------------------------------------------------
('START','auto','if',[50,1,Cause_Deact,4,3,(50150,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50000,-3.142,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50000,-3.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50050,-1.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50100,-0.001,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50100,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50100,0.000001,0x80)]),
# asdu 50: 0 - 3.141
('START','auto','if',[50,1,Cause_Deact,4,3,(50200,-0.001,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50200,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50250,0.001,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50300,1.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50300,3.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50300,3.142,0x80)]),
# asdu 50: -3.141 - 3.141
('START','auto','if',[50,1,Cause_Deact,4,3,(50400,-3.142,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50400,-3.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50450,-1.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50450,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50450,1.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50500,3.141,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50500,3.142,0x80)]),
# asdu 50: 3.40281e+38 - 3.40282e+38
('START','auto','if',[50,1,Cause_Deact,4,3,(50650,3402800000000000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50650,340280000000000000000000000000000000000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50600,340281000000000000000000000000000000000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50700,340282000000000000000000000000000000000,0x80)]),
# asdu 50: -3.40282e+38 - -3.40281e+38
('START','auto','if',[50,1,Cause_Deact,4,3,(50850,-3402800000000000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50850,-340280000000000000000000000000000000000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50800,-340281000000000000000000000000000000000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50900,-340282000000000000000000000000000000000,0x80)]),
# asdu 50: 340282.11 - 340282.22
('START','auto','if',[50,1,Cause_Deact,4,3,(50910,340282.10,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50910,340282.11,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50915,340282.12,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50915,340282.2,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50915,340282.21,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50920,340282.22,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50920,340282.23,0x80)]),
# asdu 50: 10000 - 20000
('START','auto','if',[50,1,Cause_Deact,4,3,(50930,9999.999,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50930,10000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50935,10000.001,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50935,15000.0001,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50935,19999.999,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50940,20000,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(50940,20000.001,0x80)]),
# asdu 63: -3.141 - 0 ----------------------------------------------------------------
('START','auto','if',[63,1,Cause_Deact,4,3,(50150,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50000,-3.142,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50000,-3.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50050,-1.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50100,-0.001,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50100,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50100,0.001,0x80)]),
# asdu 63: 0 - 3.141
('START','auto','if',[63,1,Cause_Deact,4,3,(50200,-0.001,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50200,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50250,0.001,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50300,1.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50300,3.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50300,3.142,0x80)]),
# asdu 63: -3.141 - 3.141
('START','auto','if',[63,1,Cause_Deact,4,3,(50400,-3.142,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50400,-3.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50450,-1.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50450,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50450,1.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50500,3.141,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50500,3.142,0x80)]),
# asdu 63: 3.40281e+38 - 3.40282e+38
('START','auto','if',[63,1,Cause_Deact,4,3,(50650,3402800000000000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50650,340280000000000000000000000000000000000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50600,340281000000000000000000000000000000000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50700,340282000000000000000000000000000000000,0x80)]),
# asdu 63: -3.40282e+38 - -3.40281e+38
('START','auto','if',[63,1,Cause_Deact,4,3,(50850,-3402800000000000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50850,-340280000000000000000000000000000000000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50800,-340281000000000000000000000000000000000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50900,-340282000000000000000000000000000000000,0x80)]),
# asdu 63: 340282.11 - 340282.22
('START','auto','if',[63,1,Cause_Deact,4,3,(50910,340282.10,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50910,340282.11,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50915,340282.12,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50915,340282.2,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50915,340282.21,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50920,340282.22,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50920,340282.23,0x80)]),
# asdu 63: 10000 - 20000
('START','auto','if',[63,1,Cause_Deact,4,3,(50930,9999.999,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50930,10000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50935,10000.001,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50935,15000.0001,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50935,19999.999,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50940,20000,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(50940,20000.001,0x80)]),
# asdu 51: 0 - 20000 --------------------------------------------------------------
('START','auto','if',[51,1,Cause_Deact,4,3,(51000,0)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51000,1)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51050,15000)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51050,19999)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51100,20000)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51100,20001)]),
# asdu 51: 4294967294 - 4294967295
('START','auto','if',[51,1,Cause_Deact,4,3,(51250,4294967293)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51200,4294967294)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(51300,4294967295)]),
# asdu 64: 0 - 20000 --------------------------------------------------------------
('START','auto','if',[64,1,Cause_Deact,4,3,(51000,0)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51000,1)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51050,15000)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51050,19999)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51100,20000)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51100,20001)]),
# asdu 64: 4294967294 - 4294967295
('START','auto','if',[64,1,Cause_Deact,4,3,(51250,4294967293)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51200,4294967294)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(51300,4294967295)]),
# yaokong addr:16777214 - 16777215 value 1, 1--------------------------------------
('START','auto','if',[45,1,Cause_Act,4,3,(16777213,SCO_On_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(16777214,SCO_On_Np_Se)]),
('START','auto','if',[45,1,Cause_Act,4,3,(16777215,SCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(16777213,DCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(16777214,DCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,3,(16777215,DCO_On_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(16777213,RCO_Up_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(16777214,RCO_Up_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,3,(16777215,RCO_Up_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(16777213,SCO_On_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(16777214,SCO_On_Np_Se)]),
('START','auto','if',[58,1,Cause_Act,4,3,(16777215,SCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(16777213,DCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(16777214,DCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,3,(16777215,DCO_On_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(16777213,RCO_Up_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(16777214,RCO_Up_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,3,(16777215,RCO_Up_Np_Se)]),
# yaotiao addr:16777214 - 16777215 value -10 - 10 --------------------------------------
('START','auto','if',[48,1,Cause_Deact,4,3,(16777213,0,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(16777214,0,0x80)]),
('START','auto','if',[48,1,Cause_Deact,4,3,(16777215,0,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(16777213,0,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(16777214,0,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,3,(16777215,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(16777213,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(16777214,0,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,3,(16777215,0,0x80)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(16777213,0)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(16777214,0)]),
('START','auto','if',[51,1,Cause_Deact,4,3,(16777215,0)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(16777213,0,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(16777214,0,0x80)]),
('START','auto','if',[61,1,Cause_Deact,4,3,(16777215,0,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(16777213,0,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(16777214,0,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,3,(16777215,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(16777213,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(16777214,0,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,3,(16777215,0,0x80)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(16777213,0)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(16777214,0)]),
('START','auto','if',[64,1,Cause_Deact,4,3,(16777215,0)]),
# yaomai
('START','auto','if',[101,1,Cause_Deact,4,3,(0,0x05)]),
('START','auto','if',[101,1,Cause_Deact,4,3,(0,0x05)]),
('START','auto','if',[101,1,Cause_Deact,4,3,(0,0x05)]),
# clock syn
('START','auto','if',[103,1,Cause_Deact,4,3,(0,0x05)]),
('START','auto','if',[103,1,Cause_Deact,4,3,(0,0x05)]),
('START','auto','if',[103,1,Cause_Deact,4,3,(0,0x05)]),
# wrong device id=4
('START','auto','if',[45,1,Cause_Act,4,4,(2100,SCO_On_Np_Se)]),
('START','auto','if',[46,1,Cause_Deact,4,4,(2100,DCO_On_Np_Se)]),
('START','auto','if',[47,1,Cause_Deact,4,4,(2100,RCO_Up_Np_Se)]),
('START','auto','if',[48,1,Cause_Deact,4,4,(3650,-23,0x80)]),
('START','auto','if',[49,1,Cause_Deact,4,4,(3650,-23,0x80)]),
('START','auto','if',[50,1,Cause_Deact,4,4,(3650,-3.3,0x80)]),
('START','auto','if',[51,1,Cause_Deact,4,4,(3650,0xffff)]),
('START','auto','if',[58,1,Cause_Act,4,4,(2100,SCO_On_Np_Se)]),
('START','auto','if',[59,1,Cause_Deact,4,4,(2100,DCO_On_Np_Se)]),
('START','auto','if',[60,1,Cause_Deact,4,4,(2100,RCO_Up_Np_Se)]),
('START','auto','if',[61,1,Cause_Deact,4,4,(3650,-23,0x80)]),
('START','auto','if',[62,1,Cause_Deact,4,4,(3650,-23,0x80)]),
('START','auto','if',[63,1,Cause_Deact,4,4,(3650,-3.3,0x80)]),
('START','auto','if',[64,1,Cause_Deact,4,4,(3650,0xffff)]),
('START','auto','if',[101,1,Cause_Deact,4,4,(0,0x05)]),
('START','auto','if',[103,1,Cause_Deact,4,4,(0,0x05)]),
# s frame
('START','auto','sf'),
('START','auto','sf'),
('START','auto','sf'),
('START','auto','sf'),
('START','auto','sf'),
('START','auto','sf'),
# u frame
('START','auto','uf',STARTDT_ACT),
('START','auto','uf',STARTDT_CON),
('START','auto','uf',STOPDT_ACT),
('START','auto','uf',STOPDT_CON),
('START','auto','uf',TESTFR_ACT),
('START','auto','uf',TESTFR_CON),
('START','auto','uf',STARTDT_ACT),
('START','auto','uf',STARTDT_CON),
('START','auto','uf',STOPDT_ACT),
('START','auto','uf',STOPDT_CON),
('START','auto','uf',TESTFR_ACT),
('START','auto','uf',TESTFR_CON),
# short i frame
('START','auto','short_if'),
('START','auto','short_if'),
('START','auto','short_if'),
('START','auto','short_if'),
('START','auto','short_if'),
('START','auto','short_if'),
]