\doxysection{CCCH (PCH/\+AGCH) channel coding}
\label{group__ccch}\index{CCCH (PCH/AGCH) channel coding@{CCCH (PCH/AGCH) channel coding}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ ccch.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 CCCH (PCH/\+AGCH) channel coding header. \end{DoxyCompactList}\item 
file \textbf{ ccch.\+c}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 CCCH (PCH/\+AGCH) channel coding implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ gmr1\+\_\+ccch\+\_\+encode} (ubit\+\_\+t $\ast$bits\+\_\+e, const uint8\+\_\+t $\ast$l2)
\begin{DoxyCompactList}\small\item\em Stateless GMR-\/1 CCCH channel coder. \end{DoxyCompactList}\item 
int \textbf{ gmr1\+\_\+ccch\+\_\+decode} (uint8\+\_\+t $\ast$l2, const sbit\+\_\+t $\ast$bits\+\_\+e, int $\ast$conv\+\_\+rv)
\begin{DoxyCompactList}\small\item\em Stateless GMR-\/1 CCCH channel decoder. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__ccch_ga2773482e1dd8ea377c2191771f85db11}} 
\index{CCCH (PCH/AGCH) channel coding@{CCCH (PCH/AGCH) channel coding}!gmr1\_ccch\_decode@{gmr1\_ccch\_decode}}
\index{gmr1\_ccch\_decode@{gmr1\_ccch\_decode}!CCCH (PCH/AGCH) channel coding@{CCCH (PCH/AGCH) channel coding}}
\doxysubsubsection{gmr1\_ccch\_decode()}
{\footnotesize\ttfamily int gmr1\+\_\+ccch\+\_\+decode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{l2,  }\item[{const sbit\+\_\+t $\ast$}]{bits\+\_\+e,  }\item[{int $\ast$}]{conv\+\_\+rv }\end{DoxyParamCaption})}



Stateless GMR-\/1 CCCH channel decoder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em l2} & L2 packet data \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+e} & Data bits of a burst \\
\hline
\mbox{\texttt{ out}}  & {\em conv\+\_\+rv} & Return of the convolutional decode (can be NULL) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if CRC check pass, any other value for fail.
\end{DoxyReturn}
L2 data is 24 byte long, and bits\+\_\+e is a 432 soft bit array unmapped from a burst. 

References \textbf{ gmr1\+\_\+deinterleave\+\_\+intra()}, and \textbf{ gmr1\+\_\+scramble\+\_\+sbit()}.

\mbox{\label{group__ccch_gaf77ce531802993a1d64bd773215b5d7d}} 
\index{CCCH (PCH/AGCH) channel coding@{CCCH (PCH/AGCH) channel coding}!gmr1\_ccch\_encode@{gmr1\_ccch\_encode}}
\index{gmr1\_ccch\_encode@{gmr1\_ccch\_encode}!CCCH (PCH/AGCH) channel coding@{CCCH (PCH/AGCH) channel coding}}
\doxysubsubsection{gmr1\_ccch\_encode()}
{\footnotesize\ttfamily void gmr1\+\_\+ccch\+\_\+encode (\begin{DoxyParamCaption}\item[{ubit\+\_\+t $\ast$}]{bits\+\_\+e,  }\item[{const uint8\+\_\+t $\ast$}]{l2 }\end{DoxyParamCaption})}



Stateless GMR-\/1 CCCH channel coder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em bits\+\_\+e} & Data bits of a burst \\
\hline
\mbox{\texttt{ in}}  & {\em l2} & L2 packet data\\
\hline
\end{DoxyParams}
L2 data is 24 byte long, and bits\+\_\+e is a 432 hard bit array to be mapped on a burst. 

References \textbf{ gmr1\+\_\+crc16}.

