\hypertarget{simplehsm_8h}{
\section{simplehsm/simplehsm.h File Reference}
\label{simplehsm_8h}\index{simplehsm/simplehsm.h@{simplehsm/simplehsm.h}}
}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structsimplehsm__t}{simplehsm\_\-t}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\hypertarget{simplehsm_8h_a93f0eb578d23995850d61f7d61c55c1}{
\#define \textbf{FALSE}~0}
\label{simplehsm_8h_a93f0eb578d23995850d61f7d61c55c1}

\item 
\hypertarget{simplehsm_8h_a8cecfc5c5c054d2875c03e77b7be15d}{
\#define \textbf{TRUE}~1}
\label{simplehsm_8h_a8cecfc5c5c054d2875c03e77b7be15d}

\item 
\#define \hyperlink{simplehsm_8h_02d8fb35d7b7acf4cc21c822bae6e746}{stnone}~NULL
\item 
\#define \hyperlink{simplehsm_8h_41590a7ab6955390a08543797a12b4ba}{stdeephist}~NULL
\item 
\#define \hyperlink{simplehsm_8h_bf8d8994f09509f9e061f5bf82daf4cd}{MAX\_\-HISTORY}~10
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{simplehsm_8h_050c65e107f0c828f856a231f4b4e788}{
typedef int \textbf{BOOL}}
\label{simplehsm_8h_050c65e107f0c828f856a231f4b4e788}

\item 
typedef void $\ast$ \hyperlink{simplehsm_8h_5a6cc73d9d531136e91731a2b6509121}{stnext}
\item 
typedef \hyperlink{simplehsm_8h_5a6cc73d9d531136e91731a2b6509121}{stnext}($\ast$ \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} )(int, void $\ast$)
\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b21}{simplehsm\_\-signals\_\-t} \{ \par
\hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b2129003564fcf95d9fadd169a6c95c0760}{SIG\_\-NULL} =  0, 
\hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b21e06d9cbab66716ec34598717c5d973a4}{SIG\_\-INIT} =  1, 
\hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b215ace407e80bb30a6c5ee1b32c1c18392}{SIG\_\-ENTRY} =  2, 
\hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b210a217e06c17a6ffbed0f241cb5a9fbd9}{SIG\_\-DEEPHIST} =  3, 
\par
\hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b21e4eb5890f0cf58b082dd48469a74bd6e}{SIG\_\-EXIT} =  4, 
\hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b2113b42ba0020cfa95059b2c9fd2bdc400}{SIG\_\-USER} =  5
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{simplehsm_8h_637aef0e0ae28c979dfca2a40b3db6c3}{simplehsm\_\-initialize} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} top\_\-state)
\item 
void \hyperlink{simplehsm_8h_6ac1c80fcdb3a59dce721b607e32dada}{simplehsm\_\-transition\_\-state\_\-ex} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} new\_\-state, BOOL to\_\-deep\_\-hist)
\item 
void \hyperlink{simplehsm_8h_8f6b1a50131e7af8e84ce6813b4f4416}{simplehsm\_\-transition\_\-state} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} new\_\-state)
\item 
void \hyperlink{simplehsm_8h_b9c54e2a8f46c47d522c33f84707785f}{simplehsm\_\-init\_\-transition\_\-state} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} new\_\-state)
\item 
void \hyperlink{simplehsm_8h_407ab0f0bd0669839eac2736d61ca89d}{simplehsm\_\-signal\_\-current\_\-state} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, int signal, void $\ast$param)
\item 
BOOL \hyperlink{simplehsm_8h_203f7e57dd3cbbb47ca40e153df26a1b}{simplehsm\_\-is\_\-in\_\-state} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} state)
\item 
void \hyperlink{simplehsm_8h_909ebd632f31475debde70641ee5d4f3}{simplehsm\_\-record\_\-deephist} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} history\_\-parent, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} history\_\-state)
\item 
\hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} \hyperlink{simplehsm_8h_d6258e9de296788479e0071b43a02ef7}{simplehsm\_\-retrieve\_\-deephist} (\hyperlink{structsimplehsm__t}{simplehsm\_\-t} $\ast$\hyperlink{oven_8c_b0f5f1813e601676237fefa2690bf4a5}{hsm}, \hyperlink{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{stfunc} history\_\-parent)
\end{CompactItemize}


\label{_details}
\hypertarget{_details}{}
\subsection{Detailed Description}
\begin{Desc}
\item[Author:]Daniel Newton $<$\href{mailto:djpnewton@gmail.com}{\tt djpnewton@gmail.com}$>$ \end{Desc}
\begin{Desc}
\item[Version:]1.0\end{Desc}
\hypertarget{simplehsm_8h_LICENSE}{}\subsection{LICENSE}\label{simplehsm_8h_LICENSE}
Copyright (c) 2009 Daniel Newton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \char`\"{}Software\char`\"{}), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED \char`\"{}AS IS\char`\"{}, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\hypertarget{simplehsm_8h_DESCRIPTION}{}\subsection{DESCRIPTION}\label{simplehsm_8h_DESCRIPTION}
The simplehsm C implementation header 

\subsection{Define Documentation}
\hypertarget{simplehsm_8h_bf8d8994f09509f9e061f5bf82daf4cd}{
\index{simplehsm.h@{simplehsm.h}!MAX\_\-HISTORY@{MAX\_\-HISTORY}}
\index{MAX\_\-HISTORY@{MAX\_\-HISTORY}!simplehsm.h@{simplehsm.h}}
\subsubsection[{MAX\_\-HISTORY}]{\setlength{\rightskip}{0pt plus 5cm}\#define MAX\_\-HISTORY~10}}
\label{simplehsm_8h_bf8d8994f09509f9e061f5bf82daf4cd}


The maximum number of deep history psuedostates supported in a single simplehsm instance \hypertarget{simplehsm_8h_41590a7ab6955390a08543797a12b4ba}{
\index{simplehsm.h@{simplehsm.h}!stdeephist@{stdeephist}}
\index{stdeephist@{stdeephist}!simplehsm.h@{simplehsm.h}}
\subsubsection[{stdeephist}]{\setlength{\rightskip}{0pt plus 5cm}\#define stdeephist~NULL}}
\label{simplehsm_8h_41590a7ab6955390a08543797a12b4ba}


Used by a state function when it handles a \hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b210a217e06c17a6ffbed0f241cb5a9fbd9}{SIG\_\-DEEPHIST} signal (which represents that the state has a child deep history psuedostate). \hypertarget{simplehsm_8h_02d8fb35d7b7acf4cc21c822bae6e746}{
\index{simplehsm.h@{simplehsm.h}!stnone@{stnone}}
\index{stnone@{stnone}!simplehsm.h@{simplehsm.h}}
\subsubsection[{stnone}]{\setlength{\rightskip}{0pt plus 5cm}\#define stnone~NULL}}
\label{simplehsm_8h_02d8fb35d7b7acf4cc21c822bae6e746}


Used by a state function when it returns no parent state (either because it is the top state or because the signal is handled). 

\subsection{Typedef Documentation}
\hypertarget{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}{
\index{simplehsm.h@{simplehsm.h}!stfunc@{stfunc}}
\index{stfunc@{stfunc}!simplehsm.h@{simplehsm.h}}
\subsubsection[{stfunc}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf stnext}($\ast$ {\bf stfunc})(int, void $\ast$)}}
\label{simplehsm_8h_cbcc44b14ee70c1d2ed54b95afcd5e62}


A state function

\begin{Desc}
\item[\hyperlink{todo__todo000004}{Todo}]make this definition better (simplehsm\_\-state\_\-t)? \end{Desc}
\hypertarget{simplehsm_8h_5a6cc73d9d531136e91731a2b6509121}{
\index{simplehsm.h@{simplehsm.h}!stnext@{stnext}}
\index{stnext@{stnext}!simplehsm.h@{simplehsm.h}}
\subsubsection[{stnext}]{\setlength{\rightskip}{0pt plus 5cm}typedef void$\ast$ {\bf stnext}}}
\label{simplehsm_8h_5a6cc73d9d531136e91731a2b6509121}


A generic pointer that points to a state function 

\subsection{Enumeration Type Documentation}
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b21}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-signals\_\-t@{simplehsm\_\-signals\_\-t}}
\index{simplehsm\_\-signals\_\-t@{simplehsm\_\-signals\_\-t}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-signals\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf simplehsm\_\-signals\_\-t}}}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b21}


The base state machine signals \begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{SIG\_\-NULL@{SIG\_\-NULL}!simplehsm.h@{simplehsm.h}}\index{simplehsm.h@{simplehsm.h}!SIG\_\-NULL@{SIG\_\-NULL}}\item[{\em 
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b2129003564fcf95d9fadd169a6c95c0760}{
SIG\_\-NULL}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b2129003564fcf95d9fadd169a6c95c0760}
}]Null signal, all state functions should ignore this signal and return their parent state (or \hyperlink{simplehsm_8h_02d8fb35d7b7acf4cc21c822bae6e746}{stnone} if the top level state) \index{SIG\_\-INIT@{SIG\_\-INIT}!simplehsm.h@{simplehsm.h}}\index{simplehsm.h@{simplehsm.h}!SIG\_\-INIT@{SIG\_\-INIT}}\item[{\em 
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b21e06d9cbab66716ec34598717c5d973a4}{
SIG\_\-INIT}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b21e06d9cbab66716ec34598717c5d973a4}
}]Initialisation signal, a state function should transition to a default substate (\hyperlink{simplehsm_8c_b9c54e2a8f46c47d522c33f84707785f}{simplehsm\_\-init\_\-transition\_\-state()}) if it has substates \index{SIG\_\-ENTRY@{SIG\_\-ENTRY}!simplehsm.h@{simplehsm.h}}\index{simplehsm.h@{simplehsm.h}!SIG\_\-ENTRY@{SIG\_\-ENTRY}}\item[{\em 
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b215ace407e80bb30a6c5ee1b32c1c18392}{
SIG\_\-ENTRY}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b215ace407e80bb30a6c5ee1b32c1c18392}
}]Entry signal, a state function should perform its entry actions (if any) \index{SIG\_\-DEEPHIST@{SIG\_\-DEEPHIST}!simplehsm.h@{simplehsm.h}}\index{simplehsm.h@{simplehsm.h}!SIG\_\-DEEPHIST@{SIG\_\-DEEPHIST}}\item[{\em 
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b210a217e06c17a6ffbed0f241cb5a9fbd9}{
SIG\_\-DEEPHIST}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b210a217e06c17a6ffbed0f241cb5a9fbd9}
}]Record deep history signal, a state function should return 'stdeephist' if it contains a deep history psuedostate \index{SIG\_\-EXIT@{SIG\_\-EXIT}!simplehsm.h@{simplehsm.h}}\index{simplehsm.h@{simplehsm.h}!SIG\_\-EXIT@{SIG\_\-EXIT}}\item[{\em 
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b21e4eb5890f0cf58b082dd48469a74bd6e}{
SIG\_\-EXIT}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b21e4eb5890f0cf58b082dd48469a74bd6e}
}]Exit signal, a state function should perform its exit actions (if any) \index{SIG\_\-USER@{SIG\_\-USER}!simplehsm.h@{simplehsm.h}}\index{simplehsm.h@{simplehsm.h}!SIG\_\-USER@{SIG\_\-USER}}\item[{\em 
\hypertarget{simplehsm_8h_8855e78111bd42430381e45a77b08b2113b42ba0020cfa95059b2c9fd2bdc400}{
SIG\_\-USER}
\label{simplehsm_8h_8855e78111bd42430381e45a77b08b2113b42ba0020cfa95059b2c9fd2bdc400}
}]User signals should start from this index \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{simplehsm_8h_b9c54e2a8f46c47d522c33f84707785f}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-init\_\-transition\_\-state@{simplehsm\_\-init\_\-transition\_\-state}}
\index{simplehsm\_\-init\_\-transition\_\-state@{simplehsm\_\-init\_\-transition\_\-state}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-init\_\-transition\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}void simplehsm\_\-init\_\-transition\_\-state ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em new\_\-state})}}
\label{simplehsm_8h_b9c54e2a8f46c47d522c33f84707785f}


Initiate an initial transition to a new state (this function should only be used from a \hyperlink{simplehsm_8h_8855e78111bd42430381e45a77b08b21e06d9cbab66716ec34598717c5d973a4}{SIG\_\-INIT} state event).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine to transition \item[{\em new\_\-state}]The state to transition to \end{description}
\end{Desc}
\hypertarget{simplehsm_8h_637aef0e0ae28c979dfca2a40b3db6c3}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-initialize@{simplehsm\_\-initialize}}
\index{simplehsm\_\-initialize@{simplehsm\_\-initialize}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-initialize}]{\setlength{\rightskip}{0pt plus 5cm}void simplehsm\_\-initialize ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em top\_\-state})}}
\label{simplehsm_8h_637aef0e0ae28c979dfca2a40b3db6c3}


Initialise a simplehsm state machine.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine to initialise \item[{\em top\_\-state}]The topmost (and initial) state of the hierarchy \end{description}
\end{Desc}
\hypertarget{simplehsm_8h_203f7e57dd3cbbb47ca40e153df26a1b}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-is\_\-in\_\-state@{simplehsm\_\-is\_\-in\_\-state}}
\index{simplehsm\_\-is\_\-in\_\-state@{simplehsm\_\-is\_\-in\_\-state}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-is\_\-in\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}BOOL simplehsm\_\-is\_\-in\_\-state ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em state})}}
\label{simplehsm_8h_203f7e57dd3cbbb47ca40e153df26a1b}


Check if a state machine is currently in a certain state.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine to check \item[{\em state}]The state to check \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]True if the state machine is currently in the specified state \end{Desc}
\hypertarget{simplehsm_8h_909ebd632f31475debde70641ee5d4f3}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-record\_\-deephist@{simplehsm\_\-record\_\-deephist}}
\index{simplehsm\_\-record\_\-deephist@{simplehsm\_\-record\_\-deephist}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-record\_\-deephist}]{\setlength{\rightskip}{0pt plus 5cm}void simplehsm\_\-record\_\-deephist ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em history\_\-parent}, \/  {\bf stfunc} {\em history\_\-state})}}
\label{simplehsm_8h_909ebd632f31475debde70641ee5d4f3}


Record deep history psuedostate.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine \item[{\em history\_\-parent}]The parent state of the deep history psuedostate \item[{\em history\_\-state}]The state to return to if transitioning to the deep history psuedostate \end{description}
\end{Desc}
\hypertarget{simplehsm_8h_d6258e9de296788479e0071b43a02ef7}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-retrieve\_\-deephist@{simplehsm\_\-retrieve\_\-deephist}}
\index{simplehsm\_\-retrieve\_\-deephist@{simplehsm\_\-retrieve\_\-deephist}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-retrieve\_\-deephist}]{\setlength{\rightskip}{0pt plus 5cm}{\bf stfunc} simplehsm\_\-retrieve\_\-deephist ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em history\_\-parent})}}
\label{simplehsm_8h_d6258e9de296788479e0071b43a02ef7}


Retrive deep history psuedostate.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine \item[{\em history\_\-parent}]The parent state of the deep history psuedostate \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The state to transition to via the deep history psuedostate \end{Desc}
\hypertarget{simplehsm_8h_407ab0f0bd0669839eac2736d61ca89d}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-signal\_\-current\_\-state@{simplehsm\_\-signal\_\-current\_\-state}}
\index{simplehsm\_\-signal\_\-current\_\-state@{simplehsm\_\-signal\_\-current\_\-state}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-signal\_\-current\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}void simplehsm\_\-signal\_\-current\_\-state ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  int {\em signal}, \/  void $\ast$ {\em param})}}
\label{simplehsm_8h_407ab0f0bd0669839eac2736d61ca89d}


Send a signal to the state machine.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine to signal \item[{\em signal}]The signal flag \item[{\em param}]An optional parameter to accompany the signal \end{description}
\end{Desc}
\hypertarget{simplehsm_8h_8f6b1a50131e7af8e84ce6813b4f4416}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-transition\_\-state@{simplehsm\_\-transition\_\-state}}
\index{simplehsm\_\-transition\_\-state@{simplehsm\_\-transition\_\-state}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-transition\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}void simplehsm\_\-transition\_\-state ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em new\_\-state})}}
\label{simplehsm_8h_8f6b1a50131e7af8e84ce6813b4f4416}


Initiate a transition to a new state.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine to transition \item[{\em new\_\-state}]The state to transition to \end{description}
\end{Desc}
\hypertarget{simplehsm_8h_6ac1c80fcdb3a59dce721b607e32dada}{
\index{simplehsm.h@{simplehsm.h}!simplehsm\_\-transition\_\-state\_\-ex@{simplehsm\_\-transition\_\-state\_\-ex}}
\index{simplehsm\_\-transition\_\-state\_\-ex@{simplehsm\_\-transition\_\-state\_\-ex}!simplehsm.h@{simplehsm.h}}
\subsubsection[{simplehsm\_\-transition\_\-state\_\-ex}]{\setlength{\rightskip}{0pt plus 5cm}void simplehsm\_\-transition\_\-state\_\-ex ({\bf simplehsm\_\-t} $\ast$ {\em hsm}, \/  {\bf stfunc} {\em new\_\-state}, \/  BOOL {\em to\_\-deep\_\-hist})}}
\label{simplehsm_8h_6ac1c80fcdb3a59dce721b607e32dada}


Initiate a transition to a new state.

This function will:\begin{itemize}
\item replace the target state with the deep history target if required\item store a deep history target state if exiting a composite state with a deep history child\item perform the exit/entry chain from the current state to the target state\end{itemize}


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em hsm}]The state machine to transition \item[{\em new\_\-state}]The state to transition to \item[{\em to\_\-deep\_\-hist}]Whether to transition to the states internal deep history psuedostate \end{description}
\end{Desc}
