\doxysection{ep.\+h}
\label{ep_8h_source}\index{include/osmocom/trx/ep.h@{include/osmocom/trx/ep.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <stdbool.h>}}
\DoxyCodeLine{7 }
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/trx/trxc.h>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <osmocom/trx/trxd.h>}}
\DoxyCodeLine{10 }
\DoxyCodeLine{15 \textcolor{keyword}{struct }osmo\_trx\_ep;}
\DoxyCodeLine{16 }
\DoxyCodeLine{20 \textcolor{keyword}{enum} osmo\_trx\_ep\_mode \{}
\DoxyCodeLine{22         OSMO\_TRX\_EP\_MODE\_L1,}
\DoxyCodeLine{24         OSMO\_TRX\_EP\_MODE\_TRX,}
\DoxyCodeLine{25 \};}
\DoxyCodeLine{26 }
\DoxyCodeLine{27 \textcolor{comment}{/* Decoded RX handlers: to avoid indirect calls on the hot path, these are}}
\DoxyCodeLine{28 \textcolor{comment}{ * plain function prototypes the API user implements (link-\/time binding,}}
\DoxyCodeLine{29 \textcolor{comment}{ * like bts\_model\_*() in osmo-\/bts), not function pointers.  The library}}
\DoxyCodeLine{30 \textcolor{comment}{ * provides weak default stubs (logging an error), so an application only}}
\DoxyCodeLine{31 \textcolor{comment}{ * needs to implement the handlers for the directions it consumes. */}}
\DoxyCodeLine{32 }
\DoxyCodeLine{37 \textcolor{keyword}{extern} \textcolor{keywordtype}{void} osmo\_trx\_ep\_rx\_clck\_ind(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, uint32\_t fn);}
\DoxyCodeLine{38 }
\DoxyCodeLine{46 \textcolor{keyword}{extern} \textcolor{keywordtype}{void} osmo\_trx\_ep\_rx\_ctrl\_msg(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan,}
\DoxyCodeLine{47                                     \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trxc\_msg *msg);}
\DoxyCodeLine{48 }
\DoxyCodeLine{55 \textcolor{keyword}{extern} \textcolor{keywordtype}{void} osmo\_trx\_ep\_rx\_burst\_ind(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan,}
\DoxyCodeLine{56                                      \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trxd\_burst\_ind *bi);}
\DoxyCodeLine{57 }
\DoxyCodeLine{64 \textcolor{keyword}{extern} \textcolor{keywordtype}{void} osmo\_trx\_ep\_rx\_burst\_req(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan,}
\DoxyCodeLine{65                                      \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trxd\_burst\_req *br);}
\DoxyCodeLine{66 }
\DoxyCodeLine{67 \textcolor{keyword}{struct }osmo\_trx\_ep *osmo\_trx\_ep\_alloc(\textcolor{keywordtype}{void} *ctx, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_chans);}
\DoxyCodeLine{68 \textcolor{keywordtype}{int} osmo\_trx\_ep\_open(\textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{69 \textcolor{keywordtype}{void} osmo\_trx\_ep\_close(\textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{70 \textcolor{keywordtype}{void} osmo\_trx\_ep\_free(\textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{71 \textcolor{keywordtype}{bool} osmo\_trx\_ep\_is\_open(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{72 \textcolor{keywordtype}{bool} osmo\_trx\_ep\_is\_closing(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{73 }
\DoxyCodeLine{76 \textcolor{keyword}{typedef} void (*osmo\_trx\_ep\_closed\_cb\_t)(\textcolor{keyword}{struct }osmo\_trx\_ep *ep);}
\DoxyCodeLine{77 \textcolor{keywordtype}{void} osmo\_trx\_ep\_set\_closed\_cb(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, osmo\_trx\_ep\_closed\_cb\_t closed\_cb);}
\DoxyCodeLine{78 }
\DoxyCodeLine{79 \textcolor{keywordtype}{void} osmo\_trx\_ep\_set\_priv(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{80 \textcolor{keywordtype}{void} *osmo\_trx\_ep\_get\_priv(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{81 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_name(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fmt, ...);}
\DoxyCodeLine{82 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_trx\_ep\_get\_name(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{83 \textcolor{keywordtype}{void} osmo\_trx\_ep\_set\_log\_cat(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{int} log\_cat);}
\DoxyCodeLine{84 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_num\_chans(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} num\_chans);}
\DoxyCodeLine{85 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} osmo\_trx\_ep\_get\_num\_chans(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{86 }
\DoxyCodeLine{87 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_mode(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keyword}{enum} osmo\_trx\_ep\_mode mode);}
\DoxyCodeLine{88 \textcolor{keyword}{enum} osmo\_trx\_ep\_mode osmo\_trx\_ep\_get\_mode(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{89 }
\DoxyCodeLine{91 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_laddr(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *addr);}
\DoxyCodeLine{92 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_trx\_ep\_get\_laddr(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{93 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_raddr(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *addr);}
\DoxyCodeLine{94 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_trx\_ep\_get\_raddr(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{95 }
\DoxyCodeLine{102 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_base\_port(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, uint16\_t base\_port);}
\DoxyCodeLine{103 uint16\_t osmo\_trx\_ep\_get\_base\_port(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{104 }
\DoxyCodeLine{106 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_clock\_socket(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{bool} enable);}
\DoxyCodeLine{107 \textcolor{keywordtype}{bool} osmo\_trx\_ep\_get\_clock\_socket(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{108 }
\DoxyCodeLine{110 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_ctrl\_promisc(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{bool} enable);}
\DoxyCodeLine{111 \textcolor{keywordtype}{bool} osmo\_trx\_ep\_get\_ctrl\_promisc(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{112 }
\DoxyCodeLine{113 \textcolor{keywordtype}{void} osmo\_trx\_ep\_set\_pdu\_batch(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{bool} enable);}
\DoxyCodeLine{114 \textcolor{keywordtype}{bool} osmo\_trx\_ep\_get\_pdu\_batch(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep);}
\DoxyCodeLine{115 }
\DoxyCodeLine{117 \textcolor{keywordtype}{int} osmo\_trx\_ep\_set\_pdu\_ver(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan, uint8\_t ver);}
\DoxyCodeLine{118 \textcolor{keywordtype}{int} osmo\_trx\_ep\_get\_pdu\_ver(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan);}
\DoxyCodeLine{119 }
\DoxyCodeLine{120 \textcolor{comment}{/* TX paths (encode + transmit) */}}
\DoxyCodeLine{121 \textcolor{keywordtype}{int} osmo\_trx\_ep\_send\_clck\_ind(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, uint32\_t fn);}
\DoxyCodeLine{122 \textcolor{keywordtype}{int} osmo\_trx\_ep\_send\_ctrl\_msg(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan,}
\DoxyCodeLine{123                               \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trxc\_msg *msg);}
\DoxyCodeLine{124 \textcolor{keywordtype}{int} osmo\_trx\_ep\_send\_burst\_ind(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan,}
\DoxyCodeLine{125                                \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trxd\_burst\_ind *bi);}
\DoxyCodeLine{126 \textcolor{keywordtype}{int} osmo\_trx\_ep\_send\_burst\_req(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan,}
\DoxyCodeLine{127                                \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_trxd\_burst\_req *br);}
\DoxyCodeLine{128 \textcolor{keywordtype}{int} osmo\_trx\_ep\_send\_burst\_fin(\textcolor{keyword}{struct} osmo\_trx\_ep *ep, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} chan);}

\end{DoxyCode}
