\doxysection{GSM 05.02 / 3GPP TS 45.002}
\label{group__gsm0502}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ gsm0502.\+h}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DURATION\+\_\+nS}~4615384  /$\ast$ in 1e−9 seconds (approx) $\ast$/
\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DURATION\+\_\+uS}~4615  /$\ast$ in 1e-\/6 seconds (approx) $\ast$/
\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+SUPERFRAME}~(26 $\ast$ 51)
\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME}~(2048 $\ast$ \textbf{ GSM\+\_\+\+TDMA\+\_\+\+SUPERFRAME})
\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUM}(a,  b)~ (((a) + (b)) \% \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME})
\begin{DoxyCompactList}\small\item\em Return the sum of two specified TDMA frame numbers (summation) \end{DoxyCompactList}\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}(a,  b)~ (((a) + \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME} -\/ (b)) \% \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME})
\begin{DoxyCompactList}\small\item\em Return the difference of two specified TDMA frame numbers (subtraction) \end{DoxyCompactList}\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DIFF}(a,  b)~ \textbf{ OSMO\+\_\+\+MIN}(\textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}(a, b), \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}(b, a))
\begin{DoxyCompactList}\small\item\em Return the {\itshape minimum} difference of two specified TDMA frame numbers (distance) \end{DoxyCompactList}\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+INC}(fn)~ ((fn) = \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUM}((fn), 1))
\begin{DoxyCompactList}\small\item\em Increment the given TDMA frame number by 1 and return the result (like ++fn) \end{DoxyCompactList}\item 
\#define \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DEC}(fn)~ ((fn) = \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}((fn), 1))
\begin{DoxyCompactList}\small\item\em Decrement the given TDMA frame number by 1 and return the result (like --fn) \end{DoxyCompactList}\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}~3
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+PAYLOAD}~(2 $\ast$ 58)
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TRAIN\+\_\+\+SEQ}~26
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}~148  /$\ast$ without guard period $\ast$/
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+TAIL}~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL} $\ast$ 3)
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+PAYLOAD}~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+PAYLOAD} $\ast$ 3)
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+TRAIN\+\_\+\+SEQ}~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TRAIN\+\_\+\+SEQ} $\ast$ 3)
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+BURST}~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST} $\ast$ 3)
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+TAIL}~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+PAYLOAD}~(2 $\ast$ 39)
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+ETRAIN\+\_\+\+SEQ}~64
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+BURST}~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+DB\+\_\+\+GMSK\+\_\+\+TAIL}~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+DB\+\_\+\+GMSK\+\_\+\+MIXED}~142
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+DB\+\_\+\+GMSK\+\_\+\+BURST}~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+ETAIL}~8
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+SYNCH\+\_\+\+SEQ}~41
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+PAYLOAD}~36
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+TAIL}~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}
\item 
\#define \textbf{ GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+BURST}~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ gsm0502\+\_\+fn\+\_\+remap\+\_\+channel} \{ \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+TCH\+\_\+F}
, \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+TCH\+\_\+\+H0}
, \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+TCH\+\_\+\+H1}
, \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+FACCH\+\_\+F}
, \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+FACCH\+\_\+\+H0}
, \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+FACCH\+\_\+\+H1}
, \newline
\textbf{ FN\+\_\+\+REMAP\+\_\+\+MAX}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static int \textbf{ gsm0502\+\_\+fncmp} (uint32\+\_\+t fn1, uint32\+\_\+t fn2)
\begin{DoxyCompactList}\small\item\em Compare the given TDMA FNs, taking the wrapping into account. \end{DoxyCompactList}\item 
static unsigned int \textbf{ gsm0502\+\_\+get\+\_\+n\+\_\+pag\+\_\+blocks} (const struct \textbf{ gsm48\+\_\+control\+\_\+channel\+\_\+descr} $\ast$\textbf{ chan\+\_\+desc})
\item 
static unsigned int \textbf{ gsm0502\+\_\+get\+\_\+ccch\+\_\+group} (uint64\+\_\+t imsi, unsigned int bs\+\_\+cc\+\_\+chans, unsigned int n\+\_\+pag\+\_\+blocks)
\item 
static unsigned int \textbf{ gsm0502\+\_\+get\+\_\+paging\+\_\+group} (uint64\+\_\+t imsi, unsigned int bs\+\_\+cc\+\_\+chans, int n\+\_\+pag\+\_\+blocks)
\item 
unsigned int \textbf{ gsm0502\+\_\+calc\+\_\+paging\+\_\+group} (const struct \textbf{ gsm48\+\_\+control\+\_\+channel\+\_\+descr} $\ast$\textbf{ chan\+\_\+desc}, uint64\+\_\+t imsi)
\item 
uint32\+\_\+t \textbf{ gsm0502\+\_\+fn\+\_\+remap} (uint32\+\_\+t fn, enum \textbf{ gsm0502\+\_\+fn\+\_\+remap\+\_\+channel} channel)
\begin{DoxyCompactList}\small\item\em Calculate the frame number of the beginning of a block. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ gsm0502\+\_\+hop\+\_\+seq\+\_\+gen} (const struct \textbf{ gsm\+\_\+time} $\ast$t, uint8\+\_\+t hsn, uint8\+\_\+t maio, size\+\_\+t \textbf{ n}, const uint16\+\_\+t $\ast$ma)
\begin{DoxyCompactList}\small\item\em Hopping sequence generation as per 3GPP TS 45.\+002, section 6.\+2.\+3. \end{DoxyCompactList}\item 
int \textbf{ gsm0502\+\_\+fn2ccch\+\_\+block} (uint32\+\_\+t fn)
\begin{DoxyCompactList}\small\item\em Calculate CCCH block number from the given TDMA frame number. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{group__gsm0502_ga112112c2ae32f11ae8d9b11995853458}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_AB\_GMSK\_BURST@{GSM\_NBITS\_AB\_GMSK\_BURST}}
\index{GSM\_NBITS\_AB\_GMSK\_BURST@{GSM\_NBITS\_AB\_GMSK\_BURST}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_AB\_GMSK\_BURST}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+BURST~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}}

\mbox{\label{group__gsm0502_ga58aaca84096125cff8dc05da430dee83}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_AB\_GMSK\_ETAIL@{GSM\_NBITS\_AB\_GMSK\_ETAIL}}
\index{GSM\_NBITS\_AB\_GMSK\_ETAIL@{GSM\_NBITS\_AB\_GMSK\_ETAIL}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_AB\_GMSK\_ETAIL}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+ETAIL~8}

\mbox{\label{group__gsm0502_ga2ddee3d8f946cfaba6b55c2e2063efc6}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_AB\_GMSK\_PAYLOAD@{GSM\_NBITS\_AB\_GMSK\_PAYLOAD}}
\index{GSM\_NBITS\_AB\_GMSK\_PAYLOAD@{GSM\_NBITS\_AB\_GMSK\_PAYLOAD}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_AB\_GMSK\_PAYLOAD}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+PAYLOAD~36}

\mbox{\label{group__gsm0502_ga78f2b809492c339e8a62ceb5b974af8b}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_AB\_GMSK\_SYNCH\_SEQ@{GSM\_NBITS\_AB\_GMSK\_SYNCH\_SEQ}}
\index{GSM\_NBITS\_AB\_GMSK\_SYNCH\_SEQ@{GSM\_NBITS\_AB\_GMSK\_SYNCH\_SEQ}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_AB\_GMSK\_SYNCH\_SEQ}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+SYNCH\+\_\+\+SEQ~41}

\mbox{\label{group__gsm0502_ga798a90440092e667eb76423a468113b7}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_AB\_GMSK\_TAIL@{GSM\_NBITS\_AB\_GMSK\_TAIL}}
\index{GSM\_NBITS\_AB\_GMSK\_TAIL@{GSM\_NBITS\_AB\_GMSK\_TAIL}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_AB\_GMSK\_TAIL}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+AB\+\_\+\+GMSK\+\_\+\+TAIL~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}}

\mbox{\label{group__gsm0502_gaab147cae376b7641513dc3f10e531080}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_DB\_GMSK\_BURST@{GSM\_NBITS\_DB\_GMSK\_BURST}}
\index{GSM\_NBITS\_DB\_GMSK\_BURST@{GSM\_NBITS\_DB\_GMSK\_BURST}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_DB\_GMSK\_BURST}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+DB\+\_\+\+GMSK\+\_\+\+BURST~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}}

\mbox{\label{group__gsm0502_ga3114c037b8fcdd6b387621d2a06b2b8c}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_DB\_GMSK\_MIXED@{GSM\_NBITS\_DB\_GMSK\_MIXED}}
\index{GSM\_NBITS\_DB\_GMSK\_MIXED@{GSM\_NBITS\_DB\_GMSK\_MIXED}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_DB\_GMSK\_MIXED}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+DB\+\_\+\+GMSK\+\_\+\+MIXED~142}

\mbox{\label{group__gsm0502_ga32e321fe89bdb19abdc816bb08199c1c}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_DB\_GMSK\_TAIL@{GSM\_NBITS\_DB\_GMSK\_TAIL}}
\index{GSM\_NBITS\_DB\_GMSK\_TAIL@{GSM\_NBITS\_DB\_GMSK\_TAIL}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_DB\_GMSK\_TAIL}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+DB\+\_\+\+GMSK\+\_\+\+TAIL~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}}

\mbox{\label{group__gsm0502_gaf17e2c94b8ad06192a728b8682ff08de}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_8PSK\_BURST@{GSM\_NBITS\_NB\_8PSK\_BURST}}
\index{GSM\_NBITS\_NB\_8PSK\_BURST@{GSM\_NBITS\_NB\_8PSK\_BURST}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_8PSK\_BURST}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+BURST~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST} $\ast$ 3)}

\mbox{\label{group__gsm0502_ga2db8d8ea04cec8d7d50895ebef13c2c2}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_8PSK\_PAYLOAD@{GSM\_NBITS\_NB\_8PSK\_PAYLOAD}}
\index{GSM\_NBITS\_NB\_8PSK\_PAYLOAD@{GSM\_NBITS\_NB\_8PSK\_PAYLOAD}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_8PSK\_PAYLOAD}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+PAYLOAD~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+PAYLOAD} $\ast$ 3)}

\mbox{\label{group__gsm0502_ga6a29a30b9e1677438be2a87b55748dd8}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_8PSK\_TAIL@{GSM\_NBITS\_NB\_8PSK\_TAIL}}
\index{GSM\_NBITS\_NB\_8PSK\_TAIL@{GSM\_NBITS\_NB\_8PSK\_TAIL}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_8PSK\_TAIL}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+TAIL~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL} $\ast$ 3)}

\mbox{\label{group__gsm0502_ga0bdea9c9bc1432e013bbeb601373f4c6}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_8PSK\_TRAIN\_SEQ@{GSM\_NBITS\_NB\_8PSK\_TRAIN\_SEQ}}
\index{GSM\_NBITS\_NB\_8PSK\_TRAIN\_SEQ@{GSM\_NBITS\_NB\_8PSK\_TRAIN\_SEQ}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_8PSK\_TRAIN\_SEQ}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+8\+PSK\+\_\+\+TRAIN\+\_\+\+SEQ~(\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TRAIN\+\_\+\+SEQ} $\ast$ 3)}

\mbox{\label{group__gsm0502_ga809d0de3f8d5e3a95f3eefda54ebd15d}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_GMSK\_BURST@{GSM\_NBITS\_NB\_GMSK\_BURST}}
\index{GSM\_NBITS\_NB\_GMSK\_BURST@{GSM\_NBITS\_NB\_GMSK\_BURST}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_GMSK\_BURST}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST~148  /$\ast$ without guard period $\ast$/}

\mbox{\label{group__gsm0502_ga058d57f5dd12ae3168889b1a30021b81}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_GMSK\_PAYLOAD@{GSM\_NBITS\_NB\_GMSK\_PAYLOAD}}
\index{GSM\_NBITS\_NB\_GMSK\_PAYLOAD@{GSM\_NBITS\_NB\_GMSK\_PAYLOAD}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_GMSK\_PAYLOAD}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+PAYLOAD~(2 $\ast$ 58)}

\mbox{\label{group__gsm0502_ga2d6612aa4bb398438704383d114ccdf1}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_GMSK\_TAIL@{GSM\_NBITS\_NB\_GMSK\_TAIL}}
\index{GSM\_NBITS\_NB\_GMSK\_TAIL@{GSM\_NBITS\_NB\_GMSK\_TAIL}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_GMSK\_TAIL}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL~3}

\mbox{\label{group__gsm0502_ga23fb79a08b82c7e627fcfb346f884350}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_NB\_GMSK\_TRAIN\_SEQ@{GSM\_NBITS\_NB\_GMSK\_TRAIN\_SEQ}}
\index{GSM\_NBITS\_NB\_GMSK\_TRAIN\_SEQ@{GSM\_NBITS\_NB\_GMSK\_TRAIN\_SEQ}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_NB\_GMSK\_TRAIN\_SEQ}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TRAIN\+\_\+\+SEQ~26}

\mbox{\label{group__gsm0502_gae68d79311177e9a2df173a7efc4cbf4f}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_SB\_GMSK\_BURST@{GSM\_NBITS\_SB\_GMSK\_BURST}}
\index{GSM\_NBITS\_SB\_GMSK\_BURST@{GSM\_NBITS\_SB\_GMSK\_BURST}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_SB\_GMSK\_BURST}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+BURST~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+BURST}}

\mbox{\label{group__gsm0502_gaf377d5103f93787057be934bec2111af}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_SB\_GMSK\_ETRAIN\_SEQ@{GSM\_NBITS\_SB\_GMSK\_ETRAIN\_SEQ}}
\index{GSM\_NBITS\_SB\_GMSK\_ETRAIN\_SEQ@{GSM\_NBITS\_SB\_GMSK\_ETRAIN\_SEQ}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_SB\_GMSK\_ETRAIN\_SEQ}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+ETRAIN\+\_\+\+SEQ~64}

\mbox{\label{group__gsm0502_ga33468470788268be1590962c86c9bae2}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_SB\_GMSK\_PAYLOAD@{GSM\_NBITS\_SB\_GMSK\_PAYLOAD}}
\index{GSM\_NBITS\_SB\_GMSK\_PAYLOAD@{GSM\_NBITS\_SB\_GMSK\_PAYLOAD}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_SB\_GMSK\_PAYLOAD}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+PAYLOAD~(2 $\ast$ 39)}

\mbox{\label{group__gsm0502_ga6baa61e87326dae666a0237c1de8f429}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_NBITS\_SB\_GMSK\_TAIL@{GSM\_NBITS\_SB\_GMSK\_TAIL}}
\index{GSM\_NBITS\_SB\_GMSK\_TAIL@{GSM\_NBITS\_SB\_GMSK\_TAIL}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_NBITS\_SB\_GMSK\_TAIL}
{\footnotesize\ttfamily \#define GSM\+\_\+\+NBITS\+\_\+\+SB\+\_\+\+GMSK\+\_\+\+TAIL~\textbf{ GSM\+\_\+\+NBITS\+\_\+\+NB\+\_\+\+GMSK\+\_\+\+TAIL}}

\mbox{\label{group__gsm0502_gacecae8d917ab65897e3ce56eb9eaa081}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_DEC@{GSM\_TDMA\_FN\_DEC}}
\index{GSM\_TDMA\_FN\_DEC@{GSM\_TDMA\_FN\_DEC}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_DEC}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DEC(\begin{DoxyParamCaption}\item[{}]{fn }\end{DoxyParamCaption})~ ((fn) = \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}((fn), 1))}



Decrement the given TDMA frame number by 1 and return the result (like --fn) 

\mbox{\label{group__gsm0502_gae547fa7a74c56e2419e67d17fbec9d33}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_DIFF@{GSM\_TDMA\_FN\_DIFF}}
\index{GSM\_TDMA\_FN\_DIFF@{GSM\_TDMA\_FN\_DIFF}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_DIFF}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DIFF(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b }\end{DoxyParamCaption})~ \textbf{ OSMO\+\_\+\+MIN}(\textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}(a, b), \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}(b, a))}



Return the {\itshape minimum} difference of two specified TDMA frame numbers (distance) 

\mbox{\label{group__gsm0502_gac887542d15833e0c32b7c32c0fbf1ba4}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_DURATION\_nS@{GSM\_TDMA\_FN\_DURATION\_nS}}
\index{GSM\_TDMA\_FN\_DURATION\_nS@{GSM\_TDMA\_FN\_DURATION\_nS}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_DURATION\_nS}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DURATION\+\_\+nS~4615384  /$\ast$ in 1e−9 seconds (approx) $\ast$/}

\mbox{\label{group__gsm0502_gab5e2c3e9f3b7b9b1a83caa886300442b}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_DURATION\_uS@{GSM\_TDMA\_FN\_DURATION\_uS}}
\index{GSM\_TDMA\_FN\_DURATION\_uS@{GSM\_TDMA\_FN\_DURATION\_uS}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_DURATION\_uS}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DURATION\+\_\+uS~4615  /$\ast$ in 1e-\/6 seconds (approx) $\ast$/}

\mbox{\label{group__gsm0502_ga777e5c9d1dac944756f4ac0bfe2fa788}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_INC@{GSM\_TDMA\_FN\_INC}}
\index{GSM\_TDMA\_FN\_INC@{GSM\_TDMA\_FN\_INC}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_INC}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+INC(\begin{DoxyParamCaption}\item[{}]{fn }\end{DoxyParamCaption})~ ((fn) = \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUM}((fn), 1))}



Increment the given TDMA frame number by 1 and return the result (like ++fn) 

\mbox{\label{group__gsm0502_gaeddaa54dbb6da8bad80f3216f97ebff6}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_SUB@{GSM\_TDMA\_FN\_SUB}}
\index{GSM\_TDMA\_FN\_SUB@{GSM\_TDMA\_FN\_SUB}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_SUB}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b }\end{DoxyParamCaption})~ (((a) + \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME} -\/ (b)) \% \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME})}



Return the difference of two specified TDMA frame numbers (subtraction) 

\mbox{\label{group__gsm0502_ga6bd355ae619d158d7ba5b94220451c88}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_FN\_SUM@{GSM\_TDMA\_FN\_SUM}}
\index{GSM\_TDMA\_FN\_SUM@{GSM\_TDMA\_FN\_SUM}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_FN\_SUM}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUM(\begin{DoxyParamCaption}\item[{}]{a,  }\item[{}]{b }\end{DoxyParamCaption})~ (((a) + (b)) \% \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME})}



Return the sum of two specified TDMA frame numbers (summation) 

\mbox{\label{group__gsm0502_ga4bb537489c920031aa68b900fc6c22b6}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_HYPERFRAME@{GSM\_TDMA\_HYPERFRAME}}
\index{GSM\_TDMA\_HYPERFRAME@{GSM\_TDMA\_HYPERFRAME}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_HYPERFRAME}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME~(2048 $\ast$ \textbf{ GSM\+\_\+\+TDMA\+\_\+\+SUPERFRAME})}

\mbox{\label{group__gsm0502_ga7620502184bdcf66991b48d35d7caa5b}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!GSM\_TDMA\_SUPERFRAME@{GSM\_TDMA\_SUPERFRAME}}
\index{GSM\_TDMA\_SUPERFRAME@{GSM\_TDMA\_SUPERFRAME}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{GSM\_TDMA\_SUPERFRAME}
{\footnotesize\ttfamily \#define GSM\+\_\+\+TDMA\+\_\+\+SUPERFRAME~(26 $\ast$ 51)}



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{group__gsm0502_gafc789b32e825ea46f9f64b26a27d69d0}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_fn\_remap\_channel@{gsm0502\_fn\_remap\_channel}}
\index{gsm0502\_fn\_remap\_channel@{gsm0502\_fn\_remap\_channel}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_fn\_remap\_channel}
{\footnotesize\ttfamily enum \textbf{ gsm0502\+\_\+fn\+\_\+remap\+\_\+channel}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_TCH\_F@{FN\_REMAP\_TCH\_F}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_TCH\_F@{FN\_REMAP\_TCH\_F}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0af44d065cadcf8019451d4019f7e5b5fa}} 
FN\+\_\+\+REMAP\+\_\+\+TCH\+\_\+F&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_TCH\_H0@{FN\_REMAP\_TCH\_H0}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_TCH\_H0@{FN\_REMAP\_TCH\_H0}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0a34678c8c9b52a86d81a24fa91ab9f45e}} 
FN\+\_\+\+REMAP\+\_\+\+TCH\+\_\+\+H0&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_TCH\_H1@{FN\_REMAP\_TCH\_H1}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_TCH\_H1@{FN\_REMAP\_TCH\_H1}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0a62ee275e8cda45534c6a7f1489971f0b}} 
FN\+\_\+\+REMAP\+\_\+\+TCH\+\_\+\+H1&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_FACCH\_F@{FN\_REMAP\_FACCH\_F}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_FACCH\_F@{FN\_REMAP\_FACCH\_F}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0a8d35c98a8c8628c3e726b0c647602a85}} 
FN\+\_\+\+REMAP\+\_\+\+FACCH\+\_\+F&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_FACCH\_H0@{FN\_REMAP\_FACCH\_H0}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_FACCH\_H0@{FN\_REMAP\_FACCH\_H0}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0afad0049a2d8eb2275ec4de82b400400a}} 
FN\+\_\+\+REMAP\+\_\+\+FACCH\+\_\+\+H0&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_FACCH\_H1@{FN\_REMAP\_FACCH\_H1}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_FACCH\_H1@{FN\_REMAP\_FACCH\_H1}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0ab1d4b8cd2494ed0c99eebf58be43fb63}} 
FN\+\_\+\+REMAP\+\_\+\+FACCH\+\_\+\+H1&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{FN\_REMAP\_MAX@{FN\_REMAP\_MAX}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!FN\_REMAP\_MAX@{FN\_REMAP\_MAX}}}\mbox{\label{group__gsm0502_ggafc789b32e825ea46f9f64b26a27d69d0a8cf036be4db56e738771b93182f09c1d}} 
FN\+\_\+\+REMAP\+\_\+\+MAX&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{group__gsm0502_gaa800e2b6eb910a96fbcaa8a0ebebfe1a}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_calc\_paging\_group@{gsm0502\_calc\_paging\_group}}
\index{gsm0502\_calc\_paging\_group@{gsm0502\_calc\_paging\_group}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_calc\_paging\_group()}
{\footnotesize\ttfamily unsigned int gsm0502\+\_\+calc\+\_\+paging\+\_\+group (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm48\+\_\+control\+\_\+channel\+\_\+descr} $\ast$}]{chan\+\_\+desc,  }\item[{uint64\+\_\+t}]{imsi }\end{DoxyParamCaption})}



References \textbf{ chan\+\_\+desc}, \textbf{ gsm0502\+\_\+get\+\_\+paging\+\_\+group()}, \textbf{ gsm48\+\_\+number\+\_\+of\+\_\+paging\+\_\+subchannels()}, and \textbf{ rsl\+\_\+ccch\+\_\+conf\+\_\+to\+\_\+bs\+\_\+cc\+\_\+chans()}.

\mbox{\label{group__gsm0502_ga089088bfd1664a0430d7910c4392d465}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_fn2ccch\_block@{gsm0502\_fn2ccch\_block}}
\index{gsm0502\_fn2ccch\_block@{gsm0502\_fn2ccch\_block}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_fn2ccch\_block()}
{\footnotesize\ttfamily int gsm0502\+\_\+fn2ccch\+\_\+block (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{fn }\end{DoxyParamCaption})}



Calculate CCCH block number from the given TDMA frame number. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em fn} & TDMA frame number (of first or last burst). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
CCCH block number 0..8 or a negative value, if the given frame number cannot carry CCCH. 
\end{DoxyReturn}


References \textbf{ ARRAY\+\_\+\+SIZE}, and \textbf{ ccch\+\_\+block\+\_\+table}.

\mbox{\label{group__gsm0502_ga24c46c3885d7d2b9bc677d881253c7b7}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_fn\_remap@{gsm0502\_fn\_remap}}
\index{gsm0502\_fn\_remap@{gsm0502\_fn\_remap}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_fn\_remap()}
{\footnotesize\ttfamily uint32\+\_\+t gsm0502\+\_\+fn\+\_\+remap (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{fn,  }\item[{enum \textbf{ gsm0502\+\_\+fn\+\_\+remap\+\_\+channel}}]{channel }\end{DoxyParamCaption})}



Calculate the frame number of the beginning of a block. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em fn} & frame number of the block ending. \\
\hline
\mbox{\texttt{ in}}  & {\em channel} & channel type (see also enum fn\+\_\+remap\+\_\+channel). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
frame number of the beginning of the block or input frame number if remapping was not possible. 
\end{DoxyReturn}


References \textbf{ ARRAY\+\_\+\+SIZE}, \textbf{ fn\+\_\+remap\+\_\+table\+::blockend}, \textbf{ fn\+\_\+remap\+\_\+table\+::cycle}, \textbf{ fn\+\_\+remap\+\_\+table\+::distance}, \textbf{ DLGLOBAL}, \textbf{ fn\+\_\+remap\+\_\+table\+\_\+ptr}, \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}, \textbf{ fn\+\_\+remap\+\_\+table\+::len}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, and \textbf{ OSMO\+\_\+\+ASSERT}.

\mbox{\label{group__gsm0502_gad5f9110f663c57b6b5c29f72b8c4589b}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_fncmp@{gsm0502\_fncmp}}
\index{gsm0502\_fncmp@{gsm0502\_fncmp}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_fncmp()}
{\footnotesize\ttfamily static int gsm0502\+\_\+fncmp (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{fn1,  }\item[{uint32\+\_\+t}]{fn2 }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Compare the given TDMA FNs, taking the wrapping into account. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em fn1} & First TDMA Fn value to compare. \\
\hline
\mbox{\texttt{ in}}  & {\em fn2} & Second TDMA Fn value to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
similarly to memcmp(), -\/1 if fn1 goes before fn2; 0 if fn1 equals fn2; 1 if fn1 goes after fn2. 
\end{DoxyReturn}


References \textbf{ GSM\+\_\+\+TDMA\+\_\+\+HYPERFRAME}.

\mbox{\label{group__gsm0502_ga040a01460e71074c26c74d43b6f9c6b8}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_get\_ccch\_group@{gsm0502\_get\_ccch\_group}}
\index{gsm0502\_get\_ccch\_group@{gsm0502\_get\_ccch\_group}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_get\_ccch\_group()}
{\footnotesize\ttfamily static unsigned int gsm0502\+\_\+get\+\_\+ccch\+\_\+group (\begin{DoxyParamCaption}\item[{uint64\+\_\+t}]{imsi,  }\item[{unsigned int}]{bs\+\_\+cc\+\_\+chans,  }\item[{unsigned int}]{n\+\_\+pag\+\_\+blocks }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}

\mbox{\label{group__gsm0502_ga9063aa53f07e090d054909b23fbc5d53}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_get\_n\_pag\_blocks@{gsm0502\_get\_n\_pag\_blocks}}
\index{gsm0502\_get\_n\_pag\_blocks@{gsm0502\_get\_n\_pag\_blocks}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_get\_n\_pag\_blocks()}
{\footnotesize\ttfamily static unsigned int gsm0502\+\_\+get\+\_\+n\+\_\+pag\+\_\+blocks (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm48\+\_\+control\+\_\+channel\+\_\+descr} $\ast$}]{chan\+\_\+desc }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ chan\+\_\+desc}, and \textbf{ RSL\+\_\+\+BCCH\+\_\+\+CCCH\+\_\+\+CONF\+\_\+1\+\_\+C}.



Referenced by \textbf{ gsm48\+\_\+number\+\_\+of\+\_\+paging\+\_\+subchannels()}.

\mbox{\label{group__gsm0502_ga52ba9a45e51cfacb5276338f5c315e6b}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_get\_paging\_group@{gsm0502\_get\_paging\_group}}
\index{gsm0502\_get\_paging\_group@{gsm0502\_get\_paging\_group}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_get\_paging\_group()}
{\footnotesize\ttfamily static unsigned int gsm0502\+\_\+get\+\_\+paging\+\_\+group (\begin{DoxyParamCaption}\item[{uint64\+\_\+t}]{imsi,  }\item[{unsigned int}]{bs\+\_\+cc\+\_\+chans,  }\item[{int}]{n\+\_\+pag\+\_\+blocks }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Referenced by \textbf{ gsm0502\+\_\+calc\+\_\+paging\+\_\+group()}.

\mbox{\label{group__gsm0502_ga8697893506f494bd492fe71b8a7e5ab3}} 
\index{GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}!gsm0502\_hop\_seq\_gen@{gsm0502\_hop\_seq\_gen}}
\index{gsm0502\_hop\_seq\_gen@{gsm0502\_hop\_seq\_gen}!GSM 05.02 / 3GPP TS 45.002@{GSM 05.02 / 3GPP TS 45.002}}
\doxysubsubsection{gsm0502\_hop\_seq\_gen()}
{\footnotesize\ttfamily uint16\+\_\+t gsm0502\+\_\+hop\+\_\+seq\+\_\+gen (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm\+\_\+time} $\ast$}]{t,  }\item[{uint8\+\_\+t}]{hsn,  }\item[{uint8\+\_\+t}]{maio,  }\item[{size\+\_\+t}]{n,  }\item[{const uint16\+\_\+t $\ast$}]{ma }\end{DoxyParamCaption})}



Hopping sequence generation as per 3GPP TS 45.\+002, section 6.\+2.\+3. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em t} & GSM time (TDMA frame number, T1/\+T2/\+T3). \\
\hline
\mbox{\texttt{ in}}  & {\em hsn} & Hopping Sequence Number. \\
\hline
\mbox{\texttt{ in}}  & {\em maio} & Mobile Allocation Index Offset. \\
\hline
\mbox{\texttt{ in}}  & {\em n} & number of entries in mobile allocation (arfcn table). \\
\hline
\mbox{\texttt{ in}}  & {\em ma} & array of ARFCNs (sorted in ascending order) representing the Mobile Allocation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ARFCN to use for given input parameters at time \textquotesingle{}t\textquotesingle{} or Mobile Allocation Index if ma == NULL. 
\end{DoxyReturn}


References \textbf{ gsm\+\_\+time\+::fn}, \textbf{ n}, \textbf{ rn\+\_\+table}, \textbf{ gsm\+\_\+time\+::t1}, \textbf{ gsm\+\_\+time\+::t2}, and \textbf{ gsm\+\_\+time\+::t3}.

