SDC C-Project CF Review 프로그램
LYW
2021-08-25 03152a241b9463c582b56896f5f5f73717497ab4
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
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
#pragma once
 
#include <map>
#include <vector>
#include <list>
 
typedef std::vector<CString>                                VectorString;
typedef std::vector<CString>::iterator                        VectorStringIt;
typedef std::vector<CString>::const_iterator                constVectorStringIt;
 
typedef std::vector<int>                                    VectorInteger;
typedef std::vector<int>::iterator                            VectorIntegerIt;
typedef std::vector<int>::const_iterator                    constVectorIntegerIt;
 
typedef std::vector<DWORD>                                    VectorDWORD;
typedef std::vector<DWORD>::iterator                        VectorDWORDIt;
typedef std::vector<DWORD>::const_iterator                    constVectorDWORDIt;
 
/*
#include "ReviewScheduleResult.h"
typedef std::vector<CPathSchedulerResult>                    VectorReviewScheduleResult;
typedef std::vector<CPathSchedulerResult>::iterator        VectorReviewScheduleResultIt;
typedef std::vector<CPathSchedulerResult>::const_iterator    constVectorReviewScheduleResultIt;
*/
#include "CHPathScheduler/PathSchedulerResult.h"
typedef std::vector<CPathSchedulerResult>                    VectorReviewScheduleResult;
typedef std::vector<CPathSchedulerResult>::iterator        VectorReviewScheduleResultIt;
typedef std::vector<CPathSchedulerResult>::const_iterator    constVectorReviewScheduleResultIt;
 
#include "CHReviewResult/DefectResult.h"
typedef std::multimap<int, CDefectResult*>                    MapDefectResult;
typedef std::multimap<int, CDefectResult*>::iterator        MapDefectResultIt;
typedef std::multimap<int, CDefectResult*>::const_iterator    constMapDefectResultIt;
 
typedef std::vector<CDefectResult>                            VectorDefectResult;
typedef std::vector<CDefectResult>::iterator                VectorDetectResultIt;
typedef std::vector<CDefectResult>::const_iterator            constVectorDetectResultIt;
 
typedef std::vector<VectorDefectResult>                        VectorVDefectResult;
typedef std::vector<VectorDefectResult>::iterator            VectorVDetectResultIt;
typedef std::vector<VectorDefectResult>::const_iterator        constVectorVDetectResultIt;
 
typedef std::vector<CCellResult>                            VectorCellResult;
typedef std::vector<CCellResult>::iterator                    VectorCellResultIt;
typedef std::vector<CCellResult>::const_iterator            constVectorCellResultIt;
 
#include "CHReviewResult/ReviewResult.h"
typedef std::vector<CReviewResult>                            VectorReviewResult;
typedef std::vector<CReviewResult>::iterator                VectorReviewResultIt;
typedef std::vector<CReviewResult>::const_iterator            constVectorReviewResultIt;
 
#include "AlignResult.h"
typedef std::vector<CAlignRecipe>                            VectorAlignRecipe;
typedef std::vector<CAlignRecipe>::iterator                    VectorAlignRecipeIt;
typedef std::vector<CAlignRecipe>::const_iterator            constVectorAlignRecipeIt;
 
typedef std::vector<CAlignResult>                            VectorAlignResult;
typedef std::vector<CAlignResult>::iterator                    VectorAlignResultIt;
typedef std::vector<CAlignResult>::const_iterator            constVectorAlignResultIt;
 
class AFX_EXT_CLASS CGlassResult
{
public:
    CGlassResult(void);
    virtual ~CGlassResult(void);
    void                Reset();
    void HT_Reset();
    // getter
    int                        GetCellResultCount() const                                { return (int)m_vecCellResult.size(); }
    int                        GetDefectResultCount() const                            { return (int)m_mapDefectResult.size(); }
 
    VectorCellResult*        GetVectorCellResult()                                     { return &m_vecCellResult; }
    const VectorCellResult*    GetVectorCellResult() const                                { return &m_vecCellResult; }
    MapDefectResult*        GetMapDefectResult()                                     { return &m_mapDefectResult; }
    const MapDefectResult*    GetMapDefectResult() const                                { return &m_mapDefectResult; }
 
 
    // getter
    // [2018/02/05 15:15:29 by jylee] related Tack Time
    float                GetTackTime() const                                { return m_nTackTime; }
    int                    GetCurDefectIdx() const                            { return m_nCurDefectIdx; }
    BOOL                GetReadRawFile() const                            { return m_bReadRawFile; }
    int                    GetSlotNum() const                                { return m_nSlotNum; }
    int                    GetGlassSizeX() const                            { return m_nGlassSizeX; }
    int                    GetGlassSizeY() const                            { return m_nGlassSizeY; }
    int                    GetCollisionDistanceX() const                    { return m_nCollisionDistanceX; }
    int                    GetCollisionDistanceY() const                    { return m_nCollisionDistanceY; }
    double                GetCollisionPosX1() const { return m_nCollisionXPos1; }
    double                GetCollisionPosX2() const { return m_nCollisionXPos2; }
    int                    GetOriginDir() const                            { return m_nOriginDir; }
    int                    GetCornerCutDir() const                            { return m_nCornerCutDir; }
    int                    GetReviewSnapSerialNo() const                    { return m_nReviewSnapSerialNo; }
    int                    GetGlassJudge() const                            { return m_glassJudge;}
    double                GetDistanceThreshold() const                    { return m_dDistanceThreshold; }
    void                GetGlassSize(int& nGlassSizeX, int& nGlassSizeY);
    BOOL                GetGlassCenterCoordinate() const                { return m_bCenterCoordinate; }
    BOOL                GetGlassInverseCoordinate() const                { return m_bInverseCoordinate; }
 
    const CAlignRecipe*    GetAlignRecipe() const                            { return &m_AlignRecipe; }
    const CAlignResult*    GetAlignResult() const                            { return &m_AlignResult; }
 
    const CString*        GetAOIRawFileName() const                        { return &m_strAOIRawFileName; }
    const CString*        GetAOIRawFilePath() const                        { return &m_strAOIRawFilePath; }
    const CString*        GetAOIRawCDFileName() const                        { return &m_strAOIRawCDFileName; }
    const CString*        GetAOIRawCDFilePath() const                        { return &m_strAOIRawCDFilePath; }
    const CString*        GetAOIRawSDFileName() const                        { return &m_strAOIRawSDFileName; }
    const CString*        GetAOIRawSDFilePath() const                        { return &m_strAOIRawSDFilePath; }
    const CString*        GetLocalRawFilePath() const                        { return &m_strLocalRawFilePath; }
    const CString*        GetLocalRawCDFilePath() const                    { return &m_strLocalRawCDFilePath; }
    const CString*        GetLocalRawSDFilePath() const                    { return &m_strLocalRawSDFilePath; }
 
    const CString*        GetLotID() const                                { return &m_strLotID; }
    const CString*        GetGlassID() const                                { return &m_strGlassID; }
    const CString*        GetJobID() const                                { return &m_strJobID; }
    const CString*        GetRecipeID() const                                { return &m_strRecipeID; }
    const CString*        GetProcessID() const                            { return &m_strProcessID; }    
    const CString*        GetPPID() const                                    { return &m_strPPID; }
    const CString*        GetPPID_RC() const                                { return &m_strPPID_RC; }// Á¦¾î¿¡¼­ PPIDÀß¶óÁØ ·¹½ÃÇÇ À̸§  
    const CString*        GetStepID() const                                { return &m_strStepID; }
    const CString*        GetFlowID() const                                { return &m_strFlowID; }
 
    const CString*        GetUnLoadingTime() const                        { return &m_strUnLoadingTime; }
 
    // [2017:1:9]-[WEZASW] : PLC GlassData Ç׸ñ ÀçÁ¤ÀÇ
    const CString*        GetOperID() const                                { return &m_strOperID; }
    const CString*        GetGlassCode() const                            { return &m_strGlassCode; }
 
    // setter
    void                SetUnLoadingTime(const CString& strValue)                { m_strUnLoadingTime    = strValue; }
 
    void                SetGlassSize(int nGlassSizeX, int nGlassSizeY);
    void                SetCollisionDistanceX(int nDistance)                         { m_nCollisionDistanceX = nDistance; }
    void                SetCollisionDistanceY(int nDistance)                         { m_nCollisionDistanceY = nDistance; }
    void                SetGlassOriginDirection(int nGlassOriginDirection);
    void                SetCornerCutDirection(int nCornerCutDirection);
    void                SetGlassCenterCoordinate(BOOL bCenter);
    void                SetGlassInverseCoordinate(BOOL bInverse);
 
    void                SetCollisionXPos(int nModuleIdx, double nDistance) {
        if (nModuleIdx == 0)
            m_nCollisionXPos1 = nDistance;
        else
            m_nCollisionXPos2 = nDistance;
    }
 
 
    // adder
    void                    AddCellResult(const CCellResult& cellResult);
    BOOL                    AddDefectResult(CDefectResult* pDefectResult);
    void                    AddDefocusCount()                            { m_nDeFocusCount++; }            // lmk 190813 image defocus
    void                    ResetDefocusCount()                            { m_nDeFocusCount = 0; }    
 
 
public: // func
    BOOL                    CheckReviewComplete(int nModuleIdx=-1);
    BOOL                    CheckUserComplete(int nModuleIdx=-1);
    BOOL                    CheckWsiComplete(int nModuleIdx=-1);
    BOOL                    CheckMeasureComplete(int nModuleIdx=-1);
    BOOL                    CheckReflowComplete(int nModuleIdx=-1);
    BOOL                    CheckWsiReflowComplete(int nModuleIdx=-1);
    BOOL                    CheckWsiUserComplete(int nModuleIdx=-1);
    BOOL                    CheckWsiMultiShotComplete(int nModuleIdx = -1);
 
    BOOL                    SetReviewResultData(int nModuleIdx, int nResultIdx, VectorImageData& vectorImageData, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetUserResultData(int nModuleIdx, int nResultIdx, VectorImageData& vectorImageData, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetWsiResultData(int nModuleIdx, int nResultIdx, const SReviewResult& wsiResult, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetMeasureResultData(int nModuleIdx, int nResultIdx, VectorImageData& vectorImageData, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetReflowResultData(int nModuleIdx, int nResultIdx, VectorImageData& vectorImageData, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetWsiReflowResultData(int nModuleIdx, int nResultIdx, const SReviewResult& wsiResult, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetUserWsiResultData(int nModuleIdx, int nResultIdx, const SReviewResult& wsiResult, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    BOOL                    SetWSIMultiShotResultData(int nModuleIdx, int nResultIdx, const SReviewResult& wsiResult, int nGlassPosX, int nGlassPosY, int nMotorPosX, int nMotorPosY, double dDurationTime);
    void                    ClassifyDefectResult(CDefectResult* pDefectResult);
 
    
public:
    int                                    GetCrackDefectResultCount() const                { return (int)m_vecCrackDefectResult.size(); }
    int                                    GetMaskDefectResultCount() const                { return (int)m_vecMaskDefectResult.size(); }
    int                                    GetPadDefectResultCount() const                    { return (int)m_vecPadDefectResult.size(); }
    int                                    GetCommonDefectResultCount() const                { return (int)m_vecCommonDefectResult.size(); }
    int                                    GetAlignDefectResultCount() const                { return (int)m_vecAlignDefectResult.size(); }
    int                                    GetActiveDefectResultCount() const                { return (int)m_vecActiveDefectResult.size(); }
    int                                    GetReworkDefectResultCount() const                { return (int)m_vecReworkDefectResult.size(); }
    
    const VectorDefectResult*            GetVectorCrackDefectResult() const                { return &m_vecCrackDefectResult; }
    const VectorDefectResult*            GetVectorMaskDefectResult() const                { return &m_vecMaskDefectResult; }
    const VectorDefectResult*            GetVectorPadDefectResult() const                { return &m_vecPadDefectResult; }
    const VectorDefectResult*            GetVectorCommonDefectResult() const                { return &m_vecCommonDefectResult; }
    const VectorDefectResult*            GetVectorAlignDefectResult() const                { return &m_vecAlignDefectResult; }
    const VectorDefectResult*            GetVectorActiveDefectResult() const                { return &m_vecActiveDefectResult; }
    const VectorDefectResult*            GetVectorReworkDefectResult() const                { return &m_vecReworkDefectResult; }
    
    VectorDefectResult*                    GetVectorCrackDefectResult()                     { return &m_vecCrackDefectResult; }
    VectorDefectResult*                    GetVectorMaskDefectResult()                     { return &m_vecMaskDefectResult; }
    VectorDefectResult*                    GetVectorPadDefectResult()                         { return &m_vecPadDefectResult; }
    VectorDefectResult*                    GetVectorCommonDefectResult()                     { return &m_vecCommonDefectResult; }
    VectorDefectResult*                    GetVectorAlignDefectResult()                     { return &m_vecAlignDefectResult; }
    VectorDefectResult*                    GetVectorActiveDefectResult()                     { return &m_vecActiveDefectResult; }
    VectorDefectResult*                    GetVectorReworkDefectResult()                     { return &m_vecReworkDefectResult; }
    
    
public:
    // review result
    const VectorReviewResult*        GetVectorReviewResult() const;
    VectorReviewResult*                GetVectorReviewResult();
    int                                GetReviewResultCount() const;
    CReviewResult*                    GetReviewResult(int nModuleIdx);
    const CReviewResult*            GetReviewResult(int nModuleIdx) const;
 
    int                                GetTotalSReviewResultCount() const;
    int                                GetSReviewResultCount(int nModuleIdx) const;
    SReviewResult*                    GetSReviewResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSReviewResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddReviewResult(const CReviewResult& cReviewResult);
    void                            AddSReviewResult(int nModuleIdx, const SReviewResult& sReviewResult);
 
    // user result
    const VectorReviewResult*        GetVectorUserResult() const;
    VectorReviewResult*                GetVectorUserResult();
    int                                GetUserResultCount() const;
    CReviewResult*                    GetUserResult(int nModuleIdx);
    const CReviewResult*            GetUserResult(int nModuleIdx) const;
 
    int                                GetTotalSUserResultCount() const;
    int                                GetSUserResultCount(int nModuleIdx) const;
    int                                GetSUserCompleteResultCount(int nModuleIdx, int resultCode) const;
 
    SReviewResult*                    GetSUserResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSUserResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddUserResult(const CReviewResult& cReviewResult);
    void                            AddSUserResult(int nModuleIdx, const SReviewResult& sReviewResult);
 
    // wsi result
    const VectorReviewResult*        GetVectorWsiResult() const;
    VectorReviewResult*                GetVectorWsiResult();
    int                                GetWsiResultCount() const;
    CReviewResult*                    GetWsiResult(int nModuleIdx);
    const CReviewResult*            GetWsiResult(int nModuleIdx) const;
 
    int                                GetTotalSWsiResultCount() const;
    int                                GetSWsiResultCount(int nModuleIdx) const;
    SReviewResult*                    GetSWsiResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSWsiResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddWsiResult(const CReviewResult& cReviewResult);
    void                            AddSWsiResult(int nModuleIdx, const SReviewResult& sReviewResult);
    
 
    // measure result
    const VectorReviewResult*        GetVectorMeasureResult() const;
    VectorReviewResult*                GetVectorMeasureResult();
    int                                GetMeasureResultCount() const;
    CReviewResult*                    GetMeasureResult(int nModuleIdx);
    const CReviewResult*            GetMeasureResult(int nModuleIdx) const;
 
    int                                GetTotalSMeasureResultCount() const;
    int                                GetSMeasureResultCount(int nModuleIdx) const;
    SReviewResult*                    GetSMeasureResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSMeasureResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddMeasureResult(const CReviewResult& cReviewResult);
    void                            AddSMeasureResult(int nModuleIdx, const SReviewResult& sReviewResult);
 
    // reflow result
    const VectorReviewResult*        GetVectorReflowResult() const;
    VectorReviewResult*                GetVectorReflowResult();
    int                                GetReflowResultCount() const;
    CReviewResult*                    GetReflowResult(int nModuleIdx);
    const CReviewResult*            GetReflowResult(int nModuleIdx) const;
 
    int                                GetTotalSReflowResultCount() const;
    int                                GetSReflowResultCount(int nModuleIdx) const;
    SReviewResult*                    GetSReflowResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSReflowResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddReflowResult(const CReviewResult& cReviewResult);
    void                            AddSReflowResult(int nModuleIdx, const SReviewResult& sReviewResult);
 
    // wsi reflow result
    const VectorReviewResult*        GetVectorWsiReflowResult() const;
    VectorReviewResult*                GetVectorWsiReflowResult();
    int                                GetWsiReflowResultCount() const;
    CReviewResult*                    GetWsiReflowResult(int nModuleIdx);
    const CReviewResult*            GetWsiReflowResult(int nModuleIdx) const;
 
    int                                GetTotalSWsiReflowResultCount() const;
    int                                GetSWsiReflowResultCount(int nModuleIdx) const;
    SReviewResult*                    GetSWsiReflowResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSWsiReflowResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddWsiReflowResult(const CReviewResult& cReviewResult);
    void                            AddSWsiReflowResult(int nModuleIdx, const SReviewResult& sReviewResult);
 
    // wsi user result
    
    CReviewResult*                  GetWsiUserResult( int nModuleIdx );
    const CReviewResult*            GetWsiUserResult( int nModuleIdx ) const;
 
    SReviewResult*                    GetSWsiUserResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSWsiUserResult(int nModuleIdx, int nResultIdx) const;
 
    const VectorReviewResult*        GetVectorUserWsiResult() const;
    VectorReviewResult*                GetVectorUserWsiResult();
 
 
 
    void                            AddWsiUserResult( const CReviewResult& cReviewResult );
    void                            AddWsiUserScheduleRedult( const CPathSchedulerResult& scheduleResult );
    int                             GetTotalSWsiUserResultCount() const;
    int GetWsiUserResultCount() const;
 
    //WSI MultiShot Result 
    const VectorReviewResult*        GetVectorWsiMultiShotResult() const;
    VectorReviewResult*                GetVectorWsiMultiShotResult();
    int                                GetWsiMultiShotResultCount() const;
    CReviewResult*                    GetWsiMultiShotResult(int nModuleIdx);
    const CReviewResult*            GetWsiMultiShotResult(int nModuleIdx) const;
 
    int                                GetTotalSWsiMultiShotResultCount() const;
    int                                GetSWsiMultiShotResultCount(int nModuleIdx) const;
    SReviewResult*                    GetSWsiMultiShotResult(int nModuleIdx, int nResultIdx);
    const SReviewResult*            GetSWsiMultiShotResult(int nModuleIdx, int nResultIdx) const;
 
    void                            AddWsiMultiShotResult(const CReviewResult& cReviewResult);
    void                            AddSWSIMultiShotResult(int nModuleIdx, const SReviewResult& sReviewResult);
 
 
    // review schedule result
    const VectorReviewScheduleResult*    GetVectorReviewScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorReviewScheduleResult();
    int                                    GetReviewScheduleResultCount() const;
    CPathSchedulerResult*                GetReviewScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*        GetReviewScheduleResult(int nModuleIdx) const;
    int                                    GetReviewSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetReviewSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetReviewSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddReviewScheduleResult(const CPathSchedulerResult& scheduleResult);
 
    // user schedule result
    const VectorReviewScheduleResult*    GetVectorUserScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorUserScheduleResult();
    int                                    GetUserScheduleResultCount() const;
    CPathSchedulerResult*                GetUserScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*        GetUserScheduleResult(int nModuleIdx) const;
    int                                    GetUserSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetUserSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetUserSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddUserScheduleResult(const CPathSchedulerResult& scheduleResult);
 
    // wsi schedule result
    const VectorReviewScheduleResult*    GetVectorWsiScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorWsiScheduleResult();
    int                                    GetWsiScheduleResultCount() const;
    CPathSchedulerResult*                GetWsiScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*        GetWsiScheduleResult(int nModuleIdx) const;
    int                                    GetWsiSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetWsiSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetWsiSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddWsiScheduleResult(const CPathSchedulerResult& scheduleResult);
 
    // Measure schedule result
    const VectorReviewScheduleResult*    GetVectorMeasureScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorMeasureScheduleResult();
    int                                    GetMeasureScheduleResultCount() const;
    CPathSchedulerResult*                GetMeausreScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*        GetMeausreScheduleResult(int nModuleIdx) const;
    int                                    GetMeausreSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetMeausreSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetMeausreSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddMeasureScheduleRedult(const CPathSchedulerResult& scheduleResult);
 
    // reflow schedule result
    const VectorReviewScheduleResult*    GetVectorReflowScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorReflowScheduleResult();
    int                                    GetReflowScheduleResultCount() const;
    CPathSchedulerResult*                GetReflowScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*            GetReflowScheduleResult(int nModuleIdx) const;
    int                                    GetReflowSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetReflowSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetReflowSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddReflowScheduleRedult(const CPathSchedulerResult& scheduleResult);
 
    // wsi reflow schedule result
    const VectorReviewScheduleResult*    GetVectorWsiReflowScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorWsiReflowScheduleResult();
    int                                    GetWsiReflowScheduleResultCount() const;
    CPathSchedulerResult*                GetWsiReflowScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*            GetWsiReflowScheduleResult(int nModuleIdx) const;
    int                                    GetWsiReflowSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetWsiReflowSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetWsiReflowSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddWsiReflowScheduleRedult(const CPathSchedulerResult& scheduleResult);
 
    // wsimultiShot schedule result
    const VectorReviewScheduleResult*    GetVectorWsiMultiShotScheduleResult() const;
    VectorReviewScheduleResult*            GetVectorWsiMultiShotScheduleResult();
    int                                    GetWsiMultiShotScheduleResultCount() const;
    CPathSchedulerResult*                GetWsiMultiShotScheduleResult(int nModuleIdx);
    const CPathSchedulerResult*            GetWsiMultiShotScheduleResult(int nModuleIdx) const;
    int                                    GetWsiMultiShotSSchedulerResultCount(int nModuleIdx) const;
    SSchedulerResult*                    GetWsiMultiShotSSchedulerResult(int nModuleIdx, int nResultIdx);
    const SSchedulerResult*                GetWsiMultiShotSSchedulerResult(int nModuleIdx, int nResultIdx) const;
    void                                AddWsiMultiShotScheduleResult(const CPathSchedulerResult& scheduleResult);
 
 
public:
 
    static double CalculateDistance(int nPosX, int nPosY, int nGrabX, int nGrabY);
    
 
 
    // current status
    BOOL                        m_bReadRawFile;
    int                            m_nCurDefectIdx;
    double                        m_dDistanceThreshold;
    DWORD                        m_dwMinFrameTick;
    int                            m_nDeFocusCount;
 
    // glass info
    int                            m_nDivideType;
    int                            m_nSlotNum;
    int                            m_nGlassSizeX;
    int                            m_nGlassSizeY;
    int                            m_nCollisionDistanceX;
    int                            m_nCollisionDistanceY;
    double                        m_nCollisionXPos1;
    double                        m_nCollisionXPos2;
    int                            m_nOriginDir;
    int                            m_nCornerCutDir;
    int                            m_nReviewSnapSerialNo;
    int                            m_glassJudge;
    BOOL                        m_bCenterCoordinate;
    BOOL                        m_bInverseCoordinate;
 
    //AOI Raw File Path
    CString                        m_strAOIRawFileName;        //TD
    CString                        m_strAOIRawFilePath;        //TD
    CString                        m_strAOIRawCDFileName;        //CD
    CString                        m_strAOIRawCDFilePath;        //CD
    CString                        m_strAOIRawSDFileName;        //SD
    CString                        m_strAOIRawSDFilePath;        //SD
    CString                        m_strResultDate;
 
    //Local Raw File Path
    CString                        m_strLocalRawFilePath;        //TD
    CString                        m_strLocalRawCDFilePath;    //CD
    CString                        m_strLocalRawSDFilePath;    //SD
 
    // glass transfer info
    CString                        m_strLotID;
    CString                        m_strRecipeID;
 
    CString                        m_strGlassID;
    CString                        m_strProcessID;    
 
    CString                        m_strStepID;
    
    CString                        m_strPPID;
    CString                        m_strPPID_RC;// Á¦¾î¿¡¼­ PPIDÀß¶óÁØ ·¹½ÃÇÇ À̸§  
    CString                        m_strFlowID;
    CString                        m_strFlowHistory;
 
    CString                        m_strMaskSize;
    CString                        m_strMaskRotation;
 
    // [2018/01/10 01:00:23 by jylee] related PANDA Equipment ID
    CString                        m_strEquipID;
 
    CString                        m_strRTMSLocalAOIImageFilePath;
    CString                        m_strUploadRTMSImageFilePath;
    CString                        m_strUploadImgFileName;
 
 
//    CString m_strProdID;
//    CString m_strOperID;
//    CString m_strLotID;
//    CString m_strPPID;
//    CString m_strProcessingFlag;
//    CString m_strInspectionFlag;
//    CString m_strSkipFlag;
//    CString m_strProcessingCount;x
//    CString m_strInspectionJudgeData;
 
    //cmj Glass Data Ãß°¡
    CString m_strJobType;
    CString    m_strJobID;
    CString m_strLotSeqNum;
    CString m_strSlotSeqNum;
    CString m_strPropertyCode;
    CString m_strJobJudgeCode;
    CString m_strJobGradeCode;
    CString m_strSubstrateType;
 
    CString m_strJobSize;
    CString m_strGlassThickness;
    CString m_strJobAngle;
    CString m_strJobFlip;
    CString m_strCuttingGlassType;
 
    CString m_strPairJobID;
    CString m_strPairFlag;
    CString m_strOptionValue;
    CString m_strReserved;
 
    CString strGlassScanSchedule; //ºÐÆÇ Á¤º¸ cmark
 
    CString m_strRTMSStepID;
 
    CString m_strGlassLastName;
 
    // [2017:1:9]-[WEZASW] : PLC GlassData Ç׸ñ ÀçÁ¤ÀÇ
    CString                        m_strOperID;
    CString                        m_strGlassCode;
    
    // 20170719 smok. machine ID Ãß°¡
    CString                        m_equipID;
 
    /////////// 20170825 smok. ph2 element Ãß°¡
    CString                        m_strGlassJudgeCode;
 
    CString                        m_strGlassGradeCode;
    CString                        m_strProdID;
    CString                        m_strProcessingFlag;
    CString                        m_strInspectionJudgeData;
 
    CString                        m_strSkipFlag;
    CString                        m_strInspectionFlag;
    CString                        m_strMode;
    CString                        m_strGlassType;
    CString                        m_strDummyType;
 
    CString                        m_strProcessingCount;
 
    // time 
    CString                        m_strUnLoadingTime;
    float                        m_nTackTime;
 
    // align info
    CAlignRecipe                m_AlignRecipe;
    CAlignResult                m_AlignResult;
 
    int m_nPlag;
 
    int nReview00ImageContrast;
    int nReview01ImageContrast;
 
public:
 
    // cell info
    VectorCellResult            m_vecCellResult;
 
    // defect info
    MapDefectResult                m_mapDefectResult;
    VectorDefectResult            m_vecCrackDefectResult;
    VectorDefectResult            m_vecMaskDefectResult;
    VectorDefectResult            m_vecPadDefectResult;
    VectorDefectResult            m_vecCommonDefectResult;
    VectorDefectResult            m_vecAlignDefectResult;
    VectorDefectResult            m_vecActiveDefectResult;
    VectorDefectResult            m_vecReworkDefectResult;
 
    // result
    VectorReviewResult            m_vecReviewResult;
    VectorReviewResult            m_vecUserResult;
    VectorReviewResult            m_vecWsiResult;
    VectorReviewResult            m_vecMeasureResult;
    VectorReviewResult            m_vecReflowResult;
    VectorReviewResult            m_vecWsiReflowResult;
    VectorReviewResult            m_vecWsiUserResult;
    VectorReviewResult            m_vecWsiMultiShotResult;
 
    // schedule result 
    VectorReviewScheduleResult    m_vecReviewScheduleResult;
    VectorReviewScheduleResult    m_vecUserScheduleResult;
    VectorReviewScheduleResult    m_vecWsiScheduleResult;
    VectorReviewScheduleResult  m_vecMeasureScheduleResult;
    VectorReviewScheduleResult  m_vecReflowScheduleResult;
    VectorReviewScheduleResult  m_vecWsiReflowScheduleResult;
    VectorReviewScheduleResult  m_vecWsiUserScheduleResult;
    VectorReviewScheduleResult  m_vecWsiMultiShotScheduleResult;
 
    CRITICAL_SECTION            m_csProcess;
    CRITICAL_SECTION            m_csDefect;
};
 
typedef std::vector<CGlassResult*>                        VectorGlassResult;
typedef std::vector<CGlassResult*>::iterator            VectorGlassResultIt;
typedef std::vector<CGlassResult*>::iterator            VectorHistoryResultIt;
typedef std::vector<CGlassResult*>::const_iterator        constVectorGlassResultIt;
 
typedef std::list<const CGlassResult*>                    ListGlassResult;
typedef std::list<const CGlassResult*>::iterator        ListGlassResultIt;
typedef std::list<const CGlassResult*>::const_iterator    constListGlassResultIt;
 
struct STransferData 
{
public:
    STransferData()
    {
        Reset();
    }
 
    void Reset()
    {
        strGlassLastName = _T("");
        strGlassID        = _T("");
 
        strEGlassID        = _T("");
        strProcessID    = _T("");
        strProductID    = _T("");
 
        strStepID         = _T("");
        strBatchID        = _T("");
        strProdType        = _T("");
        strProdKind        = _T("");
        strPPID            = _T("");
        strPPID_RC      = _T("");// Á¦¾î¿¡¼­ PPIDÀß¶óÁØ ·¹½ÃÇÇ À̸§  
        strFlowID        = _T("");
 
        strLotID        = _T("");
        strSlotNum        = _T("");
 
        strRecipeID        = _T("");
        strMaskSize        = _T("");
        strMaskRotation = _T("");
 
        strOperID        = _T("");
        strGlassCode    = _T("");
 
        //vecFlowHistory.clear();
 
 
        /////////// 20170825 smok. ph2 element Ãß°¡
//        strLotID = _T("");
//        strGlassID = _T("");
//        strOperID = _T("");
//        strGlassCode = _T("");
        strGlassJudgeCode = _T("");
 
        strGlassGradeCode = _T("");
 
        strProdID = _T("");
        strProcessingFlag = _T("");
        strInspectionJudgeData = _T("");
 
        strSkipFlag = _T("");
        strInspectionFlag = _T("");
        strMode = _T("");
        strGlassType = _T("");
        strDummyType = _T("");
 
        strProcessingCount = _T("");
 
        strJobID                = _T("");
        strJobType                = _T("");
        strLotSeqNum            = _T("");
        strSlotSeqNum            = _T("");
        strPropertyCode            = _T("");
        strJobJudgeCode            = _T("");
        strJobGradeCode            = _T("");
        strSubstrateType        = _T("");
        strJobSize                = _T("");
        strGlassThickness        = _T("");
        strJobAngle                = _T("");
        strJobFlip                = _T("");
        strCuttingGlassType        = _T("");
        strPairJobID            = _T("");
        strPairFlag                = _T("");
        strOptionValue            = _T("");
        strReserved                = _T("");
        strGlassScanSchedule    = _T("");//±Û¶ó½º ÁÂ¿ì ÆÇº°cmark
        strPanelSize            = _T("");
        strCompCount            = _T("");
        strPanelState           = _T("");
        strReadingFlag          = _T("");
        strPanelPosition        = _T("");
        strFlowHistory          = _T("");
        strUnIqueID             = _T("");
        strCount1                = _T("");
        strCount2                = _T("");
        strMultiUse                = _T("");
        strGlassDataBigSig        = _T("");
        strPairID                = _T("");
        strEPairID                = _T("");
        strPairProductID          = _T("");
        strPairGrade            = _T("");
        strFlowGroup              = _T("");
        strDBR_RECIPE            = _T("");
        strRerferData            = _T("");
 
    }
 
public:
    CString strGlassID;    // »ç¿ë H PANEL ID
    CString strEGlassID;//      E PANEL ID
    CString strProcessID;
    CString strProductID;
 
    CString strStepID;
    CString strBatchID;
    CString strProdType;
    CString strProdKind;
    CString strFlowID;
 
    //std::vector<CString> vecFlowHistory;
 
    CString strSlotNum;
 
    CString strRecipeID;
    CString strMaskSize;
    CString strMaskRotation;
    CString strGlassCode;
 
 
 
    /////////// 20170825 smok. ph2 element Ãß°¡
 
    CString strGlassJudgeCode;
    CString strGlassGradeCode;
 
    CString strMode;
    CString strGlassType;
    CString    strDummyType;
 
 
    /////////20180502 lwk b11 element Ãß°¡
 
    CString strProdID;
    CString strOperID;
    CString strLotID;
    CString strPPID;
    CString strPPID_RC;
    CString strJobType;
    CString    strJobID;
    CString strLotSeqNum;
    CString strSlotSeqNum;
    CString strPropertyCode;
    CString strJobJudgeCode;
    CString strJobGradeCode;
    CString strSubstrateType;
    CString strProcessingFlag;
    CString strInspectionFlag;
    CString strSkipFlag;
    CString strJobSize;
    CString strGlassThickness;
    CString strJobAngle;
    CString strJobFlip;
    CString strCuttingGlassType;
    CString strProcessingCount;
    CString strInspectionJudgeData;
    CString strPairJobID;
    CString strPairFlag;
    CString strOptionValue;
    CString strReserved;
    CString strGlassScanSchedule; //ÁÂ¿ì ºÐÆÇÁ¤º¸
    CString strGlassLastName;
    CString strPanelSize;
    CString strCompCount;
    CString strPanelState;
    CString strReadingFlag;
    CString strPanelPosition;
    CString strFlowHistory;
    CString    strUnIqueID;
    CString    strCount1; // °í°´»ç°¡ ¹º»ý°¢À¸·Î À̵ý½ÄÀ¸·Î ³×À̹֠Çß´ÂÁö À߸𸣰ٴ٠±ÍÂú¾Ò³ªº¸´Ù ¤¾¤¾
    CString    strCount2;
    CString strMultiUse;
    CString strGlassDataBigSig;
    CString strPairID;
    CString strEPairID;
    CString strPairProductID;
    CString strPairGrade;
    CString strFlowGroup; 
    CString strDBR_RECIPE;
    CString strRerferData;
};
 
interface IUpdateReviewResult
{
    virtual void    UpdateReviewResult(int nModuleIndex, const CGlassResult* pGlassResult, int nPlanIndex) = 0;
};
typedef std::vector<IUpdateReviewResult*>                ObserverUpdateReviewResult;
typedef std::vector<IUpdateReviewResult*>::iterator        ObserverUpdateReviewResultIt;
 
interface IUpdateProcessStatus
{
    virtual void    UpdateProcessStatus(int nLineType, int nMachineType, int nProcessStatus, const CGlassResult* pGlassResult) = 0;
};
typedef std::vector<IUpdateProcessStatus*>                ObserverUpdateProcessStatus;
typedef std::vector<IUpdateProcessStatus*>::iterator    ObserverUpdateProcessStatusIt;