added some docstrings to API, and added to miner types

This commit is contained in:
UpstreamData
2021-12-20 11:55:30 -07:00
parent b58d3cbb9b
commit 449bdfae69
10 changed files with 220 additions and 9 deletions

View File

@@ -6,8 +6,28 @@ class CGMinerAPI(BaseMinerAPI):
super().__init__(ip, port)
async def version(self) -> dict:
"""
API 'version' command.
Returns a dict containing version information.
"""
return await self.send_command("version")
async def config(self) -> dict:
"""
API 'config' command.
Returns a dict containing some miner configuration information:
ASC Count <- the number of ASCs
PGA Count <- the number of PGAs
Pool Count <- the number of Pools
Strategy <- the current pool strategy
Log Interval <- the interval of logging
Device Code <- list of compiled device drivers
OS <- the current operating system
"""
return await self.send_command("config")
async def summary(self) -> dict:
return await self.send_command("summary")