nico@207: \hypertarget{lifegrd_8h}{ nico@207: \section{/home/epimerde/documents/tc11/Can\-Festival-3/include/lifegrd.h File Reference} nico@207: \label{lifegrd_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/lifegrd.h@{/home/epimerde/documents/tc11/CanFestival-3/include/lifegrd.h}} nico@207: } nico@207: {\tt \#include $<$applicfg.h$>$}\par nico@207: {\tt \#include \char`\"{}data.h\char`\"{}}\par nico@207: \subsection*{Typedefs} nico@207: \begin{CompactItemize} nico@207: \item nico@207: typedef void($\ast$) \hyperlink{lifegrd_8h_eca3959d33fceb33487363a0493d3b7d}{heartbeat\-Error\_\-t} (UNS8) nico@207: \end{CompactItemize} nico@207: \subsection*{Functions} nico@207: \begin{CompactItemize} nico@207: \item nico@207: void \hyperlink{lifegrd_8h_5249eb891f5677b80ccf01e604748524}{\_\-heartbeat\-Error} (UNS8 heartbeat\-ID) nico@207: \item nico@207: \hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State} \hyperlink{lifegrd_8h_627254070e45c23f1776e12c524492ff}{get\-Node\-State} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id) nico@207: \item nico@207: void \hyperlink{lifegrd_8h_8896f6846e4d020390f6953f3d98aa21}{heartbeat\-Init} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d) nico@207: \item nico@207: void \hyperlink{lifegrd_8h_1b73047269c2a02065e12af18c6053c7}{heartbeat\-Stop} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d) nico@207: \item nico@207: void \hyperlink{lifegrd_8h_b3248945e06e8b05518beddf665f174d}{proceed\-NODE\_\-GUARD} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m) nico@207: \end{CompactItemize} nico@207: nico@207: nico@207: \subsection{Typedef Documentation} nico@207: \hypertarget{lifegrd_8h_eca3959d33fceb33487363a0493d3b7d}{ nico@207: \index{lifegrd.h@{lifegrd.h}!heartbeatError_t@{heartbeatError\_\-t}} nico@207: \index{heartbeatError_t@{heartbeatError\_\-t}!lifegrd.h@{lifegrd.h}} nico@207: \subsubsection[heartbeatError\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{lifegrd_8h_eca3959d33fceb33487363a0493d3b7d}{heartbeat\-Error\_\-t}(UNS8)}} nico@207: \label{lifegrd_8h_eca3959d33fceb33487363a0493d3b7d} nico@207: nico@207: nico@207: nico@207: nico@207: Definition at line 29 of file lifegrd.h. nico@207: nico@207: \subsection{Function Documentation} nico@207: \hypertarget{lifegrd_8h_5249eb891f5677b80ccf01e604748524}{ nico@207: \index{lifegrd.h@{lifegrd.h}!_heartbeatError@{\_\-heartbeatError}} nico@207: \index{_heartbeatError@{\_\-heartbeatError}!lifegrd.h@{lifegrd.h}} nico@207: \subsubsection[\_\-heartbeatError]{\setlength{\rightskip}{0pt plus 5cm}void \_\-heartbeat\-Error (UNS8 {\em heartbeat\-ID})}} nico@207: \label{lifegrd_8h_5249eb891f5677b80ccf01e604748524} nico@207: nico@207: nico@207: nico@207: nico@207: Definition at line 184 of file lifegrd.c.\hypertarget{lifegrd_8h_627254070e45c23f1776e12c524492ff}{ nico@207: \index{lifegrd.h@{lifegrd.h}!getNodeState@{getNodeState}} nico@207: \index{getNodeState@{getNodeState}!lifegrd.h@{lifegrd.h}} nico@207: \subsubsection[getNodeState]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{states_8h_5891f63a4c9243179838389a93d084e2}{e\_\-node\-State} get\-Node\-State (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id})}} nico@207: \label{lifegrd_8h_627254070e45c23f1776e12c524492ff} nico@207: nico@207: nico@207: To read the state of a node This can be used by the master after having sent a life guard request, of by any node if it is waiting for heartbeat. nico@207: nico@207: Definition at line 33 of file lifegrd.c. nico@207: nico@207: References struct\_\-s\_\-timer\_\-entry::d, and struct\_\-CO\_\-Data::NMTable.\hypertarget{lifegrd_8h_8896f6846e4d020390f6953f3d98aa21}{ nico@207: \index{lifegrd.h@{lifegrd.h}!heartbeatInit@{heartbeatInit}} nico@207: \index{heartbeatInit@{heartbeatInit}!lifegrd.h@{lifegrd.h}} nico@207: \subsubsection[heartbeatInit]{\setlength{\rightskip}{0pt plus 5cm}void heartbeat\-Init (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}} nico@207: \label{lifegrd_8h_8896f6846e4d020390f6953f3d98aa21} nico@207: nico@207: nico@207: Start heartbeat consumer and producer with respect to 0x1016 and 0x1017 object dictionary entries nico@207: nico@207: Definition at line 147 of file lifegrd.c. nico@207: nico@207: References Consumer\-Hearbeat\-Alarm(), struct\_\-CO\_\-Data::Consumer\-Heartbeat\-Count, struct\_\-CO\_\-Data::Consumer\-Heartbeat\-Entries, struct\_\-CO\_\-Data::Consumer\-Heart\-Beat\-Timers, struct\_\-s\_\-timer\_\-entry::d, MS\_\-TO\_\-TIMEVAL, On\-Heartbeat\-Producer\-Update(), Producer\-Hearbeat\-Alarm(), struct\_\-CO\_\-Data::Producer\-Heart\-Beat\-Time, struct\_\-CO\_\-Data::Producer\-Heart\-Beat\-Timer, Register\-Set\-ODentry\-Call\-Back(), Set\-Alarm(), TIMEVAL, struct\_\-CO\_\-Data::toggle, UNS16, UNS32, and UNS8.\hypertarget{lifegrd_8h_1b73047269c2a02065e12af18c6053c7}{ nico@207: \index{lifegrd.h@{lifegrd.h}!heartbeatStop@{heartbeatStop}} nico@207: \index{heartbeatStop@{heartbeatStop}!lifegrd.h@{lifegrd.h}} nico@207: \subsubsection[heartbeatStop]{\setlength{\rightskip}{0pt plus 5cm}void heartbeat\-Stop (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}} nico@207: \label{lifegrd_8h_1b73047269c2a02065e12af18c6053c7} nico@207: nico@207: nico@207: Stop heartbeat consumer and producer nico@207: nico@207: Definition at line 173 of file lifegrd.c. nico@207: nico@207: References struct\_\-CO\_\-Data::Consumer\-Heartbeat\-Count, struct\_\-CO\_\-Data::Consumer\-Heart\-Beat\-Timers, struct\_\-s\_\-timer\_\-entry::d, Del\-Alarm(), struct\_\-CO\_\-Data::Producer\-Heart\-Beat\-Timer, and UNS8.\hypertarget{lifegrd_8h_b3248945e06e8b05518beddf665f174d}{ nico@207: \index{lifegrd.h@{lifegrd.h}!proceedNODE_GUARD@{proceedNODE\_\-GUARD}} nico@207: \index{proceedNODE_GUARD@{proceedNODE\_\-GUARD}!lifegrd.h@{lifegrd.h}} nico@207: \subsubsection[proceedNODE\_\-GUARD]{\setlength{\rightskip}{0pt plus 5cm}void proceed\-NODE\_\-GUARD (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}} nico@207: \label{lifegrd_8h_b3248945e06e8b05518beddf665f174d} nico@207: nico@207: nico@207: This function is responsible to process a canopen-message which seams to be an NMT Error Control Messages. At them moment we assume that every NMT error control message is a heartbeat message. \begin{Desc} nico@207: \item[Parameters:] nico@207: \begin{description} nico@207: \item[{\em \hyperlink{structMessage}{Message}}]The CAN-message which has to be analysed. If a Boot\-Up message is detected, it will return the node\-Id of the Slave who booted up \end{description} nico@207: \end{Desc} nico@207: nico@207: nico@207: Definition at line 50 of file lifegrd.c. nico@207: nico@207: References struct\_\-CO\_\-Data::b\-Device\-Node\-Id, struct\_\-CO\_\-Data::can\-Handle, can\-Send(), Message::cob\_\-id, Consumer\-Hearbeat\-Alarm(), struct\_\-CO\_\-Data::Consumer\-Heartbeat\-Count, struct\_\-CO\_\-Data::Consumer\-Heartbeat\-Entries, struct\_\-CO\_\-Data::Consumer\-Heart\-Beat\-Timers, struct\_\-s\_\-timer\_\-entry::d, Message::data, Del\-Alarm(), GET\_\-NODE\_\-ID, Initialisation, Message::len, MS\_\-TO\_\-TIMEVAL, MSG\_\-WAR, struct\_\-CO\_\-Data::NMTable, struct\_\-CO\_\-Data::node\-State, Message::rtr, Set\-Alarm(), TIMEVAL, struct\_\-CO\_\-Data::toggle, Unknown\_\-state, UNS32, UNS8, and SHORT\_\-CAN::w.