Bitcoin Forum
May 08, 2024, 04:49:54 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Using functions from api.c in cgminer  (Read 253 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?
If you see garbage posts (off-topic, trolling, spam, no point, etc.), use the "report to moderator" links. All reports are investigated, though you will rarely be contacted about your reports.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715186994
Hero Member
*
Offline Offline

Posts: 1715186994

View Profile Personal Message (Offline)

Ignore
1715186994
Reply with quote  #2

1715186994
Report to moderator
1715186994
Hero Member
*
Offline Offline

Posts: 1715186994

View Profile Personal Message (Offline)

Ignore
1715186994
Reply with quote  #2

1715186994
Report to moderator
kano
Legendary
*
Offline Offline

Activity: 4494
Merit: 1808


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!