1 \hypertarget{can__socket_8c}{ |
|
2 \section{/home/epimerde/documents/tc11/Can\-Festival-3/drivers/can\_\-socket/can\_\-socket.c File Reference} |
|
3 \label{can__socket_8c}\index{/home/epimerde/documents/tc11/CanFestival-3/drivers/can_socket/can_socket.c@{/home/epimerde/documents/tc11/CanFestival-3/drivers/can\_\-socket/can\_\-socket.c}} |
|
4 } |
|
5 {\tt \#include $<$stdio.h$>$}\par |
|
6 {\tt \#include $<$string.h$>$}\par |
|
7 {\tt \#include $<$stdlib.h$>$}\par |
|
8 {\tt \#include $<$stddef.h$>$}\par |
|
9 {\tt \#include $<$errno.h$>$}\par |
|
10 {\tt \#include \char`\"{}config.h\char`\"{}}\par |
|
11 {\tt \#include $<$sys/socket.h$>$}\par |
|
12 {\tt \#include $<$sys/ioctl.h$>$}\par |
|
13 {\tt \#include \char`\"{}linux/can.h\char`\"{}}\par |
|
14 {\tt \#include \char`\"{}linux/can/raw.h\char`\"{}}\par |
|
15 {\tt \#include \char`\"{}net/if.h\char`\"{}}\par |
|
16 {\tt \#include \char`\"{}can\_\-driver.h\char`\"{}}\par |
|
17 \subsection*{Defines} |
|
18 \begin{CompactItemize} |
|
19 \item |
|
20 \#define \hyperlink{can__socket_8c_eac0c3db7a1e021f17987bcc76893849}{PF\_\-CAN}~29 |
|
21 \item |
|
22 \#define \hyperlink{can__socket_8c_546620c7e758f003b24b7fdae4f97bd4}{AF\_\-CAN}~PF\_\-CAN |
|
23 \item |
|
24 \#define \hyperlink{can__socket_8c_b0e2c857f77f55e9d76239af529340ef}{CAN\_\-IFNAME}~\char`\"{}can\%s\char`\"{} |
|
25 \item |
|
26 \#define \hyperlink{can__socket_8c_3947ec96c2f7841c6a25f0d2b9989597}{CAN\_\-SOCKET}~socket |
|
27 \item |
|
28 \#define \hyperlink{can__socket_8c_4a4bdc94205926096ef572a540e4d025}{CAN\_\-CLOSE}~close |
|
29 \item |
|
30 \#define \hyperlink{can__socket_8c_b78c6a888be103b97e95bfc85f5da083}{CAN\_\-RECV}~recv |
|
31 \item |
|
32 \#define \hyperlink{can__socket_8c_70c9889a227060d2e902e298858c1f36}{CAN\_\-SEND}~send |
|
33 \item |
|
34 \#define \hyperlink{can__socket_8c_f51a5befd644cec65f24d3502b31d630}{CAN\_\-BIND}~bind |
|
35 \item |
|
36 \#define \hyperlink{can__socket_8c_56776428046c869321581cd587514964}{CAN\_\-IOCTL}~ioctl |
|
37 \item |
|
38 \#define \hyperlink{can__socket_8c_e9e218c73b4cb73965e4412c4d50eb2e}{CAN\_\-ERRNO}(err)~errno |
|
39 \end{CompactItemize} |
|
40 \subsection*{Functions} |
|
41 \begin{CompactItemize} |
|
42 \item |
|
43 UNS8 \hyperlink{can__socket_8c_6b3248e95acf2b08d1fd8b42610cc5a6}{can\-Receive\_\-driver} (\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} fd0, \hyperlink{structMessage}{Message} $\ast$m) |
|
44 \item |
|
45 UNS8 \hyperlink{can__socket_8c_def95aee49efa13dd047d0b3b5507ad3}{can\-Send\_\-driver} (\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} fd0, \hyperlink{structMessage}{Message} $\ast$m) |
|
46 \item |
|
47 \hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} \hyperlink{can__socket_8c_945403aba7f36acbd2e7160ade361bab}{can\-Open\_\-driver} (\hyperlink{structstruct__s__BOARD}{s\_\-BOARD} $\ast$board) |
|
48 \item |
|
49 int \hyperlink{can__socket_8c_76e6a915d0e40a23b863198b2aaa5545}{can\-Close\_\-driver} (\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} fd0) |
|
50 \end{CompactItemize} |
|
51 |
|
52 |
|
53 \subsection{Define Documentation} |
|
54 \hypertarget{can__socket_8c_546620c7e758f003b24b7fdae4f97bd4}{ |
|
55 \index{can_socket.c@{can\_\-socket.c}!AF_CAN@{AF\_\-CAN}} |
|
56 \index{AF_CAN@{AF\_\-CAN}!can_socket.c@{can\_\-socket.c}} |
|
57 \subsubsection[AF\_\-CAN]{\setlength{\rightskip}{0pt plus 5cm}\#define AF\_\-CAN~PF\_\-CAN}} |
|
58 \label{can__socket_8c_546620c7e758f003b24b7fdae4f97bd4} |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 Definition at line 48 of file can\_\-socket.c.\hypertarget{can__socket_8c_f51a5befd644cec65f24d3502b31d630}{ |
|
64 \index{can_socket.c@{can\_\-socket.c}!CAN_BIND@{CAN\_\-BIND}} |
|
65 \index{CAN_BIND@{CAN\_\-BIND}!can_socket.c@{can\_\-socket.c}} |
|
66 \subsubsection[CAN\_\-BIND]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-BIND~bind}} |
|
67 \label{can__socket_8c_f51a5befd644cec65f24d3502b31d630} |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 Definition at line 55 of file can\_\-socket.c.\hypertarget{can__socket_8c_4a4bdc94205926096ef572a540e4d025}{ |
|
73 \index{can_socket.c@{can\_\-socket.c}!CAN_CLOSE@{CAN\_\-CLOSE}} |
|
74 \index{CAN_CLOSE@{CAN\_\-CLOSE}!can_socket.c@{can\_\-socket.c}} |
|
75 \subsubsection[CAN\_\-CLOSE]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-CLOSE~close}} |
|
76 \label{can__socket_8c_4a4bdc94205926096ef572a540e4d025} |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 Definition at line 52 of file can\_\-socket.c.\hypertarget{can__socket_8c_e9e218c73b4cb73965e4412c4d50eb2e}{ |
|
82 \index{can_socket.c@{can\_\-socket.c}!CAN_ERRNO@{CAN\_\-ERRNO}} |
|
83 \index{CAN_ERRNO@{CAN\_\-ERRNO}!can_socket.c@{can\_\-socket.c}} |
|
84 \subsubsection[CAN\_\-ERRNO]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-ERRNO(err)~errno}} |
|
85 \label{can__socket_8c_e9e218c73b4cb73965e4412c4d50eb2e} |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 Definition at line 57 of file can\_\-socket.c.\hypertarget{can__socket_8c_b0e2c857f77f55e9d76239af529340ef}{ |
|
91 \index{can_socket.c@{can\_\-socket.c}!CAN_IFNAME@{CAN\_\-IFNAME}} |
|
92 \index{CAN_IFNAME@{CAN\_\-IFNAME}!can_socket.c@{can\_\-socket.c}} |
|
93 \subsubsection[CAN\_\-IFNAME]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-IFNAME~\char`\"{}can\%s\char`\"{}}} |
|
94 \label{can__socket_8c_b0e2c857f77f55e9d76239af529340ef} |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 Definition at line 50 of file can\_\-socket.c.\hypertarget{can__socket_8c_56776428046c869321581cd587514964}{ |
|
100 \index{can_socket.c@{can\_\-socket.c}!CAN_IOCTL@{CAN\_\-IOCTL}} |
|
101 \index{CAN_IOCTL@{CAN\_\-IOCTL}!can_socket.c@{can\_\-socket.c}} |
|
102 \subsubsection[CAN\_\-IOCTL]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-IOCTL~ioctl}} |
|
103 \label{can__socket_8c_56776428046c869321581cd587514964} |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 Definition at line 56 of file can\_\-socket.c.\hypertarget{can__socket_8c_b78c6a888be103b97e95bfc85f5da083}{ |
|
109 \index{can_socket.c@{can\_\-socket.c}!CAN_RECV@{CAN\_\-RECV}} |
|
110 \index{CAN_RECV@{CAN\_\-RECV}!can_socket.c@{can\_\-socket.c}} |
|
111 \subsubsection[CAN\_\-RECV]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-RECV~recv}} |
|
112 \label{can__socket_8c_b78c6a888be103b97e95bfc85f5da083} |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 Definition at line 53 of file can\_\-socket.c.\hypertarget{can__socket_8c_70c9889a227060d2e902e298858c1f36}{ |
|
118 \index{can_socket.c@{can\_\-socket.c}!CAN_SEND@{CAN\_\-SEND}} |
|
119 \index{CAN_SEND@{CAN\_\-SEND}!can_socket.c@{can\_\-socket.c}} |
|
120 \subsubsection[CAN\_\-SEND]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-SEND~send}} |
|
121 \label{can__socket_8c_70c9889a227060d2e902e298858c1f36} |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 Definition at line 54 of file can\_\-socket.c.\hypertarget{can__socket_8c_3947ec96c2f7841c6a25f0d2b9989597}{ |
|
127 \index{can_socket.c@{can\_\-socket.c}!CAN_SOCKET@{CAN\_\-SOCKET}} |
|
128 \index{CAN_SOCKET@{CAN\_\-SOCKET}!can_socket.c@{can\_\-socket.c}} |
|
129 \subsubsection[CAN\_\-SOCKET]{\setlength{\rightskip}{0pt plus 5cm}\#define CAN\_\-SOCKET~socket}} |
|
130 \label{can__socket_8c_3947ec96c2f7841c6a25f0d2b9989597} |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 Definition at line 51 of file can\_\-socket.c.\hypertarget{can__socket_8c_eac0c3db7a1e021f17987bcc76893849}{ |
|
136 \index{can_socket.c@{can\_\-socket.c}!PF_CAN@{PF\_\-CAN}} |
|
137 \index{PF_CAN@{PF\_\-CAN}!can_socket.c@{can\_\-socket.c}} |
|
138 \subsubsection[PF\_\-CAN]{\setlength{\rightskip}{0pt plus 5cm}\#define PF\_\-CAN~29}} |
|
139 \label{can__socket_8c_eac0c3db7a1e021f17987bcc76893849} |
|
140 |
|
141 |
|
142 |
|
143 |
|
144 Definition at line 47 of file can\_\-socket.c. |
|
145 |
|
146 \subsection{Function Documentation} |
|
147 \hypertarget{can__socket_8c_76e6a915d0e40a23b863198b2aaa5545}{ |
|
148 \index{can_socket.c@{can\_\-socket.c}!canClose_driver@{canClose\_\-driver}} |
|
149 \index{canClose_driver@{canClose\_\-driver}!can_socket.c@{can\_\-socket.c}} |
|
150 \subsubsection[canClose\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}int can\-Close\_\-driver (\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} {\em fd0})}} |
|
151 \label{can__socket_8c_76e6a915d0e40a23b863198b2aaa5545} |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 Definition at line 228 of file can\_\-socket.c. |
|
157 |
|
158 References CAN\_\-CLOSE.\hypertarget{can__socket_8c_945403aba7f36acbd2e7160ade361bab}{ |
|
159 \index{can_socket.c@{can\_\-socket.c}!canOpen_driver@{canOpen\_\-driver}} |
|
160 \index{canOpen_driver@{canOpen\_\-driver}!can_socket.c@{can\_\-socket.c}} |
|
161 \subsubsection[canOpen\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} can\-Open\_\-driver (\hyperlink{structstruct__s__BOARD}{s\_\-BOARD} $\ast$ {\em board})}} |
|
162 \label{can__socket_8c_945403aba7f36acbd2e7160ade361bab} |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 Definition at line 150 of file can\_\-socket.c. |
|
168 |
|
169 References AF\_\-CAN, struct\_\-s\_\-BOARD::baudrate, struct\_\-s\_\-BOARD::busname, CAN\_\-BIND, CAN\_\-CLOSE, CAN\_\-ERRNO, CAN\_\-IFNAME, CAN\_\-IOCTL, CAN\_\-SOCKET, and PF\_\-CAN.\hypertarget{can__socket_8c_6b3248e95acf2b08d1fd8b42610cc5a6}{ |
|
170 \index{can_socket.c@{can\_\-socket.c}!canReceive_driver@{canReceive\_\-driver}} |
|
171 \index{canReceive_driver@{canReceive\_\-driver}!can_socket.c@{can\_\-socket.c}} |
|
172 \subsubsection[canReceive\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}UNS8 can\-Receive\_\-driver (\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} {\em fd0}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}} |
|
173 \label{can__socket_8c_6b3248e95acf2b08d1fd8b42610cc5a6} |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 Definition at line 64 of file can\_\-socket.c. |
|
179 |
|
180 References CAN\_\-ERRNO, CAN\_\-RECV, Message::cob\_\-id, Message::data, Message::len, Message::rtr, and SHORT\_\-CAN::w.\hypertarget{can__socket_8c_def95aee49efa13dd047d0b3b5507ad3}{ |
|
181 \index{can_socket.c@{can\_\-socket.c}!canSend_driver@{canSend\_\-driver}} |
|
182 \index{canSend_driver@{canSend\_\-driver}!can_socket.c@{can\_\-socket.c}} |
|
183 \subsubsection[canSend\_\-driver]{\setlength{\rightskip}{0pt plus 5cm}UNS8 can\-Send\_\-driver (\hyperlink{win32_2applicfg_8h_712c7b28987b12b8d400df19c92d0f5e}{CAN\_\-HANDLE} {\em fd0}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}} |
|
184 \label{can__socket_8c_def95aee49efa13dd047d0b3b5507ad3} |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 Definition at line 90 of file can\_\-socket.c. |
|
190 |
|
191 References CAN\_\-ERRNO, CAN\_\-SEND, Message::cob\_\-id, Message::data, Message::len, Message::rtr, and SHORT\_\-CAN::w. |
|