|
1 \hypertarget{sync_8h}{ |
|
2 \section{/home/epimerde/documents/tc11/Can\-Festival-3/include/sync.h File Reference} |
|
3 \label{sync_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/sync.h@{/home/epimerde/documents/tc11/CanFestival-3/include/sync.h}} |
|
4 } |
|
5 \subsection*{Typedefs} |
|
6 \begin{CompactItemize} |
|
7 \item |
|
8 typedef void($\ast$) \hyperlink{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}{post\_\-sync\_\-t} (void) |
|
9 \item |
|
10 typedef void($\ast$) \hyperlink{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}{post\_\-TPDO\_\-t} (void) |
|
11 \end{CompactItemize} |
|
12 \subsection*{Functions} |
|
13 \begin{CompactItemize} |
|
14 \item |
|
15 void \hyperlink{sync_8h_2e0bf669f5b40dfbdda0f12a5ae3631a}{start\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d) |
|
16 \item |
|
17 void \hyperlink{sync_8h_41c47dbd59d22bf9bab6cd288cf27164}{stop\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d) |
|
18 \item |
|
19 void \hyperlink{sync_8h_1da155dcbd7fa1271216d74a15e30490}{\_\-post\_\-sync} (void) |
|
20 \item |
|
21 void \hyperlink{sync_8h_1fdf94721303f1c60bb2de1a36b13cc4}{\_\-post\_\-TPDO} (void) |
|
22 \item |
|
23 UNS8 \hyperlink{sync_8h_0bcc501eb14c12365ffbaa3453905b50}{send\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 cob\_\-id) |
|
24 \item |
|
25 UNS8 \hyperlink{sync_8h_80cadcba23dc859db8a8d3f52789d6d1}{proceed\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m) |
|
26 \end{CompactItemize} |
|
27 |
|
28 |
|
29 \subsection{Typedef Documentation} |
|
30 \hypertarget{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}{ |
|
31 \index{sync.h@{sync.h}!post_sync_t@{post\_\-sync\_\-t}} |
|
32 \index{post_sync_t@{post\_\-sync\_\-t}!sync.h@{sync.h}} |
|
33 \subsubsection[post\_\-sync\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}{post\_\-sync\_\-t}(void)}} |
|
34 \label{sync_8h_8a0b5b8c19b375ef1c985caa120f3274} |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 Definition at line 30 of file sync.h.\hypertarget{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}{ |
|
40 \index{sync.h@{sync.h}!post_TPDO_t@{post\_\-TPDO\_\-t}} |
|
41 \index{post_TPDO_t@{post\_\-TPDO\_\-t}!sync.h@{sync.h}} |
|
42 \subsubsection[post\_\-TPDO\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}{post\_\-TPDO\_\-t}(void)}} |
|
43 \label{sync_8h_b9bc4632750ad12f918aa22a1eb7756b} |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 Definition at line 33 of file sync.h. |
|
49 |
|
50 \subsection{Function Documentation} |
|
51 \hypertarget{sync_8h_1da155dcbd7fa1271216d74a15e30490}{ |
|
52 \index{sync.h@{sync.h}!_post_sync@{\_\-post\_\-sync}} |
|
53 \index{_post_sync@{\_\-post\_\-sync}!sync.h@{sync.h}} |
|
54 \subsubsection[\_\-post\_\-sync]{\setlength{\rightskip}{0pt plus 5cm}void \_\-post\_\-sync (void)}} |
|
55 \label{sync_8h_1da155dcbd7fa1271216d74a15e30490} |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 Definition at line 245 of file sync.c.\hypertarget{sync_8h_1fdf94721303f1c60bb2de1a36b13cc4}{ |
|
61 \index{sync.h@{sync.h}!_post_TPDO@{\_\-post\_\-TPDO}} |
|
62 \index{_post_TPDO@{\_\-post\_\-TPDO}!sync.h@{sync.h}} |
|
63 \subsubsection[\_\-post\_\-TPDO]{\setlength{\rightskip}{0pt plus 5cm}void \_\-post\_\-TPDO (void)}} |
|
64 \label{sync_8h_1fdf94721303f1c60bb2de1a36b13cc4} |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 Definition at line 246 of file sync.c.\hypertarget{sync_8h_80cadcba23dc859db8a8d3f52789d6d1}{ |
|
70 \index{sync.h@{sync.h}!proceedSYNC@{proceedSYNC}} |
|
71 \index{proceedSYNC@{proceedSYNC}!sync.h@{sync.h}} |
|
72 \subsubsection[proceedSYNC]{\setlength{\rightskip}{0pt plus 5cm}UNS8 proceed\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}} |
|
73 \label{sync_8h_80cadcba23dc859db8a8d3f52789d6d1} |
|
74 |
|
75 |
|
76 This function is called when the node is receiving a SYNC message (cob-id = 0x80). What does the function : check if the node is in OERATIONAL mode. (other mode : return 0 but does nothing). Get the SYNC cob\-Id by reading the dictionary index 1005. (Return -1 if it does not correspond to the cob\-Id received). Scan the dictionary from index 0x1800 to the last PDO defined (dict\_\-cstes.max\_\-count\_\-of\_\-PDO\_\-transmit) for each PDO whose transmission type is on synchro (transmission type $<$ 241) and if the msg must be send at this SYNC. read the COBID. Verify that the node\-Id inside the node\-Id correspond to b\-Device\-Node\-Id. (Assume that the cob\-Id of a PDO Transmit is made with the node id of the node who transmit), get the mapping, launch PDOm\-GR to send the PDO $\ast$m is a pointer to the message received bus\_\-id is hardware dependant return 0 if OK, 0x\-FF if error |
|
77 |
|
78 Definition at line 93 of file sync.c. |
|
79 |
|
80 References td\_\-indextable::b\-Sub\-Count, Copy\-Bits(), struct\_\-s\_\-process\_\-var::count, struct\_\-CO\_\-Data::count\_\-sync, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-process\_\-var::data, struct\_\-CO\_\-Data::first\-Index, get\-ODentry(), struct\_\-CO\_\-Data::last\-Index, MSG\_\-ERR, MSG\_\-WAR, struct\_\-CO\_\-Data::node\-State, struct\_\-CO\_\-Data::objdict, OD\_\-SUCCESSFUL, Operational, s\_\-quick\_\-index::PDO\_\-TRS, s\_\-quick\_\-index::PDO\_\-TRS\_\-MAP, PDOm\-GR(), td\_\-subindex::p\-Object, struct\_\-CO\_\-Data::post\_\-sync, struct\_\-CO\_\-Data::post\_\-TPDO, struct\_\-CO\_\-Data::process\_\-var, td\_\-indextable::p\-Subindex, state10, state11, state3, state4, state5, state7, state8, state9, TRANS\_\-SYNC\_\-MAX, TRANS\_\-SYNC\_\-MIN, UNS16, UNS32, and UNS8.\hypertarget{sync_8h_0bcc501eb14c12365ffbaa3453905b50}{ |
|
81 \index{sync.h@{sync.h}!sendSYNC@{sendSYNC}} |
|
82 \index{sendSYNC@{sendSYNC}!sync.h@{sync.h}} |
|
83 \subsubsection[sendSYNC]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em cob\_\-id})}} |
|
84 \label{sync_8h_0bcc501eb14c12365ffbaa3453905b50} |
|
85 |
|
86 |
|
87 transmit a SYNC message on the bus number bus\_\-id bus\_\-id is hardware dependant return can\-Send(bus\_\-id,\&m) |
|
88 |
|
89 Definition at line 77 of file sync.c. |
|
90 |
|
91 References struct\_\-CO\_\-Data::can\-Handle, can\-Send(), Message::cob\_\-id, struct\_\-s\_\-timer\_\-entry::d, Message::len, MSG\_\-WAR, NOT\_\-A\_\-REQUEST, proceed\-SYNC(), Message::rtr, UNS8, and SHORT\_\-CAN::w.\hypertarget{sync_8h_2e0bf669f5b40dfbdda0f12a5ae3631a}{ |
|
92 \index{sync.h@{sync.h}!startSYNC@{startSYNC}} |
|
93 \index{startSYNC@{startSYNC}!sync.h@{sync.h}} |
|
94 \subsubsection[startSYNC]{\setlength{\rightskip}{0pt plus 5cm}void start\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}} |
|
95 \label{sync_8h_2e0bf669f5b40dfbdda0f12a5ae3631a} |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 Definition at line 50 of file sync.c. |
|
101 |
|
102 References struct\_\-CO\_\-Data::COB\_\-ID\_\-Sync, struct\_\-s\_\-timer\_\-entry::d, On\-COB\_\-ID\_\-Sync\-Update(), Register\-Set\-ODentry\-Call\-Back(), Set\-Alarm(), stop\-SYNC(), struct\_\-CO\_\-Data::Sync\_\-Cycle\_\-Period, Sync\-Alarm(), struct\_\-CO\_\-Data::sync\-Timer, and US\_\-TO\_\-TIMEVAL.\hypertarget{sync_8h_41c47dbd59d22bf9bab6cd288cf27164}{ |
|
103 \index{sync.h@{sync.h}!stopSYNC@{stopSYNC}} |
|
104 \index{stopSYNC@{stopSYNC}!sync.h@{sync.h}} |
|
105 \subsubsection[stopSYNC]{\setlength{\rightskip}{0pt plus 5cm}void stop\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}} |
|
106 \label{sync_8h_41c47dbd59d22bf9bab6cd288cf27164} |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 Definition at line 71 of file sync.c. |
|
112 |
|
113 References struct\_\-s\_\-timer\_\-entry::d, Del\-Alarm(), and struct\_\-CO\_\-Data::sync\-Timer. |