GNU Radio Manual and C++ API Reference 3.10.5.1
The Free & Open Software Radio Ecosystem
gr-fec/include/gnuradio/fec/viterbi.h
Go to the documentation of this file.
1/*
2 * Copyright 2008,2018 Free Software Foundation, Inc.
3 *
4 * This file is part of GNU Radio
5 *
6 * SPDX-License-Identifier: GPL-3.0-or-later
7 *
8 */
9
10/* The path memory for each state is 32 bits. This is slightly shorter
11 * than we'd like for K=7, especially since we chain back every 8 bits.
12 * But it fits so nicely into a 32-bit machine word...
13 */
14
15#ifndef INCLUDED_VITERBI_H
16#define INCLUDED_VITERBI_H
17
18#include <gnuradio/fec/api.h>
19
20namespace gr {
21namespace fec {
22
24 unsigned long path; /* Decoded path to this state */
25 long metric; /* Cumulative metric to this state */
26};
27
29void gen_met(int mettab[2][256], /* Metric table */
30 int amp, /* Signal amplitude */
31 double esn0, /* Es/N0 ratio in dB */
32 double bias, /* Metric bias */
33 int scale); /* Scale factor */
34
35FEC_API unsigned char encode(unsigned char* symbols,
36 unsigned char* data,
37 unsigned int nbytes,
38 unsigned char encstate);
39
41
42FEC_API void viterbi_butterfly2(unsigned char* symbols,
43 int mettab[2][256],
44 struct viterbi_state* state0,
45 struct viterbi_state* state1);
46
47FEC_API unsigned char viterbi_get_output(struct viterbi_state* state,
48 unsigned char* outbuf);
49} // namespace fec
50} // namespace gr
51
52#endif /* INCLUDED_VITERBI_H */
#define FEC_API
Definition: gr-fec/include/gnuradio/fec/api.h:18
FEC_API void viterbi_chunks_init(struct viterbi_state *state)
FEC_API unsigned char encode(unsigned char *symbols, unsigned char *data, unsigned int nbytes, unsigned char encstate)
FEC_API unsigned char viterbi_get_output(struct viterbi_state *state, unsigned char *outbuf)
FEC_API void viterbi_butterfly2(unsigned char *symbols, int mettab[2][256], struct viterbi_state *state0, struct viterbi_state *state1)
FEC_API void gen_met(int mettab[2][256], int amp, double esn0, double bias, int scale)
GNU Radio logging wrapper.
Definition: basic_block.h:29
Definition: gr-fec/include/gnuradio/fec/viterbi.h:23
long metric
Definition: gr-fec/include/gnuradio/fec/viterbi.h:25
unsigned long path
Definition: gr-fec/include/gnuradio/fec/viterbi.h:24