示例#1
0
        private GPUThreadResult[] ParseThreadResult()
        {
            System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
            customCulture.NumberFormat.NumberDecimalSeparator = ".";
            Thread.CurrentThread.CurrentCulture = customCulture;

            List <Dictionary <string, string> > threadData = CCMiner.ResultParser(this.data, 10);

            if (threadData.Count() > 0)
            {
                GPUThreadResult[] threadResults = new GPUThreadResult[threadData.Count()];
                uint i = 0;
                foreach (Dictionary <string, string> gpuData in threadData)
                {
                    foreach (KeyValuePair <string, string> keyValue in gpuData)
                    {
                        if (keyValue.Key == "BUS")
                        {
                            threadResults[i].bus = UInt32.Parse(keyValue.Value);
                        }
                        if (keyValue.Key == "KHS")
                        {
                            threadResults[i].hashRateK = float.Parse(keyValue.Value);
                        }
                    }

                    i++;
                }

                return(threadResults);
            }

            return(new GPUThreadResult[0]);
        }
示例#2
0
        private void QueueWorker()
        {
            if (connectionQueue.Count() != 0)
            {
                CCMiner c = connectionQueue.Dequeue();
                c.LoadData();
                return;
            }

            this.rig.CCMinerCollectorDone(this.result);
        }