천호석
2022-10-18 4adfd9671250a5c698ae1bc7b817f1060e2d907d
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
namespace SHARP_CLAS_UI
{
    public enum En_SeqType : int
    {
        Film_Judge = 0,
        Pre_Align,
        Fine_Align,
        Measurement,
    }
 
    public enum En_Module_Idx : int
    {
        Left = 0,
        Right,
    }
 
    public enum En_Result : int
    {
        Working,
        Fail,
        Success,
    }
 
    public struct RecipeChangeAck
    {
        public int msg_Index { get; private set; }
        public int result { get; private set; }
 
        public RecipeChangeAck(int msg_Index = 0, int result = 0)
        {
            this.msg_Index = msg_Index;
            this.result = result;
        }
    }
 
    public struct GrabReadyAck
    {
        public int msg_Index { get; private set; }
        public int SeqType { get; private set; }
        public int result { get; private set; }
 
        public GrabReadyAck(int msg_Index = 0, int SeqType = 0, int result = 0)
        {
            this.msg_Index = msg_Index;
            this.SeqType = SeqType;
            this.result = result;
        }
    }
 
    public struct GrabStartAck
    {
        public int msg_Index { get; private set; }
        public int SeqType { get; private set; }
        public int ModuleIdx { get; private set; }
        public int result { get; private set; }
 
        public GrabStartAck(int msg_Index = 0, int SeqType = 0, int ModuleIdx = 0, int result = 0)
        {
            this.msg_Index = msg_Index;
            this.SeqType = SeqType;
            this.ModuleIdx = ModuleIdx;
            this.result = result;
        }
    }
 
    public struct FilmJudgeResultAck
    {
        public int msg_Index { get; private set; }
        public int SeqType { get; private set; }
        public int moduleIdx { get; private set; }
        public int film_result { get; private set; }
 
        public FilmJudgeResultAck(int msg_Index = 0, int SeqType = 0, int moduleIdx = 0, int film_result = 0)
        {
            this.msg_Index = msg_Index;
            this.moduleIdx = moduleIdx;
            this.SeqType = SeqType;
            this.film_result = film_result;
        }
    }
 
    public struct AlignResultAck
    {
        public int msg_Index { get; private set; }
        public int SeqType{ get; private set; }
        public int moduleIdx{ get; private set; }
        public int align_result{ get; private set; }
        public double AlignX{ get; private set; }
        public double AlignY{ get; private set; }
        public double AlignAngle{ get; private set; }
        public int Center_Axis{ get; private set; }
 
        public AlignResultAck(int msg_Index = 0, int SeqType = 0, int moduleIdx = 0, int align_result = 0, double AlignX = 0, double AlignY = 0, double AlignAngle = 0, int Center_Axis = 0)
        {
            this.msg_Index = msg_Index;
            this.moduleIdx = moduleIdx;
            this.SeqType = SeqType;
            this.align_result = align_result;
            this.AlignX = AlignX;
            this.AlignY = AlignY;
            this.AlignAngle = AlignAngle;
            this.Center_Axis = Center_Axis;
        }
    }
 
    public struct FineAlignResultAck
    {
        public int msg_Index { get; private set; }
        public int SeqType { get; private set; }
        public int moduleIdx { get; private set; }
        public int align_result { get; private set; }
        public double AlignX { get; private set; }
        public double AlignY { get; private set; }
        public double AlignAngle { get; private set; }
        public int Center_Axis { get; private set; }
        public double Mark_Distance { get; private set; }
 
        public FineAlignResultAck(int msg_Index = 0, int SeqType = 0, int moduleIdx = 0, int align_result = 0, double AlignX = 0, double AlignY = 0, double AlignAngle = 0, int Center_Axis = 0, double Mark_Distance = 0)
        {
            this.msg_Index = msg_Index;
            this.moduleIdx = moduleIdx;
            this.SeqType = SeqType;
            this.align_result = align_result;
            this.AlignX = AlignX;
            this.AlignY = AlignY;
            this.AlignAngle = AlignAngle;
            this.Center_Axis = Center_Axis;
            this.Mark_Distance = Mark_Distance;
        }
    }
 
    public struct MeasurementResultAck
    {
        public int msg_Index{ get; private set; }
        public int moduleIdx{ get; private set; }
        public int measurement_result{ get; private set; }
        public double Mark1Point1{ get; private set; }
        public double Mark1Point2{ get; private set; }
        public double Mark2Point1{ get; private set; }
        public double Mark2Point2{ get; private set; }
        public double Mark3Point1 { get; private set; }
        public double Mark3Point2 { get; private set; }
        public double Mark4Point1 { get; private set; }
        public double Mark4Point2 { get; private set; }
        public double MarkDistance{ get; private set; }
        public int align_result{ get; private set; }
 
        public MeasurementResultAck(int msg_Index = 0, int moduleIdx = 0, int measurement_result = 0, double Mark1Point1 = 0, double Mark1Point2 = 0, double Mark2Point1 = 0, double Mark2Point2 = 0, double Mark3Point1 = 0, double Mark3Point2 = 0, double Mark4Point1 = 0, double Mark4Point2 = 0, double MarkDistance = 0, int align_result = 0)
        {
            this.msg_Index = msg_Index;
            this.moduleIdx = moduleIdx;
            this.measurement_result = measurement_result;
            this.Mark1Point1 = Mark1Point1;
            this.Mark1Point2 = Mark1Point2;
            this.Mark2Point1 = Mark2Point1;
            this.Mark2Point2 = Mark2Point2;
            this.Mark3Point1 = Mark3Point1;
            this.Mark3Point2 = Mark3Point2;
            this.Mark4Point1 = Mark4Point1;
            this.Mark4Point2 = Mark4Point2;
            this.MarkDistance = MarkDistance;
            this.align_result = align_result;
        }
    }
 
    public struct WidthMeasurementResultAck
    {
        public int msg_Index { get; private set; }
        public int moduleIdx { get; private set; }
        public int measurement_result { get; private set; }
        public double Mark1Width { get; private set; }
        public double Mark2Width { get; private set; }
        public double Mark3Width { get; private set; }
        public double Mark4Width { get; private set; }
 
        public WidthMeasurementResultAck(int msg_Index = 0, int moduleIdx = 0, int measurement_result = 0, double mark1Width = 0, double mark2Width = 0, double mark3Width = 0, double mark4Width = 0)
        {
            this.msg_Index = msg_Index;
            this.moduleIdx = moduleIdx;
            this.measurement_result = measurement_result;
            this.Mark1Width = mark1Width;
            this.Mark2Width = mark2Width;
            this.Mark3Width = mark3Width;
            this.Mark4Width = mark4Width;
        }
    }
 
    public struct MotorPosMoveReq
    {
        public int msg_Index{ get; private set; }
        public int SeqType{ get; private set; }
        public int moduleIdx{ get; private set; }
        public int GrabIdx{ get; private set; }
 
        public MotorPosMoveReq(int msg_Index = 0, int SeqType = 0, int moduleIdx = 0, int GrabIdx = 0)
        {
            this.msg_Index = msg_Index;
            this.SeqType = SeqType;
            this.moduleIdx = moduleIdx;
            this.GrabIdx = GrabIdx;
        }
    }
 
    public struct UserCommandAck
    {
        public int msg_Index{ get; private set; }
        public int SeqType{ get; private set; }
        public int result{ get; private set; }
 
        public UserCommandAck(int msg_Index = 0, int SeqType = 0, int result = 0)
        {
            this.msg_Index = msg_Index;
            this.SeqType = SeqType;
            this.result = result;
        }
    }
 
    public struct SystemTimeSyncAck
    {
        public int msg_Index{ get; private set; }
        public int result{ get; private set; }
 
        public SystemTimeSyncAck(int msg_Index = 0, int result = 0)
        {
            this.msg_Index = msg_Index;
            this.result = result;
        }
    }
 
    public struct VisionAliveAck
    {
        public int msg_Index{ get; private set; }
        public int Controller{ get; private set; }
        public int HeartBeat{ get; private set; }
 
        public VisionAliveAck(int msg_Index = 0, int Controller = 0, int HeartBeat = 0)
        {
            this.msg_Index = msg_Index;
            this.Controller = Controller;
            this.HeartBeat = HeartBeat;
        }
    }
}