docs: fix issues with docs.
This commit is contained in:
@@ -122,24 +122,24 @@ if __name__ == "__main__":
|
|||||||
## Miner control
|
## Miner control
|
||||||
---
|
---
|
||||||
`pyasic` exposes a standard interface for each miner using control functions.
|
`pyasic` exposes a standard interface for each miner using control functions.
|
||||||
Every miner class in `pyasic` must implement all the control functions defined in [`BaseMiner`][pyasic.miners.BaseMiner].
|
Every miner class in `pyasic` must implement all the control functions defined in [`MinerProtocol`][pyasic.miners.base.MinerProtocol].
|
||||||
|
|
||||||
These functions are
|
These functions are
|
||||||
[`check_light`][pyasic.miners.BaseMiner.check_light],
|
[`check_light`][pyasic.miners.base.MinerProtocol.check_light],
|
||||||
[`fault_light_off`][pyasic.miners.BaseMiner.fault_light_off],
|
[`fault_light_off`][pyasic.miners.base.MinerProtocol.fault_light_off],
|
||||||
[`fault_light_on`][pyasic.miners.BaseMiner.fault_light_on],
|
[`fault_light_on`][pyasic.miners.base.MinerProtocol.fault_light_on],
|
||||||
[`get_config`][pyasic.miners.BaseMiner.get_config],
|
[`get_config`][pyasic.miners.base.MinerProtocol.get_config],
|
||||||
[`get_data`][pyasic.miners.BaseMiner.get_data],
|
[`get_data`][pyasic.miners.base.MinerProtocol.get_data],
|
||||||
[`get_errors`][pyasic.miners.BaseMiner.get_errors],
|
[`get_errors`][pyasic.miners.base.MinerProtocol.get_errors],
|
||||||
[`get_hostname`][pyasic.miners.BaseMiner.get_hostname],
|
[`get_hostname`][pyasic.miners.base.MinerProtocol.get_hostname],
|
||||||
[`get_model`][pyasic.miners.BaseMiner.get_model],
|
[`get_model`][pyasic.miners.base.MinerProtocol.get_model],
|
||||||
[`reboot`][pyasic.miners.BaseMiner.reboot],
|
[`reboot`][pyasic.miners.base.MinerProtocol.reboot],
|
||||||
[`restart_backend`][pyasic.miners.BaseMiner.restart_backend],
|
[`restart_backend`][pyasic.miners.base.MinerProtocol.restart_backend],
|
||||||
[`stop_mining`][pyasic.miners.BaseMiner.stop_mining],
|
[`stop_mining`][pyasic.miners.base.MinerProtocol.stop_mining],
|
||||||
[`resume_mining`][pyasic.miners.BaseMiner.resume_mining],
|
[`resume_mining`][pyasic.miners.base.MinerProtocol.resume_mining],
|
||||||
[`is_mining`][pyasic.miners.BaseMiner.is_mining],
|
[`is_mining`][pyasic.miners.base.MinerProtocol.is_mining],
|
||||||
[`send_config`][pyasic.miners.BaseMiner.send_config], and
|
[`send_config`][pyasic.miners.base.MinerProtocol.send_config], and
|
||||||
[`set_power_limit`][pyasic.miners.BaseMiner.set_power_limit].
|
[`set_power_limit`][pyasic.miners.base.MinerProtocol.set_power_limit].
|
||||||
|
|
||||||
##### Usage
|
##### Usage
|
||||||
```python
|
```python
|
||||||
|
|||||||
@@ -1,7 +1,15 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## BOSMiner Backend
|
## BOSMiner Backend
|
||||||
|
|
||||||
::: pyasic.miners.backends.bosminer.BOSMiner
|
::: pyasic.miners.backends.braiins_os.BOSMiner
|
||||||
|
handler: python
|
||||||
|
options:
|
||||||
|
show_root_heading: false
|
||||||
|
heading_level: 4
|
||||||
|
|
||||||
|
## BOSer Backend
|
||||||
|
|
||||||
|
::: pyasic.miners.backends.braiins_os.BOSer
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## Base Miner
|
## Base Miner
|
||||||
[`BaseMiner`][pyasic.miners.BaseMiner] is the basis for all miner classes, they all subclass (usually indirectly) from this class.
|
[`BaseMiner`][pyasic.miners.base.BaseMiner] is the basis for all miner classes, they all subclass (usually indirectly) from this class.
|
||||||
|
|
||||||
You may not instantiate this class on its own, only subclass from it. Trying to instantiate an instance of this class will raise `TypeError`.
|
This class inherits from the [`MinerProtocol`][pyasic.miners.base.MinerProtocol], which outlines functionality for miners.
|
||||||
|
|
||||||
::: pyasic.miners.BaseMiner
|
You may not instantiate this class on its own, only subclass from it.
|
||||||
|
|
||||||
|
::: pyasic.miners.base.BaseMiner
|
||||||
|
handler: python
|
||||||
|
options:
|
||||||
|
heading_level: 4
|
||||||
|
|
||||||
|
::: pyasic.miners.base.MinerProtocol
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|||||||
@@ -1,91 +1,91 @@
|
|||||||
## Control functionality
|
## Control functionality
|
||||||
|
|
||||||
### Check Light
|
### Check Light
|
||||||
::: pyasic.miners.BaseMiner.check_light
|
::: pyasic.miners.base.MinerProtocol.check_light
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Fault Light Off
|
### Fault Light Off
|
||||||
::: pyasic.miners.BaseMiner.fault_light_off
|
::: pyasic.miners.base.MinerProtocol.fault_light_off
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Fault Light On
|
### Fault Light On
|
||||||
::: pyasic.miners.BaseMiner.fault_light_on
|
::: pyasic.miners.base.MinerProtocol.fault_light_on
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Get Config
|
### Get Config
|
||||||
::: pyasic.miners.BaseMiner.get_config
|
::: pyasic.miners.base.MinerProtocol.get_config
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Get Data
|
### Get Data
|
||||||
::: pyasic.miners.BaseMiner.get_data
|
::: pyasic.miners.base.MinerProtocol.get_data
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Get Errors
|
### Get Errors
|
||||||
::: pyasic.miners.BaseMiner.get_errors
|
::: pyasic.miners.base.MinerProtocol.get_errors
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Get Hostname
|
### Get Hostname
|
||||||
::: pyasic.miners.BaseMiner.get_hostname
|
::: pyasic.miners.base.MinerProtocol.get_hostname
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Get Model
|
### Get Model
|
||||||
::: pyasic.miners.BaseMiner.get_model
|
::: pyasic.miners.base.MinerProtocol.get_model
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Reboot
|
### Reboot
|
||||||
::: pyasic.miners.BaseMiner.reboot
|
::: pyasic.miners.base.MinerProtocol.reboot
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Restart Backend
|
### Restart Backend
|
||||||
::: pyasic.miners.BaseMiner.restart_backend
|
::: pyasic.miners.base.MinerProtocol.restart_backend
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Stop Mining
|
### Stop Mining
|
||||||
::: pyasic.miners.BaseMiner.stop_mining
|
::: pyasic.miners.base.MinerProtocol.stop_mining
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Resume Mining
|
### Resume Mining
|
||||||
::: pyasic.miners.BaseMiner.resume_mining
|
::: pyasic.miners.base.MinerProtocol.resume_mining
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Is Mining
|
### Is Mining
|
||||||
::: pyasic.miners.BaseMiner.is_mining
|
::: pyasic.miners.base.MinerProtocol.is_mining
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Send Config
|
### Send Config
|
||||||
::: pyasic.miners.BaseMiner.send_config
|
::: pyasic.miners.base.MinerProtocol.send_config
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
### Set Power Limit
|
### Set Power Limit
|
||||||
::: pyasic.miners.BaseMiner.set_power_limit
|
::: pyasic.miners.base.MinerProtocol.set_power_limit
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|||||||
@@ -2,23 +2,22 @@
|
|||||||
## X5 Models
|
## X5 Models
|
||||||
|
|
||||||
## CK5
|
## CK5
|
||||||
::: pyasic.miners.goldshell.bfgminer.X5.CK5.BFGMinerCK5
|
::: pyasic.miners.goldshell.bfgminer.X5.CK5.GoldshellCK5
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
## HS5
|
## HS5
|
||||||
::: pyasic.miners.goldshell.bfgminer.X5.HS5.BFGMinerHS5
|
::: pyasic.miners.goldshell.bfgminer.X5.HS5.GoldshellHS5
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
## KD5
|
## KD5
|
||||||
::: pyasic.miners.goldshell.bfgminer.X5.KD5.BFGMinerKD5
|
::: pyasic.miners.goldshell.bfgminer.X5.KD5.GoldshellKD5
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
## XMax Models
|
## XMax Models
|
||||||
|
|
||||||
## KD Max
|
## KD Max
|
||||||
::: pyasic.miners.goldshell.bfgminer.XMax.KDMax.BFGMinerKDMax
|
::: pyasic.miners.goldshell.bfgminer.XMax.KDMax.KDMax
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
|
|
||||||
|
|||||||
@@ -4,24 +4,24 @@ Each miner has a unique API that is used to communicate with it.
|
|||||||
Each of these API types has commands that differ between them, and some commands have data that others do not.
|
Each of these API types has commands that differ between them, and some commands have data that others do not.
|
||||||
Each miner that is a subclass of [`BaseMiner`][pyasic.miners.BaseMiner] should have an API linked to it as `Miner.api`.
|
Each miner that is a subclass of [`BaseMiner`][pyasic.miners.BaseMiner] should have an API linked to it as `Miner.api`.
|
||||||
|
|
||||||
All API implementations inherit from [`BaseMinerRPCAPI`][pyasic.API.BaseMinerRPCAPI], which implements the basic communications protocols.
|
All API implementations inherit from [`BaseMinerRPCAPI`][pyasic.rpc.BaseMinerRPCAPI], which implements the basic communications protocols.
|
||||||
|
|
||||||
[`BaseMinerRPCAPI`][pyasic.API.BaseMinerRPCAPI] should never be used unless inheriting to create a new miner API class for a new type of miner (which should be exceedingly rare).
|
[`BaseMinerRPCAPI`][pyasic.rpc.BaseMinerRPCAPI] should never be used unless inheriting to create a new miner API class for a new type of miner (which should be exceedingly rare).
|
||||||
[`BaseMinerRPCAPI`][pyasic.API.BaseMinerRPCAPI] cannot be instantiated directly, it will raise a `TypeError`.
|
[`BaseMinerRPCAPI`][pyasic.rpc.BaseMinerRPCAPI] cannot be instantiated directly, it will raise a `TypeError`.
|
||||||
Use these instead -
|
Use these instead -
|
||||||
|
|
||||||
#### [BFGMiner API][pyasic.API.bfgminer.BFGMinerRPCAPI]
|
#### [BFGMiner API][pyasic.rpc.bfgminer.BFGMinerRPCAPI]
|
||||||
#### [BMMiner API][pyasic.API.bmminer.BMMinerRPCAPI]
|
#### [BMMiner API][pyasic.rpc.bmminer.BMMinerRPCAPI]
|
||||||
#### [BOSMiner API][pyasic.API.bosminer.BOSMinerRPCAPI]
|
#### [BOSMiner API][pyasic.rpc.bosminer.BOSMinerRPCAPI]
|
||||||
#### [BTMiner API][pyasic.API.btminer.BTMinerRPCAPI]
|
#### [BTMiner API][pyasic.rpc.btminer.BTMinerRPCAPI]
|
||||||
#### [CGMiner API][pyasic.API.cgminer.CGMinerRPCAPI]
|
#### [CGMiner API][pyasic.rpc.cgminer.CGMinerRPCAPI]
|
||||||
#### [LUXMiner API][pyasic.API.luxminer.LUXMinerRPCAPI]
|
#### [LUXMiner API][pyasic.rpc.luxminer.LUXMinerRPCAPI]
|
||||||
#### [Unknown API][pyasic.API.unknown.UnknownRPCAPI]
|
#### [Unknown API][pyasic.rpc.unknown.UnknownRPCAPI]
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
## BaseMinerRPCAPI
|
## BaseMinerRPCAPI
|
||||||
::: pyasic.API.BaseMinerRPCAPI
|
::: pyasic.rpc.BaseMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
heading_level: 4
|
heading_level: 4
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## BFGMinerRPCAPI
|
## BFGMinerRPCAPI
|
||||||
::: pyasic.API.bfgminer.BFGMinerRPCAPI
|
::: pyasic.rpc.bfgminer.BFGMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## BMMinerRPCAPI
|
## BMMinerRPCAPI
|
||||||
::: pyasic.API.bmminer.BMMinerRPCAPI
|
::: pyasic.rpc.bmminer.BMMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## BOSMinerRPCAPI
|
## BOSMinerRPCAPI
|
||||||
::: pyasic.API.bosminer.BOSMinerRPCAPI
|
::: pyasic.rpc.bosminer.BOSMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## BTMinerRPCAPI
|
## BTMinerRPCAPI
|
||||||
::: pyasic.API.btminer.BTMinerRPCAPI
|
::: pyasic.rpc.btminer.BTMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## CGMinerRPCAPI
|
## CGMinerRPCAPI
|
||||||
::: pyasic.API.cgminer.CGMinerRPCAPI
|
::: pyasic.rpc.cgminer.CGMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## LUXMinerRPCAPI
|
## LUXMinerRPCAPI
|
||||||
::: pyasic.API.luxminer.LUXMinerRPCAPI
|
::: pyasic.rpc.luxminer.LUXMinerRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# pyasic
|
# pyasic
|
||||||
## UnknownRPCAPI
|
## UnknownRPCAPI
|
||||||
::: pyasic.API.unknown.UnknownRPCAPI
|
::: pyasic.rpc.unknown.UnknownRPCAPI
|
||||||
handler: python
|
handler: python
|
||||||
options:
|
options:
|
||||||
show_root_heading: false
|
show_root_heading: false
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
All settings here are global settings for all of pyasic. Set these settings with `update(key, value)`.
|
All settings here are global settings for all of pyasic. Set these settings with `update(key, value)`.
|
||||||
|
|
||||||
Settings options:
|
Settings options:
|
||||||
|
|
||||||
- `network_ping_retries`
|
- `network_ping_retries`
|
||||||
- `network_ping_timeout`
|
- `network_ping_timeout`
|
||||||
- `network_scan_threads`
|
- `network_scan_threads`
|
||||||
|
|||||||
18
mkdocs.yml
18
mkdocs.yml
@@ -13,15 +13,15 @@ nav:
|
|||||||
- Error Codes: "data/error_codes.md"
|
- Error Codes: "data/error_codes.md"
|
||||||
- Miner Config: "config/miner_config.md"
|
- Miner Config: "config/miner_config.md"
|
||||||
- Advanced:
|
- Advanced:
|
||||||
- Miner APIs:
|
- RPC APIs:
|
||||||
- Intro: "API/api.md"
|
- Intro: "rpc/api.md"
|
||||||
- BFGMiner: "API/bfgminer.md"
|
- BFGMiner: "rpc/bfgminer.md"
|
||||||
- BMMiner: "API/bmminer.md"
|
- BMMiner: "rpc/bmminer.md"
|
||||||
- BOSMiner: "API/bosminer.md"
|
- BOSMiner: "rpc/bosminer.md"
|
||||||
- BTMiner: "API/btminer.md"
|
- BTMiner: "rpc/btminer.md"
|
||||||
- CGMiner: "API/cgminer.md"
|
- CGMiner: "rpc/cgminer.md"
|
||||||
- LUXMiner: "API/luxminer.md"
|
- LUXMiner: "rpc/luxminer.md"
|
||||||
- Unknown: "API/unknown.md"
|
- Unknown: "rpc/unknown.md"
|
||||||
- Backends:
|
- Backends:
|
||||||
- BMMiner: "miners/backends/bmminer.md"
|
- BMMiner: "miners/backends/bmminer.md"
|
||||||
- BOSMiner: "miners/backends/bosminer.md"
|
- BOSMiner: "miners/backends/bosminer.md"
|
||||||
|
|||||||
@@ -17,5 +17,5 @@ from pyasic.miners.backends import GoldshellMiner
|
|||||||
from pyasic.miners.types import KDMax
|
from pyasic.miners.types import KDMax
|
||||||
|
|
||||||
|
|
||||||
class BFGMinerGoldshellKDMax(GoldshellMiner, KDMax):
|
class GoldshellKDMax(GoldshellMiner, KDMax):
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -13,4 +13,4 @@
|
|||||||
# See the License for the specific language governing permissions and -
|
# See the License for the specific language governing permissions and -
|
||||||
# limitations under the License. -
|
# limitations under the License. -
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
from .KDMax import BFGMinerGoldshellKDMax
|
from .KDMax import GoldshellKDMax
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ MINER_CLASSES = {
|
|||||||
"GOLDSHELL CK5": GoldshellCK5,
|
"GOLDSHELL CK5": GoldshellCK5,
|
||||||
"GOLDSHELL HS5": GoldshellHS5,
|
"GOLDSHELL HS5": GoldshellHS5,
|
||||||
"GOLDSHELL KD5": GoldshellKD5,
|
"GOLDSHELL KD5": GoldshellKD5,
|
||||||
"GOLDSHELL KDMAX": BFGMinerGoldshellKDMax,
|
"GOLDSHELL KDMAX": GoldshellKDMax,
|
||||||
},
|
},
|
||||||
MinerTypes.BRAIINS_OS: {
|
MinerTypes.BRAIINS_OS: {
|
||||||
None: BOSMiner,
|
None: BOSMiner,
|
||||||
|
|||||||
Reference in New Issue
Block a user