Restructure: Move mobile from common code to 'libmobile'

pull/1/head
Andreas Eversberg 5 years ago
parent ed31a26eba
commit ab59a26a51
  1. 2
      .gitignore
  2. 1
      configure.ac
  3. 1
      src/Makefile.am
  4. 2
      src/amps/Makefile.am
  5. 2
      src/amps/amps.c
  6. 2
      src/amps/amps.h
  7. 4
      src/amps/amps_tacs_main.c
  8. 2
      src/amps/dsp.c
  9. 2
      src/amps/transaction.c
  10. 2
      src/anetz/Makefile.am
  11. 2
      src/anetz/anetz.c
  12. 2
      src/anetz/anetz.h
  13. 2
      src/anetz/dsp.c
  14. 4
      src/anetz/main.c
  15. 2
      src/bnetz/Makefile.am
  16. 2
      src/bnetz/bnetz.c
  17. 2
      src/bnetz/bnetz.h
  18. 2
      src/bnetz/dsp.c
  19. 4
      src/bnetz/main.c
  20. 2
      src/cnetz/Makefile.am
  21. 2
      src/cnetz/cnetz.c
  22. 2
      src/cnetz/cnetz.h
  23. 2
      src/cnetz/dsp.c
  24. 4
      src/cnetz/main.c
  25. 2
      src/cnetz/transaction.c
  26. 8
      src/common/Makefile.am
  27. 2
      src/common/display_measurements.c
  28. 2
      src/common/display_wave.c
  29. 2
      src/jtacs/Makefile.am
  30. 2
      src/libmncc/mncc_console.c
  31. 2
      src/libmncc/mncc_cross.c
  32. 2
      src/libmncc/mncc_sock.c
  33. 14
      src/libmobile/Makefile.am
  34. 10
      src/libmobile/call.c
  35. 0
      src/libmobile/call.h
  36. 0
      src/libmobile/display_status.c
  37. 2
      src/libmobile/main_mobile.c
  38. 0
      src/libmobile/main_mobile.h
  39. 2
      src/libmobile/sender.c
  40. 2
      src/libmobile/sender.h
  41. 2
      src/libsdr/display_iq.c
  42. 2
      src/libsdr/display_spectrum.c
  43. 2
      src/libsdr/sdr.c
  44. 2
      src/libsound/sound_alsa.c
  45. 2
      src/nmt/Makefile.am
  46. 2
      src/nmt/main.c
  47. 4
      src/nmt/nmt.h
  48. 2
      src/r2000/Makefile.am
  49. 2
      src/r2000/main.c
  50. 4
      src/r2000/r2000.h
  51. 2
      src/tacs/Makefile.am
  52. 14
      src/test/Makefile.am

2
.gitignore vendored

@ -20,6 +20,7 @@ compile
.libs
.dirstamp
m4
src/libmobile/libmobile.a
src/libimage/libimage.a
src/libcompandor/libcompandor.a
src/libgoertzel/libgoertzel.a
@ -41,7 +42,6 @@ src/libsound/libsound.a
src/libsdr/libsdr.a
src/libsample/libsample.a
src/common/libcommon.a
src/common/libmobile.a
src/anetz/libgermanton.a
src/anetz/anetz
src/bnetz/bnetz

@ -75,6 +75,7 @@ AS_IF([test "x$with_soapy" == "xyes"],[AC_MSG_NOTICE( Compiling with SoapySDR su
AS_IF([test "x$somethingmagick" == "xyes"],[AC_MSG_NOTICE( Compiling with ImageMagick )],[AC_MSG_NOTICE( ImageMagick not supported )])
AC_OUTPUT(
src/libmobile/Makefile
src/libimage/Makefile
src/libcompandor/Makefile
src/libgoertzel/Makefile

@ -1,6 +1,7 @@
AUTOMAKE_OPTIONS = foreign
SUBDIRS = \
libmobile \
libsample \
libimage \
libcompandor \

@ -26,10 +26,10 @@ amps_SOURCES = \
amps_LDADD = \
$(COMMON_LA) \
libamps.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -44,7 +44,7 @@
#include <errno.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "amps.h"
#include "dsp.h"

@ -1,5 +1,5 @@
#include "../libgoertzel/goertzel.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
#include "../libtimer/timer.h"
#include "../libcompandor/compandor.h"
#include "sysinfo.h"

@ -23,9 +23,9 @@
#include <stdlib.h>
#include <string.h>
#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../libmobile/main_mobile.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "amps.h"
#include "dsp.h"
#include "frame.h"

@ -83,7 +83,7 @@
#include <math.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "amps.h"
#include "frame.h"
#include "dsp.h"

@ -22,7 +22,7 @@
#include <stdlib.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "amps.h"
//#include "database.h"

@ -18,10 +18,10 @@ anetz_SOURCES = \
anetz_LDADD = \
$(COMMON_LA) \
libgermanton.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libsquelch/libsquelch.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -27,7 +27,7 @@
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libtimer/timer.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "anetz.h"
#include "dsp.h"

@ -1,6 +1,6 @@
#include "../libsquelch/squelch.h"
#include "../libgoertzel/goertzel.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
enum dsp_mode {
DSP_MODE_SILENCE, /* send silence to transmitter, block audio from receiver */

@ -28,7 +28,7 @@
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../libtimer/timer.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "anetz.h"
#include "dsp.h"

@ -24,10 +24,10 @@
#include <string.h>
#include <math.h>
#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../libmobile/main_mobile.h"
#include "../common/debug.h"
#include "../libtimer/timer.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "freiton.h"
#include "besetztton.h"
#include "anetz.h"

@ -14,9 +14,9 @@ bnetz_SOURCES = \
bnetz_LDADD = \
$(COMMON_LA) \
../anetz/libgermanton.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libsquelch/libsquelch.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -26,7 +26,7 @@
#include <errno.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "bnetz.h"
#include "telegramm.h"

@ -1,6 +1,6 @@
#include "../libsquelch/squelch.h"
#include "../libfsk/fsk.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
#include "../libtimer/timer.h"
/* fsk modes of transmission */

@ -27,7 +27,7 @@
#include <math.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "bnetz.h"
#include "dsp.h"

@ -25,8 +25,8 @@
#include <math.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../common/main_mobile.h"
#include "../libmobile/call.h"
#include "../libmobile/main_mobile.h"
#include "../anetz/freiton.h"
#include "../anetz/besetztton.h"
#include "bnetz.h"

@ -17,9 +17,9 @@ cnetz_SOURCES = \
cnetz_LDADD = \
$(COMMON_LA) \
../anetz/libgermanton.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -144,7 +144,7 @@
#include <inttypes.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "cnetz.h"
#include "database.h"

@ -1,6 +1,6 @@
#include "../libcompandor/compandor.h"
#include "../libtimer/timer.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
#include "fsk_demod.h"
#include "../libscrambler/scrambler.h"
#include "transaction.h"

@ -27,7 +27,7 @@
#include <errno.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "cnetz.h"
#include "sysinfo.h"
#include "telegramm.h"

@ -23,9 +23,9 @@
#include <stdlib.h>
#include <string.h>
#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../libmobile/main_mobile.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../anetz/freiton.h"
#include "../anetz/besetztton.h"
#include "cnetz.h"

@ -22,7 +22,7 @@
#include <stdlib.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libmncc/cause.h"
#include "cnetz.h"
#include "telegramm.h"

@ -1,18 +1,12 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
noinst_LIBRARIES = libcommon.a libmobile.a
noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = \
debug.c \
display_wave.c \
display_measurements.c
libmobile_a_SOURCES = \
sender.c \
call.c \
display_status.c \
main_mobile.c
if HAVE_SDR
AM_CPPFLAGS += -DHAVE_SDR
endif

@ -25,7 +25,7 @@
#include <sys/ioctl.h>
#include <math.h>
#include "../libsample/sample.h"
#include "sender.h"
#include "../libmobile/sender.h"
#define MAX_NAME_LEN 16
#define MAX_UNIT_LEN 16

@ -24,7 +24,7 @@
#include <math.h>
#include <sys/ioctl.h>
#include "../libsample/sample.h"
#include "sender.h"
#include "../libmobile/sender.h"
#define HEIGHT 11

@ -12,10 +12,10 @@ jtacs_SOURCES = \
jtacs_LDADD = \
$(COMMON_LA) \
../amps/libamps.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -32,7 +32,7 @@
#include "mncc.h"
#include "mncc_console.h"
#include "cause.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libsound/sound.h"
static int new_callref = 0; /* toward mobile */

@ -24,7 +24,7 @@
#include <stdlib.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "cause.h"
#include "mncc.h"
#include "mncc_cross.h"

@ -28,7 +28,7 @@
#include <unistd.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "cause.h"
#include "mncc_sock.h"

@ -0,0 +1,14 @@
AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
noinst_LIBRARIES = libmobile.a
libmobile_a_SOURCES = \
sender.c \
call.c \
display_status.c \
main_mobile.c
if HAVE_SDR
AM_CPPFLAGS += -DHAVE_SDR
endif

@ -25,7 +25,7 @@
#include <errno.h>
#include <sys/time.h>
#include "../libsample/sample.h"
#include "debug.h"
#include "../common/debug.h"
#include "sender.h"
#include "call.h"
#include "../libtimer/timer.h"
@ -333,6 +333,11 @@ static void process_timeout(struct timer *timer)
uint8_t buf[sizeof(struct gsm_mncc)];
struct gsm_mncc *mncc = (struct gsm_mncc *)buf;
if (process->state == PROCESS_DISCONNECT) {
PDEBUG(DCALL, DEBUG_INFO, "Call released toward mobile network (after timeout)\n");
call_down_release(process->callref, process->cause);
}
memset(buf, 0, sizeof(buf));
mncc->msg_type = MNCC_REL_IND;
mncc->callref = process->callref;
@ -763,13 +768,14 @@ void mncc_down(uint8_t *buf, int length)
new_state_process(callref, PROCESS_DISCONNECT);
PDEBUG(DCALL, DEBUG_INFO, "Call disconnected\n");
call_down_disconnect(callref, mncc->cause.value);
timer_start(&process->timer, DISC_TIMEOUT);
break;
case MNCC_REL_REQ:
PDEBUG(DCALL, DEBUG_INFO, "Received MNCC release from fixed network with cause %d\n", mncc->cause.value);
release:
destroy_process(callref);
PDEBUG(DCALL, DEBUG_INFO, "Call released\n");
PDEBUG(DCALL, DEBUG_INFO, "Call released toward mobile network\n");
call_down_release(callref, mncc->cause.value);
break;
}

@ -31,7 +31,7 @@
#include <getopt.h>
#include "../libsample/sample.h"
#include "main_mobile.h"
#include "debug.h"
#include "../common/debug.h"
#include "sender.h"
#include "../libtimer/timer.h"
#include "call.h"

@ -25,7 +25,7 @@
#include <errno.h>
#include <string.h>
#include "../libsample/sample.h"
#include "debug.h"
#include "../common/debug.h"
#include "sender.h"
#include "../libtimer/timer.h"

@ -6,7 +6,7 @@
#include "../libsamplerate/samplerate.h"
#include "../libjitter/jitter.h"
#include "../libemphasis/emphasis.h"
#include "display.h"
#include "../common/display.h"
#define MAX_SENDER 16

@ -24,7 +24,7 @@
#include <pthread.h>
#include <stdlib.h>
#include "../libsample/sample.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
/* must be odd value! */
#define SIZE 23

@ -23,7 +23,7 @@
#include <string.h>
#include <math.h>
#include "../libsample/sample.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
#include "../libfft/fft.h"
#define HEIGHT 20

@ -32,7 +32,7 @@ enum paging_signal;
#include "../libsample/sample.h"
#include "../libfm/fm.h"
#include "../libtimer/timer.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
#include "sdr_config.h"
#include "sdr.h"
#ifdef HAVE_UHD

@ -23,7 +23,7 @@
#include <alsa/asoundlib.h>
#include "../libsample/sample.h"
#include "../common/debug.h"
#include "../common/sender.h"
#include "../libmobile/sender.h"
typedef struct sound {
snd_pcm_t *phandle, *chandle;

@ -22,12 +22,12 @@ nmt_SOURCES = \
nmt_LDADD = \
$(COMMON_LA) \
libdmssms.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libhagelbarger/libhagelbarger.a \
$(top_builddir)/src/libdtmf/libdtmf.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -27,7 +27,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../libmobile/main_mobile.h"
#include "../common/debug.h"
#include "nmt.h"
#include "frame.h"

@ -1,8 +1,8 @@
#include "../common/sender.h"
#include "../libmobile/sender.h"
#include "../libtimer/timer.h"
#include "../libcompandor/compandor.h"
#include "../libdtmf/dtmf_encode.h"
#include "../common/call.h"
#include "../libmobile/call.h"
#include "../libfsk/fsk.h"
#include "../libgoertzel/goertzel.h"
#include "dms.h"

@ -12,10 +12,10 @@ radiocom2000_SOURCES = \
main.c
radiocom2000_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libhagelbarger/libhagelbarger.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -27,7 +27,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "../libsample/sample.h"
#include "../common/main_mobile.h"
#include "../libmobile/main_mobile.h"
#include "../common/debug.h"
#include "r2000.h"
#include "dsp.h"

@ -1,7 +1,7 @@
#include "../libcompandor/compandor.h"
#include "../libtimer/timer.h"
#include "../common/sender.h"
#include "../common/call.h"
#include "../libmobile/sender.h"
#include "../libmobile/call.h"
#include "../libfsk/fsk.h"
enum dsp_mode {

@ -13,10 +13,10 @@ tacs_SOURCES = \
tacs_LDADD = \
$(COMMON_LA) \
../amps/libamps.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/libgoertzel/libgoertzel.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libtimer/libtimer.a \
$(top_builddir)/src/libsamplerate/libsamplerate.a \

@ -13,7 +13,7 @@ test_filter_SOURCES = test_filter.c dummy.c
test_filter_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libtimer/libtimer.a \
@ -40,8 +40,8 @@ test_compandor_SOURCES = dummy.x test_compandor.c
test_compandor_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libcompandor/libcompandor.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \
@ -52,7 +52,7 @@ test_emphasis_SOURCES = test_emphasis.c dummy.c
test_emphasis_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libtimer/libtimer.a \
@ -79,8 +79,8 @@ test_dms_SOURCES = test_dms.c dummy.c
test_dms_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/nmt/libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libtimer/libtimer.a \
@ -107,8 +107,8 @@ test_sms_SOURCES = dummy.c test_sms.c
test_sms_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/nmt/libdmssms.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libjitter/libjitter.a \
$(top_builddir)/src/libtimer/libtimer.a \
@ -135,7 +135,7 @@ test_performance_SOURCES = dummy.c test_performance.c
test_performance_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(top_builddir)/src/libfm/libfm.a \
$(top_builddir)/src/libfilter/libfilter.a \
@ -148,8 +148,8 @@ test_hagelbarger_SOURCES = dummy.c test_hagelbarger.c
test_hagelbarger_LDADD = \
$(COMMON_LA) \
$(top_builddir)/src/libmobile/libmobile.a \
$(top_builddir)/src/libhagelbarger/libhagelbarger.a \
$(top_builddir)/src/common/libmobile.a \
$(top_builddir)/src/common/libcommon.a \
$(ALSA_LIBS) \
$(UHD_LIBS) \

Loading…
Cancel
Save