Browse Source

RPC: {dev,proc}details: Add 'Processors', 'Manufacturer', 'Product', 'Serial', 'Target Temperature', 'Cutoff Temperature'

Luke Dashjr 12 years ago
parent
commit
2a3978e9a2
2 changed files with 22 additions and 1 deletions
  1. 10 0
      README.RPC
  2. 12 1
      api.c

+ 10 - 0
README.RPC

@@ -471,6 +471,16 @@ api-example.py - a Python script to access the API.
 Feature Changelog for external applications using the API:
 
 
+API V2.3
+
+Modified API command:
+ 'devdetails' - Add 'Processors', 'Manufacturer', 'Product', 'Serial',
+                    'Target Temperature', 'Cutoff Temperature'
+ 'procdetails' - Add 'Manufacturer', 'Product', 'Serial', 'Target Temperature',
+                     'Cutoff Temperature'
+
+---------
+
 API V2.2 (BFGMiner v3.6.0)
 
 Modified API command:

+ 12 - 1
api.c

@@ -60,7 +60,7 @@ static const char SEPARATOR = '|';
 #define SEPSTR "|"
 static const char GPUSEP = ',';
 
-static const char *APIVERSION = "2.2";
+static const char *APIVERSION = "2.3";
 static const char *DEAD = "Dead";
 static const char *SICK = "Sick";
 static const char *NOSTART = "NoStart";
@@ -1471,13 +1471,24 @@ static void devdetail_an(struct io_data *io_data, struct cgpu_info *cgpu, bool i
 
 	root = api_add_int(root, "DEVDETAILS", &n, true);
 	root = api_add_device_identifier(root, cgpu);
+	if (!per_proc)
+		root = api_add_int(root, "Processors", &cgpu->procs, false);
 	root = api_add_string(root, "Driver", cgpu->drv->dname, false);
 	if (cgpu->kname)
 		root = api_add_string(root, "Kernel", cgpu->kname, false);
 	if (cgpu->name)
 		root = api_add_string(root, "Model", cgpu->name, false);
+	if (cgpu->dev_manufacturer)
+		root = api_add_string(root, "Manufacturer", cgpu->dev_manufacturer, false);
+	if (cgpu->dev_product)
+		root = api_add_string(root, "Product", cgpu->dev_product, false);
+	if (cgpu->dev_serial)
+		root = api_add_string(root, "Serial", cgpu->dev_serial, false);
 	if (cgpu->device_path)
 		root = api_add_string(root, "Device Path", cgpu->device_path, false);
+	
+	root = api_add_int(root, "Target Temperature", &cgpu->targettemp, false);
+	root = api_add_int(root, "Cutoff Temperature", &cgpu->cutofftemp, false);
 
 	if (cgpu->drv->get_api_extra_device_detail)
 		root = api_add_extra(root, cgpu->drv->get_api_extra_device_detail(cgpu));