SAFTlib

Currently there is no manual yet how to work with the timing groups SAFTlib which is supposed to be integrated into the FESA 3 framework. The following should give some hints how to work with this library.

Information

https://www-acc.gsi.de/wiki/Timing/TimingSystemDocuments

https://www-acc.gsi.de/wiki/Timing/TimingSystemDocumentsSaftlib

https://www-acc.gsi.de/wiki/Timing/TimingSystemEvent

https://www-acc.gsi.de/wiki/pub/Timing/TimingSystemDocuments/eca_design_2013-05-23.pdf

Manual for compiling the SAFTlib

  • download SAFTlib sources from https://github.com/terpstra/saftlib:
    git clone https://github.com/terpstra/saftlib
  • run script ./autogen.sh, this creates a script named configure
  • run script configure: PKG_CONFIG_PATH=/common/usr/timing/root/lib/pkgconfig ./configure --prefix=/common/usr/timing/root --enable-maintainer-mode
  • For SAFTlib maintainers: make install installs the SAFTlib in /common/usr/timing/root/lib/

Compilation and Installation

  • make
  • make install: installs the library, the headers etc in /common/usr/timing/root

Manual for using the demo program: client

A client program was provided to illustrate how to use the SAFTlib. The file is attached below as an example.
  • The makefiles are created during ./configure.

How to compile

  • make client

How to run

  • run ./client on SCU supporting the latest WhiteRabbit based timing developments

SCU for testing

The SCU scuxl0052 is currently available for testing the features of SAFTlib.

Integration in FESA

The very first implementation draft is realized in fesa-core-gsi in the classes TimingEventSourceWR and TimingContextWR. The code for accessing the functionality of the SAFTlib is guarded by 'SAFT' and can be easily excluded from the build.

Currently the following shared libraries are required to run FESA software on a FEC:

DEPENDENT_LINKER_OPTIONS += -Wl,-Bdynamic -lgiomm-2.4 -lgio-2.0 -lglibmm-2.4 -lgmodule-2.0 -lgobject-2.0 -lsigc-2.0 -lgthread-2.0 -lrt -lglib-2.0

For a simple test it is sufficient to copy them manually into the same folder as the deploy-unit or inject them into the SCU's RAM via an NFS init script (-> Wesley).

Test on a FEC

It is possible to launch a development version manually on the FEC:
on asl73x:
deliver FESA software to FEC using the release functionality
rename /common/export/fesa/local/scuxl0052/WRTimingTestDU-d/ to /common/export/fesa/local/scuxl0052/WRTimingTestDU/  

on SCU:
cd /opt/fesa/nfs/local/scuxl0052/WRTimingTestDU
launch with ./startManually_WRTimingTestDU_M.sh -f "-usrArgs -WR"

How to watch log output of a FEC

https://logstash.acc.gsi.de/kibana/#/dashboard/file/default.json?query=program:WRTimingTestDU

on asl73x: logstashtail logsource=scuxl0052

Integration of SAFTlib into FESA3 release 2.3.2

Outcome of a meeting with developer of SAFTlib and his group leader: at the moment there will be no 'official' released version of the SAFTlib. The FESA team is asked by the timing group to copy snapshots by themselve of this library if it has to be used in a FESA release as it is desired by others.

Important: there won't be notifications about changes in the SAFTlib. The timing groups development version will not be recognizable as such.

What to snapshot for a FESA release

  • content of /common/usr/timing/root
  • matching zipped file for extraction on the FECs in /common/export/saftlib including the dynamic SAFTlib libraries and its dbus stuff
During copy these two parts need a version or a date in their name! The script 'createSAFTlibVersion.sh' in fesa-tools/scripts performs the required tasks.

How to integrate in the FESA FWK

  • the proper copied version has to be integrated in the makefiles and the code generation files for the generated makefiles for classes and deploy-units

How to use on a FEC

  • the matching zipped file has to be extraced during boot of the ramdisc. Wesley will provide a script that needs to be located in /common/export/nfsinit/<FEC name>/
-- SolveighMatthies - 08 Jun 2015
I Attachment Action Size Date Who Comment
client.cppcpp client.cpp manage 4 K 08 Jun 2015 - 10:34 SolveighMatthies demo client to illustrate usage of SAFTlib
Topic revision: r7 - 22 May 2018, SolveighMatthies
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback