\doxysection{src/ctrl/fsm\+\_\+ctrl\+\_\+commands.c File Reference}
\label{fsm__ctrl__commands_8c}\index{src/ctrl/fsm\_ctrl\_commands.c@{src/ctrl/fsm\_ctrl\_commands.c}}
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/fsm.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/ctrl/control\+\_\+cmd.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/ctrl/control\+\_\+if.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static int \textbf{ fsm\+\_\+ctrl\+\_\+node\+\_\+lookup} (void $\ast$\textbf{ data}, \textbf{ vector} vline, int $\ast$\textbf{ node\+\_\+type}, void $\ast$$\ast$node\+\_\+data, int $\ast$i)
\begin{DoxyCompactList}\small\item\em control interface lookup function for FSM\textquotesingle{}s \end{DoxyCompactList}\item 
static int \textbf{ get\+\_\+fsm\+\_\+inst\+\_\+state} (struct \textbf{ ctrl\+\_\+cmd} $\ast$cmd, void $\ast$\textbf{ data})
\item 
\textbf{ CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO} (fsm\+\_\+inst\+\_\+state, \char`\"{}state\char`\"{})
\item 
static int \textbf{ get\+\_\+fsm\+\_\+inst\+\_\+parent\+\_\+name} (struct \textbf{ ctrl\+\_\+cmd} $\ast$cmd, void $\ast$\textbf{ data})
\item 
\textbf{ CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO} (fsm\+\_\+inst\+\_\+parent\+\_\+name, \char`\"{}parent-\/\textbf{ name}\char`\"{})
\item 
static int \textbf{ get\+\_\+fsm\+\_\+inst\+\_\+timer} (struct \textbf{ ctrl\+\_\+cmd} $\ast$cmd, void $\ast$\textbf{ data})
\item 
\textbf{ CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO} (fsm\+\_\+inst\+\_\+timer, \char`\"{}timer\char`\"{})
\item 
static int \textbf{ get\+\_\+fsm\+\_\+inst\+\_\+dump} (struct \textbf{ ctrl\+\_\+cmd} $\ast$cmd, void $\ast$\textbf{ data})
\item 
\textbf{ CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO} (fsm\+\_\+inst\+\_\+dump, \char`\"{}dump\char`\"{})
\item 
int \textbf{ osmo\+\_\+fsm\+\_\+ctrl\+\_\+cmds\+\_\+install} (void)
\end{DoxyCompactItemize}


\doxysubsection{Function Documentation}
\mbox{\label{fsm__ctrl__commands_8c_adc5e8c7d865464e105f9a38c8dbd78c5}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}}
\index{CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{CTRL\_CMD\_DEFINE\_RO()\hspace{0.1cm}{\footnotesize\ttfamily [1/4]}}
{\footnotesize\ttfamily CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO (\begin{DoxyParamCaption}\item[{fsm\+\_\+inst\+\_\+dump}]{,  }\item[{\char`\"{}dump\char`\"{}}]{ }\end{DoxyParamCaption})}

\mbox{\label{fsm__ctrl__commands_8c_af6ddba7bfe364654a9449b535c021ebc}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}}
\index{CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{CTRL\_CMD\_DEFINE\_RO()\hspace{0.1cm}{\footnotesize\ttfamily [2/4]}}
{\footnotesize\ttfamily CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO (\begin{DoxyParamCaption}\item[{fsm\+\_\+inst\+\_\+parent\+\_\+name}]{,  }\item[{\char`\"{}parent-\/\textbf{ name}\char`\"{}}]{ }\end{DoxyParamCaption})}

\mbox{\label{fsm__ctrl__commands_8c_a1318ff4d1893a95c5dfc1c62e7989243}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}}
\index{CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{CTRL\_CMD\_DEFINE\_RO()\hspace{0.1cm}{\footnotesize\ttfamily [3/4]}}
{\footnotesize\ttfamily CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO (\begin{DoxyParamCaption}\item[{fsm\+\_\+inst\+\_\+state}]{,  }\item[{\char`\"{}state\char`\"{}}]{ }\end{DoxyParamCaption})}

\mbox{\label{fsm__ctrl__commands_8c_a3ace6a1996de712c6b03dcfbb34e5a86}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}}
\index{CTRL\_CMD\_DEFINE\_RO@{CTRL\_CMD\_DEFINE\_RO}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{CTRL\_CMD\_DEFINE\_RO()\hspace{0.1cm}{\footnotesize\ttfamily [4/4]}}
{\footnotesize\ttfamily CTRL\+\_\+\+CMD\+\_\+\+DEFINE\+\_\+\+RO (\begin{DoxyParamCaption}\item[{fsm\+\_\+inst\+\_\+timer}]{,  }\item[{\char`\"{}timer\char`\"{}}]{ }\end{DoxyParamCaption})}

\mbox{\label{fsm__ctrl__commands_8c_ace191dd1f651798d9556e4528575090a}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!fsm\_ctrl\_node\_lookup@{fsm\_ctrl\_node\_lookup}}
\index{fsm\_ctrl\_node\_lookup@{fsm\_ctrl\_node\_lookup}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{fsm\_ctrl\_node\_lookup()}
{\footnotesize\ttfamily static int fsm\+\_\+ctrl\+\_\+node\+\_\+lookup (\begin{DoxyParamCaption}\item[{void $\ast$}]{data,  }\item[{\textbf{ vector}}]{vline,  }\item[{int $\ast$}]{node\+\_\+type,  }\item[{void $\ast$$\ast$}]{node\+\_\+data,  }\item[{int $\ast$}]{i }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



control interface lookup function for FSM\textquotesingle{}s 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em data} & Private data passed to controlif\+\_\+setup() \\
\hline
\mbox{\texttt{ in}}  & {\em vline} & Vector of the line holding the command string \\
\hline
\mbox{\texttt{ out}}  & {\em node\+\_\+type} & type (CTRL\+\_\+\+NODE\+\_\+) that was determined \\
\hline
\mbox{\texttt{ out}}  & {\em node\+\_\+data} & private data of node that was determined \\
\hline
 & {\em i} & Current index into vline, up to which it is parsed \\
\hline
\end{DoxyParams}


References \textbf{ CTRL\+\_\+\+NODE\+\_\+\+FSM}, \textbf{ CTRL\+\_\+\+NODE\+\_\+\+FSM\+\_\+\+INST}, \textbf{ CTRL\+\_\+\+NODE\+\_\+\+ROOT}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::fsm}, \textbf{ osmo\+\_\+fsm\+\_\+find\+\_\+by\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+find\+\_\+by\+\_\+id()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+find\+\_\+by\+\_\+name()}, \textbf{ vector\+\_\+lookup()}, and \textbf{ vector\+\_\+slot}.



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+ctrl\+\_\+cmds\+\_\+install()}.

\mbox{\label{fsm__ctrl__commands_8c_a8142e1f65734ae84669bbfc880f4c340}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!get\_fsm\_inst\_dump@{get\_fsm\_inst\_dump}}
\index{get\_fsm\_inst\_dump@{get\_fsm\_inst\_dump}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{get\_fsm\_inst\_dump()}
{\footnotesize\ttfamily static int get\+\_\+fsm\+\_\+inst\+\_\+dump (\begin{DoxyParamCaption}\item[{struct \textbf{ ctrl\+\_\+cmd} $\ast$}]{cmd,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ osmo\+\_\+fsm\+\_\+inst\+::child}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::children}, \textbf{ CTRL\+\_\+\+CMD\+\_\+\+ERROR}, \textbf{ CTRL\+\_\+\+CMD\+\_\+\+REPLY}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::fsm}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::id}, \textbf{ llist\+\_\+for\+\_\+each\+\_\+entry}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::log\+\_\+level}, \textbf{ log\+\_\+level\+\_\+str()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::name}, \textbf{ ctrl\+\_\+cmd\+::node}, \textbf{ osmo\+\_\+fsm\+\_\+state\+\_\+name()}, \textbf{ osmo\+\_\+timer\+\_\+remaining()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::parent}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::proc}, \textbf{ ctrl\+\_\+cmd\+::reply}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::state}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::T}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+::timer}.

\mbox{\label{fsm__ctrl__commands_8c_a803b8f761557df559c31bd062e87e5d9}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!get\_fsm\_inst\_parent\_name@{get\_fsm\_inst\_parent\_name}}
\index{get\_fsm\_inst\_parent\_name@{get\_fsm\_inst\_parent\_name}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{get\_fsm\_inst\_parent\_name()}
{\footnotesize\ttfamily static int get\+\_\+fsm\+\_\+inst\+\_\+parent\+\_\+name (\begin{DoxyParamCaption}\item[{struct \textbf{ ctrl\+\_\+cmd} $\ast$}]{cmd,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ CTRL\+\_\+\+CMD\+\_\+\+ERROR}, \textbf{ CTRL\+\_\+\+CMD\+\_\+\+REPLY}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::name}, \textbf{ ctrl\+\_\+cmd\+::node}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::parent}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::proc}, and \textbf{ ctrl\+\_\+cmd\+::reply}.

\mbox{\label{fsm__ctrl__commands_8c_a223ff781695079d4cdd12aae899a6525}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!get\_fsm\_inst\_state@{get\_fsm\_inst\_state}}
\index{get\_fsm\_inst\_state@{get\_fsm\_inst\_state}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{get\_fsm\_inst\_state()}
{\footnotesize\ttfamily static int get\+\_\+fsm\+\_\+inst\+\_\+state (\begin{DoxyParamCaption}\item[{struct \textbf{ ctrl\+\_\+cmd} $\ast$}]{cmd,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ CTRL\+\_\+\+CMD\+\_\+\+ERROR}, \textbf{ CTRL\+\_\+\+CMD\+\_\+\+REPLY}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::fsm}, \textbf{ ctrl\+\_\+cmd\+::node}, \textbf{ osmo\+\_\+fsm\+\_\+state\+\_\+name()}, \textbf{ ctrl\+\_\+cmd\+::reply}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+::state}.

\mbox{\label{fsm__ctrl__commands_8c_a4a35d777c20c83f8ac9b8e24af739685}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!get\_fsm\_inst\_timer@{get\_fsm\_inst\_timer}}
\index{get\_fsm\_inst\_timer@{get\_fsm\_inst\_timer}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{get\_fsm\_inst\_timer()}
{\footnotesize\ttfamily static int get\+\_\+fsm\+\_\+inst\+\_\+timer (\begin{DoxyParamCaption}\item[{struct \textbf{ ctrl\+\_\+cmd} $\ast$}]{cmd,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ CTRL\+\_\+\+CMD\+\_\+\+ERROR}, \textbf{ CTRL\+\_\+\+CMD\+\_\+\+REPLY}, \textbf{ ctrl\+\_\+cmd\+::node}, \textbf{ osmo\+\_\+timer\+\_\+remaining()}, \textbf{ ctrl\+\_\+cmd\+::reply}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+::T}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+::timer}.

\mbox{\label{fsm__ctrl__commands_8c_a75dfd578484300659ab0955fc6da83e6}} 
\index{fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}!osmo\_fsm\_ctrl\_cmds\_install@{osmo\_fsm\_ctrl\_cmds\_install}}
\index{osmo\_fsm\_ctrl\_cmds\_install@{osmo\_fsm\_ctrl\_cmds\_install}!fsm\_ctrl\_commands.c@{fsm\_ctrl\_commands.c}}
\doxysubsubsection{osmo\_fsm\_ctrl\_cmds\_install()}
{\footnotesize\ttfamily int osmo\+\_\+fsm\+\_\+ctrl\+\_\+cmds\+\_\+install (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



References \textbf{ ctrl\+\_\+cmd\+\_\+install()}, \textbf{ ctrl\+\_\+lookup\+\_\+register()}, \textbf{ CTRL\+\_\+\+NODE\+\_\+\+FSM\+\_\+\+INST}, and \textbf{ fsm\+\_\+ctrl\+\_\+node\+\_\+lookup()}.



Referenced by \textbf{ ctrl\+\_\+init()}.

