Import class from catalogue - Tutorials available ?
I want to import a class from the catalogue this website provides, to test my installation with a very basic function.
I am trying to use the AcquireWaveformLecroy class, but I am looking for general tutorial to import classes.
Did someone wrote one ? I looked through the whole documentation, can't find what I'm looking for.
Thank you !
A young padawan
You'd like a general tutorial to import classes?
Not sure to understand what you mean with "import classes"…
Do you mean a tutorial explaining how to use existing classes in your Tango Control System?
The class you mention is written in C++.
The 1st thing you need to do is to download the source code.
You can get it from the Repository link on the classes catalog: https://www.tango-controls.org/developers/dsc/ds/1167/
In your use case, this is a link to http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/MeasureInstruments/Lecroy/AcquireWaveformLecroy
If you go to https://svn.code.sf.net/p/tango-ds/code/DeviceClasses/MeasureInstruments/Lecroy/AcquireWaveformLecroy/trunk/MOVETO, we can see that this repository has been moved to https://gitlab.synchrotron-soleil.fr/software-control-system/tango-devices/MeasureInstruments/Lecroy/AcquireWaveformLecroy
From here you can clone the repository and try to compile the device server.
To compile a device server which is coming from another institute, what I usually do is regenerating the Makefile (or CMakeLists.txt) with Pogo (passing the xmi file as parameter to Pogo) so the Makefile will be regenerated with my site preferences. Most of the times, it's enough to be able to compile the device server.
You should however check the original Makefile from the repository and look for some special dependencies (dependency on library, special compilation flags required, etc…).
Of course, you will need to have cppTango (The Tango C++ library) and its dependencies installed on the host you want to compile and run the device server.
Once you have your device server compiled, you can define it in the Tango Database using tango_admin tool or jive (https://tango-controls.readthedocs.io/en/latest/tools-and-extensions/built-in/jive/servers.html#creating-a-tango-server) and define its devices and associated device and class properties too (doc still on https://tango-controls.readthedocs.io/en/latest/tools-and-extensions/built-in/jive/servers.html).
You can also use the server wizard in jive: https://tango-controls.readthedocs.io/en/latest/tutorials-and-howtos/how-tos/how-to-start-device-server.html#howto-start-device-server
Once it is defined in the Tango DB, you can start your device server using the device server instance name you declared in the Tango Database as parameter.
E.g.: AcquireWaveformLecroy my_instance_name
If you have specific questions related to a specific class you would like to use, please do not hesitate to send an e-mail to the person listed in the "contact" field of the class catalog.
Hoping this helps a bit.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.