C# Class NiceHashMiner.Miner

Datei anzeigen Open project: nicehash/NiceHashMiner Class Usage Examples

Public Properties

Property Type Description
BenchmarkSignalHanged bool
BenchmarkSignalQuit bool
BenchmarkSignalTimedout bool

Protected Properties

Property Type Description
BenchmarkComunicator IBenchmarkComunicator
BenchmarkException System.Exception
BenchmarkSignalFinnished bool
BenchmarkTimeInSeconds int
MINER_ID long
OnBenchmarkCompleteCalled bool
Path string
PreviousTotalMH double
ProcessHandle NiceHashProcess
WorkingDirectory string
_isEthMinerExit bool

Public Methods

Method Description
BenchmarkStart ( int time, IBenchmarkComunicator benchmarkComunicator ) : void
BenchmarkTimeoutInSeconds ( int timeInSeconds ) : int
End ( ) : void
EndBenchmarkProcces ( ) : void
GetSummary ( ) : APIData
InitBenchmarkSetup ( MiningPair benchmarkPair ) : void
InitMiningSetup ( MiningSetup miningSetup ) : void
KillAllUsedMinerProcesses ( ) : void
Miner ( string minerDeviceName ) : System
MinerTAG ( ) : string
ProcessTag ( ) : string
Start ( string url, string btcAdress, string worker ) : void
Stop ( MinerStopType willswitch = MinerStopType.SWITCH ) : void

Protected Methods

Method Description
BenchmarkCreateCommandLine ( Algorithm algorithm, int time ) : string
BenchmarkOutputErrorDataReceivedImpl ( string outdata ) : void
BenchmarkParseLine ( string outdata ) : bool
BenchmarkParseLine_cpu_ccminer_extra ( string outdata ) : double
BenchmarkStartProcess ( string CommandLine ) : Process
BenchmarkThreadRoutine ( object CommandLine ) : void
BenchmarkThreadRoutineStartSettup ( ) : void
ChangeToNextAvaliablePort ( ) : void
CheckOutdata ( string outdata ) : void
GET_MAX_CooldownTimeInMilliseconds ( ) : int
GetAPIData ( int port, string cmd ) : string
GetDevicesCommandString ( ) : string
GetSummaryCPU_CCMINER ( ) : APIData
GetUsername ( string btcAdress, string worker ) : string
Miner_Exited ( ) : void
StartCoolDownTimerChecker ( ) : void
Stop_cpu_ccminer_sgminer_nheqminer ( MinerStopType willswitch ) : void
UpdateBindPortCommand ( int oldPort, int newPort ) : bool
UpdateBindPortCommand_ccminer_cpuminer ( int oldPort, int newPort ) : bool
_Start ( ) : NiceHashProcess
_Stop ( MinerStopType willswitch ) : void

Private Methods

Method Description
BenchmarkOutputErrorDataReceived ( object sender, DataReceivedEventArgs e ) : void
CoolDown ( ) : void

decrement time for half current half time, if less then min ammend

CoolUp ( ) : void

increment time for half current half time, if more then max set restart

MinerCoolingCheck_Tick ( object sender, ElapsedEventArgs e ) : void
ProcessTag ( MinerPID_Data pidData ) : string
Restart ( ) : void

Method Details

BenchmarkCreateCommandLine() protected abstract method

protected abstract BenchmarkCreateCommandLine ( Algorithm algorithm, int time ) : string
algorithm Algorithm
time int
return string

BenchmarkOutputErrorDataReceivedImpl() protected abstract method

protected abstract BenchmarkOutputErrorDataReceivedImpl ( string outdata ) : void
outdata string
return void

BenchmarkParseLine() protected abstract method

protected abstract BenchmarkParseLine ( string outdata ) : bool
outdata string
return bool

BenchmarkParseLine_cpu_ccminer_extra() protected method

protected BenchmarkParseLine_cpu_ccminer_extra ( string outdata ) : double
outdata string
return double

BenchmarkStart() public method

public BenchmarkStart ( int time, IBenchmarkComunicator benchmarkComunicator ) : void
time int
benchmarkComunicator IBenchmarkComunicator
return void

BenchmarkStartProcess() protected method

protected BenchmarkStartProcess ( string CommandLine ) : Process
CommandLine string
return System.Diagnostics.Process

BenchmarkThreadRoutine() protected method

protected BenchmarkThreadRoutine ( object CommandLine ) : void
CommandLine object
return void

BenchmarkThreadRoutineStartSettup() protected method

protected BenchmarkThreadRoutineStartSettup ( ) : void
return void

BenchmarkTimeoutInSeconds() public method

public BenchmarkTimeoutInSeconds ( int timeInSeconds ) : int
timeInSeconds int
return int

ChangeToNextAvaliablePort() protected method

protected ChangeToNextAvaliablePort ( ) : void
return void

CheckOutdata() protected method

protected CheckOutdata ( string outdata ) : void
outdata string
return void

End() public method

public End ( ) : void
return void

EndBenchmarkProcces() public method

public EndBenchmarkProcces ( ) : void
return void

GET_MAX_CooldownTimeInMilliseconds() protected abstract method

protected abstract GET_MAX_CooldownTimeInMilliseconds ( ) : int
return int

GetAPIData() protected method

protected GetAPIData ( int port, string cmd ) : string
port int
cmd string
return string

GetDevicesCommandString() protected method

protected GetDevicesCommandString ( ) : string
return string

GetSummary() public abstract method

public abstract GetSummary ( ) : APIData
return APIData

GetSummaryCPU_CCMINER() protected method

protected GetSummaryCPU_CCMINER ( ) : APIData
return APIData

GetUsername() protected method

protected GetUsername ( string btcAdress, string worker ) : string
btcAdress string
worker string
return string

InitBenchmarkSetup() public method

public InitBenchmarkSetup ( MiningPair benchmarkPair ) : void
benchmarkPair MiningPair
return void

InitMiningSetup() public method

public InitMiningSetup ( MiningSetup miningSetup ) : void
miningSetup MiningSetup
return void

KillAllUsedMinerProcesses() public method

public KillAllUsedMinerProcesses ( ) : void
return void

Miner() public method

public Miner ( string minerDeviceName ) : System
minerDeviceName string
return System

MinerTAG() public method

public MinerTAG ( ) : string
return string

Miner_Exited() protected method

protected Miner_Exited ( ) : void
return void

ProcessTag() public method

public ProcessTag ( ) : string
return string

Start() public abstract method

public abstract Start ( string url, string btcAdress, string worker ) : void
url string
btcAdress string
worker string
return void

StartCoolDownTimerChecker() protected method

protected StartCoolDownTimerChecker ( ) : void
return void

Stop() public method

public Stop ( MinerStopType willswitch = MinerStopType.SWITCH ) : void
willswitch MinerStopType
return void

Stop_cpu_ccminer_sgminer_nheqminer() protected method

protected Stop_cpu_ccminer_sgminer_nheqminer ( MinerStopType willswitch ) : void
willswitch MinerStopType
return void

UpdateBindPortCommand() protected abstract method

protected abstract UpdateBindPortCommand ( int oldPort, int newPort ) : bool
oldPort int
newPort int
return bool

UpdateBindPortCommand_ccminer_cpuminer() protected method

protected UpdateBindPortCommand_ccminer_cpuminer ( int oldPort, int newPort ) : bool
oldPort int
newPort int
return bool

_Start() protected method

protected _Start ( ) : NiceHashProcess
return NiceHashProcess

_Stop() protected abstract method

protected abstract _Stop ( MinerStopType willswitch ) : void
willswitch MinerStopType
return void

Property Details

BenchmarkComunicator protected_oe property

protected IBenchmarkComunicator BenchmarkComunicator
return IBenchmarkComunicator

BenchmarkException protected_oe property

protected Exception,System BenchmarkException
return System.Exception

BenchmarkSignalFinnished protected_oe property

protected bool BenchmarkSignalFinnished
return bool

BenchmarkSignalHanged public_oe property

public bool BenchmarkSignalHanged
return bool

BenchmarkSignalQuit public_oe property

public bool BenchmarkSignalQuit
return bool

BenchmarkSignalTimedout public_oe property

public bool BenchmarkSignalTimedout
return bool

BenchmarkTimeInSeconds protected_oe property

protected int BenchmarkTimeInSeconds
return int

MINER_ID protected_oe property

protected long MINER_ID
return long

OnBenchmarkCompleteCalled protected_oe property

protected bool OnBenchmarkCompleteCalled
return bool

Path protected_oe property

protected string Path
return string

PreviousTotalMH protected_oe property

protected double PreviousTotalMH
return double

ProcessHandle protected_oe property

protected NiceHashProcess ProcessHandle
return NiceHashProcess

WorkingDirectory protected_oe property

protected string WorkingDirectory
return string

_isEthMinerExit protected_oe property

protected bool _isEthMinerExit
return bool