Ejemplo n.º 1
0
 void _poolBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     try
     {
         _poolData = AntminerConnector.GetPools(Ip);
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 2
0
        void mobileMinerBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            var mobileMinerStatus = (from status in _antminerStatuses
                                     let pools = AntminerConnector.GetPools(IPAddress.Parse(status.IpAddress))
                                                 let devs = AntminerConnector.GetDev(IPAddress.Parse(status.IpAddress))
                                                            select new MiningStatistics
            {
                Index = 0,
                DeviceID = Convert.ToInt32(devs["ID"]),
                AcceptedShares = Convert.ToInt32(devs["Accepted"]),
                Algorithm = "SHA-256", Kind = "ASC",
                Appliance = false,
                AverageHashrate = Convert.ToDouble(devs["MHS av"]),
                CurrentHashrate = Convert.ToDouble(devs["MHS 5s"]),
                Enabled = true,
                FanSpeed = status.FanSpeed,
                FullName = status.Name,
                HardwareErrors = Convert.ToInt32(devs["Hardware Errors"]),
                HardwareErrorsPercent = status.HardwareErrorPercentage,
                MachineName = status.Name,
                MinerName = "Spiceminer's Ant Viewer",
                Name = status.Name,
                RejectedShares = Convert.ToInt32(devs["Rejected"]),
                RejectedSharesPercent = status.RejectPercentage,
                Status = status.Status,
                Temperature = GetHighestTemp(status.Temps),
                Utility = status.WorkUtility,
                FanPercent = 0,
                GpuActivity = 0,
                GpuClock = 0,
                GpuVoltage = 0,
                Intensity = "0",
                MemoryClock = 0,
                PoolIndex = 0,
                PoolName = pools[0]["URL"].ToString(),
                PowerTune = 0,
            }).ToList();

            e.Result = mobileMinerStatus;
        }