222
schangxiang@126.com
2025-09-29 f782248da68c035aae12f902f29d828e9867abb0
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
using iWareCc.Cache.Entity;
using iWareCcTest.Properties;
using iWareCommon.Common.EnumType;
using iWareCommon.Utils;
using iWareDataCore.DEV.Entity;
using iWareDataCore.DEV.EnumType;
using iWareDataCore.ORM;
using iWareDataCore.TASK.EnumType;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace iWareCc.Srm.Entity
{
    public class StackerEntity
    {
        /// <summary>
        /// 1Srm编号
        /// </summary>
 
        public int SrmNo { get; set; }
 
        /// <summary>
        /// 2运行模式
        /// </summary>
        public int Mode { get; set; }
 
 
        /// <summary>
        /// 3告警信号
        /// </summary>
 
        public int Alarm { get; set; }
 
 
        /// <summary>
        /// 4载货工位是否有货
        /// </summary>
        public int LiftFull { get; set; }
 
 
        /// <summary>
        /// 5当前列
        /// </summary>
        public int PosX { get; set; }
 
        /// <summary>
        /// 6当前层
        /// </summary>
        public int PosY { get; set; }
 
 
        /// <summary>
        /// 7货叉位置
        /// </summary>
        public int PosZ { get; set; }
 
 
        /// <summary>
        /// 8当前列坐标
        /// </summary>
        public int PosXmm { get; set; }
 
 
        /// <summary>
        /// 9当前层坐标
        /// </summary>
        public int PosYmm { get; set; }
 
 
        /// <summary>
        /// 10当前货叉坐标
        /// </summary>
        public int PosZmm { get; set; }
 
 
        /// <summary>
        /// 11完成取货信号
        /// </summary>
        public int PickFinish { get; set; }
 
 
        /// <summary>
        /// 12完成放货信号
        /// </summary>
        public int DeliveryFinish { get; set; }
 
 
        /// <summary>
        /// 13任务完成
        /// </summary>
        public int TaskFinish { get; set; }
 
 
        /// <summary>
        /// 14任务号
        /// </summary>
        public int TaskNo { get; set; }
 
 
        /// <summary>
        /// 15运行状态
        /// </summary>
        public int State { get; set; }
 
 
 
        /// <summary>
        /// 16当前巷道号
        /// </summary>
 
        public int ActualLane { get; set; }
 
        /// <summary>
        /// 17告警代码
        /// </summary>
 
        public int AlarmNumber { get; set; }
 
 
        /// <summary>
        /// 18心跳
        /// </summary>
        public int HandShake { get; set; }
 
 
 
        /// <summary>
        /// 1Srm编号
        /// </summary>
 
        public int WSrmNo { get; set; }
 
 
        /// <summary>
        /// 2任务号
        /// </summary>
        public int WTaskNo { get; set; }
 
        /// <summary>
        /// 3源列
        /// </summary>
        public int WSourcePosX { get; set; }
 
        /// <summary>
        /// 4源层
        /// </summary>
        public int WSourcePosY { get; set; }
 
        /// <summary>
        /// /5源排
        /// </summary>
        public int WSourcePosZ { get; set; }
 
        /// <summary>
        /// 6宿列
        /// </summary>
        public int WDestinationPosX { get; set; }
 
        /// <summary>
        /// 7宿层
        /// </summary>
        public int WDestinationPosY { get; set; }
 
 
        /// <summary>
        /// 8宿排
        /// </summary>
        public int WDestinationPosZ { get; set; }
 
        /// <summary>
        /// 9发送命令
        /// </summary>
        public int WCommand { get; set; }
 
        /// <summary>
        /// 10紧急停止
        /// </summary>
        public int WEmergencyStop { get; set; }
 
        /// <summary>
        /// 11解除告警
        /// </summary>
        public int WAlarmAck { get; set; }
 
        /// <summary>
        /// 12WCS通讯位
        /// </summary>
        public int WStb { get; set; }
 
        ///<summary>
        ///13SRM 应答位
        ///</summary>
        public int WAck { get; set; }
 
 
        /// <summary>
        /// 14心跳
        /// </summary>
        public int WHandShake { get; set; }
 
        /// <summary>
        /// 15批次(0:否;1:是)
        /// </summary>
        public int WLots { get; set; }
 
        /// <summary>
        /// 是否在线
        /// </summary>
        public bool IsOnline { get; set; }
 
        /// <summary>
        /// 下线次数
        /// </summary>
        public int OffLineTimes { get; set; }
 
        /// <summary>
        /// 上一次心跳数
        /// </summary>
        public int LastHandShake { get; set; }
 
        /// <summary>
        /// 设备实体
        /// </summary>
        public EquipmentEntity Equipment { get; private set; }
 
        /// <summary>
        /// WCS需要写入的OPC地址
        /// </summary>
        public OpcWriteItem OpcWriteItems { get; set; }
 
 
        /// <summary>
        /// WCS需要读取的OPC地址
        /// </summary>
        public OpcReadItem OpcReadItems { get; set; }
 
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="equipment">设备实体</param>
        public StackerEntity(EquipmentEntity equipment)
        {
            this.Equipment = equipment;
 
            var name = this.Equipment.EquipName;
 
            OpcWriteItems = CacheEntity.IsRealMode ? new OpcWriteItem
            {
                SrmNo = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W2" : "S7:[S7_Connection_3]DB540,W2",// 1Srm编号
                TaskNo = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W34" : "S7:[S7_Connection_3]DB540,DINT38",// 2任务号
                SourcePosX = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W6" : "S7:[S7_Connection_3]DB540,W6",// 3源列
                SourcePosY = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W8" : "S7:[S7_Connection_3]DB540,W8",// 4源层
                SourcePosZ = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W10" : "S7:[S7_Connection_3]DB540,W10",//5源排
                DestinationPosX = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W12" : "S7:[S7_Connection_3]DB540,W12",// 6宿列
                DestinationPosY = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W14" : "S7:[S7_Connection_3]DB540,W14",// 7宿层
                DestinationPosZ = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W16" : "S7:[S7_Connection_3]DB540,W16",// 8宿排
                Command = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W18" : "S7:[S7_Connection_3]DB540,W18",// 9发送命令 
                EmergencyStop = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W20" : "S7:[S7_Connection_3]DB540,W20",// 10紧急停止
                AlarmAck = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W22" : "S7:[S7_Connection_3]DB540,W22",// 11解除告警
                Stb = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W30" : "S7:[S7_Connection_3]DB540,W30",// 12WCS通讯位
                Ack = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W32" : "S7:[S7_Connection_3]DB540,W32",// 13SRM 应答位
                HandShake = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W0" : "S7:[S7_Connection_3]DB540,W0",// 14心跳
                Lots = name == "stacker1" ? "S7:[S7_Connection_1]DB540,W4" : "S7:[S7_Connection_3]DB540,W4"// 15是否批量
            } : new OpcWriteItem
            {
                SrmNo = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W0" : "S7:[@LOCALSERVER]DB1,W70",// 1Srm编号
                TaskNo = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,DINT6422" : "S7:[@LOCALSERVER]DB1,DINT6430",// 2任务号
                SourcePosX = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W4" : "S7:[@LOCALSERVER]DB1,W74",// 3源列
                SourcePosY = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W6" : "S7:[@LOCALSERVER]DB1,W76",// 4源层
                SourcePosZ = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W8" : "S7:[@LOCALSERVER]DB1,W78",//5源排
                DestinationPosX = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W10" : "S7:[@LOCALSERVER]DB1,W80",// 6宿列
                DestinationPosY = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W12" : "S7:[@LOCALSERVER]DB1,W82",// 7宿层
                DestinationPosZ = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W14" : "S7:[@LOCALSERVER]DB1,W84",// 8宿排
                Command = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W16" : "S7:[@LOCALSERVER]DB1,W86",// 9发送命令 
                EmergencyStop = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W18" : "S7:[@LOCALSERVER]DB1,W88",// 10紧急停止
                AlarmAck = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W20" : "S7:[@LOCALSERVER]DB1,W90",// 11解除告警
                Stb = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W22" : "S7:[@LOCALSERVER]DB1,W92",// 12WCS通讯位
                Ack = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W24" : "S7:[@LOCALSERVER]DB1,W94",// 13SRM 应答位
                HandShake = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W26" : "S7:[@LOCALSERVER]DB1,W96"// 14心跳
            };
 
            OpcReadItems = CacheEntity.IsRealMode ? new OpcReadItem
            {
                SrmNo = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W2" : "S7:[S7_Connection_3]DB541,W2",// 1Srm编号
                Mode = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W4" : "S7:[S7_Connection_3]DB541,W4",// 2模式
                Alarm = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W6" : "S7:[S7_Connection_3]DB541,W6",// 3告警
                LiftFull = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W8" : "S7:[S7_Connection_3]DB541,W8",// 4载货工位是否有货
                PosX = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W10" : "S7:[S7_Connection_3]DB541,W10",// 5当前列
                PosY = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W12" : "S7:[S7_Connection_3]DB541,W12",// 6当前层
                PosZ = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W14" : "S7:[S7_Connection_3]DB541,W14", // 7货叉位置
                PosXmm = name == "stacker1" ? "S7:[S7_Connection_1]DB541,DINT16" : "S7:[S7_Connection_3]DB541,DINT16",// 8当前列坐标
                PosYmm = name == "stacker1" ? "S7:[S7_Connection_1]DB541,DINT20" : "S7:[S7_Connection_3]DB541,DINT20",// 9当前层坐标
                PosZmm = name == "stacker1" ? "S7:[S7_Connection_1]DB541,DINT24" : "S7:[S7_Connection_3]DB541,DINT24",// 10当前货叉坐标
                PickFinish = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W28" : "S7:[S7_Connection_3]DB541,W28",// 11完成取货信号
                DeliveryFinish = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W30" : "S7:[S7_Connection_3]DB541,W30",// 12完成放货信号
                TaskFinish = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W32" : "S7:[S7_Connection_3]DB541,W32",// 13任务完成
                TaskNo = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W48" : "S7:[S7_Connection_3]DB541,DINT48",// 14当前任务号
                State = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W36" : "S7:[S7_Connection_3]DB541,W36",// 15当前任务执行状态
                ActualLane = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W38" : "S7:[S7_Connection_3]DB541,W38",// 16当前巷道号
                AlarmNumber = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W40" : "S7:[S7_Connection_3]DB541,W40",// 17告警代码
                HandShake = name == "stacker1" ? "S7:[S7_Connection_1]DB541,W0" : "S7:[S7_Connection_3]DB541,W0"// 18心跳
            } : new OpcReadItem
            {
                SrmNo = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W28" : "S7:[@LOCALSERVER]DB1,W98",// 1Srm编号
                Mode = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W30" : "S7:[@LOCALSERVER]DB1,W100",// 2模式
                Alarm = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W32" : "S7:[@LOCALSERVER]DB1,W102",// 3告警
                LiftFull = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W34" : "S7:[@LOCALSERVER]DB1,W104",// 4载货工位是否有货
                PosX = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W36" : "S7:[@LOCALSERVER]DB1,W106",// 5当前列
                PosY = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W38" : "S7:[@LOCALSERVER]DB1,W108",// 6当前层
                PosZ = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W40" : "S7:[@LOCALSERVER]DB1,W110", // 7货叉位置
                PosXmm = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,DINT42" : "S7:[@LOCALSERVER]DB1,DINT112",// 8当前列坐标
                PosYmm = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,DINT46" : "S7:[@LOCALSERVER]DB1,DINT116",// 9当前层坐标
                PosZmm = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,DINT50" : "S7:[@LOCALSERVER]DB1,DINT120",// 10当前货叉坐标
                PickFinish = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W54" : "S7:[@LOCALSERVER]DB1,W124",// 11完成取货信号
                DeliveryFinish = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W56" : "S7:[@LOCALSERVER]DB1,W126",// 12完成放货信号
                TaskFinish = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W58" : "S7:[@LOCALSERVER]DB1,W128",// 13任务完成
                TaskNo = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,DINT6426" : "S7:[@LOCALSERVER]DB1,DINT6434",// 14当前任务号
                State = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W62" : "S7:[@LOCALSERVER]DB1,W132",// 15当前任务执行状态
                ActualLane = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W64" : "S7:[@LOCALSERVER]DB1,W134",// 16当前巷道号
                AlarmNumber = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W66" : "S7:[@LOCALSERVER]DB1,W136",// 17告警代码
                HandShake = name == "stacker1" ? "S7:[@LOCALSERVER]DB1,W68" : "S7:[@LOCALSERVER]DB1,W138"// 18心跳
            };
 
        }
 
        /// <summary>
        /// 发送任务
        /// </summary>
        /// <param name="taskNo">任务号</param>
        /// <param name="srmNo">堆垛机号</param>
        /// <param name="sourcePosX">起始列</param>
        /// <param name="sourcePosY">起始层</param>
        /// <param name="sourcePosZ">起始排</param>
        /// <param name="destinationPosX">目标列</param>
        /// <param name="destinationPosY">目标层</param>
        /// <param name="destinationPosZ">目标排</param>
        /// <returns>是否发送成功</returns>
        public bool SendTask(int taskNo, int srmNo, int sourcePosX, int sourcePosY, int sourcePosZ, int destinationPosX, int destinationPosY, int destinationPosZ,int maintasktype,int lots)
        {
            try
            {
                int conmd = (int)ESrmCommand.搬运;//正常情况下的任务
                if (maintasktype == 4)
                {
                    conmd = (int)ESrmCommand.移动;//只移动不实际取货
                }
                var flag1 = CacheEntity.OpcWcfServiceClient.WriteValues(new string[]
                {
                    this.OpcWriteItems.TaskNo,
                    this.OpcWriteItems.SrmNo,
                    this.OpcWriteItems.SourcePosX,
                    this.OpcWriteItems.SourcePosY,
                    this.OpcWriteItems.SourcePosZ,
                    this.OpcWriteItems.DestinationPosX,
                    this.OpcWriteItems.DestinationPosY,
                    this.OpcWriteItems.DestinationPosZ,
                    this.OpcWriteItems.Command,
                    this.OpcWriteItems.Stb,
                    this.OpcWriteItems.Lots
                },
 
                new object[] { taskNo, srmNo, sourcePosX, sourcePosY, sourcePosZ, destinationPosX, destinationPosY, destinationPosZ, conmd, (int)EYesOrNo.是, lots});
                LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "发送堆垛机批次状态" + lots.ToString(), "地址块"+this.OpcWriteItems.Lots.ToString());
                var ack = false;
 
                while (!ack)
                {
                    ack = int.Parse(CacheEntity.OpcWcfServiceClient.ReadValue(this.OpcWriteItems.Ack).ToString()) > 0;
                }
 
                var flag2 = CacheEntity.OpcWcfServiceClient.WriteValue(this.OpcWriteItems.Stb, (int)EYesOrNo.否);
 
                return flag1 && flag2;
            }
            catch (Exception ex)
            {
                LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "SendTask", ex.Message);
                return false;
            }
        }
 
        /// <summary>
        /// 是否能够生成堆垛机任务
        /// </summary>
        /// <param name="msg">异常错误消息</param>
        /// <returns>是否能够发送任务</returns>
        public bool CanParseTask(out string msg)
        {
            using (var dbModel = new DbModelCore())
            {
                try
                {
                    msg = "";
                    if (!this.IsOnline)
                    {
                        msg = "堆垛机不在线";
                        return false;
                    }
 
                    if (this.Mode != (int)ESrmMode.自动模式)
                    {
                        msg = "堆垛机不是自动模式";
                        return false;
                    }
 
                    if (this.Alarm != (int)EYesOrNo.否)
                    {
                        msg = string.Format("堆垛机报警:{0}", (ESrmAlarm)this.AlarmNumber);
                        return false;
                    }
 
                    if (this.State != (int)ESrmState.堆垛机空闲)
                    {
                        msg = "堆垛机忙碌中";
                        return false;
                    }
 
                    var count = 0;
                    count = dbModel.TASKPartTasks.Where(x => x.isreleased == (int)EYesOrNo.是 && x.isfinished == (int)EYesOrNo.否 && x.type == (int)EPartTaskType.堆垛机任务).Count();
 
                    if (count > 0)
                    {
                        msg = string.Format("堆垛机{0}还有任务未完成", this.Equipment.EquipName);
                        return false;
                    }
 
                    return true;
                }
                catch (Exception ex)
                {
                    msg = ex.Message;
                    return false;
 
                }
            }
        }
 
        /// <summary>
        /// 是否能够生成堆垛机任务
        /// </summary>
        /// <param name="msg">异常错误消息</param>
        /// <returns>是否能够发送任务</returns>
        public bool CanDecomposeTask(out string msg)
        {
            using (var dbModel = new DbModelCore())
            {
                try
                {
                    msg = "";
                    if (!this.IsOnline)
                    {
                        msg = "堆垛机不在线";
                        return false;
                    }
 
                    if (this.Mode != (int)ESrmMode.自动模式)
                    {
                        msg = "堆垛机不是自动模式";
                        return false;
                    }
 
                    if (this.Alarm != (int)EYesOrNo.否)
                    {
                        msg = string.Format("堆垛机报警:{0}", (ESrmAlarm)this.AlarmNumber);
                        return false;
                    }
 
                    if (this.State != (int)ESrmState.堆垛机空闲)
                    {
                        msg = "堆垛机忙碌中";
                        return false;
                    }
 
                    var count = 0;
                    if (CacheEntity.DeviceRunningMode == null || CacheEntity.DeviceRunningMode.Mode == (int)EDeviceMode.双堆垛机模式)
                    {
                        count = dbModel.TASKPartTasks.Where(x => x.isfinished == (int)EYesOrNo.否 && x.type == (int)EPartTaskType.堆垛机任务 && x.equipname == this.Equipment.EquipName).Count();
                    }
                    else
                    {
                        count = dbModel.TASKPartTasks.Where(x => x.isfinished == (int)EYesOrNo.否 && x.type == (int)EPartTaskType.堆垛机任务).Count();
                    }
 
                    if (count > 0)
                    {
                        msg = string.Format("堆垛机{0}还有任务未完成", this.Equipment.EquipName);
                        return false;
                    }
 
                    return true;
                }
                catch (Exception ex)
                {
                    msg = ex.Message;
                    return false;
 
                }
            }
        }
 
    }
}