From f914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 20 Jul 2011 18:38:36 -0700 Subject: core: API declaration macros for core class and function symbols --- gnuradio-core/src/lib/viterbi/Makefile.am | 2 ++ gnuradio-core/src/lib/viterbi/viterbi.h | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'gnuradio-core/src/lib/viterbi') diff --git a/gnuradio-core/src/lib/viterbi/Makefile.am b/gnuradio-core/src/lib/viterbi/Makefile.am index 8384c52f0..1b86a86f8 100644 --- a/gnuradio-core/src/lib/viterbi/Makefile.am +++ b/gnuradio-core/src/lib/viterbi/Makefile.am @@ -21,6 +21,8 @@ include $(top_srcdir)/Makefile.common LIBS = -lm +AM_CPPFLAGS = -I$(top_srcdir)/gnuradio-core/src/lib/general + noinst_LTLIBRARIES = libviterbi.la libviterbi_la_SOURCES = \ diff --git a/gnuradio-core/src/lib/viterbi/viterbi.h b/gnuradio-core/src/lib/viterbi/viterbi.h index 155b0d93a..5bb8b357a 100644 --- a/gnuradio-core/src/lib/viterbi/viterbi.h +++ b/gnuradio-core/src/lib/viterbi/viterbi.h @@ -23,27 +23,31 @@ * than we'd like for K=7, especially since we chain back every 8 bits. * But it fits so nicely into a 32-bit machine word... */ -struct viterbi_state { + +#include + +struct GR_CORE_API viterbi_state { unsigned long path; /* Decoded path to this state */ long metric; /* Cumulative metric to this state */ }; +GR_CORE_API int gen_met(int mettab[2][256], /* Metric table */ int amp, /* Signal amplitude */ double esn0, /* Es/N0 ratio in dB */ double bias, /* Metric bias */ int scale); /* Scale factor */ -unsigned char +GR_CORE_API unsigned char encode(unsigned char *symbols, unsigned char *data, unsigned int nbytes,unsigned char encstate); -void +GR_CORE_API void viterbi_chunks_init(struct viterbi_state* state); -void + GR_CORE_API void viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1); -unsigned char +GR_CORE_API unsigned char viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf); -- cgit