schangxiang@126.com
2025-11-04 f5ed29dc26c7cd952d56ec5721a2efc43cd25992
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
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XImaging.Automation.Service.Instruction;
 
namespace BiosenSocketService.Instruction
{
    public enum eMovement
    {
        NoMovement,
        InOnly,
        OutOnly,
        InAndOut
    };
 
    #region 此处对应InsProtocol的每个方法为指令参数解析类的定义
 
    public class StartExperimentInsArgs : HxInsParser, IProtocolArgs
    {
        private string m_strBatchID;
        private string m_strBarCode;
        private string m_strMode;
       // public Dictionary<string, object> m_Data = new Dictionary<string, object>();
 
        public string BatchID 
        {
            get { return m_strBatchID; } 
        }
 
        public string BarCode
        {
            get { return m_strBarCode; }
        }
 
        public string Mode
        {
            get { return m_strMode; }
        }
 
        public StartExperimentInsArgs(JObject parameters)
        {
            m_strBatchID = parameters.GetValue("BatchID").ToString();
            m_strBarCode = parameters.GetValue("BarCode").ToString();
            m_strMode = parameters.GetValue("Mode").ToString();
            /*JToken jt = parameters.GetValue("Data");
            foreach (JProperty item in jt)
            {
                m_Data.Add(item.Name, item.Value);
            }*/
        }
        //public Dictionary<string, object> Args = new Dictionary<string, object>();
        //public string MethodName
        //{
        //    get { return m_strMethodName; }
        //}
        //public string ProjectID
        //{
        //    get { return m_strProjectID; }
        //}
 
 
        //public RunMethodArgs(JObject parameters)
        //{
        //    m_strMethodName = parameters.GetValue("method").ToString();
        //    m_strArguments = parameters.GetValue("args").ToString();
        //    m_strProjectID = parameters.GetValue("projectID").ToString();
 
        //    if (string.IsNullOrEmpty(m_strArguments))
        //    {
        //        return;
        //    }
 
        //    string[] NameNValue = m_strArguments.Split(new char[] { '-' }, StringSplitOptions.RemoveEmptyEntries);
        //    foreach (string nameNvalue in NameNValue)
        //    {
        //        string[] temp = nameNvalue.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
        //        Args.Add(temp[0], int.Parse(temp[1]));
        //    }
        //}
 
    }
 
    public class CloseDeviceInsArgs : HxInsParser, IProtocolArgs
    {
        private int m_nHasPCR;
        public int hasPCR
        {
            get { return m_nHasPCR; }
        }
 
        public CloseDeviceInsArgs(JObject parameters)
        {
            m_nHasPCR = int.Parse(parameters.GetValue("hasPCR").ToString());
        }
    }
    
    public class GetDeviceStatusInsArgs : HxInsParser, IProtocolArgs
    {
        public GetDeviceStatusInsArgs(JObject parameters) { }
    }
 
    #endregion
}