summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/viterbi
diff options
context:
space:
mode:
authorJosh Blum2011-07-20 18:38:36 -0700
committerJosh Blum2011-07-20 18:38:36 -0700
commitf914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5 (patch)
tree14287905b65ded74112b7baaf4ed5cd4bfe028d9 /gnuradio-core/src/lib/viterbi
parent1e1798393381fe7472a7cdb5b2c3c90d7ae753fb (diff)
downloadgnuradio-f914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5.tar.gz
gnuradio-f914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5.tar.bz2
gnuradio-f914499f4a96fe69ab9cd8dba48f8e3bfc7a54e5.zip
core: API declaration macros for core class and function symbols
Diffstat (limited to 'gnuradio-core/src/lib/viterbi')
-rw-r--r--gnuradio-core/src/lib/viterbi/Makefile.am2
-rw-r--r--gnuradio-core/src/lib/viterbi/viterbi.h14
2 files changed, 11 insertions, 5 deletions
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 <gr_core_api.h>
+
+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);