\doxysection{osmo\+\_\+fsm\+\_\+inst Struct Reference}
\label{structosmo__fsm__inst}\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}}


a single instanceof an osmocom finite state machine  




{\ttfamily \#include $<$fsm.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ llist\+\_\+head} \textbf{ list}
\begin{DoxyCompactList}\small\item\em member in the fsm-\/$>$instances list \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+fsm} $\ast$ \textbf{ fsm}
\begin{DoxyCompactList}\small\item\em back-\/pointer to the FSM of which we are an instance \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ id}
\begin{DoxyCompactList}\small\item\em human readable identifier \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ name}
\begin{DoxyCompactList}\small\item\em human readable fully-\/qualified name \end{DoxyCompactList}\item 
void $\ast$ \textbf{ priv}
\begin{DoxyCompactList}\small\item\em some private data of this instance \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+level}
\begin{DoxyCompactList}\small\item\em logging level for this FSM \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ state}
\begin{DoxyCompactList}\small\item\em current state of the FSM \end{DoxyCompactList}\item 
int \textbf{ T}
\begin{DoxyCompactList}\small\item\em timer number for states with time-\/out \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+timer\+\_\+list} \textbf{ timer}
\begin{DoxyCompactList}\small\item\em timer back-\/end for states with time-\/out \end{DoxyCompactList}\item 
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
struct \{\\
\>struct \textbf{ osmo\_fsm\_inst} $\ast$ \textbf{ parent}\\
\>\>{\em the parent FSM that has created us }\\
\>uint32\_t \textbf{ parent\_term\_event}\\
\>\>{\em the event we should send upon termination }\\
\>struct \textbf{ llist\_head} \textbf{ children}\\
\>\>{\em a list of children processes }\\
\>struct \textbf{ llist\_head} \textbf{ child}\\
\>\>{\em \doxyref{llist\_head}{p.}{structllist__head} linked to parent-\/$>$proc.children }\\
\>bool \textbf{ terminating}\\
\>\>{\em Indicator whether \doxyref{osmo\_fsm\_inst\_term()}{p.}{group__fsm_ga22397fdc69a4f1c303bb0b2694d5f2aa} was already invoked on this instance. }\\
\} \textbf{ proc}\\

\end{tabbing}\begin{DoxyCompactList}\small\item\em support for fsm-\/based procedures \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
a single instanceof an osmocom finite state machine 

\doxysubsection{Field Documentation}
\mbox{\label{structosmo__fsm__inst_a62f9d32cea45f8c821d29a48d9e9542c}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!child@{child}}
\index{child@{child}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{child}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} osmo\+\_\+fsm\+\_\+inst\+::child}



\doxyref{llist\+\_\+head}{p.}{structllist__head} linked to parent-\/$>$proc.\+children 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+broadcast\+\_\+children()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+change\+\_\+parent()}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+unlink\+\_\+parent()}.

\mbox{\label{structosmo__fsm__inst_aca771c55413043b0c4cff2a4cada4fd2}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!children@{children}}
\index{children@{children}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{children}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} osmo\+\_\+fsm\+\_\+inst\+::children}



a list of children processes 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+broadcast\+\_\+children()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term\+\_\+children()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+change\+\_\+parent()}.

\mbox{\label{structosmo__fsm__inst_a1679efdf9764bfbe73e3f9d68b7f7c17}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!fsm@{fsm}}
\index{fsm@{fsm}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{fsm}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+fsm}$\ast$ osmo\+\_\+fsm\+\_\+inst\+::fsm}



back-\/pointer to the FSM of which we are an instance 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term()}, \textbf{ fsm\+\_\+tmr\+\_\+cb()}, \textbf{ osmo\+\_\+fsm\+\_\+event\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc\+\_\+child()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+find\+\_\+by\+\_\+id()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+find\+\_\+by\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+state\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+update\+\_\+id\+\_\+f()}, \textbf{ osmo\+\_\+fsm\+\_\+register()}, \textbf{ osmo\+\_\+fsm\+\_\+state\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+unregister()}, \textbf{ state\+\_\+chg()}, and \textbf{ update\+\_\+name()}.

\mbox{\label{structosmo__fsm__inst_a46131006a3d4af6ba930c447640ac76b}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!id@{id}}
\index{id@{id}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{id}
{\footnotesize\ttfamily const char$\ast$ osmo\+\_\+fsm\+\_\+inst\+::id}



human readable identifier 



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc\+\_\+child()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+find\+\_\+by\+\_\+id()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+update\+\_\+id\+\_\+f()}, and \textbf{ update\+\_\+name()}.

\mbox{\label{structosmo__fsm__inst_a8697eec3c65ea86722a365c4bbfccce6}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!list@{list}}
\index{list@{list}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{list}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} osmo\+\_\+fsm\+\_\+inst\+::list}



member in the fsm-\/$>$instances list 



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+free()}.

\mbox{\label{structosmo__fsm__inst_a28f2a18f5f8273fea096d6ff3aa503f7}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!log\_level@{log\_level}}
\index{log\_level@{log\_level}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{log\_level}
{\footnotesize\ttfamily int osmo\+\_\+fsm\+\_\+inst\+::log\+\_\+level}



logging level for this FSM 



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc\+\_\+child()}.

\mbox{\label{structosmo__fsm__inst_a21f7869e25f9f5f28c06874e790f1fa6}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!name@{name}}
\index{name@{name}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{name}
{\footnotesize\ttfamily const char$\ast$ osmo\+\_\+fsm\+\_\+inst\+::name}



human readable fully-\/qualified name 



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+find\+\_\+by\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+name()}, and \textbf{ update\+\_\+name()}.

\mbox{\label{structosmo__fsm__inst_a04fc6b4d809e7a7a2b6a7c9f4700d5ac}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!parent@{parent}}
\index{parent@{parent}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{parent}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+fsm\+\_\+inst}$\ast$ osmo\+\_\+fsm\+\_\+inst\+::parent}



the parent FSM that has created us 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc\+\_\+child()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+change\+\_\+parent()}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+unlink\+\_\+parent()}.

\mbox{\label{structosmo__fsm__inst_abef9d98f2804707f16235b3afae182e2}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!parent\_term\_event@{parent\_term\_event}}
\index{parent\_term\_event@{parent\_term\_event}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{parent\_term\_event}
{\footnotesize\ttfamily uint32\+\_\+t osmo\+\_\+fsm\+\_\+inst\+::parent\+\_\+term\+\_\+event}



the event we should send upon termination 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc\+\_\+child()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+change\+\_\+parent()}, and \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+unlink\+\_\+parent()}.

\mbox{\label{structosmo__fsm__inst_a38f937407279a5cda548aa15f56daa25}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!priv@{priv}}
\index{priv@{priv}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{priv}
{\footnotesize\ttfamily void$\ast$ osmo\+\_\+fsm\+\_\+inst\+::priv}



some private data of this instance 



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}.

\mbox{\label{structosmo__fsm__inst_a6f45e68989107d7dc41901902390c51e}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!proc@{proc}}
\index{proc@{proc}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{}
{\footnotesize\ttfamily struct  \{ ... \}  osmo\+\_\+fsm\+\_\+inst\+::proc}



support for fsm-\/based procedures 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+broadcast\+\_\+children()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term\+\_\+children()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+change\+\_\+parent()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+unlink\+\_\+parent()}, and \textbf{ state\+\_\+chg()}.

\mbox{\label{structosmo__fsm__inst_a5acdbbce60516c82373bd50cf4627b44}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!state@{state}}
\index{state@{state}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{state}
{\footnotesize\ttfamily uint32\+\_\+t osmo\+\_\+fsm\+\_\+inst\+::state}



current state of the FSM 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+state\+\_\+name()}, \textbf{ osmo\+\_\+fsm\+\_\+state\+\_\+name()}, and \textbf{ state\+\_\+chg()}.

\mbox{\label{structosmo__fsm__inst_a8c1856de9383574623e1107067c3f156}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!T@{T}}
\index{T@{T}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{T}
{\footnotesize\ttfamily int osmo\+\_\+fsm\+\_\+inst\+::T}



timer number for states with time-\/out 



Referenced by \textbf{ fsm\+\_\+tmr\+\_\+cb()}, and \textbf{ state\+\_\+chg()}.

\mbox{\label{structosmo__fsm__inst_a9c8ce232a1162f38a2e9c5cb7583520d}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!terminating@{terminating}}
\index{terminating@{terminating}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{terminating}
{\footnotesize\ttfamily bool osmo\+\_\+fsm\+\_\+inst\+::terminating}



Indicator whether \doxyref{osmo\+\_\+fsm\+\_\+inst\+\_\+term()}{p.}{group__fsm_ga22397fdc69a4f1c303bb0b2694d5f2aa} was already invoked on this instance. 



Referenced by \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+dispatch()}, \textbf{ \+\_\+osmo\+\_\+fsm\+\_\+inst\+\_\+term()}, and \textbf{ state\+\_\+chg()}.

\mbox{\label{structosmo__fsm__inst_af5030c02d805d27b71084d4ccc18a0fd}} 
\index{osmo\_fsm\_inst@{osmo\_fsm\_inst}!timer@{timer}}
\index{timer@{timer}!osmo\_fsm\_inst@{osmo\_fsm\_inst}}
\doxysubsubsection{timer}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+timer\+\_\+list} osmo\+\_\+fsm\+\_\+inst\+::timer}



timer back-\/end for states with time-\/out 



Referenced by \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+alloc()}, \textbf{ osmo\+\_\+fsm\+\_\+inst\+\_\+free()}, and \textbf{ state\+\_\+chg()}.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/osmocom/core/\textbf{ fsm.\+h}\end{DoxyCompactItemize}
