\doxysection{include/osmocom/isdn/v110\+\_\+ta.h File Reference}
\label{v110__ta_8h}\index{include/osmocom/isdn/v110\_ta.h@{include/osmocom/isdn/v110\_ta.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/isdn/v110.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg}
\begin{DoxyCompactList}\small\item\em Configuration for a V.\+110 TA instance. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+v110\+\_\+local\+\_\+flow\+\_\+ctrl\+\_\+mode} \{ \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+NONE}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+133\+\_\+106}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+105\+\_\+106}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+XON\+\_\+\+XOFF}
 \}
\begin{DoxyCompactList}\small\item\em V.\+110 5.\+4.\+1 Local flow control (DTE-\/\+DCE or TE-\/\+TA) mode. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+timer} \{ \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+TIMER\+\_\+\+X1} = -\/1
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+TIMER\+\_\+\+T1} = 1
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+TIMER\+\_\+\+T2} = 2
 \}
\begin{DoxyCompactList}\small\item\em Various timers for a V.\+110 TA instance. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit} \{ \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+105}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+106}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+107}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+108}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+109}
, \newline
\textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+133}
 \}
\begin{DoxyCompactList}\small\item\em ITU-\/T Table 9 \char`\"{}\+Interchange circuit\char`\"{} (see also ITU-\/T V.\+24 Chapter 3). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+alloc} (void $\ast$ctx, const char $\ast$\textbf{ name}, const struct \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg} $\ast$cfg)
\begin{DoxyCompactList}\small\item\em Allocate a V.\+110 TA (Terminal Adapter) instance. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+free} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta)
\begin{DoxyCompactList}\small\item\em Release memory taken by the given V.\+110 TA instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+set\+\_\+timer\+\_\+val\+\_\+ms} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta, enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+timer} timer, unsigned long val\+\_\+ms)
\begin{DoxyCompactList}\small\item\em Configure a timer of the given V.\+110 TA instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+frame\+\_\+in} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta, const struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$in)
\begin{DoxyCompactList}\small\item\em Feed a [decoded] V.\+110 frame into the given TA instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+frame\+\_\+out} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta, struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$out)
\begin{DoxyCompactList}\small\item\em Pull a [decoded] V.\+110 frame out of the given TA instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+sync\+\_\+ind} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta)
\begin{DoxyCompactList}\small\item\em Indicate a synchronization establishment event. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+desync\+\_\+ind} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta)
\begin{DoxyCompactList}\small\item\em Indicate a synchronization loss event. \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+name} (enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit} circuit)
\begin{DoxyCompactList}\small\item\em Get a short name of the given TA\textquotesingle{}s circuit (format\+: NNN[/\+ABBR]). \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+desc} (enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit} circuit)
\begin{DoxyCompactList}\small\item\em Get a brief description of the given TA\textquotesingle{}s circuit. \end{DoxyCompactList}\item 
unsigned int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+get\+\_\+status} (const struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta)
\begin{DoxyCompactList}\small\item\em Get the V.\+24 status bit-\/mask of the given TA instance. \end{DoxyCompactList}\item 
bool \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+get\+\_\+circuit} (const struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta, enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit} circuit)
\begin{DoxyCompactList}\small\item\em Get state of a V.\+24 circuit of the given TA instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+set\+\_\+circuit} (struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ta, enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit} circuit, bool active)
\begin{DoxyCompactList}\small\item\em Activate/deactivate a V.\+24 circuit of the given TA instance. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+descs} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Enumeration Type Documentation}
\mbox{\label{v110__ta_8h_a7ba472f6c86d1f51395b063875a7b52d}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_local\_flow\_ctrl\_mode@{osmo\_v110\_local\_flow\_ctrl\_mode}}
\index{osmo\_v110\_local\_flow\_ctrl\_mode@{osmo\_v110\_local\_flow\_ctrl\_mode}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_local\_flow\_ctrl\_mode}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+v110\+\_\+local\+\_\+flow\+\_\+ctrl\+\_\+mode}}



V.\+110 5.\+4.\+1 Local flow control (DTE-\/\+DCE or TE-\/\+TA) mode. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_NONE@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_NONE}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_LOCAL\_FLOW\_CTRL\_NONE@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_NONE}}}\mbox{\label{v110__ta_8h_a7ba472f6c86d1f51395b063875a7b52da021f0e486ba50327c7c6900fd8571489}} 
OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+NONE&No local flow control. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_133\_106@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_133\_106}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_LOCAL\_FLOW\_CTRL\_133\_106@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_133\_106}}}\mbox{\label{v110__ta_8h_a7ba472f6c86d1f51395b063875a7b52da40faebd6fbe55abfd8e13d84ef884f81}} 
OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+133\+\_\+106&5.\+4.\+1.\+1 133/106 operation \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_105\_106@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_105\_106}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_LOCAL\_FLOW\_CTRL\_105\_106@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_105\_106}}}\mbox{\label{v110__ta_8h_a7ba472f6c86d1f51395b063875a7b52dab372f6597712837cb592225b8e97fb19}} 
OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+105\+\_\+106&5.\+4.\+1.\+2 105/106 operation \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_XON\_XOFF@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_XON\_XOFF}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_LOCAL\_FLOW\_CTRL\_XON\_XOFF@{OSMO\_V110\_LOCAL\_FLOW\_CTRL\_XON\_XOFF}}}\mbox{\label{v110__ta_8h_a7ba472f6c86d1f51395b063875a7b52da8b2b501c49816877c3d188ef5fe9bcd3}} 
OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+XON\+\_\+\+XOFF&5.\+4.\+1.\+3 XON/\+XOFF operation \\
\hline

\end{DoxyEnumFields}
\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9d}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_circuit@{osmo\_v110\_ta\_circuit}}
\index{osmo\_v110\_ta\_circuit@{osmo\_v110\_ta\_circuit}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_circuit}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit}}



ITU-\/T Table 9 \char`\"{}\+Interchange circuit\char`\"{} (see also ITU-\/T V.\+24 Chapter 3). 

XXX\+: Not all circuits are present here, only those which we actually use. TODO\+: add human-\/friendly abbreviated circuit names. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_C\_105@{OSMO\_V110\_TA\_C\_105}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_C\_105@{OSMO\_V110\_TA\_C\_105}}}\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9da878633780ed5a59c0482b0d6b00f08b5}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+105&DTE-\/$>$DCE $\vert$ RTS (Request to Send) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_C\_106@{OSMO\_V110\_TA\_C\_106}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_C\_106@{OSMO\_V110\_TA\_C\_106}}}\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9da496623cc3e9aad908e8b22d2b4d3b154}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+106&DTE$<$-\/DCE $\vert$ CTS (Clear to Send) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_C\_107@{OSMO\_V110\_TA\_C\_107}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_C\_107@{OSMO\_V110\_TA\_C\_107}}}\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9da03529b04d1a40c6bb727356a80014aa0}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+107&DTE$<$-\/DCE $\vert$ DSR (Data Set Ready) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_C\_108@{OSMO\_V110\_TA\_C\_108}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_C\_108@{OSMO\_V110\_TA\_C\_108}}}\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9da521223bfde64425a1e7fcf1f521a1ec1}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+108&DTE-\/$>$DCE $\vert$ DTR (Data Terminal Ready) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_C\_109@{OSMO\_V110\_TA\_C\_109}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_C\_109@{OSMO\_V110\_TA\_C\_109}}}\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9da485c7b77964088f4f173f989fcbdaa84}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+109&DTE$<$-\/DCE $\vert$ DCD (Data Carrier Detect) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_C\_133@{OSMO\_V110\_TA\_C\_133}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_C\_133@{OSMO\_V110\_TA\_C\_133}}}\mbox{\label{v110__ta_8h_a6c335c645b1d7ef249806633136efd9da8d7b47746a8ae2008dfb5eee54a6c5a8}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+133&DTE-\/$>$DCE $\vert$ Ready for receiving. \\
\hline

\end{DoxyEnumFields}
\mbox{\label{v110__ta_8h_a3fd84054dd11edd2ff69728745b073e4}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_timer@{osmo\_v110\_ta\_timer}}
\index{osmo\_v110\_ta\_timer@{osmo\_v110\_ta\_timer}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_timer}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+timer}}



Various timers for a V.\+110 TA instance. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_TIMER\_X1@{OSMO\_V110\_TA\_TIMER\_X1}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_TIMER\_X1@{OSMO\_V110\_TA\_TIMER\_X1}}}\mbox{\label{v110__ta_8h_a3fd84054dd11edd2ff69728745b073e4aeb35bd9b9b985d54c1d7cafe856ecaec}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+TIMER\+\_\+\+X1&7.\+1.\+5 Loss of frame synchronization\+: sync recovery timer. T-\/number is not assigned in V.\+110, so we call it X1. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_TIMER\_T1@{OSMO\_V110\_TA\_TIMER\_T1}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_TIMER\_T1@{OSMO\_V110\_TA\_TIMER\_T1}}}\mbox{\label{v110__ta_8h_a3fd84054dd11edd2ff69728745b073e4a7838332de20dc0e88d6f2f58a31ac1b6}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+TIMER\+\_\+\+T1&7.\+1.\+2 Connect TA to line\+: sync establishment timer \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_V110\_TA\_TIMER\_T2@{OSMO\_V110\_TA\_TIMER\_T2}!v110\_ta.h@{v110\_ta.h}}\index{v110\_ta.h@{v110\_ta.h}!OSMO\_V110\_TA\_TIMER\_T2@{OSMO\_V110\_TA\_TIMER\_T2}}}\mbox{\label{v110__ta_8h_a3fd84054dd11edd2ff69728745b073e4ab12f7090dfc4166d999737f4a31a9c76}} 
OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+TIMER\+\_\+\+T2&7.\+1.\+4 Disconnect mode\+: disconnect confirmation timer \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{v110__ta_8h_ad0eeb730509b01bf7cc00ebc7a6c39c3}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_alloc@{osmo\_v110\_ta\_alloc}}
\index{osmo\_v110\_ta\_alloc@{osmo\_v110\_ta\_alloc}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$ osmo\+\_\+v110\+\_\+ta\+\_\+alloc (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{const char $\ast$}]{name,  }\item[{const struct \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg} $\ast$}]{cfg }\end{DoxyParamCaption})}



Allocate a V.\+110 TA (Terminal Adapter) instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ctx} & parent talloc context. \\
\hline
\mbox{\texttt{ in}}  & {\em name} & name of the TA instance. \\
\hline
\mbox{\texttt{ in}}  & {\em cfg} & initial configuration of the TA instance. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to allocated TA instance; NULL on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::cfg}, \textbf{ DLGLOBAL}, \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg\+::flow\+\_\+ctrl}, \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg\+::local}, \textbf{ LOGL\+\_\+\+DEBUG}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGP}, \textbf{ name}, \textbf{ osmo\+\_\+v110\+\_\+ta\+::name}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+free()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+state\+\_\+chg}, \textbf{ osmo\+\_\+tdefs\+\_\+reset()}, \textbf{ OSMO\+\_\+\+V110\+\_\+\+LOCAL\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+NONE}, \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+fsm}, \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg\+::rx\+\_\+cb}, \textbf{ osmo\+\_\+v110\+\_\+ta\+::\+Tdefs}, \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+cfg\+::tx\+\_\+cb}, \textbf{ V110\+\_\+\+TA\+\_\+\+ST\+\_\+\+IDLE\+\_\+\+READY}, and \textbf{ v110\+\_\+ta\+\_\+tdef}.

\mbox{\label{v110__ta_8h_a5472e4222a6d47b6048dbdce53537109}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_circuit\_desc@{osmo\_v110\_ta\_circuit\_desc}}
\index{osmo\_v110\_ta\_circuit\_desc@{osmo\_v110\_ta\_circuit\_desc}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_circuit\_desc()}
{\footnotesize\ttfamily static const char $\ast$ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+desc (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit}}]{circuit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Get a brief description of the given TA\textquotesingle{}s circuit. 



References \textbf{ get\+\_\+value\+\_\+string()}, and \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+descs}.

\mbox{\label{v110__ta_8h_a58c9ec40fc4c16cea6a692c4d13cb07d}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_circuit\_name@{osmo\_v110\_ta\_circuit\_name}}
\index{osmo\_v110\_ta\_circuit\_name@{osmo\_v110\_ta\_circuit\_name}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_circuit\_name()}
{\footnotesize\ttfamily static const char $\ast$ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+name (\begin{DoxyParamCaption}\item[{enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit}}]{circuit }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Get a short name of the given TA\textquotesingle{}s circuit (format\+: NNN[/\+ABBR]). 



References \textbf{ get\+\_\+value\+\_\+string()}, and \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+names}.



Referenced by \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+set\+\_\+circuit()}.

\mbox{\label{v110__ta_8h_adcf60687fd6b8db394afb77436753288}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_desync\_ind@{osmo\_v110\_ta\_desync\_ind}}
\index{osmo\_v110\_ta\_desync\_ind@{osmo\_v110\_ta\_desync\_ind}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_desync\_ind()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+ta\+\_\+desync\+\_\+ind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta }\end{DoxyParamCaption})}



Indicate a synchronization loss event. 

This function is intended to be called when the lower layer experiences a loss of synchronization with the frame clock.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to indicate the event to. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, and \textbf{ V110\+\_\+\+TA\+\_\+\+EV\+\_\+\+DESYNC\+\_\+\+IND}.

\mbox{\label{v110__ta_8h_a99d319cad4a911b4bd47819e6797b9d3}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_frame\_in@{osmo\_v110\_ta\_frame\_in}}
\index{osmo\_v110\_ta\_frame\_in@{osmo\_v110\_ta\_frame\_in}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_frame\_in()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+ta\+\_\+frame\+\_\+in (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta,  }\item[{const struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$}]{in }\end{DoxyParamCaption})}



Feed a [decoded] V.\+110 frame into the given TA instance. 

This function, like its {\itshape out counterpart, is intended to be used by the lower layers receiving V.\+110 frames over some medium. The caller of this function is responsible for finding the synchronization pattern (if needed), aligning to the frame boundaries, and decoding frames using \doxyref{osmo\+\_\+v110\+\_\+decode\+\_\+frame()}{p.}{v110_8h_acc6f2e28e2a12d015e2dc1abd9161323} or osmo\+\_\+csd}$\ast$\+\_\+decode\+\_\+frame().

Bits E1/\+E2/\+E3 are expected to be set by the caller (if not being transmitted over the medium) in accordance with the configured synchronous user rate.

Bits D1..D48 are passed to the bit rate adaption function RA1. The resulting output is then passed to the upper layer (application) via the configured .rx\+\_\+cb(). Though, in certain states of the TA\textquotesingle{}s FSM, bits D1..D48 are ignored and the upper layer gets a sequence of binary \textquotesingle{}0\textquotesingle{} or \textquotesingle{}1\textquotesingle{}.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to feed the given frame into. \\
\hline
\mbox{\texttt{ in}}  & {\em in} & pointer to a [decoded] V.\+110 frame. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, and \textbf{ V110\+\_\+\+TA\+\_\+\+EV\+\_\+\+RX\+\_\+\+FRAME\+\_\+\+IND}.

\mbox{\label{v110__ta_8h_aa8a0dbcbe6b0aee794156274cc49efe1}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_frame\_out@{osmo\_v110\_ta\_frame\_out}}
\index{osmo\_v110\_ta\_frame\_out@{osmo\_v110\_ta\_frame\_out}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_frame\_out()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+ta\+\_\+frame\+\_\+out (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta,  }\item[{struct \textbf{ osmo\+\_\+v110\+\_\+decoded\+\_\+frame} $\ast$}]{out }\end{DoxyParamCaption})}



Pull a [decoded] V.\+110 frame out of the given TA instance. 

This function, like its {\itshape in counterpart, is intended to be used by the lower layers transmitting V.\+110 frames over some medium. The caller of this function is responsible for encoding the output frame using \doxyref{osmo\+\_\+v110\+\_\+encode\+\_\+frame()}{p.}{v110_8h_af3cbd1398cd8f1548c12f88be13368fe} or osmo\+\_\+csd}$\ast$\+\_\+encode\+\_\+frame().

Bits E1/\+E2/\+E3 are set in accordance with the configured synchronous user rate. Bits E4/\+E5/\+E6/\+E7 are unconditionally set to binary \textquotesingle{}1\textquotesingle{}.

Bits D1..D48 are set depending on the state of TA\textquotesingle{}s FSM\+:


\begin{DoxyItemize}
\item In data transfer mode, the user bits are obtained from the upper layer (application) via the configured .tx\+\_\+cb(), and then passed to the bit rate adaption function RA1, which generates bits D1..D48.
\item In other modes, bits D1..D48 are all set to binary \textquotesingle{}0\textquotesingle{} or \textquotesingle{}1\textquotesingle{}.
\end{DoxyItemize}


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to pull a frame from. \\
\hline
\mbox{\texttt{ out}}  & {\em out} & where to store a [decoded] V.\+110 frame. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, and \textbf{ V110\+\_\+\+TA\+\_\+\+EV\+\_\+\+TX\+\_\+\+FRAME\+\_\+\+RTS}.

\mbox{\label{v110__ta_8h_a63cf615faccd81eae9fded389959a652}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_free@{osmo\_v110\_ta\_free}}
\index{osmo\_v110\_ta\_free@{osmo\_v110\_ta\_free}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_free()}
{\footnotesize\ttfamily void osmo\+\_\+v110\+\_\+ta\+\_\+free (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta }\end{DoxyParamCaption})}



Release memory taken by the given V.\+110 TA instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to be free()d. \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+free()}.

\mbox{\label{v110__ta_8h_a371c4a31253b3deabf2ec7f6e63ffcda}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_get\_circuit@{osmo\_v110\_ta\_get\_circuit}}
\index{osmo\_v110\_ta\_get\_circuit@{osmo\_v110\_ta\_get\_circuit}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_get\_circuit()}
{\footnotesize\ttfamily bool osmo\+\_\+v110\+\_\+ta\+\_\+get\+\_\+circuit (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta,  }\item[{enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit}}]{circuit }\end{DoxyParamCaption})}



Get state of a V.\+24 circuit of the given TA instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to get the circuit state. \\
\hline
\mbox{\texttt{ in}}  & {\em circuit} & a V.\+24 circuit, one of OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+$\ast$. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
circuit state\+: active (true) or inactive (false). 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::state}, \textbf{ V24\+\_\+\+FLAGMASK\+\_\+\+IS\+\_\+\+ON}, and \textbf{ v110\+\_\+ta\+\_\+state\+::v24\+\_\+flags}.

\mbox{\label{v110__ta_8h_a9806b327f303a8d76c25bcafd421ce86}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_get\_status@{osmo\_v110\_ta\_get\_status}}
\index{osmo\_v110\_ta\_get\_status@{osmo\_v110\_ta\_get\_status}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_get\_status()}
{\footnotesize\ttfamily unsigned int osmo\+\_\+v110\+\_\+ta\+\_\+get\+\_\+status (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta }\end{DoxyParamCaption})}



Get the V.\+24 status bit-\/mask of the given TA instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to get the circuit bit-\/mask. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bitmask of OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+$\ast$. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::state}, and \textbf{ v110\+\_\+ta\+\_\+state\+::v24\+\_\+flags}.

\mbox{\label{v110__ta_8h_aebdf2e129196caf25edce055d36a0aa7}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_set\_circuit@{osmo\_v110\_ta\_set\_circuit}}
\index{osmo\_v110\_ta\_set\_circuit@{osmo\_v110\_ta\_set\_circuit}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_set\_circuit()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+ta\+\_\+set\+\_\+circuit (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta,  }\item[{enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit}}]{circuit,  }\item[{bool}]{active }\end{DoxyParamCaption})}



Activate/deactivate a V.\+24 circuit of the given TA instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to update the circuit state. \\
\hline
\mbox{\texttt{ in}}  & {\em circuit} & a V.\+24 circuit, one of OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+$\ast$ (DTE-\/$>$DCE). \\
\hline
\mbox{\texttt{ in}}  & {\em active} & activate (true) or deactivate (false) the circuit. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, \textbf{ LOGL\+\_\+\+ERROR}, \textbf{ LOGPFSML}, \textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+105}, \textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+108}, \textbf{ OSMO\+\_\+\+V110\+\_\+\+TA\+\_\+\+C\+\_\+133}, \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+name()}, \textbf{ osmo\+\_\+v110\+\_\+ta\+::state}, \textbf{ v110\+\_\+ta\+\_\+set\+\_\+status()}, \textbf{ V24\+\_\+\+FLAGMASK\+\_\+\+SET\+\_\+\+OFF}, \textbf{ V24\+\_\+\+FLAGMASK\+\_\+\+SET\+\_\+\+ON}, and \textbf{ v110\+\_\+ta\+\_\+state\+::v24\+\_\+flags}.

\mbox{\label{v110__ta_8h_a6078e0dd1bcc9edd5fa1f9374f398c90}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_set\_timer\_val\_ms@{osmo\_v110\_ta\_set\_timer\_val\_ms}}
\index{osmo\_v110\_ta\_set\_timer\_val\_ms@{osmo\_v110\_ta\_set\_timer\_val\_ms}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_set\_timer\_val\_ms()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+ta\+\_\+set\+\_\+timer\+\_\+val\+\_\+ms (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta,  }\item[{enum \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+timer}}]{timer,  }\item[{unsigned long}]{val\+\_\+ms }\end{DoxyParamCaption})}



Configure a timer of the given V.\+110 TA instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to be configured. \\
\hline
\mbox{\texttt{ in}}  & {\em timer} & a timer to be configured. \\
\hline
\mbox{\texttt{ in}}  & {\em val\+\_\+ms} & the new timeout value to set (in milliseconds). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success; negative on error. 
\end{DoxyReturn}


References \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+MS}, \textbf{ osmo\+\_\+tdef\+\_\+set()}, and \textbf{ osmo\+\_\+v110\+\_\+ta\+::\+Tdefs}.

\mbox{\label{v110__ta_8h_af1155bfc692c13776dfe4a30e4df838b}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_sync\_ind@{osmo\_v110\_ta\_sync\_ind}}
\index{osmo\_v110\_ta\_sync\_ind@{osmo\_v110\_ta\_sync\_ind}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_sync\_ind()}
{\footnotesize\ttfamily int osmo\+\_\+v110\+\_\+ta\+\_\+sync\+\_\+ind (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+v110\+\_\+ta} $\ast$}]{ta }\end{DoxyParamCaption})}



Indicate a synchronization establishment event. 

This function is intended to be called when the lower layer achieves synchronization to the frame clock.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ta} & TA instance to indicate the event to. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 in case of success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+v110\+\_\+ta\+::fi}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch}, and \textbf{ V110\+\_\+\+TA\+\_\+\+EV\+\_\+\+SYNC\+\_\+\+IND}.



\doxysubsection{Variable Documentation}
\mbox{\label{v110__ta_8h_a08e4007d6bda086965e900c6afefa55d}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_circuit\_descs@{osmo\_v110\_ta\_circuit\_descs}}
\index{osmo\_v110\_ta\_circuit\_descs@{osmo\_v110\_ta\_circuit\_descs}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_circuit\_descs}
{\footnotesize\ttfamily const struct \textbf{ value\+\_\+string} osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+descs[$\,$]\hspace{0.3cm}{\ttfamily [extern]}}



Referenced by \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+desc()}.

\mbox{\label{v110__ta_8h_a09ef610f36ad607fd2c31f09da599a95}} 
\index{v110\_ta.h@{v110\_ta.h}!osmo\_v110\_ta\_circuit\_names@{osmo\_v110\_ta\_circuit\_names}}
\index{osmo\_v110\_ta\_circuit\_names@{osmo\_v110\_ta\_circuit\_names}!v110\_ta.h@{v110\_ta.h}}
\doxysubsubsection{osmo\_v110\_ta\_circuit\_names}
{\footnotesize\ttfamily const struct \textbf{ value\+\_\+string} osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+names[$\,$]\hspace{0.3cm}{\ttfamily [extern]}}



Referenced by \textbf{ osmo\+\_\+v110\+\_\+ta\+\_\+circuit\+\_\+name()}.

