\doxysection{include/osmocom/core/conv.h File Reference}
\label{conv_8h}\index{include/osmocom/core/conv.h@{include/osmocom/core/conv.h}}


Osmocom convolutional encoder and decoder.  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+conv\+\_\+code}
\begin{DoxyCompactList}\small\item\em structure describing a given convolutional code \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+conv\+\_\+encoder}
\begin{DoxyCompactList}\small\item\em convolutional encoder state \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+conv\+\_\+decoder}
\begin{DoxyCompactList}\small\item\em convolutional decoder state \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+conv\+\_\+term} \{ \newline
\textbf{ CONV\+\_\+\+TERM\+\_\+\+FLUSH} = 0
, \newline
\textbf{ CONV\+\_\+\+TERM\+\_\+\+TRUNCATION}
, \newline
\textbf{ CONV\+\_\+\+TERM\+\_\+\+TAIL\+\_\+\+BITING}
 \}
\begin{DoxyCompactList}\small\item\em possibe termination types \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ osmo\+\_\+conv\+\_\+get\+\_\+input\+\_\+length} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, int \textbf{ len})
\item 
int \textbf{ osmo\+\_\+conv\+\_\+get\+\_\+output\+\_\+length} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, int \textbf{ len})
\item 
void \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+init} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code)
\begin{DoxyCompactList}\small\item\em Initialize a convolutional encoder. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+load\+\_\+state} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, const \textbf{ ubit\+\_\+t} $\ast$input)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+raw} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, const \textbf{ ubit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output, int \textbf{ n})
\item 
int \textbf{ osmo\+\_\+conv\+\_\+encode\+\_\+flush} (struct \textbf{ osmo\+\_\+conv\+\_\+encoder} $\ast$encoder, \textbf{ ubit\+\_\+t} $\ast$output)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+encode} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, const \textbf{ ubit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output)
\begin{DoxyCompactList}\small\item\em All-\/in-\/one convolutional encoding function. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+init} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, int \textbf{ len}, int start\+\_\+state)
\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+reset} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, int start\+\_\+state)
\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+rewind} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder)
\item 
void \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+deinit} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+scan} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, const \textbf{ sbit\+\_\+t} $\ast$input, int \textbf{ n})
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+flush} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, const \textbf{ sbit\+\_\+t} $\ast$input)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+best\+\_\+end\+\_\+state} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode\+\_\+get\+\_\+output} (struct \textbf{ osmo\+\_\+conv\+\_\+decoder} $\ast$decoder, \textbf{ ubit\+\_\+t} $\ast$output, int has\+\_\+flush, int end\+\_\+state)
\item 
int \textbf{ osmo\+\_\+conv\+\_\+decode} (const struct \textbf{ osmo\+\_\+conv\+\_\+code} $\ast$code, const \textbf{ sbit\+\_\+t} $\ast$input, \textbf{ ubit\+\_\+t} $\ast$output)
\begin{DoxyCompactList}\small\item\em All-\/in-\/one convolutional decoding function. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom convolutional encoder and decoder. 

