207
|
1 |
\hypertarget{pdo_8h}{
|
|
2 |
\section{/home/epimerde/documents/tc11/Can\-Festival-3/include/pdo.h File Reference}
|
|
3 |
\label{pdo_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/pdo.h@{/home/epimerde/documents/tc11/CanFestival-3/include/pdo.h}}
|
|
4 |
}
|
|
5 |
{\tt \#include $<$applicfg.h$>$}\par
|
|
6 |
{\tt \#include $<$def.h$>$}\par
|
|
7 |
{\tt \#include \char`\"{}data.h\char`\"{}}\par
|
|
8 |
\subsection*{Data Structures}
|
|
9 |
\begin{CompactItemize}
|
|
10 |
\item
|
|
11 |
struct \hyperlink{structstruct__s__process__var}{struct\_\-s\_\-process\_\-var}
|
|
12 |
\item
|
|
13 |
struct \hyperlink{structstruct__s__PDO}{struct\_\-s\_\-PDO}
|
|
14 |
\end{CompactItemize}
|
|
15 |
\subsection*{Typedefs}
|
|
16 |
\begin{CompactItemize}
|
|
17 |
\item
|
|
18 |
typedef \hyperlink{structstruct__s__process__var}{struct\_\-s\_\-process\_\-var} \hyperlink{pdo_8h_cebb3b4d895da8e726cc7eddb6035e6f}{s\_\-process\_\-var}
|
|
19 |
\item
|
|
20 |
typedef \hyperlink{structstruct__s__PDO}{struct\_\-s\_\-PDO} \hyperlink{pdo_8h_7f9085f960c6632e8c79537abac9a9ff}{s\_\-PDO}
|
|
21 |
\end{CompactItemize}
|
|
22 |
\subsection*{Functions}
|
|
23 |
\begin{CompactItemize}
|
|
24 |
\item
|
|
25 |
UNS8 \hyperlink{pdo_8h_a6774c219dc64c1cec4b4721ba23e15a}{send\-PDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structstruct__s__PDO}{s\_\-PDO} pdo, UNS8 request)
|
|
26 |
\item
|
|
27 |
UNS8 \hyperlink{pdo_8h_298b8291fa35cca22264cf8a70bf138a}{PDOm\-GR} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 cob\-Id)
|
|
28 |
\item
|
|
29 |
UNS8 \hyperlink{pdo_8h_b9c82d949045cb7f52ed40d0ee8c7bf1}{build\-PDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS16 index)
|
|
30 |
\item
|
|
31 |
UNS8 \hyperlink{pdo_8h_cc08547009d3d2755d2291999941694c}{send\-PDOrequest} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 cob\-Id)
|
|
32 |
\item
|
|
33 |
UNS8 \hyperlink{pdo_8h_ae7d661cd3ef7adf93a0d08fdb15b7f2}{proceed\-PDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m)
|
|
34 |
\item
|
|
35 |
UNS8 \hyperlink{pdo_8h_07ff33d0d2e6b1070bf3c27578006e8d}{send\-PDOevent} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, void $\ast$variable)
|
|
36 |
\item
|
|
37 |
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)
|
|
38 |
\end{CompactItemize}
|
|
39 |
|
|
40 |
|
|
41 |
\subsection{Typedef Documentation}
|
|
42 |
\hypertarget{pdo_8h_7f9085f960c6632e8c79537abac9a9ff}{
|
|
43 |
\index{pdo.h@{pdo.h}!s_PDO@{s\_\-PDO}}
|
|
44 |
\index{s_PDO@{s\_\-PDO}!pdo.h@{pdo.h}}
|
|
45 |
\subsubsection[s\_\-PDO]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__PDO}{struct\_\-s\_\-PDO} \hyperlink{structstruct__s__PDO}{s\_\-PDO}}}
|
|
46 |
\label{pdo_8h_7f9085f960c6632e8c79537abac9a9ff}
|
|
47 |
|
|
48 |
|
|
49 |
The PDO structure \hypertarget{pdo_8h_cebb3b4d895da8e726cc7eddb6035e6f}{
|
|
50 |
\index{pdo.h@{pdo.h}!s_process_var@{s\_\-process\_\-var}}
|
|
51 |
\index{s_process_var@{s\_\-process\_\-var}!pdo.h@{pdo.h}}
|
|
52 |
\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}}}
|
|
53 |
\label{pdo_8h_cebb3b4d895da8e726cc7eddb6035e6f}
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
\subsection{Function Documentation}
|
|
59 |
\hypertarget{pdo_8h_b9c82d949045cb7f52ed40d0ee8c7bf1}{
|
|
60 |
\index{pdo.h@{pdo.h}!buildPDO@{buildPDO}}
|
|
61 |
\index{buildPDO@{buildPDO}!pdo.h@{pdo.h}}
|
|
62 |
\subsubsection[buildPDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 build\-PDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS16 {\em index})}}
|
|
63 |
\label{pdo_8h_b9c82d949045cb7f52ed40d0ee8c7bf1}
|
|
64 |
|
|
65 |
|
|
66 |
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}{
|
|
67 |
\index{pdo.h@{pdo.h}!CopyBits@{CopyBits}}
|
|
68 |
\index{CopyBits@{CopyBits}!pdo.h@{pdo.h}}
|
|
69 |
\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})}}
|
|
70 |
\label{pdo_8h_e468510c9f77f502207d961d26389918}
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
Definition at line 376 of file pdo.c.
|
|
76 |
|
|
77 |
References INTEGER8, and UNS8.\hypertarget{pdo_8h_298b8291fa35cca22264cf8a70bf138a}{
|
|
78 |
\index{pdo.h@{pdo.h}!PDOmGR@{PDOmGR}}
|
|
79 |
\index{PDOmGR@{PDOmGR}!pdo.h@{pdo.h}}
|
|
80 |
\subsubsection[PDOmGR]{\setlength{\rightskip}{0pt plus 5cm}UNS8 PDOm\-GR (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em cob\-Id})}}
|
|
81 |
\label{pdo_8h_298b8291fa35cca22264cf8a70bf138a}
|
|
82 |
|
|
83 |
|
|
84 |
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
|
|
85 |
|
|
86 |
Definition at line 61 of file pdo.c.
|
|
87 |
|
|
88 |
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}{
|
|
89 |
\index{pdo.h@{pdo.h}!proceedPDO@{proceedPDO}}
|
|
90 |
\index{proceedPDO@{proceedPDO}!pdo.h@{pdo.h}}
|
|
91 |
\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})}}
|
|
92 |
\label{pdo_8h_ae7d661cd3ef7adf93a0d08fdb15b7f2}
|
|
93 |
|
|
94 |
|
|
95 |
Compute a PDO frame reception bus\_\-id is hardware dependant return 0x\-FF if error, else return 0
|
|
96 |
|
|
97 |
Definition at line 187 of file pdo.c.
|
|
98 |
|
|
99 |
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}{
|
|
100 |
\index{pdo.h@{pdo.h}!sendPDO@{sendPDO}}
|
|
101 |
\index{sendPDO@{sendPDO}!pdo.h@{pdo.h}}
|
|
102 |
\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})}}
|
|
103 |
\label{pdo_8h_a6774c219dc64c1cec4b4721ba23e15a}
|
|
104 |
|
|
105 |
|
|
106 |
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
|
|
107 |
|
|
108 |
Definition at line 27 of file pdo.c.
|
|
109 |
|
|
110 |
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}{
|
|
111 |
\index{pdo.h@{pdo.h}!sendPDOevent@{sendPDOevent}}
|
|
112 |
\index{sendPDOevent@{sendPDOevent}!pdo.h@{pdo.h}}
|
|
113 |
\subsubsection[sendPDOevent]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-PDOevent (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, void $\ast$ {\em variable})}}
|
|
114 |
\label{pdo_8h_07ff33d0d2e6b1070bf3c27578006e8d}
|
|
115 |
|
|
116 |
|
|
117 |
\hypertarget{pdo_8h_cc08547009d3d2755d2291999941694c}{
|
|
118 |
\index{pdo.h@{pdo.h}!sendPDOrequest@{sendPDOrequest}}
|
|
119 |
\index{sendPDOrequest@{sendPDOrequest}!pdo.h@{pdo.h}}
|
|
120 |
\subsubsection[sendPDOrequest]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-PDOrequest (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em cob\-Id})}}
|
|
121 |
\label{pdo_8h_cc08547009d3d2755d2291999941694c}
|
|
122 |
|
|
123 |
|
|
124 |
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.
|
|
125 |
|
|
126 |
Definition at line 154 of file pdo.c.
|
|
127 |
|
|
128 |
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. |