doc/doxygen/latex/sync_8h.tex
author nico
Thu, 07 Jun 2007 09:03:41 +0200
changeset 213 1df3055de547
parent 207 b6572d0336c3
permissions -rw-r--r--
Manual and Documentation finish
207
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     1
\hypertarget{sync_8h}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     2
\section{/home/epimerde/documents/tc11/Can\-Festival-3/include/sync.h File Reference}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     3
\label{sync_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/sync.h@{/home/epimerde/documents/tc11/CanFestival-3/include/sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     4
}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     5
\subsection*{Typedefs}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     6
\begin{CompactItemize}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     7
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     8
typedef void($\ast$) \hyperlink{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}{post\_\-sync\_\-t} (void)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
     9
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    10
typedef void($\ast$) \hyperlink{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}{post\_\-TPDO\_\-t} (void)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    11
\end{CompactItemize}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    12
\subsection*{Functions}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    13
\begin{CompactItemize}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    14
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    15
void \hyperlink{sync_8h_2e0bf669f5b40dfbdda0f12a5ae3631a}{start\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    16
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    17
void \hyperlink{sync_8h_41c47dbd59d22bf9bab6cd288cf27164}{stop\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    18
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    19
void \hyperlink{sync_8h_1da155dcbd7fa1271216d74a15e30490}{\_\-post\_\-sync} (void)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    20
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    21
void \hyperlink{sync_8h_1fdf94721303f1c60bb2de1a36b13cc4}{\_\-post\_\-TPDO} (void)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    22
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    23
UNS8 \hyperlink{sync_8h_0bcc501eb14c12365ffbaa3453905b50}{send\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 cob\_\-id)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    24
\item 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    25
UNS8 \hyperlink{sync_8h_80cadcba23dc859db8a8d3f52789d6d1}{proceed\-SYNC} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m)
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    26
\end{CompactItemize}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    27
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    28
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    29
\subsection{Typedef Documentation}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    30
\hypertarget{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    31
\index{sync.h@{sync.h}!post_sync_t@{post\_\-sync\_\-t}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    32
\index{post_sync_t@{post\_\-sync\_\-t}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    33
\subsubsection[post\_\-sync\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}{post\_\-sync\_\-t}(void)}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    34
\label{sync_8h_8a0b5b8c19b375ef1c985caa120f3274}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    35
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    36
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    37
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    38
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    39
Definition at line 30 of file sync.h.\hypertarget{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    40
\index{sync.h@{sync.h}!post_TPDO_t@{post\_\-TPDO\_\-t}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    41
\index{post_TPDO_t@{post\_\-TPDO\_\-t}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    42
\subsubsection[post\_\-TPDO\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}{post\_\-TPDO\_\-t}(void)}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    43
\label{sync_8h_b9bc4632750ad12f918aa22a1eb7756b}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    44
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    45
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    46
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    47
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    48
Definition at line 33 of file sync.h.
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    49
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    50
\subsection{Function Documentation}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    51
\hypertarget{sync_8h_1da155dcbd7fa1271216d74a15e30490}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    52
\index{sync.h@{sync.h}!_post_sync@{\_\-post\_\-sync}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    53
\index{_post_sync@{\_\-post\_\-sync}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    54
\subsubsection[\_\-post\_\-sync]{\setlength{\rightskip}{0pt plus 5cm}void \_\-post\_\-sync (void)}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    55
\label{sync_8h_1da155dcbd7fa1271216d74a15e30490}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    56
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    57
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    58
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    59
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    60
Definition at line 245 of file sync.c.\hypertarget{sync_8h_1fdf94721303f1c60bb2de1a36b13cc4}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    61
\index{sync.h@{sync.h}!_post_TPDO@{\_\-post\_\-TPDO}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    62
\index{_post_TPDO@{\_\-post\_\-TPDO}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    63
\subsubsection[\_\-post\_\-TPDO]{\setlength{\rightskip}{0pt plus 5cm}void \_\-post\_\-TPDO (void)}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    64
\label{sync_8h_1fdf94721303f1c60bb2de1a36b13cc4}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    65
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    66
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    67
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    68
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    69
Definition at line 246 of file sync.c.\hypertarget{sync_8h_80cadcba23dc859db8a8d3f52789d6d1}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    70
\index{sync.h@{sync.h}!proceedSYNC@{proceedSYNC}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    71
\index{proceedSYNC@{proceedSYNC}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    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})}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    73
\label{sync_8h_80cadcba23dc859db8a8d3f52789d6d1}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    74
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    75
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    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 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    77
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    78
Definition at line 93 of file sync.c.
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    79
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    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}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    81
\index{sync.h@{sync.h}!sendSYNC@{sendSYNC}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    82
\index{sendSYNC@{sendSYNC}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    83
\subsubsection[sendSYNC]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em cob\_\-id})}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    84
\label{sync_8h_0bcc501eb14c12365ffbaa3453905b50}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    85
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    86
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    87
transmit a SYNC message on the bus number bus\_\-id bus\_\-id is hardware dependant return can\-Send(bus\_\-id,\&m) 
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    88
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    89
Definition at line 77 of file sync.c.
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    90
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    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}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    92
\index{sync.h@{sync.h}!startSYNC@{startSYNC}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    93
\index{startSYNC@{startSYNC}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    94
\subsubsection[startSYNC]{\setlength{\rightskip}{0pt plus 5cm}void start\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    95
\label{sync_8h_2e0bf669f5b40dfbdda0f12a5ae3631a}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    96
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    97
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    98
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
    99
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   100
Definition at line 50 of file sync.c.
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   101
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   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}{
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   103
\index{sync.h@{sync.h}!stopSYNC@{stopSYNC}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   104
\index{stopSYNC@{stopSYNC}!sync.h@{sync.h}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   105
\subsubsection[stopSYNC]{\setlength{\rightskip}{0pt plus 5cm}void stop\-SYNC (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   106
\label{sync_8h_41c47dbd59d22bf9bab6cd288cf27164}
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   107
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   108
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   109
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   110
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   111
Definition at line 71 of file sync.c.
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   112
b6572d0336c3 First doxygen implementation
nico
parents:
diff changeset
   113
References struct\_\-s\_\-timer\_\-entry::d, Del\-Alarm(), and struct\_\-CO\_\-Data::sync\-Timer.