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


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__facch3_ga8f2a10c4a2203e69460dbf7f8345cd26}} 
\index{FACCH3 channel coding@{FACCH3 channel coding}!gmr1\_facch3\_decode@{gmr1\_facch3\_decode}}
\index{gmr1\_facch3\_decode@{gmr1\_facch3\_decode}!FACCH3 channel coding@{FACCH3 channel coding}}
\doxysubsubsection{gmr1\_facch3\_decode()}
{\footnotesize\ttfamily int gmr1\+\_\+facch3\+\_\+decode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{l2,  }\item[{ubit\+\_\+t $\ast$}]{bits\+\_\+s,  }\item[{const sbit\+\_\+t $\ast$}]{bits\+\_\+e,  }\item[{const ubit\+\_\+t $\ast$}]{ciph,  }\item[{int $\ast$}]{conv\+\_\+rv }\end{DoxyParamCaption})}



Stateless GMR-\/1 FACCH3 channel decoder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em l2} & L2 packet data \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+s} & 4$\ast$8 status bits de-\/multiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+e} & 4$\ast$104 encoded bits of 4 bursts \\
\hline
\mbox{\texttt{ in}}  & {\em ciph} & 4$\ast$96 bits of cipher stream (can be NULL) \\
\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 10 byte long. bits\+\_\+s is 32 bits, 8 bits for each of the 4 burts, organized as 4 s\+\_\+n followed by 4 s\+\_\+p, as shown in section 7.\+3.\+2.\+2. bits\+\_\+e is a 424 soft bits array unmapped from 4 bursts. ciph is the A5 cipher stream to use, 96 bits for each of the 4 burts. 

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

\mbox{\label{group__facch3_gae7fb89197eae0f343d38c3c70b2d6ada}} 
\index{FACCH3 channel coding@{FACCH3 channel coding}!gmr1\_facch3\_encode@{gmr1\_facch3\_encode}}
\index{gmr1\_facch3\_encode@{gmr1\_facch3\_encode}!FACCH3 channel coding@{FACCH3 channel coding}}
\doxysubsubsection{gmr1\_facch3\_encode()}
{\footnotesize\ttfamily void gmr1\+\_\+facch3\+\_\+encode (\begin{DoxyParamCaption}\item[{ubit\+\_\+t $\ast$}]{bits\+\_\+e,  }\item[{const uint8\+\_\+t $\ast$}]{l2,  }\item[{const ubit\+\_\+t $\ast$}]{bits\+\_\+s,  }\item[{const ubit\+\_\+t $\ast$}]{ciph }\end{DoxyParamCaption})}



Stateless GMR-\/1 FACCH3 channel coder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em bits\+\_\+e} & 4$\ast$104 encoded bits of 4 bursts \\
\hline
\mbox{\texttt{ in}}  & {\em l2} & L2 packet data \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+s} & 4$\ast$8 status bits to be multiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em ciph} & 4$\ast$96 bits of cipher stream (can be NULL)\\
\hline
\end{DoxyParams}
L2 data is 10 byte long. bits\+\_\+s is 32 bits, 8 bits for each of the 4 burts, organized as 4 s\+\_\+n followed by 4 s\+\_\+p, as shown in section 7.\+3.\+2.\+2. bits\+\_\+e is a 432 hard bit array to be mapped on 4 bursts. ciph is the A5 cipher stream to use, 96 bits for each of the 4 burts. 

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

