\doxysection{include/osmocom/vty/tdef\+\_\+vty.h File Reference}
\label{tdef__vty_8h}\index{include/osmocom/vty/tdef\_vty.h@{include/osmocom/vty/tdef\_vty.h}}


API to configure \textbf{ osmo\+\_\+tdef} Tnnn timers from VTY configuration.  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdarg.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/vty/command.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+T}~\char`\"{}TNNNN\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+DOC\+\_\+T}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+T\+\_\+\+OPTIONAL}~\char`\"{}[\char`\"{} \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+T} \char`\"{}]\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+VAL}~\char`\"{}($<$0-\/2147483647$>$$\vert$default)\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+DOC\+\_\+\+VAL}~\char`\"{}New timer \textbf{ value\textbackslash{}n}\char`\"{} \char`\"{}Set to default timer \textbf{ value\textbackslash{}n}\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+VAL\+\_\+\+OPTIONAL}~\char`\"{}[\char`\"{} \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+VAL} \char`\"{}]\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+SET}~\textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+T} \char`\"{} \char`\"{} \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+VAL}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+DOC\+\_\+\+SET}~\textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+DOC\+\_\+T} \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+DOC\+\_\+\+VAL}
\item 
\#define \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+SET\+\_\+\+OPTIONAL}~\textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+T\+\_\+\+OPTIONAL} \char`\"{} \char`\"{} \textbf{ OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+VAL\+\_\+\+OPTIONAL}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+set\+\_\+cmd} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$\textbf{ tdefs}, const char $\ast$$\ast$args)
\begin{DoxyCompactList}\small\item\em Apply a timer configuration from VTY argument strings. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+show\+\_\+cmd} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$\textbf{ tdefs}, const char $\ast$\textbf{ T\+\_\+arg}, const char $\ast$prefix\+\_\+fmt,...)
\begin{DoxyCompactList}\small\item\em Output one or all timers to the VTY, as for a VTY command like \textquotesingle{}show timer [TNNNN]\textquotesingle{}. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+write} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$\textbf{ tdefs}, const char $\ast$prefix\+\_\+fmt,...)
\begin{DoxyCompactList}\small\item\em Write current timer configuration arguments to the vty. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+one} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$t, const char $\ast$prefix\+\_\+fmt,...)
\begin{DoxyCompactList}\small\item\em Write to VTY the current status of one timer. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+all} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$\textbf{ tdefs}, const char $\ast$prefix\+\_\+fmt,...)
\begin{DoxyCompactList}\small\item\em Write to VTY the current status of all given timers. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+one\+\_\+va} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$t, const char $\ast$prefix\+\_\+fmt, va\+\_\+list va)
\begin{DoxyCompactList}\small\item\em Write to VTY the current status of one timer. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+out\+\_\+all\+\_\+va} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$\textbf{ tdefs}, const char $\ast$prefix\+\_\+fmt, va\+\_\+list va)
\begin{DoxyCompactList}\small\item\em Write to VTY the current status of all given timers. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+tdef} $\ast$ \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+parse\+\_\+\+T\+\_\+arg} (struct \textbf{ vty} $\ast$\textbf{ vty}, struct \textbf{ osmo\+\_\+tdef} $\ast$\textbf{ tdefs}, const char $\ast$T\+\_\+str)
\begin{DoxyCompactList}\small\item\em Parse an argument like \char`\"{}1234\char`\"{}, \char`\"{}\+T1234\char`\"{}, \char`\"{}t1234\char`\"{}, or \char`\"{}\+X1234\char`\"{}, \char`\"{}x1234\char`\"{}, as from OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+T. \end{DoxyCompactList}\item 
unsigned long \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+parse\+\_\+val\+\_\+arg} (const char $\ast$val\+\_\+arg, unsigned long default\+\_\+val)
\begin{DoxyCompactList}\small\item\em Parse an argument of the form \char`\"{}(0-\/2147483647$\vert$default)\char`\"{}, as from OSMO\+\_\+\+TDEF\+\_\+\+VTY\+\_\+\+ARG\+\_\+\+VAL. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+groups\+\_\+init} (unsigned int parent\+\_\+cfg\+\_\+node, struct \textbf{ osmo\+\_\+tdef\+\_\+group} $\ast$groups)
\begin{DoxyCompactList}\small\item\em Convenience implementation for keeping a fixed set of timer groups in a program. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+tdef\+\_\+vty\+\_\+groups\+\_\+write} (struct \textbf{ vty} $\ast$\textbf{ vty}, const char $\ast$indent)
\begin{DoxyCompactList}\small\item\em Write the global \textbf{ osmo\+\_\+tdef\+\_\+group} configuration to VTY, as previously passed to \doxyref{osmo\+\_\+tdef\+\_\+vty\+\_\+groups\+\_\+init()}{p.}{group__Tdef__VTY_ga7deb1e36c8f098f16f0a344b3039088c}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
API to configure \textbf{ osmo\+\_\+tdef} Tnnn timers from VTY configuration. 

