Example #1
0
        public static string PostTrackOut(List <string> list, string modelno, out string key)
        {
            XmlDocument xmlDoc      = XMLHelpler.CreateTrackoutXml(list, modelno, PostParams.P_I.StrLot);
            string      returnValue = CIM.C_I.WriteData(XMLHelpler.XMLToString(xmlDoc), out key);

            XMLHelpler.SaveXml(xmlDoc, "Post-" + key, PostType.TrackOut);

            return(returnValue);
        }
Example #2
0
        public static string PostLot(string modelno, out string key)
        {
            XmlDocument xmlDoc      = XMLHelpler.CreateLotXml(modelno, PostParams.P_I.StrTempLot);
            string      returnValue = CIM.C_I.WriteData(XMLHelpler.XMLToString(xmlDoc), out key);

            XMLHelpler.SaveXml(xmlDoc, "Post-" + key, PostType.Lot);

            return(returnValue);
        }
Example #3
0
        // public static PostHelper instance = new PostHelper();

        public static string PostChipID(string chipid, string modelno, out string key)
        {
            XmlDocument xmlDoc      = XMLHelpler.CreateChipIDXml(chipid, modelno, PostParams.P_I.StrLot);
            string      returnValue = CIM.C_I.WriteData(XMLHelpler.XMLToString(xmlDoc), out key);

            XMLHelpler.SaveXml(xmlDoc, "Post-" + chipid + "-" + key, PostType.ChipID);

            return(returnValue);
        }
Example #4
0
        public static string PostTrackOut(string code, string modelno, XmlCreaterBase xmlCreater, out string key)
        {
            XmlDocument xmlDoc      = xmlCreater.CreateTrackoutXml(code, modelno);
            string      returnValue = CIM.C_I.WriteData(XMLHelpler.XMLToString(xmlDoc), out key);

            if (PostParams.P_I.BlLog)
            {
                XMLHelpler.SaveXml(xmlDoc, "Post-" + key, PostType.TrackOut);
            }

            return(returnValue);
        }
Example #5
0
        public static string PostInsp(string chipid, string modelno, List <string> paths,
                                      XmlCreaterBase xmlCreater, out string key)
        {
            XmlDocument xmlDoc      = xmlCreater.CreateInspXml(chipid, modelno, paths);
            string      returnValue = CIM.C_I.WriteData(XMLHelpler.XMLToString(xmlDoc), out key);

            if (PostParams.P_I.BlLog)
            {
                XMLHelpler.SaveXml(xmlDoc, "Post-" + chipid + "-" + key, PostType.Insp);
            }

            return(returnValue);
        }
Example #6
0
 /// <summary>
 /// 解析字符串
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public bool ParseStr(string data, string id, out PostType type)
 {
     type = PostType.Null;
     try
     {
         XmlDocument xmlDoc = XMLHelpler.StringToXML(data);
         bool        result = ParseXml(xmlDoc, out type);
         SaveXml(xmlDoc, "Recv-" + id, type);
         return(result);
     }
     catch (Exception ex)
     {
         Log.L_I.WriteError(ClassName, ex);
         return(false);
     }
 }
Example #7
0
        public static void Monitor()
        {
            try
            {
                string data = string.Empty;
                string key  = string.Empty;
                while (true)
                {
                    if (cts.Token.IsCancellationRequested)
                    {
                        break;
                    }

                    int i = 0;
                    while (i++ < PostParams.P_I.iCycTimes && CIM.GetListCnt() > 0)
                    {
                        Log.L_I.WriteError("MCMQ", string.Format("开始第{0}次扫描,当前待Recv数量:{1}", i, CIM.GetListCnt()));

                        Thread.Sleep(200);
                        if (CIM.C_I.ReadData(out data, out key) == CIM.ReturnOK)
                        {
                            CIM.AddDic(key, XMLHelpler.ParseStr(data, key, out PostType type));
                            Log.L_I.WriteError("MCMQ", "ADD" + key);
                            CIM.RemoveIDFromList(key);
                            i = 0;
                        }
                    }
                    if (CIM.GetListCnt() > 5)
                    {
                        DataFlowAlarm_event?.Invoke();
                    }
                    //Log.L_I.WriteError("MCMQ", "Finish Monitor " + key);
                    Thread.Sleep(100);
                }
            }
            catch (Exception ex)
            {
                Log.L_I.WriteError(ClassName, ex);
            }
        }