Page 1 of 1

C++ API

Posted: 26 Oct 2015, 12:13
by jan
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

Re: C++ API

Posted: 26 Oct 2015, 13:32
by soliday
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.

Re: C++ API

Posted: 26 Oct 2015, 14:48
by michael_borland
Meanwhile, one can call the existing C API from C++. Much better than trying to parse the ASCII files.

--Michael

Re: C++ API

Posted: 27 Oct 2015, 03:06
by jan
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.

Re: C++ API

Posted: 27 Oct 2015, 09:37
by soliday
What operating system are you on?

Re: C++ API

Posted: 27 Oct 2015, 09:38
by soliday
If Linux, tell me the version. I can then build it for you and send you the link.

Re: C++ API

Posted: 27 Oct 2015, 11:15
by jan
I am on Ubuntu 15.10 64bit. Thank you.

Re: C++ API

Posted: 27 Oct 2015, 15:47
by soliday
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

Re: C++ API

Posted: 29 Oct 2015, 05:15
by jan
Thank you very much for the library and the demo.

Re: C++ API

Posted: 29 Oct 2015, 15:03
by soliday
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.