5 - [Documentation](#documentation)
6 - [Compilation](#compilation)
7 - [Installation](#installation)
8 - [Running unit tests](#running-unit-tests)
9 - [Using SDL in application pod](#using-sdl-in-application-pod)
13 Documentation is generated with `doxygen` tool.
15 By default `make doxygen-doc` creates HTML, PDF and PS documents (if
16 the needed tools are available). The documents are created to:
18 1. doxygen-doc/html/index.html
19 2. doxygen-doc/shareddatalayer.pdf
20 3. doxygen-doc/shareddatalayer.ps
22 Creation of different document formats can be controlled with various
23 `--enable-doxygen-*` and `--disable-doxygen-*` configuration
24 options. For example if only HTML document is needed, then run:
26 ./configure --disable-doxygen-pdf --disable-doxygen-ps
31 These instructions assume that the project has been cloned into
32 directory named `shareddatalayer`.
36 Currently, the following libraries are required while building:
41 ### Compilation in the source directory
48 ### Compilation outside the source directory
55 ../shareddatalayer/configure
60 By default the shared library is installed to `/usr/local/lib` and
61 headers into to `/usr/local/include`. If this is not desired, then
62 provide different path when running `configure`, for example:
64 ./configure --prefix=$HOME/usr/local
66 In above example SDL pkg-config .pc file is installed to `$HOME/usr/local/lib/pkgconfig`
67 directory. This directory should be included to `PKG_CONFIG_PATH` while building
68 the application which is using the SDL API library.
70 Note that `configure` command allows plethora of additional options.
75 After configuration has been done, run:
79 In some cases dynamic linker cache needs to be manually refreshed after SDL API
80 has been re-installed:
86 When Redis is used, SDL requires that the following Redis extension commands
87 have been installed to runtime environment:
96 Redis v4.0 or greater is required. Older versions do not support extension
99 Implementation for these commands is produced by RIC DBaaS:
100 https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/dbaas
102 In official RIC deployments these commands are installed by `dbaas` service to
105 In development environment you may want install commands manually to pod/container
106 which is running Redis.
108 Installation to default system directory:
115 Following line should be added to `redis.conf` file:
117 loadmodule <path>/libredismodule.so
119 `<path>` should be replaced to match library installation directory path.
120 `redis-server` must be restarted after configuration file update.
122 Notice that `redis-server` takes path to configuration file as an argument.
123 If not given it will start with default parameter values and above made
124 `loadmodule` option is not effective. Refer to `redis-server --help`.
126 SDL API will check in connection setup phase that all required commands are
127 available, if not then execution is aborted and error log is written to identify
128 that which commands are missing.
130 ## Running unit tests
132 Unit tests are compiled and executed by simply running:
136 By default all unit tests are executed. If `valgrind` is installed,
137 then by default unit test execution is analyzed with `valgrind`.
138 Running specific test cases can be achieved by using `GTEST_FILTER`
139 environment variable. For example:
141 make test GTEST_FILTER=ConnectionTest*
143 If `valgrind` is not desired (even if installed), then it can be
144 disabled with `USE_VALGRIND` environment variable:
146 make test USE_VALGRIND=false
148 Additional `valgrind` arguments can be specified with `VALGRIND_EXTRA_ARGS`
149 environment variable. For example:
151 make test VALGRIND_EXTRA_ARGS='--track-fds=yes --log-file=mylog.txt'
153 It is also possible to use the `testrunner` binary directly (after it
154 has been compiled). The `testrunner` binary supports all the command
155 line options gtest supports, for example:
160 ## Using SDL in application pod
162 SDL is not yet available in O-RAN-SC PackageCloud.io repository.
164 Plan is to add it, but in the meantime SDL API needs to be complied and installed
165 in SDL client Dockerfiles (refer instructions above). You may need to execute
166 `RUN ldconfig` command to Dockerfile after SDL API installation.
168 RIC DBaaS service must be running before starting application pod which is using SDL
169 API. DBaaS defines environment variables which are used to contact DBaaS service
170 (offering backend for SDL). Those environment variables are exposed inside application
171 container only if DBaaS service is running when application container is started.
173 You may test SDL connectivity to its backend with `sdltool test-connectivity`
174 command inside your application container.