Commit Graph

21 Commits

Author SHA1 Message Date
Vadim Yanitskiy 874542ca7c CommonLibs: clean up and fix Makefile.am
* Do not hard-code '-O3' and '-g', let the user decide on them.
* Move '-lpthread' to LIBADD, it shall not be in CFLAGS.
* Also add '-Wall' to AM_CFLAGS.

Change-Id: Ia971fc4124b405514792e5309d42936aaebdc8c1
2023-03-14 13:16:09 +00:00
Pau Espin b9d2515704 Transceiver: replace UDPSocket with libosmocore socket API
We have a good socket API in libosmocore, let's drop osmo-trx socket API
and use libosmocore's one instead of maintaining the two of them.

Change-Id: Ib19856a3e0a7607f63436c4a80b1381a3f318764
2019-07-02 15:07:25 +02:00
Pau Espin 4456b6f132 Add rate_ctr support to store/retrieve SDR errors through VTY
Introduce a unified implementation-agnostic interface for radioDevice to
signal SDR error counters to upper layers and manage them.
This patch only implements counters for osmo-trx-lms (other devices will
show all counters unchanged during time).

Sample use through VTY:
"""
OsmoTRX> show rate-counters
osmo-trx statistics 0:
   device:rx_underruns:          0 (0/s 0/m 0/h 0/d) Number of Rx underruns
    device:rx_overruns:          0 (0/s 0/m 0/h 0/d) Number of Rx overruns
   device:tx_underruns:          0 (0/s 0/m 0/h 0/d) Number of Tx underruns
 device:rx_drop_events:          4 (0/s 2/m 3/h 0/d) Number of times Rx samples were dropped by HW
device:rx_drop_samples:        513 (0/s 196/m 425/h 0/d) Number of Rx samples dropped by HW
"""

Change-Id: I78b158141697e5714d04db8b9ccc96f31f34f439
2019-06-05 12:50:38 +02:00
Oliver Smith 8d9a05ce5b osmo-trx.cpp: move comma_delimited_to_vector() to Utils.cpp
Make the "opt" argument const. This function will also be used by
LMSDevice.cpp in a follow-up commit.

Related: OS#3654
Change-Id: If3f0f682ca453c2b0a06175ec9626567932cfce6
2018-12-12 17:26:32 +01:00
Pau Espin 55dd2aa5ab CommonLibs/Makefile.am: Specify libcommon_la_LIBADD
This way the dependencies are passed after the .la object, which seems
to be the correct order. Some setups may fail to find some symbols from
libosmocore otherwise (OBS i586).

Change-Id: I22c80055bcffd4179a0a8ca76533ba7aaa38c859
2018-10-02 09:34:55 +02:00
Pau Espin db936b9b55 osmo-trx: Add osmo_signal to stop whole transceiver chain correctly on error
Transceiver::stop() can only be called from either CTRL iface thread or
from main thread (running osmocom loop). That's because stop attempts to
cancel and then join all the other threads, which would then lock if
attempting to stop from some of them.
As a result, the best option is to indicate to the user of the
transceiver option (osmo-trx.cpp) to stop it in a correct fashion by
destroying the object from the main thread.

Change-Id: Iac1d2dbe2328e735db2d4b933cb67b1af1babca1
2018-09-04 16:35:23 +02:00
Pau Espin 478f82f47e build: Fix make distcheck
Change-Id: I1fa5e34b44331cd56408ea7ad4483dcf6443b259
2018-04-27 11:34:11 +02:00
Pau Espin efac20b6bb Move enums required by VTY to a separate header
This patch is a preparation for next patches, which add full VTY cfg
support.

Change-Id: I3d5b0576aa96869756f1629a40306c0043b6304b
2018-03-05 17:16:05 +01:00
Pau Espin 3da1f8352e Logger: Use libosmocore logging system
We still need an intermediate class Logger due to osmo-trx being
multi-threaded and requiring to have a lock to use libosmocore, which is
not thread safe.

Change-Id: I30baac89f53e927f8699d0586b43cccf88ecd493
2018-02-27 07:11:11 +00:00
Pau Espin 5ea1817dc2 Add initial support for logging, vty, ctrl
Up to this point, the logging system, vty and ctrl are initialized and
can be used fine, though they don't have a lot of use yet.

Depends on libosmocore Change-Id Ib79cdb62d45d8c78445c7b064e58eb7e9faeccf9

Related: OS#2184

Change-Id: I08982c37b4f873966304b3cfb38a10ee86eb3dad
2018-02-27 07:10:50 +00:00
Pau Espin 89be118a3b Remove unneeded libdl dependency
Closes: OS#1929

Change-Id: I0caea2a2a8e6bd07432fd73bae72b42b1ce022cd
2018-01-23 18:15:24 +00:00
Pau Espin 2ac788b2c3 Set up GNU Autotest infrastructure
Test files are moved from CommonLibs/ to tests/CommonLibs/.
Some tests are disabled in autotest because they generate timedate
related output which cannot exactly match against expected output.

Change-Id: I3d6ba625968be09297642d18090c496490e9b8fc
2018-01-10 11:17:32 +01:00
Pau Espin caf2abc58f Remove Configuration module and libsqlite dependency
Change-Id: I823aea91367d586507bbf352f1b6f25bdd635baa
2018-01-09 15:26:50 +01:00
Pau Espin 82f83ced73 cosmetic: Remove trailing whitespace
Change-Id: I64c8dbad3fc42bcb8dd4ac9b16bbd9c59a0cf5d5
2018-01-09 15:26:49 +01:00
Alexander Chemeris 082bbbf8fe PRBS: a Pseudo-random binary sequence (PRBS) generator class.
Implemeted with a Galois LFSR for speed and flexibility compared to Fibonacci version.

Aliases for three popular PRBS' are added for convenience - PRBS9, PRBS15 and PRBS64.

Note that we can't test PRBS64 completely, because the sequence is too long to
be generated.

Change-Id: Ib5331ba5d0b5819929541686fdd87905e2177b74
2017-06-08 18:33:47 +00:00
Alexander Chemeris 4793f4679b CommonLibs: Remove unused files.
Change-Id: I2bfb45a1c7d01785bdb30204dba38c683a4288a9
2017-03-20 17:32:04 +00:00
Max 2dee3e996e Fix building against sqlite3
* Explicitly check for sqlite3 at configure stage, remove old include
  dir, fix header inclusion.
* Use configure results for linking instead of hardcoded linker option
  for sqlite.
* Add dependency on -dev package for .deb

Change-Id: I6d7f697d67651f02ceb77fc4da4317b64fa47f9e
Fixes: OS#1928
2017-01-26 17:06:06 +01:00
kurtis.heimerl 5a87247fdf syncing commonlibs with Many thanks to Michael Iedema for these patches, makes config a lot better.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5655 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2013-05-31 21:47:25 +00:00
kurtis.heimerl db70eb4c6e Patch 4545 in private:
Added support for performance-reporting counters.

and

Patch 4588 in private:
For some reason, ReportingTest won't build on all systems.  Since it is not part of the actuall application, I am commenting it out from the Makefile.am for now.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4627 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-12-16 06:06:32 +00:00
kurtis.heimerl e766abbf82 Alexander's patch #1:
This patch makes a step towards using a system-wide sqlite3 lib. It
moves sqlite3util.cpp/.h to CommonLibs and leaves only original
sqlite3 files in the sqlite3 dir of OpenBTS.

I do not claim any copyright over this change, as it's very basic.
Looking forward to see it merged into mainline.

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4467 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2012-11-14 03:51:51 +00:00
dburgess 82c46ff7ae Putting the actual OpenBTS P2.8 source code into the public SVN branch.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2242 19bc5d8c-e614-43d4-8b26-e1612bc8e597
2011-10-07 02:40:51 +00:00