0%

小米DSA状态字节定义

小米DSA通讯部分说明

四轮

车型信息

ServiceID StartByte Length UserDefine
04 23 17 VIN
04 12 3 ZTS

设备状态

Byte bit UserDefine
5 1 PLCFault(Communication_NCA_IN_System_Fault)或非自动模式(Communication_NCA_IN_System_AutoMode)或放弃测试按钮(Communication_NCA_IN_CycleAbort)
7 0 四轮对中完成(Communication_NCA_IN_Centered)
7 1 四轮测试完成标志位(System_BEP_NewData)
7 2 轮眉测试完成标志位
7 3 空悬标定完成滚筒启动后置位
7 4 近光测试完成(Communication_NCA_IN_HLA*LowDone)
7 5 远光测试完成(Communication_NCA_IN_HLA*HighDone)
7 6 ADB测试完成(Communication_NCA_IN_HLA*ADBDone)
7 7 四轮调整完成按钮信号(Communication_NCA_IN_CycleComplete)

ADAS

接收DSA信息

ServiceID StartByte Length UserDefine
04 8 17 VIN
04 25 1 ZTS
0A 8 2 CarParam_ACC_TargetX
0A 10 2 CarParam_ACC_TargetY
0A 12 2 CarParam_ACC_TargetZ
0D 8 2 CarParam_HUD_TargetX
0D 10 2 CarParam_HUD_TargetY
0D 12 2 CarParam_HUD_TargetZ
0D 14 2 CarParam_HUD_TargetRX
0D 16 2 CarParam_HUD_TargetRY
0D 18 2 CarParam_HUD_TargetRZ

设备状态

Byte bit UserDefine
5 0 Communication_FAS_IN_System_EStop
5 1 Communication_FAS_IN_System_Fault
5 4 Communication_FAS_IN_System_AutoMode
5 5 !Communication_FAS_IN_System_AutoMode
5 7 上述信号正常

部分代码

四轮

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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
public override void IDT_SERVICE_02_STOP()
{
ExecuteProAndCheckReturn("MainThread_Monitor_CancelTest");
}

private void IDT_SERVICE_03_DeviceInit()//设备回初始状态
{
ExecuteProAndCheckReturn("MainThread_Monitor_CancelTest");
}

private void IDT_SERVICE_04_VehicleInformation()
{
string sZTS = RecvData[12].ToString() + RecvData[13].ToString() + RecvData[14].ToString(); //GetString(12, 3);
Pt["CarParam_VIN"] = GetString(23, 17);
Pt["CarParam_ZTS"] = sZTS;
//CkProj("MainThread_Vehicle_SendToNCA");//IDT_SERVICE4
ExecutePlatTeam("MainThread_Vehicle_SendToNCA");
}

private void IDT_SERVICE_05_TOE_F_Pre_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Toe_LFPreset"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Toe_LFPreset_Result"].Value);//确认是否有调整前判定
SetValue(15, XmlFO.PubObjects["@NCA.Toe_LFPresetMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Toe_LFPresetMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Toe_RFPreset"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Toe_RFPreset_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Toe_RFPresetMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Toe_RFPresetMin"].Value, 600);

//SetValue(26, XmlFO.PubObjects["@NCA.Toe_FTotalPreset"].Value);
//SetResult(28, XmlFO.PubObjects["@NCA.Toe_FTotalPreset_Result"].Value);
//SetValue(29, XmlFO.PubObjects["@NCA.Toe_FTotalPresetMax"].Value);
//SetValue(31, XmlFO.PubObjects["@NCA.Toe_FTotalPresetMin"].Value);
}

private void IDT_SERVICE_06_TOE_R_Pre_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Toe_LRPreset"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Toe_LRPreset_Result"].Value);//确认是否有调整前判定
SetValue(15, XmlFO.PubObjects["@NCA.Toe_LRPresetMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Toe_LRPresetMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Toe_RRPreset"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Toe_RRPreset_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Toe_RRPresetMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Toe_RRPresetMin"].Value, 600);

//SetValue(26, XmlFO.PubObjects["@NCA.Toe_RTotalPreset"].Value);
//SetResult(28, XmlFO.PubObjects["@NCA.Toe_RTotalPreset_Result"].Value);
//SetValue(29, XmlFO.PubObjects["@NCA.Toe_RTotalPresetMax"].Value);
//SetValue(31, XmlFO.PubObjects["@NCA.Toe_RTotalPresetMin"].Value);
}

private void IDT_SERVICE_07_TOE_F_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Toe_LF"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Toe_LF_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Toe_LFMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Toe_LFMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Toe_RF"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Toe_RF_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Toe_RFMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Toe_RFMin"].Value, 600);

SetValue(26, XmlFO.PubObjects["@NCA.Toe_FTotal"].Value, 600);
SetResult(28, XmlFO.PubObjects["@NCA.Toe_FTotal_Result"].Value);
SetValue(29, XmlFO.PubObjects["@NCA.Toe_FTotalMax"].Value, 600);
SetValue(31, XmlFO.PubObjects["@NCA.Toe_FTotalMin"].Value, 600);
}

private void IDT_SERVICE_08_TOE_R_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Toe_LR"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Toe_LR_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Toe_LRMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Toe_LRMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Toe_RR"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Toe_RR_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Toe_RRMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Toe_RRMin"].Value, 600);

SetValue(26, XmlFO.PubObjects["@NCA.Toe_RTotal"].Value, 600);
SetResult(28, XmlFO.PubObjects["@NCA.Toe_RTotal_Result"].Value);
SetValue(29, XmlFO.PubObjects["@NCA.Toe_RTotalMax"].Value, 600);
SetValue(31, XmlFO.PubObjects["@NCA.Toe_RTotalMin"].Value, 600);
}

private void IDT_SERVICE_09_CAMBER_F_Pre_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Camber_LFPreset"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Camber_LFPreset_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Camber_LFPresetMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Camber_LFPresetMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Camber_RFPreset"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Camber_RFPreset_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Camber_RFPresetMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Camber_RFPresetMin"].Value, 600);

//SetValue(26, XmlFO.PubObjects["@NCA.Camber_FCrossPreset"].Value);
//SetResult(28, XmlFO.PubObjects["@NCA.Camber_FCross_Result"].Value);
//SetValue(29, XmlFO.PubObjects["@NCA.Camber_FCrossPresetMax"].Value);
//SetValue(31, XmlFO.PubObjects["@NCA.Camber_FCrossPresetMin"].Value);
}

private void IDT_SERVICE_0A_CAMBER_R_Pre_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Camber_LRPreset"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Camber_LRPreset_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Camber_LRPresetMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Camber_LRPresetMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Camber_RRPreset"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Camber_RRPreset_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Camber_RRPresetMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Camber_RRPresetMin"].Value, 600);

//SetValue(26, XmlFO.PubObjects["@NCA.Camber_RCrossPreset"].Value);
//SetResult(28, XmlFO.PubObjects["@NCA.Camber_RCross_Result"].Value);
//SetValue(29, XmlFO.PubObjects["@NCA.Camber_RCrossPresetMax"].Value);
//SetValue(31, XmlFO.PubObjects["@NCA.Camber_RCrossPresetMin"].Value);
}

private void IDT_SERVICE_0B_CAMBER_F_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Camber_LF"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Camber_LF_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Camber_LFMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Camber_LFMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Camber_RF"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Camber_RF_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Camber_RFMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Camber_RFMin"].Value, 600);

SetValue(26, XmlFO.PubObjects["@NCA.Camber_FCross"].Value, 600);
SetResult(28, XmlFO.PubObjects["@NCA.Camber_FCross_Result"].Value);
SetValue(29, XmlFO.PubObjects["@NCA.Camber_FCrossMax"].Value, 600);
SetValue(31, XmlFO.PubObjects["@NCA.Camber_FCrossMin"].Value, 600);
}

private void IDT_SERVICE_0C_CAMBER_R_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Camber_LR"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Camber_LR_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Camber_LRMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Camber_LRMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Camber_RR"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Camber_RR_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Camber_RRMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Camber_RRMin"].Value, 600);

SetValue(26, XmlFO.PubObjects["@NCA.Camber_RCross"].Value, 600);
SetResult(28, XmlFO.PubObjects["@NCA.Camber_RCross_Result"].Value);
SetValue(29, XmlFO.PubObjects["@NCA.Camber_RCrossMax"].Value, 600);
SetValue(31, XmlFO.PubObjects["@NCA.Camber_RCrossMin"].Value, 600);
}

private void IDT_SERVICE_0D_ThrustSWA_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Thrust_R"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Thrust_R_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Thrust_RMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Thrust_RMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.SWA"].Value, 100);
SetResult(21, XmlFO.PubObjects["@NCA.SWA_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.SWAMax"].Value, 100);
SetValue(24, XmlFO.PubObjects["@NCA.SWAMin"].Value, 100);
}

private void IDT_SERVICE_0E_Light_L_Low_Result()
{
SetValue(12, XmlFO.PubObjects["@HLA.Low_L_Hor"].Value, 10);
SetResult(14, XmlFO.PubObjects["@HLA.Low_L_Hor_Result"].Value);
SetValue(15, XmlFO.PubObjects["@HLA.Low_L_HorMax"].Value, 10);
SetValue(17, XmlFO.PubObjects["@HLA.Low_L_HorMin"].Value, 10);

SetValue(19, XmlFO.PubObjects["@HLA.Low_L_Ver"].Value, 10);
SetResult(21, XmlFO.PubObjects["@HLA.Low_L_Ver_Result"].Value);
SetValue(22, XmlFO.PubObjects["@HLA.Low_L_VerMax"].Value, 10);
SetValue(24, XmlFO.PubObjects["@HLA.Low_L_VerMin"].Value, 10);
}

private void IDT_SERVICE_0F_Light_R_Low_Result()
{
SetValue(12, XmlFO.PubObjects["@HLA.Low_R_Hor"].Value, 10);
SetResult(14, XmlFO.PubObjects["@HLA.Low_R_Hor_Result"].Value);
SetValue(15, XmlFO.PubObjects["@HLA.Low_R_HorMax"].Value, 10);
SetValue(17, XmlFO.PubObjects["@HLA.Low_R_HorMin"].Value, 10);

SetValue(19, XmlFO.PubObjects["@HLA.Low_R_Ver"].Value, 10);
SetResult(21, XmlFO.PubObjects["@HLA.Low_R_Ver_Result"].Value);
SetValue(22, XmlFO.PubObjects["@HLA.Low_R_VerMax"].Value, 10);
SetValue(24, XmlFO.PubObjects["@HLA.Low_R_VerMin"].Value, 10);
}

private void IDT_SERVICE_10_Light_L_High_Result()
{
SetValue(12, XmlFO.PubObjects["@HLA.High_L_Hor"].Value, 10);
SetResult(14, XmlFO.PubObjects["@HLA.High_L_Hor_Result"].Value);
SetValue(15, XmlFO.PubObjects["@HLA.High_L_HorMax"].Value, 10);
SetValue(17, XmlFO.PubObjects["@HLA.High_L_HorMin"].Value, 10);

SetValue(19, XmlFO.PubObjects["@HLA.High_L_Ver"].Value, 10);
SetResult(21, XmlFO.PubObjects["@HLA.High_L_Ver_Result"].Value);
SetValue(22, XmlFO.PubObjects["@HLA.High_L_VerMax"].Value, 10);
SetValue(24, XmlFO.PubObjects["@HLA.High_L_VerMin"].Value, 10);

SetValue(26, XmlFO.PubObjects["@HLA.High_L_Int"].Value, 0.1);
SetResult(28, XmlFO.PubObjects["@HLA.High_L_Int_Result"].Value);
SetValue(29, XmlFO.PubObjects["@HLA.High_L_IntMax"].Value, 0.1);
SetValue(31, XmlFO.PubObjects["@HLA.High_L_IntMin"].Value, 0.1);
}

private void IDT_SERVICE_11_Light_R_High_Result()
{
SetValue(12, XmlFO.PubObjects["@HLA.High_R_Hor"].Value, 10);
SetResult(14, XmlFO.PubObjects["@HLA.High_R_Hor_Result"].Value);
SetValue(15, XmlFO.PubObjects["@HLA.High_R_HorMax"].Value, 10);
SetValue(17, XmlFO.PubObjects["@HLA.High_R_HorMin"].Value, 10);

SetValue(19, XmlFO.PubObjects["@HLA.High_R_Ver"].Value, 10);
SetResult(21, XmlFO.PubObjects["@HLA.High_R_Ver_Result"].Value);
SetValue(22, XmlFO.PubObjects["@HLA.High_R_VerMax"].Value, 10);
SetValue(24, XmlFO.PubObjects["@HLA.High_R_VerMin"].Value, 10);

SetValue(26, XmlFO.PubObjects["@HLA.High_R_Int"].Value, 0.1);
SetResult(28, XmlFO.PubObjects["@HLA.High_R_Int_Result"].Value);
SetValue(29, XmlFO.PubObjects["@HLA.High_R_IntMax"].Value, 0.1);
SetValue(31, XmlFO.PubObjects["@HLA.High_R_IntMin"].Value, 0.1);
}

private void IDT_SERVICE_12_WBH_F_Result()
{
SetValue(12, XmlFO.ListObject["Device_WBH_FL"].xValue, 10);
SetResult(14, "Y");
SetValue(15, 0);
SetValue(17, 0);

SetValue(19, XmlFO.ListObject["Device_WBH_FR"].xValue, 10);
SetResult(21, "Y");
SetValue(22, 0);
SetValue(24, 0);
}

private void IDT_SERVICE_13_WBH_R_Result()
{
SetValue(12, XmlFO.ListObject["Device_WBH_RL"].xValue, 10);
SetResult(14, "Y");
SetValue(15, 0);
SetValue(17, 0);

SetValue(19, XmlFO.ListObject["Device_WBH_RR"].xValue, 10);
SetResult(21, "Y");
SetValue(22, 0);
SetValue(24, 0);
}

private void IDT_SERVICE_14_Weight_Result()
{
SetValue(12, XmlFO.PubObjects["@Weight.LF"].Value, 10);
SetValue(14, XmlFO.PubObjects["@Weight.RF"].Value, 10);
SetValue(16, XmlFO.PubObjects["@Weight.Front"].Value, 10);
SetValue(18, XmlFO.PubObjects["@Weight.LR"].Value, 10);
SetValue(20, XmlFO.PubObjects["@Weight.RR"].Value, 10);
SetValue(22, XmlFO.PubObjects["@Weight.Rear"].Value, 10);
SetValue(24, XmlFO.PubObjects["@Weight.Vehicle"].Value, 10);
}

private void IDT_SERVICE_15_Caster_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Caster_LF"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Caster_LF_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Caster_LFMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Caster_LFMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Caster_RF"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Caster_RF_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Caster_RFMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Caster_RFMin"].Value, 600);

SendData[26] = (byte)(XmlFO.ListObject["Communication_NCA_IN_CasterEnable"].xValue.StartsWith("T") ? 1 : 0); //1表示抽检测试, 0表示不测试
}

private void IDT_SERVICE_16_Sai_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.SAI_LF"].Value, 300);
SetResult(14, XmlFO.PubObjects["@NCA.SAI_LF_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.SAI_LFMax"].Value, 300);
SetValue(17, XmlFO.PubObjects["@NCA.SAI_LFMin"].Value, 300);

SetValue(19, XmlFO.PubObjects["@NCA.SAI_RF"].Value, 300);
SetResult(21, XmlFO.PubObjects["@NCA.SAI_RF_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.SAI_RFMax"].Value, 300);
SetValue(24, XmlFO.PubObjects["@NCA.SAI_RFMin"].Value, 300);

SendData[26] = (byte)(XmlFO.ListObject["Communication_NCA_IN_CasterEnable"].xValue.StartsWith("T") ? 1 : 0); //1表示抽检测试, 0表示不测试
}

private void IDT_SERVICE_17_LTL_In_Result()
{
SetValue(12, XmlFO.PubObjects["@LTL.LF_Turn_In"].Value, 10);
SetResult(14, XmlFO.PubObjects["@LTL.LF_Turn_In_Result"].Value);
SetValue(15, XmlFO.PubObjects["@LTL.LF_Turn_InMax"].Value, 10);
SetValue(17, XmlFO.PubObjects["@LTL.LF_Turn_InMin"].Value, 10);

SetValue(19, XmlFO.PubObjects["@LTL.RF_Turn_In"].Value, 10);
SetResult(21, XmlFO.PubObjects["@LTL.RF_Turn_In_Result"].Value);
SetValue(22, XmlFO.PubObjects["@LTL.RF_Turn_InMax"].Value, 10);
SetValue(24, XmlFO.PubObjects["@LTL.RF_Turn_InMin"].Value, 10);

//转角差--看四轮数据中是否存在,存在直接接收,否则计算
/*SetValue(26, XmlFO.PubObjects["@LTL.LF_Turn_In"].Value);
SetResult(28, XmlFO.PubObjects["@LTL.LF_Turn_In_Result"].Value);
SetValue(29, XmlFO.PubObjects["@LTL.LF_Turn_InMax"].Value);
SetValue(31, XmlFO.PubObjects["@LTL.LF_Turn_InMin"].Value);*/

SendData[33] = (byte)(XmlFO.ListObject["Communication_NCA_IN_L2LEnable"].xValue.StartsWith("T") ? 1 : 0); //1表示抽检测试, 0表示不测试
}

private void IDT_SERVICE_18_LTL_Out_Result()
{
SetValue(12, XmlFO.PubObjects["@LTL.LF_Turn_Out"].Value, 10);
SetResult(14, XmlFO.PubObjects["@LTL.LF_Turn_Out_Result"].Value);
SetValue(15, XmlFO.PubObjects["@LTL.LF_Turn_OutMax"].Value, 10);
SetValue(17, XmlFO.PubObjects["@LTL.LF_Turn_OutMin"].Value, 10);

SetValue(19, XmlFO.PubObjects["@LTL.RF_Turn_Out"].Value, 10);
SetResult(21, XmlFO.PubObjects["@LTL.RF_Turn_Out_Result"].Value);
SetValue(22, XmlFO.PubObjects["@LTL.RF_Turn_OutMax"].Value, 10);
SetValue(24, XmlFO.PubObjects["@LTL.RF_Turn_OutMin"].Value, 10);

//转角差
/*SetValue(26, XmlFO.PubObjects["@LTL.LF_Turn_In"].Value);
SetResult(28, XmlFO.PubObjects["@LTL.LF_Turn_In_Result"].Value);
SetValue(29, XmlFO.PubObjects["@LTL.LF_Turn_InMax"].Value);
SetValue(31, XmlFO.PubObjects["@LTL.LF_Turn_InMin"].Value);*/

SendData[33] = (byte)(XmlFO.ListObject["Communication_NCA_IN_L2LEnable"].xValue.StartsWith("T") ? 1 : 0); //1表示抽检测试, 0表示不测试
}

private void IDT_SERVICE_19_WBHTest()
{
((xDvBaseClient)XmlFO.ListObject["Communication_NCA_OUT_StopMotor"]).SetTrue("");
SendData[7] &= 0xFB;//bit2置0
//启动轮眉测量
ExecutePlatTeam("Device_StepItem_WBH", () =>
{
SetState(IDTState.OK);
SendData[7] |= 1 << 2; //轮眉测试标志位,收到25号服务置0,轮眉测试完置1
});
}

//空气悬架标定完成
private void IDT_SERVICE_1A_ASUDone()
{
((xDvBaseClient)XmlFO.ListObject["Communication_NCA_OUT_StopMotor"]).SetFalse("");
SendData[7] |= 1 << 3; //是否需要一直保持
}

private void IDT_SERVICE_1B_HLA_LowBeamOn()
{
}

private void IDT_SERVICE_1C_HLA_FullBeamOn()
{
}

private void IDT_SERVICE_1D_ADB_On()
{
//((xDvBaseClient)XmlFO.ListObject["Communication_NCA_OUT_ADBReady"]).SetTrue("");
}

private void IDT_SERVICE_1E_EPSTest()
{
//将停止滚筒放在Always流程中调用
ExecutePlatTeam("Device_Public_DSA_StopRolls");
((xDvBaseClient)XmlFO.ListObject["Communication_NCA_OUT_StopMotor"]).SetTrue("");
}

private void IDT_SERVICE_1F_EPSTestDone()
{
((xDvBaseClient)XmlFO.ListObject["Communication_NCA_OUT_StopMotor"]).SetFalse("");
}

private void IDT_SERVICE_20_HEAD_ADB_Left_Result()
{
SetValue(12, XmlFO.PubObjects["@HLA.DASM_Hor"].Value, 100);//LeftEmaxX
SetValue(14, XmlFO.PubObjects["@HLA.DASM_Hor_SetPoint"].Value, 100);//LeftEmaxY
SetValue(16, XmlFO.PubObjects["@HLA.DASM_Hor_Max"].Value, 100);//LeftP0X
SetValue(18, XmlFO.PubObjects["@HLA.DASM_Hor_Min"].Value, 100);//LeftP0Y
SetValue(20, XmlFO.PubObjects["@HLA.DASM_Hor_Offset"].Value, 100);//LeftP1X
SetValue(22, XmlFO.PubObjects["@HLA.DASM_Hor_Module_Offset"].Value, 100);//LeftP1Y
}

private void IDT_SERVICE_21_HEAD_ADB_Right_Result()
{
SetValue(12, XmlFO.PubObjects["@HLA.DASM_Ver"].Value, 100);//Right
SetValue(14, XmlFO.PubObjects["@HLA.DASM_Ver_SetPoint"].Value, 100);
SetValue(16, XmlFO.PubObjects["@HLA.DASM_Ver_Max"].Value, 100);
SetValue(18, XmlFO.PubObjects["@HLA.DASM_Ver_Min"].Value, 100);
SetValue(20, XmlFO.PubObjects["@HLA.DASM_Ver_Offset"].Value, 100);
SetValue(22, XmlFO.PubObjects["@HLA.DASM_Ver_Module_Offset"].Value, 100);
}

private void IDT_SERVICE_22_TOECross_Result()
{
SetValue(12, XmlFO.PubObjects["@NCA.Toe_FCross"].Value, 600);
SetResult(14, XmlFO.PubObjects["@NCA.Toe_FCross_Result"].Value);
SetValue(15, XmlFO.PubObjects["@NCA.Toe_FCrossMax"].Value, 600);
SetValue(17, XmlFO.PubObjects["@NCA.Toe_FCrossMin"].Value, 600);

SetValue(19, XmlFO.PubObjects["@NCA.Toe_RCross"].Value, 600);
SetResult(21, XmlFO.PubObjects["@NCA.Toe_RCross_Result"].Value);
SetValue(22, XmlFO.PubObjects["@NCA.Toe_RCrossMax"].Value, 600);
SetValue(24, XmlFO.PubObjects["@NCA.Toe_RCrossMin"].Value, 600);

SetValue(26, XmlFO.PubObjects["@NCA.Thrust_F"].Value, 600);
SetResult(28, XmlFO.PubObjects["@NCA.Thrust_F_Result"].Value);
SetValue(29, XmlFO.PubObjects["@NCA.Thrust_FMax"].Value, 600);
SetValue(31, XmlFO.PubObjects["@NCA.Thrust_FMin"].Value, 600);
}

public override void SendBeforeHandle()
{
//Byte5 bit0:急停 bit1:fault bit4:Automode bit5:Manualmode bit6:calmode bit7:ready
int byte5 = 0x00;
//bool ems = Pt["Communication_NCA_IN_System_EStop"].zString().StartsWith("T");
bool fault = Pt["Communication_NCA_IN_System_Fault"].zString().StartsWith("T");
bool automode = Pt["Communication_NCA_IN_System_AutoMode"].zString().StartsWith("T");
bool centered = Pt["Communication_NCA_IN_Centered"].zString().StartsWith("T");
bool abort = Pt["Communication_NCA_IN_CycleAbort"].zString().StartsWith("T");

//byte5 = ems ? (byte5 | (1 << 0)) : byte5;
byte5 = fault || !automode || abort ? (byte5 | (1 << 1)) : byte5;
SendData[5] = (byte)byte5;

int byte7 = 0x00;
bool bepNewData = Pt["System_BEP_NewData"].zString().StartsWith("Y");
byte7 = centered ? (byte7 | (1 << 0)) : byte7; //四轮对中完成
byte7 = bepNewData ? (byte7 | (1 << 1)) : byte7; //四轮调整完成标志位
SendData[7] |= (byte)byte7;

#region ADB
bool hlaLeftLow = XmlFO.ListObject["Communication_NCA_IN_HLALeftLowDone"].xValue.StartsWith("T");
bool hlaRightLow = XmlFO.ListObject["Communication_NCA_IN_HLARightLowDone"].xValue.StartsWith("T");
bool hlaLeftHigh = XmlFO.ListObject["Communication_NCA_IN_HLALeftHighDone"].xValue.StartsWith("T");
bool hlaRightHigh = XmlFO.ListObject["Communication_NCA_IN_HLARightHighDone"].xValue.StartsWith("T");
bool hlaLeftADB = XmlFO.ListObject["Communication_NCA_IN_HLALeftADBDone"].xValue.StartsWith("T");
bool hlaRightADB = XmlFO.ListObject["Communication_NCA_IN_HLARightADBDone"].xValue.StartsWith("T");
SendData[7] |= (byte)(!(hlaLeftLow || hlaRightLow) ? 0x01 << 4 : 0x00);//近光测试完成
SendData[7] |= (byte)(!(hlaLeftHigh || hlaRightHigh) ? 0x01 << 5 : 0x00);//远光测试完成
SendData[7] |= (byte)(!(hlaLeftADB || hlaRightADB) ? 0x01 << 6 : 0x00);//ADB测试完成
SendData[7] |= (byte)(XmlFO.ListObject["Communication_NCA_IN_CycleComplete"].xValue.StartsWith("T") ? 0x01 << 7 : 0x00);
#endregion

byte xor = 0x00;
for (int i = 0; i < (SendData.Length - 2); i++)
xor ^= SendData[i];
SendData[SendData.Length - 2] = xor;
}

public override void SetResult(int index, object value)
{
string sval = Convert.ToString(value).ToUpper();
switch(sval)
{
case "Y":
SendData[index] = 0x01;
break;
case "T":
SendData[index] = 0x01;
break;
case "P":
SendData[index] = 0x01;
break;
case "N":
SendData[index] = 0x00;
break;
case "F":
SendData[index] = 0x00;
break;
default:
SendData[index] = 0x01;
break;
}
}

ADAS

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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
private void IDT_SERVICE_0E_VehicleInformation()
{
try
{
string sZTS = RecvData[25].ToString();
string sVIN = GetString(8, 17);
Pt["CarParam_VIN"] = sVIN;
Pt["CarParam_ZTS"] = sZTS;
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_07_DeviceReturnHome()
{
try
{
ExecutePlatTeam("MainThread_Monitor_CancelTest", "Communication_IDT_PlatReturnHomeStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_0A_ACCBoardMove()
{
try
{
Pt["CarParam_ACC_TargetX"] = GetValue(8);
Pt["CarParam_ACC_TargetY"] = GetValue(10);
Pt["CarParam_ACC_TargetZ"] = GetValue(12);
ExecutePlatTeam("Device_FAS_ACC_设备就位", "Communication_IDT_PlatACCMoveStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_0B_ACCBoardReturnHome()
{
try
{
ExecutePlatTeam("Device_FAS_ACC_设备回位", "Communication_IDT_PlatACCReturnHomeStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_0C_Center()//协议中未定义
{
try
{
//if (RecvData[12] == 0x01 && RecvData[13] == 0x01)
//CkProj("Device_FAS_摆正器_设备就位");
//if (RecvData[12] == 0x00 && RecvData[13] == 0x00)
//CkProj("Device_FAS_摆正器_设备回位");
ExecutePlatTeam("Device_FAS_摆正器_设备就位", "Communication_IDT_PlatCenterStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_0D_RobotMove()
{
try
{
Pt["CarParam_HUD_Route"] = "1";
Pt["CarParam_HUD_TargetX"] = GetValue(8, 0.1);
Pt["CarParam_HUD_TargetY"] = GetValue(10, 0.1);
Pt["CarParam_HUD_TargetZ"] = GetValue(12, 0.1);
Pt["CarParam_HUD_TargetRX"] = GetValue(14, 0.001);
Pt["CarParam_HUD_TargetRY"] = GetValue(16, 0.001);
Pt["CarParam_HUD_TargetRZ"] = GetValue(18, 0.001);

ExecutePlatTeam("Device_FAS_HUD_设备就位", "Communication_IDT_PlatRobotMoveStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_0F_WBH_Result()
{
ExecutePlatTeam("Device_StepItem_WBH", "Communication_IDT_PlatWBHStatus", () =>
{
SetState(IDTState.OK);

SetValue(12, XmlFO.PubObjects["@WBHTest.WBH_FL"].Value, 10);
SetResult(20, "Y");
SetValue(14, XmlFO.PubObjects["@WBHTest.WBH_FR"].Value, 10);
SetResult(21, "Y");
SetValue(16, XmlFO.PubObjects["@WBHTest.WBH_RL"].Value, 10);
SetResult(22, "Y");
SetValue(18, XmlFO.PubObjects["@WBHTest.WBH_RR"].Value, 10);
SetResult(23, "Y");
});
}

//Byte 07
//BIT0: 改位置 1 表示 BBK LDA 测量结束
//BIT1: 改位置 1 表示 BBK 畸变测量结束
//BIT2: 改位置 1 表示 BBK FOV 测量结束
//BIT3: 改位置 1 表示 BBK 重影测量结束
//BIT4: 改位置 1 表示 BBK VID 测量结束
//BIT5: 改位置 1 表示 BBK LOA 测量结束
private void IDT_SERVICE_10_LDA()
{
try
{
HUDTestServiceHandle(0, "Device_FAS_HUD_LDA", "Communication_IDT_PlatLDAStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_11_LDAResult()
{
try
{
SetResult(10, zjHUD.ValueLDA.bResult);
SetResult(11, zjHUD.ValueLDACalibrable.bResult);
SetValue(12, zjHUD.ValueLDAOffset.Value);
SetValue(14, zjHUD.ValueLDA.Value.Value, 100);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

//Byte 07 BIT1: 改位置 1 表示 BBK 畸变 测量结束
private void IDT_SERVICE_12_Distortion()
{
try
{
//zjHUD.eyeBoxPos = "M";
HUDTestServiceHandle(1, "Device_FAS_HUD_Distortion", "Communication_IDT_PlatDistortionStatus");
//HUDTestServiceHandle(1, "Device_FAS_HUD_RotateAngle");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_13_DistortionResult()
{
try
{
SetResult(10, zjHUD.ValueDistortion.bResult &&
zjHUD.ValueDistortionMaxH.bResult &&
zjHUD.ValueDistortionMaxV.bResult &&
zjHUD.ValueDistortionRotation.bResult);
SetResult(11, zjHUD.ValueDistortionHCalibrable.bResult &&
zjHUD.ValueDistortionVCalibrable.bResult &&
zjHUD.ValueDistortionRCalibrable.bResult);
SetValue(12, zjHUD.ValueDistortionMaxH.Value.Value, 100);
SetValue(14, zjHUD.ValueDistortionMaxV.Value.Value, 100);
SetValue(16, zjHUD.ValueDistortionRotation.Value.Value, 100);
SetValue(18, zjHUD.ValueDistortion.Value.Value, 100);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

#region 畸变刷写

private void IDT_SERVICE_14_DistortionParam1()
{
try
{
Array.Copy(zjHUD.warpParamMsg, 0, SendData, 12, 25);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_15_DistortionParam2()
{
try
{
Array.Copy(zjHUD.warpParamMsg, 25, SendData, 12, 25);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_16_DistortionParam3()
{
try
{
Array.Copy(zjHUD.warpParamMsg, 50, SendData, 12, 25);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_17_DistortionParam4()
{
try
{
Array.Copy(zjHUD.warpParamMsg, 75, SendData, 12, 25);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_18_DistortionParam5()
{
try
{
Array.Copy(zjHUD.warpParamMsg, 100, SendData, 12, 24);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

#endregion

private void IDT_SERVICE_19_FOVTest()
{
try
{
//zjHUD.eyeBoxPos = "M";
HUDTestServiceHandle(2, "Device_FAS_HUD_FOV", "Communication_IDT_PlatFOVStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_1A_FOVResult()
{
try
{
SetResult(10, zjHUD.ValueHorFOVDistance.bResult && zjHUD.ValueVerFOVDistance.bResult);
SetValue(12, zjHUD.ValueHorFOVDistance.Value.Value, 10);
SetValue(14, zjHUD.ValueVerFOVDistance.Value.Value, 10);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_1B_GhostTest()
{
try
{
if (RecvData[8] == 0x00)
zjHUD.EyeBoxPos.Value = "Top";
if (RecvData[8] == 0x01)
zjHUD.EyeBoxPos.Value = "Mid";
if (RecvData[8] == 0x02)
zjHUD.EyeBoxPos.Value = "Bot";
HUDTestServiceHandle(3, "Device_FAS_HUD_Ghost", "Communication_IDT_PlatGhostStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_1C_GhostResult()
{
try
{
SetResult(10, zjHUD.ValueGhost.bResult);
SetValue(12, zjHUD.ValueGhost.Value.Value, 10);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_1D_VIDTest()
{
try
{
HUDTestServiceHandle(4, "Device_FAS_HUD_Distance", "Communication_IDT_PlatDistanceStatus");
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_1E_VIDResult()
{
try
{
SetResult(10, zjHUD.ValueDistance.bResult);
SetValue(12, zjHUD.ValueDistance.Value.Value, 10);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_1F_LOATest()
{
try
{
//TestServiceHandle(4, "Device_FAS_HUD_Distance");//FOV中测试完成
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void IDT_SERVICE_20_LOAResult()
{
try
{
SetResult(10, zjHUD.ValueLLA.Result.Value);
SetValue(12, zjHUD.ValueLLA.Value.Value, 10);
}
catch (System.Exception ex)
{
Log(ex.ToString());
SetState(IDTState.NOK);
}
}

private void HUDTestServiceHandle(int bits, string proName, string checkObject)
{
byte shift = 0x01;
SendData[7] &= (byte)~(shift << bits);
ExecutePlatTeam(proName, checkObject, () =>
{
SetState(IDTState.OK);
SendData[7] |= (byte)(shift << bits);
}, () =>
{
SetState(IDTState.NOK);
SendData[7] |= (byte)(shift << bits);
});
}

public override void SendBeforeHandle()
{
//Byte5 bit0:急停 bit1:fault bit4:Automode bit5:Manualmode bit6:calmode bit7:ready
int byte5 = 0x00;
bool ems = Pt["Communication_FAS_IN_System_EStop"].zString().StartsWith("T");
bool fault = Pt["Communication_FAS_IN_System_Fault"].zString().StartsWith("T");
bool autoMode = Pt["Communication_FAS_IN_System_AutoMode"].zString().StartsWith("T");
bool ready = !ems && !fault && autoMode;

byte5 = ems ? (byte5 | (1 << 0)) : byte5;
byte5 = fault ? (byte5 | (1 << 1)) : byte5;
byte5 = autoMode ? (byte5 | (1 << 4)) : byte5;
byte5 = !autoMode ? (byte5 | (1 << 5)) : byte5;
byte5 = ready ? (byte5 | (1 << 7)) : byte5;
SendData[5] = (byte)byte5;
//8-11 车型信息--未知

//12-13 前后对中状态
//RecvData[12] = RecvData[13] = (byte)(Pt["Communication_FAS_IN_Center_TestPos"].zString().StartsWith("T") ? 0x01 : 0x00);

//17-18 PLC心跳

//21-24 坐标信息
//SetValue(20, Pt["Communication_FAS_IN_ACC_XDirection_CurrentValue"]);
//SetValue(21, Pt["Communication_FAS_IN_ACC_Hori_CurrentValue"]);
//SetValue(22, Pt["Communication_FAS_IN_ACC_Vertical_CurrentValue"]);

byte xor = 0x00;
for (int i = 0; i < (SendData.Length - 2); i++)
xor ^= SendData[i];
SendData[SendData.Length - 2] = xor;
}

public override void SetResult(int index, object value)
{
string sval = Convert.ToString(value).ToUpper();
if (sval.StartsWith("Y"))
SendData[index] = 0x01;
if (sval.StartsWith("T"))
SendData[index] = 0x01;
if (sval.StartsWith("N"))
SendData[index] = 0x00;
if (sval.StartsWith("F"))
SendData[index] = 0x00;
}