\doxysection{include/osmocom/isdn/v110.h File Reference}
\label{v110_8h}\index{include/osmocom/isdn/v110.h@{include/osmocom/isdn/v110.h}}
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame}
\begin{DoxyCompactList}\small\item\em a \textquotesingle{}decoded\textquotesingle{} representation of a single V.\+110 frame. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ MAX\+\_\+\+D\+\_\+\+BITS}~48
\item 
\#define \textbf{ MAX\+\_\+\+E\+\_\+\+BITS}~7
\item 
\#define \textbf{ MAX\+\_\+\+S\+\_\+\+BITS}~9
\item 
\#define \textbf{ MAX\+\_\+\+X\+\_\+\+BITS}~2
\item 
\#define \textbf{ osmo\+\_\+v110\+\_\+e1e2e3\+\_\+set}(e\+\_\+bits,  rate)~ memcpy(e\+\_\+bits, \textbf{ osmo\+\_\+v110\+\_\+e1e2e3}[rate], 3)
\item 
\#define \textbf{ osmo\+\_\+v110\+\_\+e1e2e3\+\_\+cmp}(e\+\_\+bits,  rate)~ memcmp(e\+\_\+bits, \textbf{ osmo\+\_\+v110\+\_\+e1e2e3}[rate], 3)
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate} \{ \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+600}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+1200}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+2400}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+4800}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+7200}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+9600}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+12000}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+14400}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+19200}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+24000}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+28800}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+38400}
, \newline
\textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}
 \}
\begin{DoxyCompactList}\small\item\em enum for each supported V.\+110 synchronous RA1 function (one for each user bitrate) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ osmo\+\_\+v110\+\_\+decode\+\_\+frame} (struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$fr, const \textbf{ ubit\+\_\+t} $\ast$ra\+\_\+bits, size\+\_\+t n\+\_\+bits)
\begin{DoxyCompactList}\small\item\em Decode a 80-\/bit V.\+110 frame present as 80 ubits into a struct \doxyref{osmo\+\_\+v110\+\_\+decoded\+\_\+frame}{p.}{structosmo__v110__decoded__frame}. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+encode\+\_\+frame} (\textbf{ ubit\+\_\+t} $\ast$ra\+\_\+bits, size\+\_\+t n\+\_\+bits, const struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$fr)
\begin{DoxyCompactList}\small\item\em Encode a struct \doxyref{osmo\+\_\+v110\+\_\+decoded\+\_\+frame}{p.}{structosmo__v110__decoded__frame} into an 80-\/bit V.\+110 frame as ubits. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+v110\+\_\+ubit\+\_\+dump} (FILE $\ast$outf, const \textbf{ ubit\+\_\+t} $\ast$fr, size\+\_\+t in\+\_\+len)
\begin{DoxyCompactList}\small\item\em Print a encoded V.\+110 frame in the same table-\/like structure as the spec. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+get\+\_\+user\+\_\+data\+\_\+chunk\+\_\+bitlen} (enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate} rate)
\begin{DoxyCompactList}\small\item\em obtain the size (in number of bits) of the user data bits in one V.\+110 frame for specified RA1 rate \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+get\+\_\+user\+\_\+data\+\_\+rate} (enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate} rate)
\begin{DoxyCompactList}\small\item\em obtain the user data rate (in bits/s) for specified RA1 rate \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+get\+\_\+intermediate\+\_\+rate} (enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate} rate)
\begin{DoxyCompactList}\small\item\em obtain the intermediate rate (in bits/s) for specified RA1 rate \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+user\+\_\+to\+\_\+ir} (enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate} rate, struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$fr, const \textbf{ ubit\+\_\+t} $\ast$d\+\_\+in, size\+\_\+t in\+\_\+len)
\begin{DoxyCompactList}\small\item\em perform V.\+110 RA1 function in user rate -\/$>$ intermediate rate direction. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+ir\+\_\+to\+\_\+user} (enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate} rate, \textbf{ ubit\+\_\+t} $\ast$d\+\_\+out, size\+\_\+t out\+\_\+len, const struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$fr)
\begin{DoxyCompactList}\small\item\em perform V.\+110 RA1 function in intermediate rate -\/$>$ user rate direction. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const \textbf{ ubit\+\_\+t} \textbf{ osmo\+\_\+v110\+\_\+e1e2e3} [\textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}][3]
\begin{DoxyCompactList}\small\item\em E1/\+E2/\+E3 bit values as per Table 5/\+V.\+110. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{v110_8h_ad0f42bffff6fc109fb82dbfc0a352030}} 
\index{v110.h@{v110.h}!MAX\_D\_BITS@{MAX\_D\_BITS}}
\index{MAX\_D\_BITS@{MAX\_D\_BITS}!v110.h@{v110.h}}
\doxysubsubsection{MAX\_D\_BITS}
{\footnotesize\ttfamily \#define MAX\+\_\+\+D\+\_\+\+BITS~48}

\mbox{\label{v110_8h_a4f4705a08efdb9d7fdfb7e88ce3b5694}} 
\index{v110.h@{v110.h}!MAX\_E\_BITS@{MAX\_E\_BITS}}
\index{MAX\_E\_BITS@{MAX\_E\_BITS}!v110.h@{v110.h}}
\doxysubsubsection{MAX\_E\_BITS}
{\footnotesize\ttfamily \#define MAX\+\_\+\+E\+\_\+\+BITS~7}

\mbox{\label{v110_8h_a7d90dbbc663e67e9c4778cb0c071eddc}} 
\index{v110.h@{v110.h}!MAX\_S\_BITS@{MAX\_S\_BITS}}
\index{MAX\_S\_BITS@{MAX\_S\_BITS}!v110.h@{v110.h}}
\doxysubsubsection{MAX\_S\_BITS}
{\footnotesize\ttfamily \#define MAX\+\_\+\+S\+\_\+\+BITS~9}

\mbox{\label{v110_8h_ac72a87f2edb475f54c95294ca403982a}} 
\index{v110.h@{v110.h}!MAX\_X\_BITS@{MAX\_X\_BITS}}
\index{MAX\_X\_BITS@{MAX\_X\_BITS}!v110.h@{v110.h}}
\doxysubsubsection{MAX\_X\_BITS}
{\footnotesize\ttfamily \#define MAX\+\_\+\+X\+\_\+\+BITS~2}

\mbox{\label{v110_8h_a52cbec52cc95fe2553a0ddfbcfeccd46}} 
\index{v110.h@{v110.h}!osmo\_v110\_e1e2e3\_cmp@{osmo\_v110\_e1e2e3\_cmp}}
\index{osmo\_v110\_e1e2e3\_cmp@{osmo\_v110\_e1e2e3\_cmp}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_e1e2e3\_cmp}
{\footnotesize\ttfamily \#define osmo\+\_\+v110\+\_\+e1e2e3\+\_\+cmp(\begin{DoxyParamCaption}\item[{}]{e\+\_\+bits,  }\item[{}]{rate }\end{DoxyParamCaption})~ memcmp(e\+\_\+bits, \textbf{ osmo\+\_\+v110\+\_\+e1e2e3}[rate], 3)}

\mbox{\label{v110_8h_a3774a371a2369a379a0611701c6c3d74}} 
\index{v110.h@{v110.h}!osmo\_v110\_e1e2e3\_set@{osmo\_v110\_e1e2e3\_set}}
\index{osmo\_v110\_e1e2e3\_set@{osmo\_v110\_e1e2e3\_set}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_e1e2e3\_set}
{\footnotesize\ttfamily \#define osmo\+\_\+v110\+\_\+e1e2e3\+\_\+set(\begin{DoxyParamCaption}\item[{}]{e\+\_\+bits,  }\item[{}]{rate }\end{DoxyParamCaption})~ memcpy(e\+\_\+bits, \textbf{ osmo\+\_\+v110\+\_\+e1e2e3}[rate], 3)}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3d}} 
\index{v110.h@{v110.h}!osmo\_v100\_sync\_ra1\_rate@{osmo\_v100\_sync\_ra1\_rate}}
\index{osmo\_v100\_sync\_ra1\_rate@{osmo\_v100\_sync\_ra1\_rate}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v100\_sync\_ra1\_rate}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate}}



enum for each supported V.\+110 synchronous RA1 function (one for each user bitrate) 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_600@{OSMO\_V110\_SYNC\_RA1\_600}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_600@{OSMO\_V110\_SYNC\_RA1\_600}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3daaf475ed0fd2339f05cc5ec23613d8226}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+600&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_1200@{OSMO\_V110\_SYNC\_RA1\_1200}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_1200@{OSMO\_V110\_SYNC\_RA1\_1200}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da3e3c3de31d60df0603b5ae0d1c2419e0}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+1200&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_2400@{OSMO\_V110\_SYNC\_RA1\_2400}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_2400@{OSMO\_V110\_SYNC\_RA1\_2400}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da483e30d2aa59d29323e611f00f3fd00e}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+2400&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_4800@{OSMO\_V110\_SYNC\_RA1\_4800}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_4800@{OSMO\_V110\_SYNC\_RA1\_4800}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da479fad3c612ac57cd95fbe1fbc447db5}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+4800&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_7200@{OSMO\_V110\_SYNC\_RA1\_7200}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_7200@{OSMO\_V110\_SYNC\_RA1\_7200}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da8673ebf1d919fb466a5dfc9dc3e9ba9f}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+7200&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_9600@{OSMO\_V110\_SYNC\_RA1\_9600}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_9600@{OSMO\_V110\_SYNC\_RA1\_9600}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da0bef69bd3b31f1a88252261a911ef073}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+9600&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_12000@{OSMO\_V110\_SYNC\_RA1\_12000}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_12000@{OSMO\_V110\_SYNC\_RA1\_12000}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da59e0b7fcf71205562e46d32d521506e7}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+12000&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_14400@{OSMO\_V110\_SYNC\_RA1\_14400}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_14400@{OSMO\_V110\_SYNC\_RA1\_14400}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da0a51b8ac92f598d74d8c877b3cae2f9c}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+14400&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_19200@{OSMO\_V110\_SYNC\_RA1\_19200}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_19200@{OSMO\_V110\_SYNC\_RA1\_19200}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3dab05b4d2913c77453403bd5b537430778}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+19200&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_24000@{OSMO\_V110\_SYNC\_RA1\_24000}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_24000@{OSMO\_V110\_SYNC\_RA1\_24000}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3daeb1a983be02c21186bbc2b4f7c91d63d}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+24000&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_28800@{OSMO\_V110\_SYNC\_RA1\_28800}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_28800@{OSMO\_V110\_SYNC\_RA1\_28800}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da340c118b45df4c8bb650c71eae2b66fd}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+28800&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_SYNC\_RA1\_38400@{OSMO\_V110\_SYNC\_RA1\_38400}!v110.h@{v110.h}}\index{v110.h@{v110.h}!OSMO\_V110\_SYNC\_RA1\_38400@{OSMO\_V110\_SYNC\_RA1\_38400}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3daa990633b49caec8949a997573b7b3a49}} 
OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1\+\_\+38400&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{\_NUM\_OSMO\_V110\_SYNC\_RA1@{\_NUM\_OSMO\_V110\_SYNC\_RA1}!v110.h@{v110.h}}\index{v110.h@{v110.h}!\_NUM\_OSMO\_V110\_SYNC\_RA1@{\_NUM\_OSMO\_V110\_SYNC\_RA1}}}\mbox{\label{v110_8h_aa0f6ae98032ca94d267c24bce9a1eb3da716d9f0ea5bb03c224271c271eaa1ce3}} 
\+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{v110_8h_acc6f2e28e2a12d015e2dc1abd9161323}} 
\index{v110.h@{v110.h}!osmo\_v110\_decode\_frame@{osmo\_v110\_decode\_frame}}
\index{osmo\_v110\_decode\_frame@{osmo\_v110\_decode\_frame}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_decode\_frame()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+decode\+\_\+frame (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$}]{fr,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{ra\+\_\+bits,  }\item[{size\+\_\+t}]{n\+\_\+bits }\end{DoxyParamCaption})}



Decode a 80-\/bit V.\+110 frame present as 80 ubits into a struct \doxyref{osmo\+\_\+v110\+\_\+decoded\+\_\+frame}{p.}{structosmo__v110__decoded__frame}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em fr} & caller-\/allocated output data structure, filled by this function \\
\hline
\mbox{\texttt{ in}}  & {\em ra\+\_\+bits} & One V.\+110 frame as 80 unpacked bits. \\
\hline
\mbox{\texttt{ in}}  & {\em n\+\_\+bits} & number of unpacked bits provided in ra\+\_\+bits \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::d\+\_\+bits}, \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::e\+\_\+bits}, \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::s\+\_\+bits}, and \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::x\+\_\+bits}.

\mbox{\label{v110_8h_af3cbd1398cd8f1548c12f88be13368fe}} 
\index{v110.h@{v110.h}!osmo\_v110\_encode\_frame@{osmo\_v110\_encode\_frame}}
\index{osmo\_v110\_encode\_frame@{osmo\_v110\_encode\_frame}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_encode\_frame()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+encode\+\_\+frame (\begin{DoxyParamCaption}\item[{\textbf{ ubit\+\_\+t} $\ast$}]{ra\+\_\+bits,  }\item[{size\+\_\+t}]{n\+\_\+bits,  }\item[{const struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$}]{fr }\end{DoxyParamCaption})}



Encode a struct \doxyref{osmo\+\_\+v110\+\_\+decoded\+\_\+frame}{p.}{structosmo__v110__decoded__frame} into an 80-\/bit V.\+110 frame as ubits. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em ra\+\_\+bits} & caller-\/provided output buffer at leat 80 ubits large \\
\hline
\mbox{\texttt{ in}}  & {\em n\+\_\+bits} & length of ra\+\_\+bits. Must be at least 80. \\
\hline
\mbox{\texttt{ in}}  & {\em input} & data structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bits written to ra\+\_\+bits 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::d\+\_\+bits}, \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::e\+\_\+bits}, \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::s\+\_\+bits}, and \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame\+::x\+\_\+bits}.

\mbox{\label{v110_8h_a02c02ce33eadc13d32721deef44cee7b}} 
\index{v110.h@{v110.h}!osmo\_v110\_sync\_ra1\_get\_intermediate\_rate@{osmo\_v110\_sync\_ra1\_get\_intermediate\_rate}}
\index{osmo\_v110\_sync\_ra1\_get\_intermediate\_rate@{osmo\_v110\_sync\_ra1\_get\_intermediate\_rate}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_sync\_ra1\_get\_intermediate\_rate()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+get\+\_\+intermediate\+\_\+rate (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate}}]{rate }\end{DoxyParamCaption})}



obtain the intermediate rate (in bits/s) for specified RA1 rate 



References \textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}, \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+::intermediate\+\_\+rate}, and \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+def}.

\mbox{\label{v110_8h_ac4e7ce7e4a6b6b3aa224cfeecf62ac3f}} 
\index{v110.h@{v110.h}!osmo\_v110\_sync\_ra1\_get\_user\_data\_chunk\_bitlen@{osmo\_v110\_sync\_ra1\_get\_user\_data\_chunk\_bitlen}}
\index{osmo\_v110\_sync\_ra1\_get\_user\_data\_chunk\_bitlen@{osmo\_v110\_sync\_ra1\_get\_user\_data\_chunk\_bitlen}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_sync\_ra1\_get\_user\_data\_chunk\_bitlen()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+get\+\_\+user\+\_\+data\+\_\+chunk\+\_\+bitlen (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate}}]{rate }\end{DoxyParamCaption})}



obtain the size (in number of bits) of the user data bits in one V.\+110 frame for specified RA1 rate 



References \textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}, \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+def}, and \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+::user\+\_\+data\+\_\+chunk\+\_\+bits}.



Referenced by \textbf{ v110\+\_\+ta\+\_\+build\+\_\+frame()}, and \textbf{ v110\+\_\+ta\+\_\+handle\+\_\+frame()}.

\mbox{\label{v110_8h_af0943d3c316d70dcd9061a0f3fc0540a}} 
\index{v110.h@{v110.h}!osmo\_v110\_sync\_ra1\_get\_user\_data\_rate@{osmo\_v110\_sync\_ra1\_get\_user\_data\_rate}}
\index{osmo\_v110\_sync\_ra1\_get\_user\_data\_rate@{osmo\_v110\_sync\_ra1\_get\_user\_data\_rate}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_sync\_ra1\_get\_user\_data\_rate()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+get\+\_\+user\+\_\+data\+\_\+rate (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate}}]{rate }\end{DoxyParamCaption})}



obtain the user data rate (in bits/s) for specified RA1 rate 



References \textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}, \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+::data\+\_\+rate}, and \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+def}.

\mbox{\label{v110_8h_ae7646c097b11e07bd7f8892ecf7e5883}} 
\index{v110.h@{v110.h}!osmo\_v110\_sync\_ra1\_ir\_to\_user@{osmo\_v110\_sync\_ra1\_ir\_to\_user}}
\index{osmo\_v110\_sync\_ra1\_ir\_to\_user@{osmo\_v110\_sync\_ra1\_ir\_to\_user}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_sync\_ra1\_ir\_to\_user()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+ir\+\_\+to\+\_\+user (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate}}]{rate,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{d\+\_\+out,  }\item[{size\+\_\+t}]{out\+\_\+len,  }\item[{const struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$}]{fr }\end{DoxyParamCaption})}



perform V.\+110 RA1 function in intermediate rate -\/$>$ user rate direction. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rate} & specification of the user bitrate \\
\hline
\mbox{\texttt{ out}}  & {\em d\+\_\+out} & caller-\/allocated output user data (unpacked bits) \\
\hline
\mbox{\texttt{ out}}  & {\em out\+\_\+len} & length of d\+\_\+out output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em fr} & [decoded] V.\+110 frame used as input \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of unpacked bits written to d\+\_\+out on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}, \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+::adapt\+\_\+ir\+\_\+to\+\_\+user}, and \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+def}.



Referenced by \textbf{ v110\+\_\+ta\+\_\+handle\+\_\+frame()}.

\mbox{\label{v110_8h_a8919fd7d95ea3d611c1ccbdf50d4b6b1}} 
\index{v110.h@{v110.h}!osmo\_v110\_sync\_ra1\_user\_to\_ir@{osmo\_v110\_sync\_ra1\_user\_to\_ir}}
\index{osmo\_v110\_sync\_ra1\_user\_to\_ir@{osmo\_v110\_sync\_ra1\_user\_to\_ir}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_sync\_ra1\_user\_to\_ir()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+user\+\_\+to\+\_\+ir (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v100\+\_\+sync\+\_\+ra1\+\_\+rate}}]{rate,  }\item[{struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$}]{fr,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{d\+\_\+in,  }\item[{size\+\_\+t}]{in\+\_\+len }\end{DoxyParamCaption})}



perform V.\+110 RA1 function in user rate -\/$>$ intermediate rate direction. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rate} & specification of the user bitrate \\
\hline
\mbox{\texttt{ out}}  & {\em fr} & caller-\/allocated output buffer for the [decoded] V.\+110 frame generated \\
\hline
\mbox{\texttt{ in}}  & {\em d\+\_\+in} & input user data (unpacked bits) \\
\hline
\mbox{\texttt{ in}}  & {\em in\+\_\+len} & length of user input data (in number of bits) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative in case of error 
\end{DoxyReturn}


References \textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}, \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+::adapt\+\_\+user\+\_\+to\+\_\+ir}, and \textbf{ osmo\+\_\+v110\+\_\+sync\+\_\+ra1\+\_\+def}.



Referenced by \textbf{ v110\+\_\+ta\+\_\+build\+\_\+frame()}.

\mbox{\label{v110_8h_a65f773ea9a57fde1f2e4367b14d58dda}} 
\index{v110.h@{v110.h}!osmo\_v110\_ubit\_dump@{osmo\_v110\_ubit\_dump}}
\index{osmo\_v110\_ubit\_dump@{osmo\_v110\_ubit\_dump}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_ubit\_dump()}
{\footnotesize\ttfamily void osmo\+\_\+v110\+\_\+ubit\+\_\+dump (\begin{DoxyParamCaption}\item[{FILE $\ast$}]{outf,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{fr,  }\item[{size\+\_\+t}]{in\+\_\+len }\end{DoxyParamCaption})}



Print a encoded V.\+110 frame in the same table-\/like structure as the spec. 


\begin{DoxyParams}[1]{Parameters}
 & {\em outf} & output FILE stream to which to dump \\
\hline
\mbox{\texttt{ in}}  & {\em fr} & unpacked bits to dump \\
\hline
\mbox{\texttt{ in}}  & {\em in\+\_\+len} & length of unpacked bits available at fr. \\
\hline
\end{DoxyParams}


\doxysubsection{Variable Documentation}
\mbox{\label{v110_8h_a7d9a7b0b64b999c831d36a657b4aca46}} 
\index{v110.h@{v110.h}!osmo\_v110\_e1e2e3@{osmo\_v110\_e1e2e3}}
\index{osmo\_v110\_e1e2e3@{osmo\_v110\_e1e2e3}!v110.h@{v110.h}}
\doxysubsubsection{osmo\_v110\_e1e2e3}
{\footnotesize\ttfamily const \textbf{ ubit\+\_\+t} osmo\+\_\+v110\+\_\+e1e2e3[\textbf{ \+\_\+\+NUM\+\_\+\+OSMO\+\_\+\+V110\+\_\+\+SYNC\+\_\+\+RA1}][3]\hspace{0.3cm}{\ttfamily [extern]}}



E1/\+E2/\+E3 bit values as per Table 5/\+V.\+110. 

