Bitcoin Forum
May 05, 2024, 12:02:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: C++ CG/SGminer API calls?  (Read 1205 times)
nuggetbram (OP)
Full Member
***
Offline Offline

Activity: 326
Merit: 100



View Profile
August 28, 2014, 10:12:21 AM
 #1

I'm in the process of screwing around trying to learn c++ in a bitcoin related environment. I've so far made, in QT, a gui application to essentially write the batch files for me. Now all I need is for it to display rpc/api things (speed, a/r etc...).

I've got no idea how to do this, other than it requires JSON.

Could someone show me some example code or something along those lines? I've found python and c# examples but I'm not really sure how to convert those...

I'm looking for something that I can use as a string (so I can set a label to it easily Smiley  )

Thanks,

nuggetbram

1714910540
Hero Member
*
Offline Offline

Posts: 1714910540

View Profile Personal Message (Offline)

Ignore
1714910540
Reply with quote  #2

1714910540
Report to moderator
1714910540
Hero Member
*
Offline Offline

Posts: 1714910540

View Profile Personal Message (Offline)

Ignore
1714910540
Reply with quote  #2

1714910540
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714910540
Hero Member
*
Offline Offline

Posts: 1714910540

View Profile Personal Message (Offline)

Ignore
1714910540
Reply with quote  #2

1714910540
Report to moderator
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
August 28, 2014, 12:35:12 PM
 #2

CGminer includes a file called api.c, it exports some functions you use in your project to call the cgminer APIs, if you want to do it yourself you will need to learn about sockets.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!