nico@207: \hypertarget{pdo_8h}{ nico@207: \section{/home/epimerde/documents/tc11/Can\-Festival-3/include/pdo.h File Reference} nico@207: \label{pdo_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/pdo.h@{/home/epimerde/documents/tc11/CanFestival-3/include/pdo.h}} nico@207: } nico@207: {\tt \#include $<$applicfg.h$>$}\par nico@207: {\tt \#include $<$def.h$>$}\par nico@207: {\tt \#include \char`\"{}data.h\char`\"{}}\par nico@207: \subsection*{Data Structures} nico@207: \begin{CompactItemize} nico@207: \item nico@207: struct \hyperlink{structstruct__s__process__var}{struct\_\-s\_\-process\_\-var} nico@207: \item nico@207: struct \hyperlink{structstruct__s__PDO}{struct\_\-s\_\-PDO} nico@207: \end{CompactItemize} nico@207: \subsection*{Typedefs} nico@207: \begin{CompactItemize} nico@207: \item nico@207: typedef \hyperlink{structstruct__s__process__var}{struct\_\-s\_\-process\_\-var} \hyperlink{pdo_8h_cebb3b4d895da8e726cc7eddb6035e6f}{s\_\-process\_\-var} nico@207: \item nico@207: typedef \hyperlink{structstruct__s__PDO}{struct\_\-s\_\-PDO} \hyperlink{pdo_8h_7f9085f960c6632e8c79537abac9a9ff}{s\_\-PDO} nico@207: \end{CompactItemize} nico@207: \subsection*{Functions} nico@207: \begin{CompactItemize} nico@207: \item nico@207: UNS8 \hyperlink{pdo_8h_a6774c219dc64c1cec4b4721ba23e15a}{send\-PDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structstruct__s__PDO}{s\_\-PDO} pdo, UNS8 request) nico@207: \item nico@207: UNS8 \hyperlink{pdo_8h_298b8291fa35cca22264cf8a70bf138a}{PDOm\-GR} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 cob\-Id) nico@207: \item nico@207: UNS8 \hyperlink{pdo_8h_b9c82d949045cb7f52ed40d0ee8c7bf1}{build\-PDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS16 index) nico@207: \item nico@207: UNS8 \hyperlink{pdo_8h_cc08547009d3d2755d2291999941694c}{send\-PDOrequest} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 cob\-Id) nico@207: \item nico@207: UNS8 \hyperlink{pdo_8h_ae7d661cd3ef7adf93a0d08fdb15b7f2}{proceed\-PDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m) nico@207: \item nico@207: UNS8 \hyperlink{pdo_8h_07ff33d0d2e6b1070bf3c27578006e8d}{send\-PDOevent} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, void $\ast$variable) nico@207: \item nico@207: void \hyperlink{pdo_8h_e468510c9f77f502207d961d26389918}{Copy\-Bits} (UNS8 Nb\-Bits, UNS8 $\ast$Src\-Byte\-Index, UNS8 Src\-Bit\-Index, UNS8 Src\-Big\-Endian, UNS8 $\ast$Dest\-Byte\-Index, UNS8 Dest\-Bit\-Index, UNS8 Dest\-Big\-Endian) nico@207: \end{CompactItemize} nico@207: nico@207: nico@207: \subsection{Typedef Documentation} nico@207: \hypertarget{pdo_8h_7f9085f960c6632e8c79537abac9a9ff}{ nico@207: \index{pdo.h@{pdo.h}!s_PDO@{s\_\-PDO}} nico@207: \index{s_PDO@{s\_\-PDO}!pdo.h@{pdo.h}} nico@207: \subsubsection[s\_\-PDO]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__PDO}{struct\_\-s\_\-PDO} \hyperlink{structstruct__s__PDO}{s\_\-PDO}}} nico@207: \label{pdo_8h_7f9085f960c6632e8c79537abac9a9ff} nico@207: nico@207: nico@207: The PDO structure \hypertarget{pdo_8h_cebb3b4d895da8e726cc7eddb6035e6f}{ nico@207: \index{pdo.h@{pdo.h}!s_process_var@{s\_\-process\_\-var}} nico@207: \index{s_process_var@{s\_\-process\_\-var}!pdo.h@{pdo.h}} nico@207: \subsubsection[s\_\-process\_\-var]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__process__var}{struct\_\-s\_\-process\_\-var} \hyperlink{structstruct__s__process__var}{s\_\-process\_\-var}}} nico@207: \label{pdo_8h_cebb3b4d895da8e726cc7eddb6035e6f} nico@207: nico@207: nico@207: nico@207: nico@207: \subsection{Function Documentation} nico@207: \hypertarget{pdo_8h_b9c82d949045cb7f52ed40d0ee8c7bf1}{ nico@207: \index{pdo.h@{pdo.h}!buildPDO@{buildPDO}} nico@207: \index{buildPDO@{buildPDO}!pdo.h@{pdo.h}} nico@207: \subsubsection[buildPDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 build\-PDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS16 {\em index})}} nico@207: \label{pdo_8h_b9c82d949045cb7f52ed40d0ee8c7bf1} nico@207: nico@207: nico@207: Prepare the PDO defined at index to be sent by PDOm\-GR Copy all the data to transmit in process\_\-var $\ast$pw\-Cob\-Id : returns the value of the cobid. (subindex 1) Return 0 or 0x\-FF if error. \hypertarget{pdo_8h_e468510c9f77f502207d961d26389918}{ nico@207: \index{pdo.h@{pdo.h}!CopyBits@{CopyBits}} nico@207: \index{CopyBits@{CopyBits}!pdo.h@{pdo.h}} nico@207: \subsubsection[CopyBits]{\setlength{\rightskip}{0pt plus 5cm}void Copy\-Bits (UNS8 {\em Nb\-Bits}, UNS8 $\ast$ {\em Src\-Byte\-Index}, UNS8 {\em Src\-Bit\-Index}, UNS8 {\em Src\-Big\-Endian}, UNS8 $\ast$ {\em Dest\-Byte\-Index}, UNS8 {\em Dest\-Bit\-Index}, UNS8 {\em Dest\-Big\-Endian})}} nico@207: \label{pdo_8h_e468510c9f77f502207d961d26389918} nico@207: nico@207: nico@207: nico@207: nico@207: Definition at line 376 of file pdo.c. nico@207: nico@207: References INTEGER8, and UNS8.\hypertarget{pdo_8h_298b8291fa35cca22264cf8a70bf138a}{ nico@207: \index{pdo.h@{pdo.h}!PDOmGR@{PDOmGR}} nico@207: \index{PDOmGR@{PDOmGR}!pdo.h@{pdo.h}} nico@207: \subsubsection[PDOmGR]{\setlength{\rightskip}{0pt plus 5cm}UNS8 PDOm\-GR (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em cob\-Id})}} nico@207: \label{pdo_8h_298b8291fa35cca22264cf8a70bf138a} nico@207: nico@207: nico@207: Prepare a PDO frame transmission, whose different parameters are stored in process\_\-var table, to the slave. bus\_\-id is hardware dependant call the function send\-PDO return the result of the function send\-PDO or 0x\-FF if error nico@207: nico@207: Definition at line 61 of file pdo.c. nico@207: nico@207: References struct\_\-s\_\-PDO::cob\-Id, struct\_\-s\_\-process\_\-var::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-process\_\-var::data, struct\_\-s\_\-PDO::data, struct\_\-s\_\-PDO::len, MSG\_\-WAR, NOT\_\-A\_\-REQUEST, struct\_\-CO\_\-Data::process\_\-var, send\-PDO(), and UNS8.\hypertarget{pdo_8h_ae7d661cd3ef7adf93a0d08fdb15b7f2}{ nico@207: \index{pdo.h@{pdo.h}!proceedPDO@{proceedPDO}} nico@207: \index{proceedPDO@{proceedPDO}!pdo.h@{pdo.h}} nico@207: \subsubsection[proceedPDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 proceed\-PDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}} nico@207: \label{pdo_8h_ae7d661cd3ef7adf93a0d08fdb15b7f2} nico@207: nico@207: nico@207: Compute a PDO frame reception bus\_\-id is hardware dependant return 0x\-FF if error, else return 0 nico@207: nico@207: Definition at line 187 of file pdo.c. nico@207: nico@207: References Message::cob\_\-id, Copy\-Bits(), struct\_\-s\_\-process\_\-var::count, struct\_\-s\_\-timer\_\-entry::d, Message::data, struct\_\-s\_\-process\_\-var::data, struct\_\-CO\_\-Data::first\-Index, get\-ODentry(), struct\_\-CO\_\-Data::last\-Index, Message::len, MSG\_\-ERR, MSG\_\-WAR, NOT\_\-A\_\-REQUEST, struct\_\-CO\_\-Data::objdict, OD\_\-SUCCESSFUL, s\_\-quick\_\-index::PDO\_\-RCV, s\_\-quick\_\-index::PDO\_\-RCV\_\-MAP, s\_\-quick\_\-index::PDO\_\-TRS, s\_\-quick\_\-index::PDO\_\-TRS\_\-MAP, PDOm\-GR(), td\_\-subindex::p\-Object, struct\_\-CO\_\-Data::process\_\-var, td\_\-indextable::p\-Subindex, REQUEST, set\-ODentry(), state1, state2, state4, state5, TRANS\_\-EVENT, TRANS\_\-RTR, TRANS\_\-RTR\_\-SYNC, UNS16, UNS32, UNS8, and SHORT\_\-CAN::w.\hypertarget{pdo_8h_a6774c219dc64c1cec4b4721ba23e15a}{ nico@207: \index{pdo.h@{pdo.h}!sendPDO@{sendPDO}} nico@207: \index{sendPDO@{sendPDO}!pdo.h@{pdo.h}} nico@207: \subsubsection[sendPDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-PDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{structstruct__s__PDO}{s\_\-PDO} {\em pdo}, UNS8 {\em request})}} nico@207: \label{pdo_8h_a6774c219dc64c1cec4b4721ba23e15a} nico@207: nico@207: nico@207: Transmit a PDO data frame on the bus bus\_\-id pdo is a structure which contains the pdo to transmit bus\_\-id is hardware dependant return can\-Send(bus\_\-id,\&m) or 0x\-FF if error request can take the value REQUEST or NOT\_\-A\_\-REQUEST nico@207: nico@207: Definition at line 27 of file pdo.c. nico@207: nico@207: References struct\_\-CO\_\-Data::can\-Handle, can\-Send(), Message::cob\_\-id, struct\_\-s\_\-PDO::cob\-Id, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-PDO::data, Message::data, struct\_\-s\_\-PDO::len, Message::len, MSG\_\-WAR, struct\_\-CO\_\-Data::node\-State, NOT\_\-A\_\-REQUEST, Operational, REQUEST, Message::rtr, UNS8, and SHORT\_\-CAN::w.\hypertarget{pdo_8h_07ff33d0d2e6b1070bf3c27578006e8d}{ nico@207: \index{pdo.h@{pdo.h}!sendPDOevent@{sendPDOevent}} nico@207: \index{sendPDOevent@{sendPDOevent}!pdo.h@{pdo.h}} nico@207: \subsubsection[sendPDOevent]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-PDOevent (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, void $\ast$ {\em variable})}} nico@207: \label{pdo_8h_07ff33d0d2e6b1070bf3c27578006e8d} nico@207: nico@207: nico@207: \hypertarget{pdo_8h_cc08547009d3d2755d2291999941694c}{ nico@207: \index{pdo.h@{pdo.h}!sendPDOrequest@{sendPDOrequest}} nico@207: \index{sendPDOrequest@{sendPDOrequest}!pdo.h@{pdo.h}} nico@207: \subsubsection[sendPDOrequest]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-PDOrequest (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em cob\-Id})}} nico@207: \label{pdo_8h_cc08547009d3d2755d2291999941694c} nico@207: nico@207: nico@207: Transmit a PDO request frame on the bus bus\_\-id to the slave. bus\_\-id is hardware dependant Returns 0x\-FF if error, other in success. nico@207: nico@207: Definition at line 154 of file pdo.c. nico@207: nico@207: References struct\_\-s\_\-PDO::cob\-Id, struct\_\-s\_\-timer\_\-entry::d, struct\_\-CO\_\-Data::first\-Index, struct\_\-CO\_\-Data::last\-Index, struct\_\-s\_\-PDO::len, MSG\_\-WAR, struct\_\-CO\_\-Data::objdict, s\_\-quick\_\-index::PDO\_\-RCV, td\_\-subindex::p\-Object, td\_\-indextable::p\-Subindex, REQUEST, send\-PDO(), UNS16, UNS32, and UNS8.