\doxysection{include/osmocom/trx/trxd.h File Reference}
\label{trxd_8h}\index{include/osmocom/trx/trxd.h@{include/osmocom/trx/trxd.h}}


TRXD (burst data) protocol\+: I/\+O-\/free PDU codec.  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stddef.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind}
\begin{DoxyCompactList}\small\item\em TRX -\/$>$ L1\+: received burst indication (soft bits + measurements). \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req}
\begin{DoxyCompactList}\small\item\em L1 -\/$>$ TRX\+: burst transmit request (hard bits). \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state}
\begin{DoxyCompactList}\small\item\em Parser state, keeping cross-\/\+PDU context for TRXDv2 batches. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+PDU\+\_\+\+VER\+\_\+\+MAX}~2
\begin{DoxyCompactList}\small\item\em The highest TRXD PDU version supported by this library. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+\+GMSK}~148
\begin{DoxyCompactList}\small\item\em GMSK modulated burst\+: 1 bit per symbol. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+8\+PSK}~444
\begin{DoxyCompactList}\small\item\em 8-\/PSK modulated burst\+: 3 bits per symbol \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+\+MAX}~\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+8\+PSK}
\begin{DoxyCompactList}\small\item\em Maximum burst length in (soft-\/)bits. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+HDR\+\_\+\+LEN\+\_\+\+MAX}~12
\begin{DoxyCompactList}\small\item\em Maximum single-\/\+PDU header size, in bytes\+: the TRXDv2 header (largest of all versions, either direction) plus the TDMA FN present on the first PDU of a datagram. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+MSG\+\_\+\+BUF\+\_\+\+SIZE}~(\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+HDR\+\_\+\+LEN\+\_\+\+MAX} + \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+\+MAX})
\begin{DoxyCompactList}\small\item\em Recommended Rx/\+Tx socket buffer size, in bytes, for a single (non-\/batched) TRXD datagram\+: largest possible header plus the largest possible burst payload. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND}~(1 $<$$<$ 0)
\begin{DoxyCompactList}\small\item\em no burst detected / idle indication \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+REQ}~\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND}
\begin{DoxyCompactList}\small\item\em alias of OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND, reading cleaner in BURST.\+req context \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+MOD\+\_\+\+TYPE}~(1 $<$$<$ 1)
\begin{DoxyCompactList}\small\item\em \textquotesingle{}mod\textquotesingle{} is valid \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TS\+\_\+\+INFO}~(1 $<$$<$ 2)
\begin{DoxyCompactList}\small\item\em \textquotesingle{}tsc\+\_\+set\textquotesingle{}/\textquotesingle{}tsc\textquotesingle{} are valid \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+CI\+\_\+\+CB}~(1 $<$$<$ 3)
\begin{DoxyCompactList}\small\item\em \textquotesingle{}ci\+\_\+cb\textquotesingle{} is valid \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TRX\+\_\+\+NUM}~(1 $<$$<$ 4)
\begin{DoxyCompactList}\small\item\em \textquotesingle{}trx\+\_\+num\textquotesingle{} is valid \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+BATCH\+\_\+\+IND}~(1 $<$$<$ 5)
\begin{DoxyCompactList}\small\item\em more PDUs follow in this datagram \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+SHADOW\+\_\+\+IND}~(1 $<$$<$ 6)
\begin{DoxyCompactList}\small\item\em burst received on a shadow (VAMOS) channel \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+ACCESS\+\_\+\+BURST}~(1 $<$$<$ 7)
\begin{DoxyCompactList}\small\item\em an Access Burst (RACH) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type} \{ \newline
\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+MOD\+\_\+\+T\+\_\+\+GMSK}
, \newline
\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+MOD\+\_\+\+T\+\_\+8\+PSK}
, \newline
\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+MOD\+\_\+\+T\+\_\+\+AQPSK}
 \}
\begin{DoxyCompactList}\small\item\em Modulation types (defined by the TRXDv2 MTS encoding, 3GPP TS 45.\+002) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state\+\_\+init} (struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state} $\ast$st)
\begin{DoxyCompactList}\small\item\em Initialize a parser state; call before parsing each datagram. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+parse} (struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state} $\ast$st, struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$bi, const uint8\+\_\+t $\ast$buf, size\+\_\+t buf\+\_\+len)
\begin{DoxyCompactList}\small\item\em Parse one burst indication (TRX -\/$>$ L1) PDU from the given buffer. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+parse} (struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state} $\ast$st, struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$br, const uint8\+\_\+t $\ast$buf, size\+\_\+t buf\+\_\+len)
\begin{DoxyCompactList}\small\item\em Parse one burst transmit request (L1 -\/$>$ TRX) PDU from the given buffer. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+build} (struct msgb $\ast$msg, uint8\+\_\+t pdu\+\_\+ver, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$bi)
\begin{DoxyCompactList}\small\item\em Append one encoded burst indication (TRX -\/$>$ L1) PDU to the given msgb. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+build} (struct msgb $\ast$msg, uint8\+\_\+t pdu\+\_\+ver, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$br)
\begin{DoxyCompactList}\small\item\em Append one encoded burst transmit request (L1 -\/$>$ TRX) PDU to the given msgb. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+trxd\+\_\+build\+\_\+fin} (struct msgb $\ast$msg, uint8\+\_\+t pdu\+\_\+ver)
\begin{DoxyCompactList}\small\item\em Finalize a datagram built by osmo\+\_\+trxd\+\_\+burst\+\_\+\{ind,req\}\+\_\+build(). \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name} (const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$bi)
\begin{DoxyCompactList}\small\item\em Compose a human-\/readable representation of the given burst indication (for logging), store into a thread-\/local static buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$bi)
\begin{DoxyCompactList}\small\item\em Compose a human-\/readable representation of the given burst indication (for logging), store into the given buffer. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name} (const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$br)
\begin{DoxyCompactList}\small\item\em Compose a human-\/readable representation of the given burst transmit request (for logging), store into a thread-\/local static buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$br)
\begin{DoxyCompactList}\small\item\em Compose a human-\/readable representation of the given burst transmit request (for logging), store into the given buffer. \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+name} (enum \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type} mod)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct value\+\_\+string \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
TRXD (burst data) protocol\+: I/\+O-\/free PDU codec. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{trxd_8h_ab6fbef880f297644d07f2b34aefa00e4}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_BURST\_LEN\_8PSK@{OSMO\_TRXD\_BURST\_LEN\_8PSK}}
\index{OSMO\_TRXD\_BURST\_LEN\_8PSK@{OSMO\_TRXD\_BURST\_LEN\_8PSK}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_BURST\_LEN\_8PSK}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+8\+PSK~444}



8-\/PSK modulated burst\+: 3 bits per symbol 

\mbox{\label{trxd_8h_adf38a4fdefbada9d53b7b199e14188a0}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_BURST\_LEN\_GMSK@{OSMO\_TRXD\_BURST\_LEN\_GMSK}}
\index{OSMO\_TRXD\_BURST\_LEN\_GMSK@{OSMO\_TRXD\_BURST\_LEN\_GMSK}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_BURST\_LEN\_GMSK}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+\+GMSK~148}



GMSK modulated burst\+: 1 bit per symbol. 

\mbox{\label{trxd_8h_a8fe7d5cab9617871e113bce6cca30e3e}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_BURST\_LEN\_MAX@{OSMO\_TRXD\_BURST\_LEN\_MAX}}
\index{OSMO\_TRXD\_BURST\_LEN\_MAX@{OSMO\_TRXD\_BURST\_LEN\_MAX}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_BURST\_LEN\_MAX}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+\+MAX~\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+8\+PSK}}



Maximum burst length in (soft-\/)bits. 

\mbox{\label{trxd_8h_a9fc5c027e584caf306b2774d04a3b0f3}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_ACCESS\_BURST@{OSMO\_TRXD\_F\_ACCESS\_BURST}}
\index{OSMO\_TRXD\_F\_ACCESS\_BURST@{OSMO\_TRXD\_F\_ACCESS\_BURST}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_ACCESS\_BURST}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+ACCESS\+\_\+\+BURST~(1 $<$$<$ 7)}



an Access Burst (RACH) 

\mbox{\label{trxd_8h_aaa0b46196c282fe503d4ea204e4f6c93}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_BATCH\_IND@{OSMO\_TRXD\_F\_BATCH\_IND}}
\index{OSMO\_TRXD\_F\_BATCH\_IND@{OSMO\_TRXD\_F\_BATCH\_IND}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_BATCH\_IND}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+BATCH\+\_\+\+IND~(1 $<$$<$ 5)}



more PDUs follow in this datagram 

\mbox{\label{trxd_8h_aa2a5a25efe0d179f38e2ea157dbdab4b}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_CI\_CB@{OSMO\_TRXD\_F\_CI\_CB}}
\index{OSMO\_TRXD\_F\_CI\_CB@{OSMO\_TRXD\_F\_CI\_CB}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_CI\_CB}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+CI\+\_\+\+CB~(1 $<$$<$ 3)}



\textquotesingle{}ci\+\_\+cb\textquotesingle{} is valid 

\mbox{\label{trxd_8h_a8003e29b14ab0be1989f75a9e88d0447}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_MOD\_TYPE@{OSMO\_TRXD\_F\_MOD\_TYPE}}
\index{OSMO\_TRXD\_F\_MOD\_TYPE@{OSMO\_TRXD\_F\_MOD\_TYPE}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_MOD\_TYPE}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+MOD\+\_\+\+TYPE~(1 $<$$<$ 1)}



\textquotesingle{}mod\textquotesingle{} is valid 

\mbox{\label{trxd_8h_ac0d8c6864dafc9a1a5d6fdc9c94e34c7}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_NOPE\_IND@{OSMO\_TRXD\_F\_NOPE\_IND}}
\index{OSMO\_TRXD\_F\_NOPE\_IND@{OSMO\_TRXD\_F\_NOPE\_IND}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_NOPE\_IND}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND~(1 $<$$<$ 0)}



no burst detected / idle indication 

\mbox{\label{trxd_8h_a0e729c75809bad6f412dc33ff0335a58}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_NOPE\_REQ@{OSMO\_TRXD\_F\_NOPE\_REQ}}
\index{OSMO\_TRXD\_F\_NOPE\_REQ@{OSMO\_TRXD\_F\_NOPE\_REQ}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_NOPE\_REQ}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+REQ~\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND}}



alias of OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND, reading cleaner in BURST.\+req context 

\mbox{\label{trxd_8h_a71f4b976f463cba738e31bf6dc1aa1d3}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_SHADOW\_IND@{OSMO\_TRXD\_F\_SHADOW\_IND}}
\index{OSMO\_TRXD\_F\_SHADOW\_IND@{OSMO\_TRXD\_F\_SHADOW\_IND}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_SHADOW\_IND}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+SHADOW\+\_\+\+IND~(1 $<$$<$ 6)}



burst received on a shadow (VAMOS) channel 

\mbox{\label{trxd_8h_a97f8a44d036c3a8101c7b497baeffa53}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_TRX\_NUM@{OSMO\_TRXD\_F\_TRX\_NUM}}
\index{OSMO\_TRXD\_F\_TRX\_NUM@{OSMO\_TRXD\_F\_TRX\_NUM}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_TRX\_NUM}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TRX\+\_\+\+NUM~(1 $<$$<$ 4)}



\textquotesingle{}trx\+\_\+num\textquotesingle{} is valid 

\mbox{\label{trxd_8h_a20baa67321ae38d936a759d412fefd15}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_F\_TS\_INFO@{OSMO\_TRXD\_F\_TS\_INFO}}
\index{OSMO\_TRXD\_F\_TS\_INFO@{OSMO\_TRXD\_F\_TS\_INFO}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_F\_TS\_INFO}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TS\+\_\+\+INFO~(1 $<$$<$ 2)}



\textquotesingle{}tsc\+\_\+set\textquotesingle{}/\textquotesingle{}tsc\textquotesingle{} are valid 

\mbox{\label{trxd_8h_a5b6737c111d62ac39daf958e3c10d29d}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_HDR\_LEN\_MAX@{OSMO\_TRXD\_HDR\_LEN\_MAX}}
\index{OSMO\_TRXD\_HDR\_LEN\_MAX@{OSMO\_TRXD\_HDR\_LEN\_MAX}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_HDR\_LEN\_MAX}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+HDR\+\_\+\+LEN\+\_\+\+MAX~12}



Maximum single-\/\+PDU header size, in bytes\+: the TRXDv2 header (largest of all versions, either direction) plus the TDMA FN present on the first PDU of a datagram. 

\mbox{\label{trxd_8h_ab280d2780e6255379c86936f9a2e8bf1}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_MSG\_BUF\_SIZE@{OSMO\_TRXD\_MSG\_BUF\_SIZE}}
\index{OSMO\_TRXD\_MSG\_BUF\_SIZE@{OSMO\_TRXD\_MSG\_BUF\_SIZE}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_MSG\_BUF\_SIZE}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+MSG\+\_\+\+BUF\+\_\+\+SIZE~(\textbf{ OSMO\+\_\+\+TRXD\+\_\+\+HDR\+\_\+\+LEN\+\_\+\+MAX} + \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+BURST\+\_\+\+LEN\+\_\+\+MAX})}



Recommended Rx/\+Tx socket buffer size, in bytes, for a single (non-\/batched) TRXD datagram\+: largest possible header plus the largest possible burst payload. 

\mbox{\label{trxd_8h_ac1ef16ae13bc09cb76386fb831dce110}} 
\index{trxd.h@{trxd.h}!OSMO\_TRXD\_PDU\_VER\_MAX@{OSMO\_TRXD\_PDU\_VER\_MAX}}
\index{OSMO\_TRXD\_PDU\_VER\_MAX@{OSMO\_TRXD\_PDU\_VER\_MAX}!trxd.h@{trxd.h}}
\doxysubsubsection{OSMO\_TRXD\_PDU\_VER\_MAX}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+TRXD\+\_\+\+PDU\+\_\+\+VER\+\_\+\+MAX~2}



The highest TRXD PDU version supported by this library. 



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{trxd_8h_aab64439ecc7445f58e7c34334cf3f3b0}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_mod\_type@{osmo\_trxd\_mod\_type}}
\index{osmo\_trxd\_mod\_type@{osmo\_trxd\_mod\_type}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_mod\_type}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type}}



Modulation types (defined by the TRXDv2 MTS encoding, 3GPP TS 45.\+002) 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_TRXD\_MOD\_T\_GMSK@{OSMO\_TRXD\_MOD\_T\_GMSK}!trxd.h@{trxd.h}}\index{trxd.h@{trxd.h}!OSMO\_TRXD\_MOD\_T\_GMSK@{OSMO\_TRXD\_MOD\_T\_GMSK}}}\mbox{\label{trxd_8h_aab64439ecc7445f58e7c34334cf3f3b0a1c86a64de09b06a8e6714576f6b5ec31}} 
OSMO\+\_\+\+TRXD\+\_\+\+MOD\+\_\+\+T\+\_\+\+GMSK&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_TRXD\_MOD\_T\_8PSK@{OSMO\_TRXD\_MOD\_T\_8PSK}!trxd.h@{trxd.h}}\index{trxd.h@{trxd.h}!OSMO\_TRXD\_MOD\_T\_8PSK@{OSMO\_TRXD\_MOD\_T\_8PSK}}}\mbox{\label{trxd_8h_aab64439ecc7445f58e7c34334cf3f3b0a7250c732fe62d71482972be595aeacaf}} 
OSMO\+\_\+\+TRXD\+\_\+\+MOD\+\_\+\+T\+\_\+8\+PSK&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_TRXD\_MOD\_T\_AQPSK@{OSMO\_TRXD\_MOD\_T\_AQPSK}!trxd.h@{trxd.h}}\index{trxd.h@{trxd.h}!OSMO\_TRXD\_MOD\_T\_AQPSK@{OSMO\_TRXD\_MOD\_T\_AQPSK}}}\mbox{\label{trxd_8h_aab64439ecc7445f58e7c34334cf3f3b0a05db0df38471b8b8ea1f7cfb50c851c8}} 
OSMO\+\_\+\+TRXD\+\_\+\+MOD\+\_\+\+T\+\_\+\+AQPSK&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{trxd_8h_a2eb6ff22f0638eeaeea0e94d5dbfc893}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_build\_fin@{osmo\_trxd\_build\_fin}}
\index{osmo\_trxd\_build\_fin@{osmo\_trxd\_build\_fin}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_build\_fin()}
{\footnotesize\ttfamily void osmo\+\_\+trxd\+\_\+build\+\_\+fin (\begin{DoxyParamCaption}\item[{struct msgb $\ast$}]{msg,  }\item[{uint8\+\_\+t}]{pdu\+\_\+ver }\end{DoxyParamCaption})}



Finalize a datagram built by osmo\+\_\+trxd\+\_\+burst\+\_\+\{ind,req\}\+\_\+build(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em msg} & message buffer holding the encoded PDU(s) \\
\hline
\mbox{\texttt{ in}}  & {\em pdu\+\_\+ver} & TRXD PDU version in use \\
\hline
\end{DoxyParams}


Referenced by \textbf{ trx\+\_\+ep\+\_\+data\+\_\+tx\+\_\+flush()}.

\mbox{\label{trxd_8h_ae8a9a0227af3d206a637c20d10f476a2}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_ind\_build@{osmo\_trxd\_burst\_ind\_build}}
\index{osmo\_trxd\_burst\_ind\_build@{osmo\_trxd\_burst\_ind\_build}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_ind\_build()}
{\footnotesize\ttfamily int osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+build (\begin{DoxyParamCaption}\item[{struct msgb $\ast$}]{msg,  }\item[{uint8\+\_\+t}]{pdu\+\_\+ver,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$}]{bi }\end{DoxyParamCaption})}



Append one encoded burst indication (TRX -\/$>$ L1) PDU to the given msgb. 

For TRXDv2, PDU batching works by calling this function repeatedly on the same msgb; call \doxyref{osmo\+\_\+trxd\+\_\+build\+\_\+fin()}{p.}{trxd_8c_a2eb6ff22f0638eeaeea0e94d5dbfc893} once the datagram is complete (it clears the BATCH.\+ind bit of the last PDU).


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em msg} & destination message buffer \\
\hline
\mbox{\texttt{ in}}  & {\em pdu\+\_\+ver} & TRXD PDU version to encode \\
\hline
\mbox{\texttt{ in}}  & {\em bi} & burst indication to be encoded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. Note that TRXDv0 has no MTS field, so a NOPE.\+ind is encoded as a header-\/only PDU with the burst payload omitted. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::burst}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::burst\+\_\+len}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::ci\+\_\+cb}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::flags}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::fn}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+SHADOW\+\_\+\+IND}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::rssi}, \textbf{ soft\+\_\+bits\+\_\+build()}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::tn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::toa256}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::trx\+\_\+num}, \textbf{ TRXD\+\_\+\+IND\+\_\+\+V0\+HDR\+\_\+\+LEN}, \textbf{ TRXD\+\_\+\+IND\+\_\+\+V1\+HDR\+\_\+\+LEN}, \textbf{ TRXD\+\_\+\+IND\+\_\+\+V2\+HDR\+\_\+\+LEN}, and \textbf{ trxd\+\_\+mts\+\_\+build\+\_\+ind()}.



Referenced by \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+ind()}.

\mbox{\label{trxd_8h_a636994519470585d420b9a1568c98e20}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_ind\_name@{osmo\_trxd\_burst\_ind\_name}}
\index{osmo\_trxd\_burst\_ind\_name@{osmo\_trxd\_burst\_ind\_name}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_ind\_name()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$}]{bi }\end{DoxyParamCaption})}



Compose a human-\/readable representation of the given burst indication (for logging), store into a thread-\/local static buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em bi} & BURST.\+ind to get a human-\/readable representation of \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to a thread-\/local static buffer 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name\+\_\+buf()}.

\mbox{\label{trxd_8h_af76c68d609c9a237c864f9782be2a22d}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_ind\_name\_buf@{osmo\_trxd\_burst\_ind\_name\_buf}}
\index{osmo\_trxd\_burst\_ind\_name\_buf@{osmo\_trxd\_burst\_ind\_name\_buf}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_ind\_name\_buf()}
{\footnotesize\ttfamily char $\ast$ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name\+\_\+buf (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf,  }\item[{size\+\_\+t}]{buf\+\_\+len,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$}]{bi }\end{DoxyParamCaption})}



Compose a human-\/readable representation of the given burst indication (for logging), store into the given buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em buf} & output buffer to store the result \\
\hline
\mbox{\texttt{ in}}  & {\em buf\+\_\+len} & size of the output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em bi} & BURST.\+ind to get a human-\/readable representation of \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to the given buffer 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::burst\+\_\+len}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::ci\+\_\+cb}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::flags}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::fn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::mod}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+CI\+\_\+\+CB}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+MOD\+\_\+\+TYPE}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TRX\+\_\+\+NUM}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TS\+\_\+\+INFO}, \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+name()}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::rssi}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::tn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::toa256}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::trx\+\_\+num}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::tsc}, and \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::tsc\+\_\+set}.



Referenced by \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name()}.

\mbox{\label{trxd_8h_a80d942d6b9d99393758415e6a775c245}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_ind\_parse@{osmo\_trxd\_burst\_ind\_parse}}
\index{osmo\_trxd\_burst\_ind\_parse@{osmo\_trxd\_burst\_ind\_parse}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_ind\_parse()}
{\footnotesize\ttfamily int osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+parse (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state} $\ast$}]{st,  }\item[{struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind} $\ast$}]{bi,  }\item[{const uint8\+\_\+t $\ast$}]{buf,  }\item[{size\+\_\+t}]{buf\+\_\+len }\end{DoxyParamCaption})}



Parse one burst indication (TRX -\/$>$ L1) PDU from the given buffer. 

The PDU version is parsed from the first PDU of a datagram and kept in {\itshape st}. Starting from TRXDv2, a datagram may batch multiple PDUs\+: call this function repeatedly on the remaining buffer as long as the parsed PDU has OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+BATCH\+\_\+\+IND set in bi-\/$>$flags.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em st} & parser state (see \doxyref{osmo\+\_\+trxd\+\_\+parse\+\_\+state\+\_\+init()}{p.}{trxd_8c_adbcdd7c1e4f0a54fbe0e8c6bf38fb46b}) \\
\hline
\mbox{\texttt{ out}}  & {\em bi} & parsed burst indication \\
\hline
\mbox{\texttt{ in}}  & {\em buf} & buffer positioned at the beginning of a PDU \\
\hline
\mbox{\texttt{ in}}  & {\em buf\+\_\+len} & remaining length of the buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of consumed bytes on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::burst}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::burst\+\_\+len}, \textbf{ burst\+\_\+len\+\_\+by\+\_\+mod()}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::flags}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::fn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+::mod}, \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state\+::num\+\_\+pdus}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+IND}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+PDU\+\_\+\+VER\+\_\+\+MAX}, \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state\+::pdu\+\_\+ver}, \textbf{ soft\+\_\+bits\+\_\+parse()}, \textbf{ trxd\+\_\+burst\+\_\+ind\+\_\+parse\+\_\+v0()}, \textbf{ trxd\+\_\+burst\+\_\+ind\+\_\+parse\+\_\+v1()}, \textbf{ trxd\+\_\+burst\+\_\+ind\+\_\+parse\+\_\+v2()}, \textbf{ TRXD\+\_\+\+IND\+\_\+\+V0\+HDR\+\_\+\+LEN}, \textbf{ TRXD\+\_\+\+IND\+\_\+\+V1\+HDR\+\_\+\+LEN}, and \textbf{ TRXD\+\_\+\+IND\+\_\+\+V2\+HDR\+\_\+\+LEN}.



Referenced by \textbf{ trx\+\_\+ep\+\_\+data\+\_\+read\+\_\+cb()}.

\mbox{\label{trxd_8h_a7199886684425865643eee1569ccbc4f}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_req\_build@{osmo\_trxd\_burst\_req\_build}}
\index{osmo\_trxd\_burst\_req\_build@{osmo\_trxd\_burst\_req\_build}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_req\_build()}
{\footnotesize\ttfamily int osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+build (\begin{DoxyParamCaption}\item[{struct msgb $\ast$}]{msg,  }\item[{uint8\+\_\+t}]{pdu\+\_\+ver,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$}]{br }\end{DoxyParamCaption})}



Append one encoded burst transmit request (L1 -\/$>$ TRX) PDU to the given msgb. 

For TRXDv2, PDU batching works by calling this function repeatedly on the same msgb; call \doxyref{osmo\+\_\+trxd\+\_\+build\+\_\+fin()}{p.}{trxd_8c_a2eb6ff22f0638eeaeea0e94d5dbfc893} once the datagram is complete (it clears the BATCH.\+ind bit of the last PDU).


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em msg} & destination message buffer \\
\hline
\mbox{\texttt{ in}}  & {\em pdu\+\_\+ver} & TRXD PDU version to encode \\
\hline
\mbox{\texttt{ in}}  & {\em br} & burst transmit request to be encoded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::att}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::burst}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::burst\+\_\+len}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::flags}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::fn}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+REQ}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::scpir}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::tn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::trx\+\_\+num}, \textbf{ trxd\+\_\+mts\+\_\+build\+\_\+req()}, \textbf{ TRXD\+\_\+\+REQ\+\_\+\+V01\+HDR\+\_\+\+LEN}, and \textbf{ TRXD\+\_\+\+REQ\+\_\+\+V2\+HDR\+\_\+\+LEN}.



Referenced by \textbf{ osmo\+\_\+trx\+\_\+ep\+\_\+send\+\_\+burst\+\_\+req()}.

\mbox{\label{trxd_8h_a0926bc07f343708657ab00869e6e96cc}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_req\_name@{osmo\_trxd\_burst\_req\_name}}
\index{osmo\_trxd\_burst\_req\_name@{osmo\_trxd\_burst\_req\_name}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_req\_name()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$}]{br }\end{DoxyParamCaption})}



Compose a human-\/readable representation of the given burst transmit request (for logging), store into a thread-\/local static buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em br} & BURST.\+req to get a human-\/readable representation of \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to a thread-\/local static buffer 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name\+\_\+buf()}.

\mbox{\label{trxd_8h_a112447b6b61eea32af3542ada3b3febd}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_req\_name\_buf@{osmo\_trxd\_burst\_req\_name\_buf}}
\index{osmo\_trxd\_burst\_req\_name\_buf@{osmo\_trxd\_burst\_req\_name\_buf}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_req\_name\_buf()}
{\footnotesize\ttfamily char $\ast$ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name\+\_\+buf (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf,  }\item[{size\+\_\+t}]{buf\+\_\+len,  }\item[{const struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$}]{br }\end{DoxyParamCaption})}



Compose a human-\/readable representation of the given burst transmit request (for logging), store into the given buffer. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em buf} & output buffer to store the result \\
\hline
\mbox{\texttt{ in}}  & {\em buf\+\_\+len} & size of the output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em br} & BURST.\+req to get a human-\/readable representation of \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to the given buffer 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::att}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::burst\+\_\+len}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::flags}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::fn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::mod}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+MOD\+\_\+\+TYPE}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+NOPE\+\_\+\+REQ}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TRX\+\_\+\+NUM}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+TS\+\_\+\+INFO}, \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+name()}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::tn}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::trx\+\_\+num}, \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::tsc}, and \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::tsc\+\_\+set}.



Referenced by \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name()}.

\mbox{\label{trxd_8h_aa035689c32908462a1fc24475e8b1ca4}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_burst\_req\_parse@{osmo\_trxd\_burst\_req\_parse}}
\index{osmo\_trxd\_burst\_req\_parse@{osmo\_trxd\_burst\_req\_parse}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_burst\_req\_parse()}
{\footnotesize\ttfamily int osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+parse (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state} $\ast$}]{st,  }\item[{struct \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req} $\ast$}]{br,  }\item[{const uint8\+\_\+t $\ast$}]{buf,  }\item[{size\+\_\+t}]{buf\+\_\+len }\end{DoxyParamCaption})}



Parse one burst transmit request (L1 -\/$>$ TRX) PDU from the given buffer. 

The PDU version is parsed from the first PDU of a datagram and kept in {\itshape st}. Starting from TRXDv2, a datagram may batch multiple PDUs\+: call this function repeatedly on the remaining buffer as long as the parsed PDU has OSMO\+\_\+\+TRXD\+\_\+\+F\+\_\+\+BATCH\+\_\+\+IND set in br-\/$>$flags.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in,out}}  & {\em st} & parser state (see \doxyref{osmo\+\_\+trxd\+\_\+parse\+\_\+state\+\_\+init()}{p.}{trxd_8c_adbcdd7c1e4f0a54fbe0e8c6bf38fb46b}) \\
\hline
\mbox{\texttt{ out}}  & {\em br} & parsed burst transmit request \\
\hline
\mbox{\texttt{ in}}  & {\em buf} & buffer positioned at the beginning of a PDU \\
\hline
\mbox{\texttt{ in}}  & {\em buf\+\_\+len} & remaining length of the buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of consumed bytes on success; negative on error 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+::fn}, \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state\+::num\+\_\+pdus}, \textbf{ OSMO\+\_\+\+TRXD\+\_\+\+PDU\+\_\+\+VER\+\_\+\+MAX}, \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state\+::pdu\+\_\+ver}, \textbf{ trxd\+\_\+burst\+\_\+req\+\_\+parse\+\_\+v01()}, \textbf{ trxd\+\_\+burst\+\_\+req\+\_\+parse\+\_\+v2()}, \textbf{ TRXD\+\_\+\+REQ\+\_\+\+V01\+HDR\+\_\+\+LEN}, and \textbf{ TRXD\+\_\+\+REQ\+\_\+\+V2\+HDR\+\_\+\+LEN}.



Referenced by \textbf{ trx\+\_\+ep\+\_\+data\+\_\+read\+\_\+cb()}.

\mbox{\label{trxd_8h_ac2805e19039b1926e24522612993d6ee}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_mod\_type\_name@{osmo\_trxd\_mod\_type\_name}}
\index{osmo\_trxd\_mod\_type\_name@{osmo\_trxd\_mod\_type\_name}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_mod\_type\_name()}
{\footnotesize\ttfamily static const char $\ast$ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+name (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type}}]{mod }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



References \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+names}.



Referenced by \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+ind\+\_\+name\+\_\+buf()}, and \textbf{ osmo\+\_\+trxd\+\_\+burst\+\_\+req\+\_\+name\+\_\+buf()}.

\mbox{\label{trxd_8h_adbcdd7c1e4f0a54fbe0e8c6bf38fb46b}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_parse\_state\_init@{osmo\_trxd\_parse\_state\_init}}
\index{osmo\_trxd\_parse\_state\_init@{osmo\_trxd\_parse\_state\_init}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_parse\_state\_init()}
{\footnotesize\ttfamily void osmo\+\_\+trxd\+\_\+parse\+\_\+state\+\_\+init (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+trxd\+\_\+parse\+\_\+state} $\ast$}]{st }\end{DoxyParamCaption})}



Initialize a parser state; call before parsing each datagram. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em st} & parser state to be initialized \\
\hline
\end{DoxyParams}


Referenced by \textbf{ trx\+\_\+ep\+\_\+data\+\_\+read\+\_\+cb()}.



\doxysubsection{Variable Documentation}
\mbox{\label{trxd_8h_aaa7ed6cc1dc0a6058c8efad137c0ed52}} 
\index{trxd.h@{trxd.h}!osmo\_trxd\_mod\_type\_names@{osmo\_trxd\_mod\_type\_names}}
\index{osmo\_trxd\_mod\_type\_names@{osmo\_trxd\_mod\_type\_names}!trxd.h@{trxd.h}}
\doxysubsubsection{osmo\_trxd\_mod\_type\_names}
{\footnotesize\ttfamily const struct value\+\_\+string osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+names[$\,$]\hspace{0.3cm}{\ttfamily [extern]}}



Referenced by \textbf{ osmo\+\_\+trxd\+\_\+mod\+\_\+type\+\_\+name()}.

