\doxysection{TCH9 channel coding}
\label{group__tch9}\index{TCH9 channel coding@{TCH9 channel coding}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ tch9.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 TCH9 channel coding header. \end{DoxyCompactList}\item 
file \textbf{ tch9.\+c}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 TCH9 channel coding implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ gmr1\+\_\+tch9\+\_\+mode} \{ \textbf{ GMR1\+\_\+\+TCH9\+\_\+2k4}
, \textbf{ GMR1\+\_\+\+TCH9\+\_\+4k8}
, \textbf{ GMR1\+\_\+\+TCH9\+\_\+9k6}
, \textbf{ GMR1\+\_\+\+TCH9\+\_\+\+MAX}
 \}
\begin{DoxyCompactList}\small\item\em TCH9 possible data rates. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ gmr1\+\_\+tch9\+\_\+encode} (\textbf{ ubit\+\_\+t} $\ast$bits\+\_\+e, const uint8\+\_\+t $\ast$l2, enum \textbf{ gmr1\+\_\+tch9\+\_\+mode} mode, const \textbf{ ubit\+\_\+t} $\ast$bits\+\_\+sacch, const \textbf{ ubit\+\_\+t} $\ast$bits\+\_\+status, const \textbf{ ubit\+\_\+t} $\ast$ciph, struct \textbf{ gmr1\+\_\+interleaver} $\ast$il)
\begin{DoxyCompactList}\small\item\em GMR-\/1 TCH9 channel coder. \end{DoxyCompactList}\item 
void \textbf{ gmr1\+\_\+tch9\+\_\+decode} (uint8\+\_\+t $\ast$l2, \textbf{ sbit\+\_\+t} $\ast$bits\+\_\+sacch, \textbf{ sbit\+\_\+t} $\ast$bits\+\_\+status, const \textbf{ sbit\+\_\+t} $\ast$bits\+\_\+e, enum \textbf{ gmr1\+\_\+tch9\+\_\+mode} mode, const \textbf{ ubit\+\_\+t} $\ast$ciph, struct \textbf{ gmr1\+\_\+interleaver} $\ast$il, int $\ast$conv\+\_\+rv)
\begin{DoxyCompactList}\small\item\em GMR-\/1 TCH9 channel decoder. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Enumeration Type Documentation}
\mbox{\label{group__tch9_ga744d45ed21afcffb14ab1dada9843d45}} 
\index{TCH9 channel coding@{TCH9 channel coding}!gmr1\_tch9\_mode@{gmr1\_tch9\_mode}}
\index{gmr1\_tch9\_mode@{gmr1\_tch9\_mode}!TCH9 channel coding@{TCH9 channel coding}}
\doxysubsubsection{gmr1\_tch9\_mode}
{\footnotesize\ttfamily enum \textbf{ gmr1\+\_\+tch9\+\_\+mode}}



TCH9 possible data rates. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{GMR1\_TCH9\_2k4@{GMR1\_TCH9\_2k4}!TCH9 channel coding@{TCH9 channel coding}}\index{TCH9 channel coding@{TCH9 channel coding}!GMR1\_TCH9\_2k4@{GMR1\_TCH9\_2k4}}}\mbox{\label{group__tch9_gga744d45ed21afcffb14ab1dada9843d45a762585e2143ebf69e4d98938fa20e648}} 
GMR1\+\_\+\+TCH9\+\_\+2k4&TCH9 with 2.\+4k data rate. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GMR1\_TCH9\_4k8@{GMR1\_TCH9\_4k8}!TCH9 channel coding@{TCH9 channel coding}}\index{TCH9 channel coding@{TCH9 channel coding}!GMR1\_TCH9\_4k8@{GMR1\_TCH9\_4k8}}}\mbox{\label{group__tch9_gga744d45ed21afcffb14ab1dada9843d45a31ed2ba33bf118dc2d973f7c1db264a2}} 
GMR1\+\_\+\+TCH9\+\_\+4k8&TCH9 with 4.\+8k data rate. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GMR1\_TCH9\_9k6@{GMR1\_TCH9\_9k6}!TCH9 channel coding@{TCH9 channel coding}}\index{TCH9 channel coding@{TCH9 channel coding}!GMR1\_TCH9\_9k6@{GMR1\_TCH9\_9k6}}}\mbox{\label{group__tch9_gga744d45ed21afcffb14ab1dada9843d45a47478138efd91b1307e767a674836a18}} 
GMR1\+\_\+\+TCH9\+\_\+9k6&TCH9 with 9.\+6k data rate. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{GMR1\_TCH9\_MAX@{GMR1\_TCH9\_MAX}!TCH9 channel coding@{TCH9 channel coding}}\index{TCH9 channel coding@{TCH9 channel coding}!GMR1\_TCH9\_MAX@{GMR1\_TCH9\_MAX}}}\mbox{\label{group__tch9_gga744d45ed21afcffb14ab1dada9843d45aada4ebb2664386d79975327200434f3d}} 
GMR1\+\_\+\+TCH9\+\_\+\+MAX&Dummy value. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{group__tch9_ga1dc40fc5c18b5f082de485e701db9af4}} 
\index{TCH9 channel coding@{TCH9 channel coding}!gmr1\_tch9\_decode@{gmr1\_tch9\_decode}}
\index{gmr1\_tch9\_decode@{gmr1\_tch9\_decode}!TCH9 channel coding@{TCH9 channel coding}}
\doxysubsubsection{gmr1\_tch9\_decode()}
{\footnotesize\ttfamily void gmr1\+\_\+tch9\+\_\+decode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{l2,  }\item[{\textbf{ sbit\+\_\+t} $\ast$}]{bits\+\_\+sacch,  }\item[{\textbf{ sbit\+\_\+t} $\ast$}]{bits\+\_\+status,  }\item[{const \textbf{ sbit\+\_\+t} $\ast$}]{bits\+\_\+e,  }\item[{enum \textbf{ gmr1\+\_\+tch9\+\_\+mode}}]{mode,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{ciph,  }\item[{struct \textbf{ gmr1\+\_\+interleaver} $\ast$}]{il,  }\item[{int $\ast$}]{conv\+\_\+rv }\end{DoxyParamCaption})}



GMR-\/1 TCH9 channel decoder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em l2} & L2 packet data \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+sacch} & 10 saach bits demultiplexed \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+status} & 4 status bits demultiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+e} & 662 encoded bits of one NT9 burst \\
\hline
\mbox{\texttt{ in}}  & {\em mode} & Channel encoding mode \\
\hline
\mbox{\texttt{ in}}  & {\em ciph} & 658 bits of cipher stream (can be NULL) \\
\hline
\mbox{\texttt{ in,out}}  & {\em il} & Inter-\/burst interleaver state \\
\hline
\mbox{\texttt{ out}}  & {\em conv\+\_\+rv} & Return of the convolutional decode (can be NULL)\\
\hline
\end{DoxyParams}
L2 data size depends on the mode (18 bytes for 2k4, 30 bytes for 4k8, 60 bytes for 9k6). \mbox{\label{group__tch9_ga7a8227b3a47497d84316568637b9d732}} 
\index{TCH9 channel coding@{TCH9 channel coding}!gmr1\_tch9\_encode@{gmr1\_tch9\_encode}}
\index{gmr1\_tch9\_encode@{gmr1\_tch9\_encode}!TCH9 channel coding@{TCH9 channel coding}}
\doxysubsubsection{gmr1\_tch9\_encode()}
{\footnotesize\ttfamily void gmr1\+\_\+tch9\+\_\+encode (\begin{DoxyParamCaption}\item[{\textbf{ ubit\+\_\+t} $\ast$}]{bits\+\_\+e,  }\item[{const uint8\+\_\+t $\ast$}]{l2,  }\item[{enum \textbf{ gmr1\+\_\+tch9\+\_\+mode}}]{mode,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{bits\+\_\+sacch,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{bits\+\_\+status,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{ciph,  }\item[{struct \textbf{ gmr1\+\_\+interleaver} $\ast$}]{il }\end{DoxyParamCaption})}



GMR-\/1 TCH9 channel coder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em bits\+\_\+e} & 662 encoded bits of one NT9 burst \\
\hline
\mbox{\texttt{ in}}  & {\em l2} & L2 packet data \\
\hline
\mbox{\texttt{ in}}  & {\em mode} & Channel encoding mode \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+sacch} & 10 saach bits to be multiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+status} & 4 status bits to be multiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em ciph} & 658 bits of cipher stream (can be NULL) \\
\hline
\mbox{\texttt{ in,out}}  & {\em il} & Inter-\/burst interleaver state\\
\hline
\end{DoxyParams}
L2 data size depends on the mode (18 bytes for 2k4, 30 bytes for 4k8, 60 bytes for 9k6). 