C++ API

Moderators: cyao, michael_borland

Post Reply
jan
Posts: 13
Joined: 02 Oct 2013, 07:20
Location: ELSA, Bonn, Germany

C++ API

Post by jan » 26 Oct 2015, 12:13

Hi,
is there any chance for a SDDS C++ API?
It would be really nice to read SDDS binary files without the overhead to convert them to ascii.

I found some C++ code called "SDDS3lib", but no documentation. I could not manage to compile it. As far as I figured out, it fails due to an incompatibility with zlib >=1.2.6 (something with gzFile no longer being a typedef of voidp...) Is "SDDS3lib" still maintained?

Thanks a lot,
Jan

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: C++ API

Post by soliday » 26 Oct 2015, 13:32

SDDS3lib was an old attempt I made at an SDDS C++ implementation. It was never finished and mostly abandoned. When I get some time, I will look at it again and see what still needs to be done.

michael_borland
Posts: 1927
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: C++ API

Post by michael_borland » 26 Oct 2015, 14:48

Meanwhile, one can call the existing C API from C++. Much better than trying to parse the ASCII files.

--Michael

jan
Posts: 13
Joined: 02 Oct 2013, 07:20
Location: ELSA, Bonn, Germany

Re: C++ API

Post by jan » 27 Oct 2015, 03:06

Thank you for your replies. I would really appreciate SDDS3lib to be finished.
The C API Michael mentions is SDDSlib? This would be a good starting point for me. Is there a documentation at least on how to compile it? The Makefiles seem to require a special directory structure and other projects related to epics.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: C++ API

Post by soliday » 27 Oct 2015, 09:37

What operating system are you on?

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: C++ API

Post by soliday » 27 Oct 2015, 09:38

If Linux, tell me the version. I can then build it for you and send you the link.

jan
Posts: 13
Joined: 02 Oct 2013, 07:20
Location: ELSA, Bonn, Germany

Re: C++ API

Post by jan » 27 Oct 2015, 11:15

I am on Ubuntu 15.10 64bit. Thank you.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: C++ API

Post by soliday » 27 Oct 2015, 15:47

You can now download http://www.aps.anl.gov/asd/oag/download ... .10.tar.gz
This expands into SDDSapi/lib64, SDDSapi/include and SDDSapi/demo
I only had time to put together one simple demo to create an SDDS file. Tomorrow I'll put together a few more demos and make a link to it on our website. Plus I still need to release the Ubuntu 15.10 RPMs which should be done by tomorrow too.

The basic documentation for programming with the SDDS code is at:
http://www.aps.anl.gov/Accelerator_Syst ... /SDDS.html

jan
Posts: 13
Joined: 02 Oct 2013, 07:20
Location: ELSA, Bonn, Germany

Re: C++ API

Post by jan » 29 Oct 2015, 05:15

Thank you very much for the library and the demo.

soliday
Posts: 390
Joined: 28 May 2008, 09:15

Re: C++ API

Post by soliday » 29 Oct 2015, 15:03

I created a new SDDSToolKit-devel RPM. You can get it from:
http://www.aps.anl.gov/asd/oag/download ... x86_64.rpm
It installs the libraries into:
/usr/lib/x86_64-linux-gnu/SDDS/
The header files are install to:
/usr/include/SDDS/
The demo into:
/usr/lib/x86_64-linux-gnu/SDDS/demo/

This demo is better annotated and does both reading and writing of SDDS files. Hopefully this will make it easier for outside users to create their own SDDS programs without having to deal with the complexities of building SDDS itself.

Post Reply