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
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
package safeluck.drive.evaluation.bean;
 
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
 
import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModelProviders;
import androidx.work.Data;
import androidx.work.OneTimeWorkRequest;
import androidx.work.WorkManager;
 
import com.anyun.basecommonlib.MyLog;
import com.anyun.exam.lib.util.Speaker;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
 
import safeluck.drive.evaluation.Constant;
import safeluck.drive.evaluation.DB.appstatusdb.AppStatusWorker;
import safeluck.drive.evaluation.app;
import safeluck.drive.evaluation.platformMessage.PlatFormConstant;
import safeluck.drive.evaluation.routecollect.bean.RoadInfo;
import safeluck.drive.evaluation.util.SPUtils;
import safeluck.drive.evaluation.viewmodels.ExamPlatformModel;
import safeluck.drive.evaluation.viewmodels.MainViewModel;
 
public class ExamPlatformData {
 
 
 
    public static final int PERSON_TYPE_COACH = 0;//类型为教练
    public static final int PERSON_TYPE_STU = 1;//人员类型为学员
    public static final int COACH_ID = 1002;//教练数据库表里面的唯一id
    public static final int STU_ID = 1001;//学员数据库表里面的唯一id
 
 
 
    //一id学员数据库表里面的唯
    public static final int  ROAD_ITEM_NONE = 0;
    //一id学员数据库表里面的唯
    public static final int  ROAD_ITEM_CHANGE_LANE        = 1;
    //一id学员数据库表里面的唯
    public static final int  ROAD_ITEM_OVERTAKE           = 2;
    //一id学员数据库表里面的唯
    public static final int  ROAD_ITEM_STRAIGHT           = 3;
    //一id学员数据库表里面的唯
    public static final int  ROAD_ITEM_OPERATE_GEAR       = 4;
    public static final int  ROAD_ITEM_START_CAR                = 5;
    public static final int  ROAD_ITEM_PARK_SIDE              = 6;
    public static final int  ROAD_ITEM_CROSS_WALK              = 7;
    public static final int  ROAD_ITEM_BUS_AREA               = 8;
    public static final int  ROAD_ITEM_SCHOOL_AREA               = 9;
 
 
    public static final int MODE_NONE = 0;
    public static final int EXAM_TYPE_LUKAO_Light = 3;
    public static final int EXAM_TYPE_LUKAO = 4;
    public static final int EXAM_TYPE_ChangKAO = 2;
    private static final String TAG = "ExamPlatformData";
    private static final ExamPlatformData ourInstance = new ExamPlatformData();
 
    private int exam_id =12345;//考试唯一ID
 
    private String mPhone = "";//考试平台消息用到的phone
 
    private int examType = 0;//2 场地;
//3 道路,模拟夜考;
//            4 道路,实际夜考;
 
    public static final int TCP_DISCONNECT = 1;
    public static final int TCP_CONNECTED = 2;///2-未连接(tcp连接不上)
    public static final int DEV_NOT_REGISTERED = 3;
    public static final int DEV_REGISTERED = 4;
    public static final int DEV_NOT_LOGIN = 5;
    public static final int DEV_LOGIN = 6;
 
    private int  trainingMode = 0;//即不是训练模式也不是考试模式
    public static final int EXAMING_MODE =1;
    public static final int TRAINING_MODE =2;
    //采集模式
    public static final int ROUTE_MODE =3;
 
 
    //主要是为了控制既不是考试模式也不是训练模式下 0206消息的发送,10s一次发送
    private boolean timeArrive_10s = false;
 
    private static HashMap<Integer,String> examPlatformStrs = new HashMap<>();
    private List<Integer> sns =new ArrayList<>();//保存所有失败项目的sn
    private static HashMap<Integer,String> enter_exit_item_tts = new HashMap<>();
    private static List<SimulateNightBean.QuestionBean> simulate_light_tips = new ArrayList<>();
 
    private static List<String> RulesettingFilesName = new ArrayList<>();
    private String mcuSN;
    private  boolean canWriteSD;
 
    public static List<String> getRulesettingFilesName() {
        return RulesettingFilesName;
    }
 
    static {
 
        RulesettingFilesName.add("startcar_setting.json");
        RulesettingFilesName.add("station_setting.json");
        RulesettingFilesName.add("straightline_setting.json");
        RulesettingFilesName.add("subdecGear_setting.json");
        RulesettingFilesName.add("sidestop_setting.json");
        RulesettingFilesName.add("overtake_setting.json");
        RulesettingFilesName.add("Gear_Setting.json");
        RulesettingFilesName.add("cornerlamp_setting.json");
        RulesettingFilesName.add("common_setting.json");
        RulesettingFilesName.add("area_setting.json");
 
 
        examPlatformStrs.put(TCP_DISCONNECT,"未连接");
        examPlatformStrs.put(TCP_CONNECTED,"未登录");
        examPlatformStrs.put(DEV_NOT_REGISTERED,"未注册");
        examPlatformStrs.put(DEV_REGISTERED,"未登录");
        examPlatformStrs.put(DEV_NOT_LOGIN,"未登录");
        examPlatformStrs.put(DEV_LOGIN,"已登录");
 
/*侧方位停车 type = 3
 
 倒车入库 type = 1
 上坡起步  type = 2
 zhijiao  type = 5*/
 
        enter_exit_item_tts.put(1,"倒车入库");
        enter_exit_item_tts.put(2,"坡道定点停车和起步");
        enter_exit_item_tts.put(3,"侧方停车");
        enter_exit_item_tts.put(4,"曲线行驶");
        enter_exit_item_tts.put(5,"直角转弯");
 
        enter_exit_item_tts.put(101,"直线行驶");
        enter_exit_item_tts.put(102,"加减挡位操作");
        enter_exit_item_tts.put(103,"靠边停车");
        enter_exit_item_tts.put(104,"直行通过路口");
        enter_exit_item_tts.put(105,"路口左转弯");
        enter_exit_item_tts.put(106,"路口右转弯");
        enter_exit_item_tts.put(107,"通过人行道横线");
        enter_exit_item_tts.put(108,"通过学校区域");
        enter_exit_item_tts.put(109,"通过公共汽车站");
        enter_exit_item_tts.put(110,"掉头");
 
 
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(1,"请打开前照灯"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(2,"夜间在没有路灯,照明不良条件下行驶"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(3,"夜间与机动车会车"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(4,"请将前照灯更换成远光"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(5,"夜间同方向近距离跟车行驶"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(6,"雾天行驶"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(6,"夜间通过拱桥、人行道"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(7,"夜间在道路上发生故障,妨碍交通又难以移动"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(8,"夜间通过急弯、坡路"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(9,"夜间通过没有交通信号灯控制的路口"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(10,"路边临时停车"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(12,"超车"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(1,"请打开前照灯"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(2,"夜间与机动车会车"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(3,"夜间同方向近距离跟车行驶"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(4,"夜间直行通过路口"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(5,"夜间在有路灯,照明良好的道路上行驶"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(6,"夜间在没有路灯,照明不良条件下行驶"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(7,"夜间通过急弯、坡路"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(8," 夜间通过急弯、拱桥"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(9,"夜间通过拱桥、人行横道"));
//        //、拱桥、人行横道、或者没有交通信号灯控制的路口
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(10,"夜间通过坡路、拱桥"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(11,"夜间通过没有交通信号灯控制的路口"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(12,"夜间超越前方车辆"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(13,"夜间在道路上发生故障,妨碍交通又难以移动"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(14,"路边临时停车"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(15,"夜间路口左转弯"));
//        simulate_light_tips.add(new SimulateNightBean.QuestionBean(16,"夜间路口右转弯"));
 
 
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(100,"下面将进行模拟夜间行驶场景灯光使用的考试,请按语音指令在5秒内做出相应的灯光操作"));
        simulate_light_tips.add(new SimulateNightBean.QuestionBean(101,"模拟夜间考试完成请关闭所有灯光,请起步继续完成考试"));
 
 
 
 
    }
    private static final String WORK_PLATFORM_STATUS = " work_platform";
 
 
    private int examplatformStatus =1;//1-未连接(tcp连接不上)   3-未注册(设备没有注册)   5-未登录(鉴权未通过)
 
    private String id;//身份证
 
    private Speaker speaker = null;
    private int examRoute;//考试/训练用的线路号
    private String ip="47.93.80.84";
    private int port=12125;
    private String mapPath;//绝对路径包含文件名的path
    private String roadmapPath;//绝对路径包含文件名的path
    private String carPath;//绝对路径包含文件名的path
    private int rtkPort = 12125;
    private String rtkIP = "47.93.80.84";
    public final int MAX_SCORE_DUCT = 20;
    private String coachID;//教练员身份证号码
    //保存采集模式下的道路信息
    private RoadInfo roadInfo;
 
    //当前采集线路的名称
    private String routeLineName;
    private int routeItem= ROAD_ITEM_NONE;
 
    public static ExamPlatformData getInstance() {
        return ourInstance;
    }
 
 
    public int getExamRoute() {
       examRoute = (int) SPUtils.get(app.getAppContext(),SPUtils.EXAM_ROUTE_ID,-1);
        return examRoute;
    }
 
    /**
     * 设置训练、考试用的  线路ID
     * @param examRoute
     */
    public void setExamRoute(int examRoute) {
        SPUtils.put(app.getAppContext(),SPUtils.EXAM_ROUTE_ID,examRoute);
        this.examRoute = examRoute;
    }
 
    private ExamPlatformData() {
 
    }
 
    public String getPlatformIP(){
        ip = (String) SPUtils.get(app.getAppContext(),SPUtils.PLATFORM_IP,"47.93.80.84");
        return ip;
    }
 
    public int getPlatformPort(){
        port = (int) SPUtils.get(app.getAppContext(),SPUtils.PLATFORM_PORT,12125);
        return port;
    }
 
    public boolean isCanWriteSD() {
        return canWriteSD;
    }
 
    public void setCanWriteSD(boolean canWriteSD) {
        this.canWriteSD = canWriteSD;
    }
 
    /**
     * 插入平台IP地址
     * @param ip
     */
    public void insertPlatformIp(String ip){
 
        SPUtils.put(app.getAppContext(),SPUtils.PLATFORM_IP,ip);
 
    }
 
    /**
     * 比较ip地址和端口号,
     * @param ip
     * @param port
     * @return ip和端口其中有变化,返回true,否则返回false
     */
    public boolean compareIPandPort(String ip,int port){
        MyLog.i( "compareIPandPort: "+ip+" "+port);
        if(!getPlatformIP().equalsIgnoreCase(ip) || getPlatformPort()!=port){
            MyLog.i("ip和端口有变化");
            return true;
        }
        return false;
    }    /**
     * 比较RTK ip地址和端口号,
     * @param ip
     * @param port
     * @return ip和端口其中有变化,返回true,否则返回false
     */
    public boolean compareRTKIPandPort(String ip,int port){
        MyLog.i( "compareIPandPort: "+ip+" "+port);
        if(!getRtkIP().equalsIgnoreCase(ip) || getRtkPort()!=port){
            MyLog.i("ip和端口有变化");
            return true;
        }
        return false;
    }
 
    /**
     * 插入平台端口号
     * @param port
     */
    public void insertPlatformPort(int port){
        SPUtils.put(app.getAppContext(),SPUtils.PLATFORM_PORT,port);
    }
 
 
    /**
     * 获取学员ID(身份证)
     * @return
     */
    public String getID() {
        return id;
    }
 
    public void setId(String id) {
        this.id = id;
    }
 
    public int getExam_id() {
        exam_id = (int) SPUtils.get(app.getAppContext(),SPUtils.EXAM_ID,12345);
        return exam_id;
    }
 
    public void setExam_id(int exam_id) {
        this.exam_id = exam_id;
        SPUtils.put(app.getAppContext(),SPUtils.EXAM_ID,exam_id);
    }
 
    public void setNewMapPath(String path) {
        this.mapPath = path;
        SPUtils.put(app.getAppContext(),SPUtils.MAP_PATH,mapPath);
    }
 
    public String  getMapPath(){
        mapPath = (String) SPUtils.get(app.getAppContext(),SPUtils.MAP_PATH,"");
        return mapPath;
    }
 
    /**
     * 设置保存地图模型文件(坐标点—)的路径
     * @param car_path
     */
    public void setCarModelPath(String car_path) {
        this.carPath = car_path;
        SPUtils.put(app.getAppContext(),SPUtils.CAR_PATH,car_path);
    }
 
    public String getCarModelPath(){
        carPath = (String) SPUtils.get(app.getAppContext(),SPUtils.CAR_PATH,"");
        return carPath;
    }
 
    public int getExamplatformStatus() {
        return examplatformStatus;
    }
 
    public void setExamplatformStatus(int examplatformStatus) {
        String[] conn_strs = new String[2];
        conn_strs[0] = Constant.WORK_PLATFORM_STATUS_COLUMN;
        conn_strs[1] = "{"+WORK_PLATFORM_STATUS+":"+examplatformStatus+"}";
        //RTK平台连接状态
        Data connStatusData = new Data.Builder().putStringArray(Constant.APP_STATUS,conn_strs).build();
        OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(AppStatusWorker.class).
                setInputData(connStatusData).build();
        WorkManager.getInstance(app.getAppContext()).enqueue(oneTimeWorkRequest);
        this.examplatformStatus = examplatformStatus;
    }
 
    public String getExamplatformStatusStr(int work_platform) {
 
        return examPlatformStrs.get(work_platform);
    }
 
    /**
     * 进入退出某个场地的文字
     * @param item
     * @return
     */
    public String getItemStatusStr(int item) {
 
        if (enter_exit_item_tts.get(item)==null){
            return "未知项目";
        }
        return enter_exit_item_tts.get(item);
    }
 
    public synchronized Speaker getTTS(){
        if (speaker == null){
            MyLog.i("请先初始化TTS,先调用initTTS");
            initTTS(app.getAppContext());
            return speaker;
        }else
        return speaker;
    }
 
    /**
     * 初始化tts
     * @param context
     */
    public void initTTS(Context context){
        if (speaker == null){
 
            speaker = new Speaker(context,null);
        }
    }
 
    public int getTrainingMode() {
        trainingMode = (int) SPUtils.get(app.getAppContext(),SPUtils.TRAIN_MODE,0);
        return trainingMode;
    }
 
 
 
    public void setTrainingMode(int trainingMode) {
        SPUtils.put(app.getAppContext(),SPUtils.TRAIN_MODE,trainingMode);
        trainingMode = trainingMode;
    }
 
    public void setPhone(String phone) {
        this.mPhone = phone;
    }
 
    public String getPhone() {
        return mPhone;
    }
 
    public List<SimulateNightBean.QuestionBean> getSimulate_light_tips() {
        return simulate_light_tips;
    }
 
    public boolean isTimeArrive_10s() {
        return timeArrive_10s;
    }
 
    public void setTimeArrive_10s(boolean timeArrive_10s) {
        this.timeArrive_10s = timeArrive_10s;
    }
 
    public void setRTKPort(int port) {
        this.rtkPort = port;
    }
 
    public void setRTKIP(String ip) {
        this.rtkIP = ip;
    }
 
    public int getRtkPort() {
        return rtkPort;
    }
 
    public String getRtkIP() {
        return rtkIP;
    }
 
    public void setQfAndSatNum(int qf,int satNum){
        String[] rtk_strs = new String[2];
        rtk_strs[0] = Constant.RTK_INFO_SAT_QF;
        rtk_strs[1] = "{qf:"+qf+","+"sat_num:"+satNum+"}";
        Data rtkInfoData = new Data.Builder().putStringArray(Constant.APP_STATUS,rtk_strs).build();
        OneTimeWorkRequest appStatusWorker = new OneTimeWorkRequest.Builder(AppStatusWorker.class).setInputData(rtkInfoData).build();
        WorkManager.getInstance(app.getAppContext()).enqueue(appStatusWorker);
    }
//  //清空app_status qf和sat tcp状态
    public void whenAppExitResetStatus(){
        setQfAndSatNum(0,0);
        setExamplatformStatus(0);
    }
 
    public int getExamType() {
        return examType;
    }
 
    public void setExamType(int examType) {
        this.examType = examType;
    }
 
    /**
     * 设置路考地图的路径
     * @param path
     */
    public void setNewRoadMapPath(String path) {
        this.roadmapPath = path;
        SPUtils.put(app.getAppContext(),SPUtils.ROAD_MAP_PATH,roadmapPath);
    }
 
    /**
     * 获得路考地图的路径
     * @return
     */
    public String  getRoadMapPath(){
        roadmapPath = (String) SPUtils.get(app.getAppContext(),SPUtils.ROAD_MAP_PATH,"");
        return roadmapPath;
    }
 
    /**
     * 设置保存教练员身份证号
     * @param id
     */
    public void setCoachID(String id) {
        this.coachID = id;
    }
 
    /**
     * 获取
     * @return 教练员身份证
     */
    public String getCoachID() {
        return coachID;
    }
 
    /**
     * 返回学员是否签到,true-已经签到
     */
    public boolean IsStuSign() {
        isStuSign =  (boolean) SPUtils.get(app.getAppContext(),SPUtils.STU_SIGN_STATUS,false);
        return isStuSign;
    }
    public void setStuSign(boolean flag){
        if (!flag)
        setSingnMode(SIGN_MODE_NONE);
        isStuSign = flag;
        SPUtils.put(app.getAppContext(),SPUtils.STU_SIGN_STATUS,flag);
    }
    private boolean isStuSign;
    /**
     * 返回教练是否签到,true-已经签到
     */
    public boolean IsCoachSign() {
        isCoachSign =  (boolean) SPUtils.get(app.getAppContext(),SPUtils.Coach_SIGN_STATUS,false);
        return isCoachSign;
    }
    public void setCoachSign(boolean flag){
        isCoachSign = flag;
        SPUtils.put(app.getAppContext(),SPUtils.Coach_SIGN_STATUS,flag);
    }
    private boolean isCoachSign;
    private int sign_mode = 0;
    public static final int SIGN_MODE_NONE =0 ;
    public static final int SIGN_MODE_TRAIN =1 ;
    public static final int SIGN_MODE_EXAM =2 ;
    public void setSingnMode(int mode){
        SPUtils.put(app.getAppContext(),SPUtils.SIGN_MODE,mode);
        this.sign_mode = mode;
    }
    public int getSign_mode(){
        sign_mode = (int) SPUtils.get(app.getAppContext(),SPUtils.SIGN_MODE,0);
        return sign_mode;
    }
    private HashMap<BaseDataUIBean.TYPE_,MapInfoHead> mapInfoHeads = new HashMap<>();
 
    public HashMap<BaseDataUIBean.TYPE_, MapInfoHead> getMapInfoHeads() {
        mapInfoHeads = SPUtils.getHashMap(app.getAppContext());
        return mapInfoHeads;
    }
 
    public void setMapHeadInfo(MapInfoHead mapHeadInfo) {
 
            mapInfoHeads.put(mapHeadInfo.getType(),mapHeadInfo);
        SPUtils.saveHashMap(mapInfoHeads,app.getAppContext());
    }
 
    public void setRouteCollectRoadInfo(RoadInfo roadInfo) {
        this.roadInfo = roadInfo;
    }
 
    public RoadInfo getRouteCollectRoadInfo() {
        return roadInfo;
    }
 
    public void setRouteCollectLineName(String string) {
        this.routeLineName = string;
    }
 
    public String getRouteLineName(){
        return routeLineName;
    }
 
    /**
     * 返回线路采集中当前采集的项目
     * @return
     */
    public int getCurrRouteItem() {
        return routeItem;
    }
 
    public void setCurrRouteItem(int roadItemChangeLane) {
        this.routeItem = roadItemChangeLane;
    }
 
    private String smCanBriefString;
    public void setSM_CAN_BRIEF(String json) {
        if (smCanBriefString != null && smCanBriefString.equalsIgnoreCase(json)){
 
        }else{
            smCanBriefString = json;
        }
    }
 
    public String getSMCanBrief(){
        return smCanBriefString;
    }
 
    public void setMcuSN(String sn) {
        this.mcuSN = sn;
    }
 
    public String getMcuSN(){
        return mcuSN;
    }
}