\hypertarget{states_8c}{
\section{/home/epimerde/documents/tc11/Can\-Festival-3/src/states.c File Reference}
\label{states_8c}\index{/home/epimerde/documents/tc11/CanFestival-3/src/states.c@{/home/epimerde/documents/tc11/CanFestival-3/src/states.c}}
}
{\tt \#include \char`\"{}states.h\char`\"{}}\par
{\tt \#include \char`\"{}def.h\char`\"{}}\par
{\tt \#include \char`\"{}dcf.h\char`\"{}}\par
{\tt \#include \char`\"{}nmt\-Slave.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item
\#define \hyperlink{states_8c_3a7cf0c586b1e467e6215396e9a439ae}{Start\-Or\-Stop}(Comm\-Type, Func\-Start, Func\-Stop)
\item
\#define \hyperlink{states_8c_f4e8bc2d192090ff502229b33c24a389}{None}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item
void \hyperlink{states_8c_915991eebf7c2ac6c929c6c9cfbd7d03}{switch\-Communication\-State} (CO\_\-Data $\ast$d, s\_\-state\_\-communication $\ast$new\-Communication\-State)
\item
e\_\-node\-State \hyperlink{states_8c_95d835785ba564bf6d92e3224c5e3848}{get\-State} (CO\_\-Data $\ast$d)
\item
void \hyperlink{states_8c_3f8975650604cc23582f19a43fd4e518}{can\-Dispatch} (CO\_\-Data $\ast$d, Message $\ast$m)
\item
UNS8 \hyperlink{states_8c_0a5004efd1dedbee82a4f21ec5c44fb5}{set\-State} (CO\_\-Data $\ast$d, e\_\-node\-State new\-State)
\item
UNS8 \hyperlink{states_8c_3020f2e5762f6e389a21382ec827b6a6}{get\-Node\-Id} (CO\_\-Data $\ast$d)
\item
void \hyperlink{states_8c_d47a53979b9311a374d029f7923abbe1}{set\-Node\-Id} (CO\_\-Data $\ast$d, UNS8 node\-Id)
\item
void \hyperlink{states_8c_1ee4d5c3d5dc6f39607d414b7bf9bcc9}{\_\-initialisation} ()
\item
void \hyperlink{states_8c_00113c22ed3366ee552f77862241d317}{\_\-pre\-Operational} ()
\item
void \hyperlink{states_8c_4c917142acca702f7e04e919a0b958b4}{\_\-operational} ()
\item
void \hyperlink{states_8c_244e9269c323e14509bea947c2729a13}{\_\-stopped} ()
\end{CompactItemize}
\subsection{Define Documentation}
\hypertarget{states_8c_f4e8bc2d192090ff502229b33c24a389}{
\index{states.c@{states.c}!None@{None}}
\index{None@{None}!states.c@{states.c}}
\subsubsection[None]{\setlength{\rightskip}{0pt plus 5cm}\#define None}}
\label{states_8c_f4e8bc2d192090ff502229b33c24a389}
Definition at line 86 of file states.c.\hypertarget{states_8c_3a7cf0c586b1e467e6215396e9a439ae}{
\index{states.c@{states.c}!StartOrStop@{StartOrStop}}
\index{StartOrStop@{StartOrStop}!states.c@{states.c}}
\subsubsection[StartOrStop]{\setlength{\rightskip}{0pt plus 5cm}\#define Start\-Or\-Stop(Comm\-Type, Func\-Start, Func\-Stop)}}
\label{states_8c_3a7cf0c586b1e467e6215396e9a439ae}
\textbf{Value:}
\begin{Code}\begin{verbatim}if(newCommunicationState->CommType && !d->CurrentCommunicationState.CommType){\
MSG_WAR(0x9999,#FuncStart, 9999);\
d->CurrentCommunicationState.CommType = 1;\
FuncStart;\
}else if(!newCommunicationState->CommType && d->CurrentCommunicationState.CommType){\
MSG_WAR(0x9999,#FuncStop, 9999);\
d->CurrentCommunicationState.CommType = 0;\
FuncStop;\
}
\end{verbatim}\end{Code}
Definition at line 76 of file states.c.
\subsection{Function Documentation}
\hypertarget{states_8c_1ee4d5c3d5dc6f39607d414b7bf9bcc9}{
\index{states.c@{states.c}!_initialisation@{\_\-initialisation}}
\index{_initialisation@{\_\-initialisation}!states.c@{states.c}}
\subsubsection[\_\-initialisation]{\setlength{\rightskip}{0pt plus 5cm}void \_\-initialisation ()}}
\label{states_8c_1ee4d5c3d5dc6f39607d414b7bf9bcc9}
Definition at line 234 of file states.c.\hypertarget{states_8c_4c917142acca702f7e04e919a0b958b4}{
\index{states.c@{states.c}!_operational@{\_\-operational}}
\index{_operational@{\_\-operational}!states.c@{states.c}}
\subsubsection[\_\-operational]{\setlength{\rightskip}{0pt plus 5cm}void \_\-operational ()}}
\label{states_8c_4c917142acca702f7e04e919a0b958b4}
Definition at line 236 of file states.c.\hypertarget{states_8c_00113c22ed3366ee552f77862241d317}{
\index{states.c@{states.c}!_preOperational@{\_\-preOperational}}
\index{_preOperational@{\_\-preOperational}!states.c@{states.c}}
\subsubsection[\_\-preOperational]{\setlength{\rightskip}{0pt plus 5cm}void \_\-pre\-Operational ()}}
\label{states_8c_00113c22ed3366ee552f77862241d317}
Definition at line 235 of file states.c.\hypertarget{states_8c_244e9269c323e14509bea947c2729a13}{
\index{states.c@{states.c}!_stopped@{\_\-stopped}}
\index{_stopped@{\_\-stopped}!states.c@{states.c}}
\subsubsection[\_\-stopped]{\setlength{\rightskip}{0pt plus 5cm}void \_\-stopped ()}}
\label{states_8c_244e9269c323e14509bea947c2729a13}
Definition at line 237 of file states.c.\hypertarget{states_8c_3f8975650604cc23582f19a43fd4e518}{
\index{states.c@{states.c}!canDispatch@{canDispatch}}
\index{canDispatch@{canDispatch}!states.c@{states.c}}
\subsubsection[canDispatch]{\setlength{\rightskip}{0pt plus 5cm}void can\-Dispatch (CO\_\-Data $\ast$ {\em d}, Message $\ast$ {\em m})}}
\label{states_8c_3f8975650604cc23582f19a43fd4e518}
Definition at line 39 of file states.c.
References proceed\-NMTstate\-Change(), proceed\-NODE\_\-GUARD(), proceed\-PDO(), proceed\-SDO(), and proceed\-SYNC().\hypertarget{states_8c_3020f2e5762f6e389a21382ec827b6a6}{
\index{states.c@{states.c}!getNodeId@{getNodeId}}
\index{getNodeId@{getNodeId}!states.c@{states.c}}
\subsubsection[getNodeId]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-Node\-Id (CO\_\-Data $\ast$ {\em d})}}
\label{states_8c_3020f2e5762f6e389a21382ec827b6a6}
Definition at line 180 of file states.c.\hypertarget{states_8c_95d835785ba564bf6d92e3224c5e3848}{
\index{states.c@{states.c}!getState@{getState}}
\index{getState@{getState}!states.c@{states.c}}
\subsubsection[getState]{\setlength{\rightskip}{0pt plus 5cm}e\_\-node\-State get\-State (CO\_\-Data $\ast$ {\em d})}}
\label{states_8c_95d835785ba564bf6d92e3224c5e3848}
Definition at line 33 of file states.c.\hypertarget{states_8c_d47a53979b9311a374d029f7923abbe1}{
\index{states.c@{states.c}!setNodeId@{setNodeId}}
\index{setNodeId@{setNodeId}!states.c@{states.c}}
\subsubsection[setNodeId]{\setlength{\rightskip}{0pt plus 5cm}void set\-Node\-Id (CO\_\-Data $\ast$ {\em d}, UNS8 {\em node\-Id})}}
\label{states_8c_d47a53979b9311a374d029f7923abbe1}
Definition at line 186 of file states.c.\hypertarget{states_8c_0a5004efd1dedbee82a4f21ec5c44fb5}{
\index{states.c@{states.c}!setState@{setState}}
\index{setState@{setState}!states.c@{states.c}}
\subsubsection[setState]{\setlength{\rightskip}{0pt plus 5cm}UNS8 set\-State (CO\_\-Data $\ast$ {\em d}, e\_\-node\-State {\em new\-State})}}
\label{states_8c_0a5004efd1dedbee82a4f21ec5c44fb5}
Definition at line 100 of file states.c.
References decompo\_\-dcf(), ptr\-Table, and switch\-Communication\-State().\hypertarget{states_8c_915991eebf7c2ac6c929c6c9cfbd7d03}{
\index{states.c@{states.c}!switchCommunicationState@{switchCommunicationState}}
\index{switchCommunicationState@{switchCommunicationState}!states.c@{states.c}}
\subsubsection[switchCommunicationState]{\setlength{\rightskip}{0pt plus 5cm}void switch\-Communication\-State (CO\_\-Data $\ast$ {\em d}, s\_\-state\_\-communication $\ast$ {\em new\-Communication\-State})}}
\label{states_8c_915991eebf7c2ac6c929c6c9cfbd7d03}
Definition at line 89 of file states.c.
References heartbeat\-Init(), heartbeat\-Stop(), None, reset\-SDO(), slave\-Send\-Boot\-Up(), Start\-Or\-Stop, start\-SYNC(), and stop\-SYNC().