Ejemplo n.º 1
0
        public async Task DevicesCrossReference(IEnumerable <BaseDevice> devices)
        {
            var minerBinPath = GetBinAndCwdPaths().Item1;
            var output       = await DevicesCrossReferenceHelpers.MinerOutput(minerBinPath, "--print-devices");

            var mappedDevs = DevicesListParser.ParseWildRigOutput(output, devices.ToList());

            foreach (var kvp in mappedDevs)
            {
                var uuid    = kvp.Key;
                var indexID = kvp.Value;
                _mappedIDs[uuid] = indexID;
            }
        }
Ejemplo n.º 2
0
        public async Task DevicesCrossReference(IEnumerable<BaseDevice> devices)
        {
            if (_mappedDeviceIds.Count == 0) return;
            // will block
            var minerBinPath = GetBinAndCwdPaths().Item1;
            var output = await DevicesCrossReferenceHelpers.MinerOutput(minerBinPath, "--benchmark BEAM --longstats 60 --devices -1", new List<string> { "Start Benchmark..." });
            var mappedDevs = DevicesListParser.ParseLolMinerOutput(output, devices.ToList());

            foreach (var kvp in mappedDevs)
            {
                var uuid = kvp.Key;
                var indexID = kvp.Value;
                _mappedDeviceIds[uuid] = indexID;
            }
        }
Ejemplo n.º 3
0
        public async Task DevicesCrossReference(IEnumerable <BaseDevice> devices)
        {
            if (_mappedDeviceIds.Count == 0)
            {
                return;
            }
            var minerBinPath = GetBinAndCwdPaths().Item1;
            var output       = await DevicesCrossReferenceHelpers.MinerOutput(minerBinPath, "--list_devices");

            var mappedDevs = DevicesListParser.ParseGMinerOutput(output, devices.ToList());

            foreach (var kvp in mappedDevs)
            {
                var uuid    = kvp.Key;
                var indexID = kvp.Value;
                _mappedDeviceIds[uuid] = indexID;
            }
        }
Ejemplo n.º 4
0
        public async Task DevicesCrossReference(IEnumerable <BaseDevice> devices)
        {
            var miner = CreateMiner() as IBinAndCwdPathsGettter;

            if (miner == null)
            {
                return;
            }
            var minerBinPath = miner.GetBinAndCwdPaths().Item1;
            var output       = await DevicesCrossReferenceHelpers.MinerOutput(minerBinPath, "--list_devices --bus_reorder");

            var mappedDevs = DevicesListParser.ParseTeamRedMinerOutput(output, devices.ToList());

            foreach (var kvp in mappedDevs)
            {
                var uuid    = kvp.Key;
                var indexID = kvp.Value;
                _mappedMinerIds[uuid] = indexID;
            }
        }
Ejemplo n.º 5
0
        public async Task DevicesCrossReference(IEnumerable <BaseDevice> devices)
        {
#warning Blocks exit
            return;

            if (_mappedIDs.Count == 0)
            {
                return;
            }
            // TODO will break
            var minerBinPath = GetBinAndCwdPaths().Item1;
            var output       = await DevicesCrossReferenceHelpers.MinerOutput(minerBinPath, "--device-info-json --no-watchdog --platform 1"); // NVIDIA only

            var mappedDevs = DevicesListParser.ParseNBMinerOutput(output, devices.ToList());

            foreach (var kvp in mappedDevs)
            {
                var uuid    = kvp.Key;
                var indexID = kvp.Value;
                _mappedIDs[uuid] = indexID;
            }
        }