\doxysection{v110\+\_\+ta.\+h}
\label{v110__ta_8h_source}\index{include/osmocom/isdn/v110\_ta.h@{include/osmocom/isdn/v110\_ta.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <stdbool.h>}}
\DoxyCodeLine{5 }
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/core/utils.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/core/bits.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/isdn/v110.h>}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{comment}{/* Definition of this struct is [intentionally] kept private */}}
\DoxyCodeLine{11 \textcolor{keyword}{struct }osmo\_v110\_ta;}
\DoxyCodeLine{12 }
\DoxyCodeLine{14 \textcolor{keyword}{enum} osmo\_v110\_local\_flow\_ctrl\_mode \{}
\DoxyCodeLine{15         OSMO\_V110\_LOCAL\_FLOW\_CTRL\_NONE,           }
\DoxyCodeLine{16         OSMO\_V110\_LOCAL\_FLOW\_CTRL\_133\_106,     }
\DoxyCodeLine{17         OSMO\_V110\_LOCAL\_FLOW\_CTRL\_105\_106,     }
\DoxyCodeLine{18         OSMO\_V110\_LOCAL\_FLOW\_CTRL\_XON\_XOFF,   }
\DoxyCodeLine{19 \};}
\DoxyCodeLine{20 }
\DoxyCodeLine{22 \textcolor{keyword}{struct }osmo\_v110\_ta\_cfg \{}
\DoxyCodeLine{24         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} flags;}
\DoxyCodeLine{26         \textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate rate;}
\DoxyCodeLine{27 }
\DoxyCodeLine{29         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{31                 \textcolor{keyword}{enum} osmo\_v110\_local\_flow\_ctrl\_mode local;}
\DoxyCodeLine{33                 \textcolor{keywordtype}{bool} end\_to\_end;}
\DoxyCodeLine{34         \} flow\_ctrl;}
\DoxyCodeLine{35 }
\DoxyCodeLine{37         \textcolor{keywordtype}{void} *priv;}
\DoxyCodeLine{38 }
\DoxyCodeLine{43         void (*rx\_cb)(\textcolor{keywordtype}{void} *priv, \textcolor{keyword}{const} ubit\_t *buf, \textcolor{keywordtype}{size\_t} buf\_size);}
\DoxyCodeLine{44 }
\DoxyCodeLine{49         void (*tx\_cb)(\textcolor{keywordtype}{void} *priv, ubit\_t *buf, \textcolor{keywordtype}{size\_t} buf\_size);}
\DoxyCodeLine{50 }
\DoxyCodeLine{54         void (*status\_update\_cb)(\textcolor{keywordtype}{void} *priv, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} status);}
\DoxyCodeLine{55 \};}
\DoxyCodeLine{56 }
\DoxyCodeLine{57 \textcolor{keyword}{struct }osmo\_v110\_ta *osmo\_v110\_ta\_alloc(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{58                                         \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_v110\_ta\_cfg *cfg);}
\DoxyCodeLine{59 \textcolor{keywordtype}{void} osmo\_v110\_ta\_free(\textcolor{keyword}{struct} osmo\_v110\_ta *ta);}
\DoxyCodeLine{60 }
\DoxyCodeLine{62 \textcolor{keyword}{enum} osmo\_v110\_ta\_timer \{}
\DoxyCodeLine{65         OSMO\_V110\_TA\_TIMER\_X1              = -\/1,}
\DoxyCodeLine{67         OSMO\_V110\_TA\_TIMER\_T1              = 1,}
\DoxyCodeLine{69         OSMO\_V110\_TA\_TIMER\_T2              = 2,}
\DoxyCodeLine{70 \};}
\DoxyCodeLine{71 }
\DoxyCodeLine{72 \textcolor{keywordtype}{int} osmo\_v110\_ta\_set\_timer\_val\_ms(\textcolor{keyword}{struct} osmo\_v110\_ta *ta,}
\DoxyCodeLine{73                                   \textcolor{keyword}{enum} osmo\_v110\_ta\_timer timer,}
\DoxyCodeLine{74                                   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} val\_ms);}
\DoxyCodeLine{75 }
\DoxyCodeLine{76 \textcolor{keywordtype}{int} osmo\_v110\_ta\_frame\_in(\textcolor{keyword}{struct} osmo\_v110\_ta *ta, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_v110\_decoded\_frame *in);}
\DoxyCodeLine{77 \textcolor{keywordtype}{int} osmo\_v110\_ta\_frame\_out(\textcolor{keyword}{struct} osmo\_v110\_ta *ta, \textcolor{keyword}{struct} osmo\_v110\_decoded\_frame *out);}
\DoxyCodeLine{78 }
\DoxyCodeLine{79 \textcolor{keywordtype}{int} osmo\_v110\_ta\_sync\_ind(\textcolor{keyword}{struct} osmo\_v110\_ta *ta);}
\DoxyCodeLine{80 \textcolor{keywordtype}{int} osmo\_v110\_ta\_desync\_ind(\textcolor{keyword}{struct} osmo\_v110\_ta *ta);}
\DoxyCodeLine{81 }
\DoxyCodeLine{85 \textcolor{keyword}{enum} osmo\_v110\_ta\_circuit \{}
\DoxyCodeLine{86         OSMO\_V110\_TA\_C\_105,           }
\DoxyCodeLine{87         OSMO\_V110\_TA\_C\_106,           }
\DoxyCodeLine{88         OSMO\_V110\_TA\_C\_107,           }
\DoxyCodeLine{89         OSMO\_V110\_TA\_C\_108,           }
\DoxyCodeLine{90         OSMO\_V110\_TA\_C\_109,           }
\DoxyCodeLine{91         OSMO\_V110\_TA\_C\_133,           }
\DoxyCodeLine{92 \};}
\DoxyCodeLine{93 }
\DoxyCodeLine{94 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_v110\_ta\_circuit\_names[];}
\DoxyCodeLine{95 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_v110\_ta\_circuit\_descs[];}
\DoxyCodeLine{96 }
\DoxyCodeLine{98 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_v110\_ta\_circuit\_name(\textcolor{keyword}{enum} osmo\_v110\_ta\_circuit circuit)}
\DoxyCodeLine{99 \{}
\DoxyCodeLine{100         \textcolor{keywordflow}{return} get\_value\_string(osmo\_v110\_ta\_circuit\_names, circuit);}
\DoxyCodeLine{101 \}}
\DoxyCodeLine{102 }
\DoxyCodeLine{104 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_v110\_ta\_circuit\_desc(\textcolor{keyword}{enum} osmo\_v110\_ta\_circuit circuit)}
\DoxyCodeLine{105 \{}
\DoxyCodeLine{106         \textcolor{keywordflow}{return} get\_value\_string(osmo\_v110\_ta\_circuit\_descs, circuit);}
\DoxyCodeLine{107 \}}
\DoxyCodeLine{108 }
\DoxyCodeLine{109 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} osmo\_v110\_ta\_get\_status(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_v110\_ta *ta);}
\DoxyCodeLine{110 \textcolor{keywordtype}{bool} osmo\_v110\_ta\_get\_circuit(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_v110\_ta *ta,}
\DoxyCodeLine{111                               \textcolor{keyword}{enum} osmo\_v110\_ta\_circuit circuit);}
\DoxyCodeLine{112 \textcolor{keywordtype}{int} osmo\_v110\_ta\_set\_circuit(\textcolor{keyword}{struct} osmo\_v110\_ta *ta,}
\DoxyCodeLine{113                              \textcolor{keyword}{enum} osmo\_v110\_ta\_circuit circuit, \textcolor{keywordtype}{bool} active);}

\end{DoxyCode}
