Bitcoin Forum
November 06, 2024, 12:00:46 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using functions from api.c in cgminer  (Read 267 times)
dexterov (OP)
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 16, 2019, 11:09:48 AM
 #1

Hello!

I am creating my own application for manage of Antminer S9.
I found source with API here: https://github.com/ckolivas/cgminer
And there is file api.c with functions i need and example in api-example.c
But how i can use API from api.c and create my own application for send command?

Is it possible to create library from cgminer for using functions in my C++ project? How is possible to use functions from this project?
kano
Legendary
*
Offline Offline

Activity: 4620
Merit: 1851


Linux since 1997 RedHat 4


View Profile
May 17, 2019, 11:16:56 PM
 #2

Hello!

I am creating my own application for manage of Antminer S9.
I found source with API here: https://github.com/ckolivas/cgminer
And there is file api.c with functions i need and example in api-example.c
But how i can use API from api.c and create my own application for send command?

Is it possible to create library from cgminer for using functions in my C++ project? How is possible to use functions from this project?
I put an example in C, Java, PHP and there's also an example in Python and Ruby.
Look for the word api in the filenames.
If that doesn't help, you'll not be able to write anything anyway.
It's a simple socket, you just send a command and get a reply then close the socket.
The "library" is called socket programming.

Pool: https://kano.is - low 0.5% fee PPLNS 3 Days - Most reliable Solo with ONLY 0.5% fee   Bitcointalk thread: Forum
Discord support invite at https://kano.is/ Majority developer of the ckpool code - k for kano
The ONLY active original developer of cgminer. Original master git: https://github.com/kanoi/cgminer
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!