doc/doxygen/latex/states_8h.tex
author nico
Thu, 07 Jun 2007 09:03:41 +0200
changeset 213 1df3055de547
parent 207 b6572d0336c3
permissions -rw-r--r--
Manual and Documentation finish
\hypertarget{states_8h}{
\section{/home/epimerde/documents/tc11/Can\-Festival-3/include/states.h File Reference}
\label{states_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/states.h@{/home/epimerde/documents/tc11/CanFestival-3/include/states.h}}
}
{\tt \#include $<$applicfg.h$>$}\par
{\tt \#include \char`\"{}data.h\char`\"{}}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structs__state__communication}{s\_\-state\_\-communication}
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef enum \hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646}{enum\_\-node\-State} \hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State}
\item 
typedef void($\ast$) \hyperlink{states_8h_d0cd6d1eb89085da7cb9f32ce386e8bc}{initialisation\_\-t} (void)
\item 
typedef void($\ast$) \hyperlink{states_8h_f4a6da4fe018afbe20eaf716c248e02a}{pre\-Operational\_\-t} (void)
\item 
typedef void($\ast$) \hyperlink{states_8h_8aed99e590473f26db47a9c2dc5b73fc}{operational\_\-t} (void)
\item 
typedef void($\ast$) \hyperlink{states_8h_c99397ce6341b6b5128104aee4c27ec5}{stopped\_\-t} (void)
\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646}{enum\_\-node\-State} \{ \par
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646eb3ae26d7a1629aa0fc6c83f46306cf5}{Initialisation} =  0x00, 
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec6864684ab0fbbb76a8c897feb1cd806d56443}{Disconnected} =  0x01, 
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec686466ea90df6fe966852496b4846da497fb0}{Connecting} =  0x02, 
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec6864695fc3c631fbad8ca3dc8d5b69a3e0d5b}{Preparing} =  0x02, 
\par
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec686464d049c6d45e08a294523df186ad77a75}{Stopped} =  0x04, 
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646a80594b1522cb686b981f56bbec45124}{Operational} =  0x05, 
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646c747c16a9c4d7dec65cdab6e38df99b7}{Pre\_\-operational} =  0x7F, 
\hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646cb4b5cb64be091d76f846380eb0afe59}{Unknown\_\-state} =  0x0F
 \}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{states_8h_67ca1ac7ff49e88cf7847e408b258cae}{\_\-initialisation} (void)
\item 
void \hyperlink{states_8h_f4e52eb187303eca1962bb6f74cb8169}{\_\-pre\-Operational} (void)
\item 
void \hyperlink{states_8h_b31a0526e24de79a09ccc512db420d91}{\_\-operational} (void)
\item 
void \hyperlink{states_8h_9117ccff20aaed468dd715517e77dbc3}{\_\-stopped} (void)
\item 
void \hyperlink{states_8h_3f8975650604cc23582f19a43fd4e518}{can\-Dispatch} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m)
\item 
\hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State} \hyperlink{states_8h_95d835785ba564bf6d92e3224c5e3848}{get\-State} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
\item 
UNS8 \hyperlink{states_8h_0a5004efd1dedbee82a4f21ec5c44fb5}{set\-State} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State} new\-State)
\item 
UNS8 \hyperlink{states_8h_3020f2e5762f6e389a21382ec827b6a6}{get\-Node\-Id} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
\item 
void \hyperlink{states_8h_d47a53979b9311a374d029f7923abbe1}{set\-Node\-Id} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id)
\item 
void \hyperlink{states_8h_3e57769f3a958c103825263b7abdd92b}{init\-Pre\-Operational\-Mode} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
\end{CompactItemize}


\subsection{Typedef Documentation}
\hypertarget{states_8h_5891f63a4c9243179838389a93d084e2}{
\index{states.h@{states.h}!e_nodeState@{e\_\-nodeState}}
\index{e_nodeState@{e\_\-nodeState}!states.h@{states.h}}
\subsubsection[e\_\-nodeState]{\setlength{\rightskip}{0pt plus 5cm}typedef enum \hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646}{enum\_\-node\-State} \hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State}}}
\label{states_8h_5891f63a4c9243179838389a93d084e2}




Definition at line 46 of file states.h.\hypertarget{states_8h_d0cd6d1eb89085da7cb9f32ce386e8bc}{
\index{states.h@{states.h}!initialisation_t@{initialisation\_\-t}}
\index{initialisation_t@{initialisation\_\-t}!states.h@{states.h}}
\subsubsection[initialisation\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{states_8h_d0cd6d1eb89085da7cb9f32ce386e8bc}{initialisation\_\-t}(void)}}
\label{states_8h_d0cd6d1eb89085da7cb9f32ce386e8bc}


Function that user app can overload 

Definition at line 61 of file states.h.\hypertarget{states_8h_8aed99e590473f26db47a9c2dc5b73fc}{
\index{states.h@{states.h}!operational_t@{operational\_\-t}}
\index{operational_t@{operational\_\-t}!states.h@{states.h}}
\subsubsection[operational\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{states_8h_8aed99e590473f26db47a9c2dc5b73fc}{operational\_\-t}(void)}}
\label{states_8h_8aed99e590473f26db47a9c2dc5b73fc}




Definition at line 63 of file states.h.\hypertarget{states_8h_f4a6da4fe018afbe20eaf716c248e02a}{
\index{states.h@{states.h}!preOperational_t@{preOperational\_\-t}}
\index{preOperational_t@{preOperational\_\-t}!states.h@{states.h}}
\subsubsection[preOperational\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{states_8h_f4a6da4fe018afbe20eaf716c248e02a}{pre\-Operational\_\-t}(void)}}
\label{states_8h_f4a6da4fe018afbe20eaf716c248e02a}




Definition at line 62 of file states.h.\hypertarget{states_8h_c99397ce6341b6b5128104aee4c27ec5}{
\index{states.h@{states.h}!stopped_t@{stopped\_\-t}}
\index{stopped_t@{stopped\_\-t}!states.h@{states.h}}
\subsubsection[stopped\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{states_8h_c99397ce6341b6b5128104aee4c27ec5}{stopped\_\-t}(void)}}
\label{states_8h_c99397ce6341b6b5128104aee4c27ec5}




Definition at line 64 of file states.h.

\subsection{Enumeration Type Documentation}
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec68646}{
\index{states.h@{states.h}!enum_nodeState@{enum\_\-nodeState}}
\index{enum_nodeState@{enum\_\-nodeState}!states.h@{states.h}}
\subsubsection[enum\_\-nodeState]{\setlength{\rightskip}{0pt plus 5cm}enum \hyperlink{states_8h_3136d2815abe9d284f985e0a7ec68646}{enum\_\-node\-State}}}
\label{states_8h_3136d2815abe9d284f985e0a7ec68646}


\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{Initialisation@{Initialisation}!states.h@{states.h}}\index{states.h@{states.h}!Initialisation@{Initialisation}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec68646eb3ae26d7a1629aa0fc6c83f46306cf5}{
Initialisation}
\label{states_8h_3136d2815abe9d284f985e0a7ec68646eb3ae26d7a1629aa0fc6c83f46306cf5}
}]\index{Disconnected@{Disconnected}!states.h@{states.h}}\index{states.h@{states.h}!Disconnected@{Disconnected}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec6864684ab0fbbb76a8c897feb1cd806d56443}{
Disconnected}
\label{states_8h_3136d2815abe9d284f985e0a7ec6864684ab0fbbb76a8c897feb1cd806d56443}
}]\index{Connecting@{Connecting}!states.h@{states.h}}\index{states.h@{states.h}!Connecting@{Connecting}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec686466ea90df6fe966852496b4846da497fb0}{
Connecting}
\label{states_8h_3136d2815abe9d284f985e0a7ec686466ea90df6fe966852496b4846da497fb0}
}]\index{Preparing@{Preparing}!states.h@{states.h}}\index{states.h@{states.h}!Preparing@{Preparing}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec6864695fc3c631fbad8ca3dc8d5b69a3e0d5b}{
Preparing}
\label{states_8h_3136d2815abe9d284f985e0a7ec6864695fc3c631fbad8ca3dc8d5b69a3e0d5b}
}]\index{Stopped@{Stopped}!states.h@{states.h}}\index{states.h@{states.h}!Stopped@{Stopped}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec686464d049c6d45e08a294523df186ad77a75}{
Stopped}
\label{states_8h_3136d2815abe9d284f985e0a7ec686464d049c6d45e08a294523df186ad77a75}
}]\index{Operational@{Operational}!states.h@{states.h}}\index{states.h@{states.h}!Operational@{Operational}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec68646a80594b1522cb686b981f56bbec45124}{
Operational}
\label{states_8h_3136d2815abe9d284f985e0a7ec68646a80594b1522cb686b981f56bbec45124}
}]\index{Pre_operational@{Pre\_\-operational}!states.h@{states.h}}\index{states.h@{states.h}!Pre_operational@{Pre\_\-operational}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec68646c747c16a9c4d7dec65cdab6e38df99b7}{
Pre\_\-operational}
\label{states_8h_3136d2815abe9d284f985e0a7ec68646c747c16a9c4d7dec65cdab6e38df99b7}
}]\index{Unknown_state@{Unknown\_\-state}!states.h@{states.h}}\index{states.h@{states.h}!Unknown_state@{Unknown\_\-state}}\item[{\em 
\hypertarget{states_8h_3136d2815abe9d284f985e0a7ec68646cb4b5cb64be091d76f846380eb0afe59}{
Unknown\_\-state}
\label{states_8h_3136d2815abe9d284f985e0a7ec68646cb4b5cb64be091d76f846380eb0afe59}
}]\end{description}
\end{Desc}



Definition at line 35 of file states.h.

\subsection{Function Documentation}
\hypertarget{states_8h_67ca1ac7ff49e88cf7847e408b258cae}{
\index{states.h@{states.h}!_initialisation@{\_\-initialisation}}
\index{_initialisation@{\_\-initialisation}!states.h@{states.h}}
\subsubsection[\_\-initialisation]{\setlength{\rightskip}{0pt plus 5cm}void \_\-initialisation (void)}}
\label{states_8h_67ca1ac7ff49e88cf7847e408b258cae}




Definition at line 234 of file states.c.\hypertarget{states_8h_b31a0526e24de79a09ccc512db420d91}{
\index{states.h@{states.h}!_operational@{\_\-operational}}
\index{_operational@{\_\-operational}!states.h@{states.h}}
\subsubsection[\_\-operational]{\setlength{\rightskip}{0pt plus 5cm}void \_\-operational (void)}}
\label{states_8h_b31a0526e24de79a09ccc512db420d91}




Definition at line 236 of file states.c.\hypertarget{states_8h_f4e52eb187303eca1962bb6f74cb8169}{
\index{states.h@{states.h}!_preOperational@{\_\-preOperational}}
\index{_preOperational@{\_\-preOperational}!states.h@{states.h}}
\subsubsection[\_\-preOperational]{\setlength{\rightskip}{0pt plus 5cm}void \_\-pre\-Operational (void)}}
\label{states_8h_f4e52eb187303eca1962bb6f74cb8169}




Definition at line 235 of file states.c.\hypertarget{states_8h_9117ccff20aaed468dd715517e77dbc3}{
\index{states.h@{states.h}!_stopped@{\_\-stopped}}
\index{_stopped@{\_\-stopped}!states.h@{states.h}}
\subsubsection[\_\-stopped]{\setlength{\rightskip}{0pt plus 5cm}void \_\-stopped (void)}}
\label{states_8h_9117ccff20aaed468dd715517e77dbc3}




Definition at line 237 of file states.c.\hypertarget{states_8h_3f8975650604cc23582f19a43fd4e518}{
\index{states.h@{states.h}!canDispatch@{canDispatch}}
\index{canDispatch@{canDispatch}!states.h@{states.h}}
\subsubsection[canDispatch]{\setlength{\rightskip}{0pt plus 5cm}void can\-Dispatch (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}}
\label{states_8h_3f8975650604cc23582f19a43fd4e518}


Called by driver/app when receiving messages 

Definition at line 39 of file states.c.

References Message::cob\_\-id, s\_\-state\_\-communication::cs\-Heartbeat, s\_\-state\_\-communication::cs\-PDO, s\_\-state\_\-communication::cs\-SDO, s\_\-state\_\-communication::cs\-SYNC, struct\_\-CO\_\-Data::Current\-Communication\-State, struct\_\-s\_\-timer\_\-entry::d, struct\_\-CO\_\-Data::iam\_\-a\_\-slave, NMT, NODE\_\-GUARD, PDO1rx, PDO1tx, PDO2rx, PDO2tx, PDO3rx, PDO3tx, PDO4rx, PDO4tx, proceed\-NMTstate\-Change(), proceed\-NODE\_\-GUARD(), proceed\-PDO(), proceed\-SDO(), proceed\-SYNC(), SDOrx, SDOtx, SYNC, and SHORT\_\-CAN::w.\hypertarget{states_8h_3020f2e5762f6e389a21382ec827b6a6}{
\index{states.h@{states.h}!getNodeId@{getNodeId}}
\index{getNodeId@{getNodeId}!states.h@{states.h}}
\subsubsection[getNodeId]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-Node\-Id (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
\label{states_8h_3020f2e5762f6e389a21382ec827b6a6}


Returns the nod\-Id 

Definition at line 180 of file states.c.

References struct\_\-CO\_\-Data::b\-Device\-Node\-Id, and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{states_8h_95d835785ba564bf6d92e3224c5e3848}{
\index{states.h@{states.h}!getState@{getState}}
\index{getState@{getState}!states.h@{states.h}}
\subsubsection[getState]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State} get\-State (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
\label{states_8h_95d835785ba564bf6d92e3224c5e3848}


Returns the state of the node 

Definition at line 33 of file states.c.

References struct\_\-s\_\-timer\_\-entry::d, and struct\_\-CO\_\-Data::node\-State.\hypertarget{states_8h_3e57769f3a958c103825263b7abdd92b}{
\index{states.h@{states.h}!initPreOperationalMode@{initPreOperationalMode}}
\index{initPreOperationalMode@{initPreOperationalMode}!states.h@{states.h}}
\subsubsection[initPreOperationalMode]{\setlength{\rightskip}{0pt plus 5cm}void init\-Pre\-Operational\-Mode (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
\label{states_8h_3e57769f3a958c103825263b7abdd92b}


Some stuff to do when the node enter in pre-operational mode \hypertarget{states_8h_d47a53979b9311a374d029f7923abbe1}{
\index{states.h@{states.h}!setNodeId@{setNodeId}}
\index{setNodeId@{setNodeId}!states.h@{states.h}}
\subsubsection[setNodeId]{\setlength{\rightskip}{0pt plus 5cm}void set\-Node\-Id (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id})}}
\label{states_8h_d47a53979b9311a374d029f7923abbe1}


Define the node ID. Initialize the object dictionary 

Definition at line 186 of file states.c.

References struct\_\-CO\_\-Data::b\-Device\-Node\-Id, struct\_\-s\_\-timer\_\-entry::d, struct\_\-CO\_\-Data::first\-Index, struct\_\-CO\_\-Data::last\-Index, struct\_\-CO\_\-Data::objdict, s\_\-quick\_\-index::PDO\_\-RCV, s\_\-quick\_\-index::PDO\_\-TRS, td\_\-subindex::p\-Object, td\_\-indextable::p\-Subindex, s\_\-quick\_\-index::SDO\_\-SVR, UNS16, UNS32, and UNS8.\hypertarget{states_8h_0a5004efd1dedbee82a4f21ec5c44fb5}{
\index{states.h@{states.h}!setState@{setState}}
\index{setState@{setState}!states.h@{states.h}}
\subsubsection[setState]{\setlength{\rightskip}{0pt plus 5cm}UNS8 set\-State (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State} {\em new\-State})}}
\label{states_8h_0a5004efd1dedbee82a4f21ec5c44fb5}


Change the state of the node 

Definition at line 100 of file states.c.

References struct\_\-s\_\-timer\_\-entry::d, decompo\_\-dcf(), struct\_\-CO\_\-Data::iam\_\-a\_\-slave, struct\_\-CO\_\-Data::initialisation, Initialisation, struct\_\-CO\_\-Data::node\-State, OD\_\-SUCCESSFUL, struct\_\-CO\_\-Data::operational, Operational, Pre\_\-operational, struct\_\-CO\_\-Data::pre\-Operational, ptr\-Table, struct\_\-CO\_\-Data::scan\-Index\-OD, struct\_\-CO\_\-Data::stopped, Stopped, switch\-Communication\-State(), UNS16, and UNS32.