doc/doxygen/latex/sdo_8h.tex
changeset 207 b6572d0336c3
equal deleted inserted replaced
206:6787754b251b 207:b6572d0336c3
       
     1 \hypertarget{sdo_8h}{
       
     2 \section{/home/epimerde/documents/tc11/Can\-Festival-3/include/sdo.h File Reference}
       
     3 \label{sdo_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/sdo.h@{/home/epimerde/documents/tc11/CanFestival-3/include/sdo.h}}
       
     4 }
       
     5 {\tt \#include \char`\"{}timer.h\char`\"{}}\par
       
     6 {\tt \#include \char`\"{}data.h\char`\"{}}\par
       
     7 \subsection*{Data Structures}
       
     8 \begin{CompactItemize}
       
     9 \item 
       
    10 struct \hyperlink{structstruct__s__transfer}{struct\_\-s\_\-transfer}
       
    11 \item 
       
    12 struct \hyperlink{structBODY}{BODY}
       
    13 \item 
       
    14 struct \hyperlink{structstruct__s__SDO}{struct\_\-s\_\-SDO}
       
    15 \end{CompactItemize}
       
    16 \subsection*{Typedefs}
       
    17 \begin{CompactItemize}
       
    18 \item 
       
    19 typedef void($\ast$) \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id)
       
    20 \item 
       
    21 typedef \hyperlink{structstruct__s__transfer}{struct\_\-s\_\-transfer} \hyperlink{sdo_8h_0c41985ac8cf4546cbce64eb0f2ac897}{s\_\-transfer}
       
    22 \item 
       
    23 typedef \hyperlink{structstruct__s__SDO}{struct\_\-s\_\-SDO} \hyperlink{sdo_8h_f9e5cbdc9fba242ca4060f6bffa6d7c8}{s\_\-SDO}
       
    24 \end{CompactItemize}
       
    25 \subsection*{Functions}
       
    26 \begin{CompactItemize}
       
    27 \item 
       
    28 void \hyperlink{sdo_8h_9309025e29b59e09026abcd3b45a5b61}{SDOTimeout\-Alarm} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 id)
       
    29 \item 
       
    30 void \hyperlink{sdo_8h_1f4f07eccc4890a11ccf4f632da7740b}{reset\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
       
    31 \item 
       
    32 UNS32 \hyperlink{sdo_8h_2eb5309dca3a7363da5e5e7230b85d58}{SDOline\-To\-Objdict} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line)
       
    33 \item 
       
    34 UNS32 \hyperlink{sdo_8h_29427a80fd1aeabff30bf0602fbc220f}{objdict\-To\-SDOline} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line)
       
    35 \item 
       
    36 UNS8 \hyperlink{sdo_8h_ad6eb8be03b832ebba4dfb87aaba4065}{line\-To\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 nb\-Bytes, UNS8 $\ast$data)
       
    37 \item 
       
    38 UNS8 \hyperlink{sdo_8h_18b6f7e9c9441640a88ffef1e8720694}{SDOto\-Line} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 nb\-Bytes, UNS8 $\ast$data)
       
    39 \item 
       
    40 UNS8 \hyperlink{sdo_8h_2019db2a4d17e6d29c055cbae173e2b9}{failed\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS8 whoami, UNS16 index, UNS8 sub\-Index, UNS32 abort\-Code)
       
    41 \item 
       
    42 void \hyperlink{sdo_8h_42d33be015d4c4c83c73f1f0e588f481}{reset\-SDOline} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line)
       
    43 \item 
       
    44 UNS8 \hyperlink{sdo_8h_b9c873a15f55b29112b5527a6cc6898d}{init\-SDOline} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 node\-Id, UNS16 index, UNS8 sub\-Index, UNS8 state)
       
    45 \item 
       
    46 UNS8 \hyperlink{sdo_8h_58d1f9691977617601beb9e5b4123252}{get\-SDOfree\-Line} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 whoami, UNS8 $\ast$line)
       
    47 \item 
       
    48 UNS8 \hyperlink{sdo_8h_bb0c376b048ab2c6e0524b135b62376f}{get\-SDOline\-On\-Use} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS8 whoami, UNS8 $\ast$line)
       
    49 \item 
       
    50 UNS8 \hyperlink{sdo_8h_555a772d3a88a29c495f33513f8b2d58}{close\-SDOtransfer} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS8 whoami)
       
    51 \item 
       
    52 UNS8 \hyperlink{sdo_8h_acceb714c6e457e98deb9ba164ba2a2f}{get\-SDOline\-Rest\-Bytes} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 $\ast$nb\-Bytes)
       
    53 \item 
       
    54 UNS8 \hyperlink{sdo_8h_601a837ecb5f21bf4c66b058c5ae7810}{set\-SDOline\-Rest\-Bytes} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 nb\-Bytes)
       
    55 \item 
       
    56 UNS8 \hyperlink{sdo_8h_c6b5d7d1439d537da992a96644a1ca5d}{send\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 whoami, \hyperlink{structstruct__s__SDO}{s\_\-SDO} sdo)
       
    57 \item 
       
    58 UNS8 \hyperlink{sdo_8h_b26c3f2fb63d81055809d6ccaa785b7c}{send\-SDOabort} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 whoami, UNS16 index, UNS8 sub\-Index, UNS32 abort\-Code)
       
    59 \item 
       
    60 UNS8 \hyperlink{sdo_8h_2a93a7c780472b1d8666d89aa270f661}{proceed\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m)
       
    61 \item 
       
    62 UNS8 \hyperlink{sdo_8h_bc20ed246e00053dcf71faa8f45ee39c}{write\-Network\-Dict} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS16 index, UNS8 sub\-Index, UNS8 count, UNS8 data\-Type, void $\ast$data)
       
    63 \item 
       
    64 UNS8 \hyperlink{sdo_8h_f4ec05293fb8971a1b282994498ed4f5}{write\-Network\-Dict\-Call\-Back} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS16 index, UNS8 sub\-Index, UNS8 count, UNS8 data\-Type, void $\ast$data, \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t} Callback)
       
    65 \item 
       
    66 UNS8 \hyperlink{sdo_8h_0e102a0835e4115920cd406e80a8d135}{read\-Network\-Dict} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS16 index, UNS8 sub\-Index, UNS8 data\-Type)
       
    67 \item 
       
    68 UNS8 \hyperlink{sdo_8h_542a5cdd20c00aa130a39fe68295e769}{read\-Network\-Dict\-Callback} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS16 index, UNS8 sub\-Index, UNS8 data\-Type, \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t} Callback)
       
    69 \item 
       
    70 UNS8 \hyperlink{sdo_8h_05b0c8eee1faee3c7a2f6e2ba3a16533}{get\-Read\-Result\-Network\-Dict} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, void $\ast$data, UNS8 $\ast$size, UNS32 $\ast$abort\-Code)
       
    71 \item 
       
    72 UNS8 \hyperlink{sdo_8h_8671e306873f19362c60bb50ab930d1d}{get\-Write\-Result\-Network\-Dict} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS32 $\ast$abort\-Code)
       
    73 \end{CompactItemize}
       
    74 
       
    75 
       
    76 \subsection{Typedef Documentation}
       
    77 \hypertarget{sdo_8h_f9e5cbdc9fba242ca4060f6bffa6d7c8}{
       
    78 \index{sdo.h@{sdo.h}!s_SDO@{s\_\-SDO}}
       
    79 \index{s_SDO@{s\_\-SDO}!sdo.h@{sdo.h}}
       
    80 \subsubsection[s\_\-SDO]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__SDO}{struct\_\-s\_\-SDO} \hyperlink{structstruct__s__SDO}{s\_\-SDO}}}
       
    81 \label{sdo_8h_f9e5cbdc9fba242ca4060f6bffa6d7c8}
       
    82 
       
    83 
       
    84 
       
    85 
       
    86 Definition at line 86 of file sdo.h.\hypertarget{sdo_8h_0c41985ac8cf4546cbce64eb0f2ac897}{
       
    87 \index{sdo.h@{sdo.h}!s_transfer@{s\_\-transfer}}
       
    88 \index{s_transfer@{s\_\-transfer}!sdo.h@{sdo.h}}
       
    89 \subsubsection[s\_\-transfer]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__transfer}{struct\_\-s\_\-transfer} \hyperlink{structstruct__s__transfer}{s\_\-transfer}}}
       
    90 \label{sdo_8h_0c41985ac8cf4546cbce64eb0f2ac897}
       
    91 
       
    92 
       
    93 
       
    94 
       
    95 Definition at line 69 of file sdo.h.\hypertarget{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{
       
    96 \index{sdo.h@{sdo.h}!SDOCallback_t@{SDOCallback\_\-t}}
       
    97 \index{SDOCallback_t@{SDOCallback\_\-t}!sdo.h@{sdo.h}}
       
    98 \subsubsection[SDOCallback\_\-t]{\setlength{\rightskip}{0pt plus 5cm}typedef void($\ast$) \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t}(\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id)}}
       
    99 \label{sdo_8h_606eccfef67e572723e1efba3f0d87ba}
       
   100 
       
   101 
       
   102 
       
   103 
       
   104 Definition at line 30 of file sdo.h.
       
   105 
       
   106 \subsection{Function Documentation}
       
   107 \hypertarget{sdo_8h_555a772d3a88a29c495f33513f8b2d58}{
       
   108 \index{sdo.h@{sdo.h}!closeSDOtransfer@{closeSDOtransfer}}
       
   109 \index{closeSDOtransfer@{closeSDOtransfer}!sdo.h@{sdo.h}}
       
   110 \subsubsection[closeSDOtransfer]{\setlength{\rightskip}{0pt plus 5cm}UNS8 close\-SDOtransfer (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS8 {\em whoami})}}
       
   111 \label{sdo_8h_555a772d3a88a29c495f33513f8b2d58}
       
   112 
       
   113 
       
   114 Close a transmission. node\-Id : Node id of the server if both server or client whoami : Line opened as SDO\_\-CLIENT or SDO\_\-SERVER 
       
   115 
       
   116 Definition at line 318 of file sdo.c.
       
   117 
       
   118 References struct\_\-s\_\-timer\_\-entry::d, get\-SDOline\-On\-Use(), MSG\_\-WAR, reset\-SDOline(), and UNS8.\hypertarget{sdo_8h_2019db2a4d17e6d29c055cbae173e2b9}{
       
   119 \index{sdo.h@{sdo.h}!failedSDO@{failedSDO}}
       
   120 \index{failedSDO@{failedSDO}!sdo.h@{sdo.h}}
       
   121 \subsubsection[failedSDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 failed\-SDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS8 {\em whoami}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS32 {\em abort\-Code})}}
       
   122 \label{sdo_8h_2019db2a4d17e6d29c055cbae173e2b9}
       
   123 
       
   124 
       
   125 Called when an internal SDO abort occurs. Release the line $\ast$ Only if server $\ast$ If client, the line must be released manually in the core application. The reason of that is to permit the program to read the transfers\mbox{[}\mbox{]}\mbox{[}\mbox{]} structure before its reset, because many informations are stored on it : index, subindex, data received or trasmited, ... In all cases, sends a SDO abort. Returns 0 
       
   126 
       
   127 Definition at line 227 of file sdo.c.
       
   128 
       
   129 References struct\_\-s\_\-timer\_\-entry::d, get\-SDOline\-On\-Use(), MSG\_\-WAR, reset\-SDOline(), SDO\_\-ABORTED\_\-INTERNAL, SDO\_\-CLIENT, SDO\_\-SERVER, send\-SDOabort(), struct\_\-s\_\-transfer::state, Stop\-SDO\_\-TIMER, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_05b0c8eee1faee3c7a2f6e2ba3a16533}{
       
   130 \index{sdo.h@{sdo.h}!getReadResultNetworkDict@{getReadResultNetworkDict}}
       
   131 \index{getReadResultNetworkDict@{getReadResultNetworkDict}!sdo.h@{sdo.h}}
       
   132 \subsubsection[getReadResultNetworkDict]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-Read\-Result\-Network\-Dict (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, void $\ast$ {\em data}, UNS8 $\ast$ {\em size}, UNS32 $\ast$ {\em abort\-Code})}}
       
   133 \label{sdo_8h_05b0c8eee1faee3c7a2f6e2ba3a16533}
       
   134 
       
   135 
       
   136 Use this function after a read\-Network\-Dict to get the result. Returns : SDO\_\-FINISHED // data is available SDO\_\-ABORTED\_\-RCV // Transfert failed. (abort SDO received) SDO\_\-ABORTED\_\-INTERNAL // Transfert failed. Internal abort. SDO\_\-UPLOAD\_\-IN\_\-PROGRESS // Data not yet available SDO\_\-DOWNLOAD\_\-IN\_\-PROGRESS // Should not arrive !
       
   137 
       
   138 data\-Type (defined in \hyperlink{objdictdef_8h}{objdictdef.h}) : type expected. put \char`\"{}visible\_\-string\char`\"{} for strings, 0 for integers or reals. abort\-Code : 0 = not available. Else : SDO abort code. (received if return SDO\_\-ABORTED\_\-RCV) example : UNS32 data; UNS8 size; read\-Network\-Dict(0, 0x05, 0x1016, 1, 0) // get the data index 1016 subindex 1 of node 5 while (get\-Read\-Result\-Network\-Dict (0, 0x05, \&data, \&size) != SDO\_\-UPLOAD\_\-IN\_\-PROGRESS); 
       
   139 
       
   140 Definition at line 1295 of file sdo.c.
       
   141 
       
   142 References CANOPEN\_\-BIG\_\-ENDIAN, struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data, struct\_\-s\_\-transfer::data\-Type, get\-SDOline\-On\-Use(), MSG\_\-ERR, SDO\_\-ABORTED\_\-INTERNAL, SDO\_\-CLIENT, SDO\_\-FINISHED, struct\_\-s\_\-transfer::state, struct\_\-CO\_\-Data::transfers, UNS8, and visible\_\-string.\hypertarget{sdo_8h_58d1f9691977617601beb9e5b4123252}{
       
   143 \index{sdo.h@{sdo.h}!getSDOfreeLine@{getSDOfreeLine}}
       
   144 \index{getSDOfreeLine@{getSDOfreeLine}!sdo.h@{sdo.h}}
       
   145 \subsubsection[getSDOfreeLine]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-SDOfree\-Line (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em whoami}, UNS8 $\ast$ {\em line})}}
       
   146 \label{sdo_8h_58d1f9691977617601beb9e5b4123252}
       
   147 
       
   148 
       
   149 Search for an unused line in the transfers array to store a new SDO. ie a line which value of the field \char`\"{}state\char`\"{} is \char`\"{}SDO\_\-RESET\char`\"{} An unused line have the field \char`\"{}state\char`\"{} at the value SDO\_\-RESET bus\_\-id is hardware dependant whoami : create the line for a SDO\_\-SERVER or SDO\_\-CLIENT. return 0x\-FF if all the lines are on use. Else, return 0 
       
   150 
       
   151 Definition at line 284 of file sdo.c.
       
   152 
       
   153 References struct\_\-s\_\-timer\_\-entry::d, SDO\_\-MAX\_\-SIMULTANEOUS\_\-TRANSFERTS, SDO\_\-RESET, struct\_\-s\_\-transfer::state, struct\_\-CO\_\-Data::transfers, UNS8, and struct\_\-s\_\-transfer::whoami.\hypertarget{sdo_8h_bb0c376b048ab2c6e0524b135b62376f}{
       
   154 \index{sdo.h@{sdo.h}!getSDOlineOnUse@{getSDOlineOnUse}}
       
   155 \index{getSDOlineOnUse@{getSDOlineOnUse}!sdo.h@{sdo.h}}
       
   156 \subsubsection[getSDOlineOnUse]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-SDOline\-On\-Use (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS8 {\em whoami}, UNS8 $\ast$ {\em line})}}
       
   157 \label{sdo_8h_bb0c376b048ab2c6e0524b135b62376f}
       
   158 
       
   159 
       
   160 Search for the line, in the transfers array, which contains the beginning of the reception of a fragmented SDO whoami takes 2 values : look for a line opened as SDO\_\-CLIENT or SDO\_\-SERVER bus\_\-id is hardware dependant node\-Id correspond to the message node-id return 0x\-FF if error. Else, return 0 
       
   161 
       
   162 Definition at line 301 of file sdo.c.
       
   163 
       
   164 References struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::node\-Id, SDO\_\-MAX\_\-SIMULTANEOUS\_\-TRANSFERTS, SDO\_\-RESET, struct\_\-s\_\-transfer::state, struct\_\-CO\_\-Data::transfers, UNS8, and struct\_\-s\_\-transfer::whoami.\hypertarget{sdo_8h_acceb714c6e457e98deb9ba164ba2a2f}{
       
   165 \index{sdo.h@{sdo.h}!getSDOlineRestBytes@{getSDOlineRestBytes}}
       
   166 \index{getSDOlineRestBytes@{getSDOlineRestBytes}!sdo.h@{sdo.h}}
       
   167 \subsubsection[getSDOlineRestBytes]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-SDOline\-Rest\-Bytes (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line}, UNS8 $\ast$ {\em nb\-Bytes})}}
       
   168 \label{sdo_8h_acceb714c6e457e98deb9ba164ba2a2f}
       
   169 
       
   170 
       
   171 Bytes in the line structure which must be transmited (or received) bus\_\-id is hardware dependant. return 0. 
       
   172 
       
   173 Definition at line 332 of file sdo.c.
       
   174 
       
   175 References struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::offset, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_8671e306873f19362c60bb50ab930d1d}{
       
   176 \index{sdo.h@{sdo.h}!getWriteResultNetworkDict@{getWriteResultNetworkDict}}
       
   177 \index{getWriteResultNetworkDict@{getWriteResultNetworkDict}!sdo.h@{sdo.h}}
       
   178 \subsubsection[getWriteResultNetworkDict]{\setlength{\rightskip}{0pt plus 5cm}UNS8 get\-Write\-Result\-Network\-Dict (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS32 $\ast$ {\em abort\-Code})}}
       
   179 \label{sdo_8h_8671e306873f19362c60bb50ab930d1d}
       
   180 
       
   181 
       
   182 Use this function after a write\-Network\-Dict to get the result of the write It is mandatory to call this function because it is releasing the line used for the transfer. Returns : SDO\_\-FINISHED // data is available SDO\_\-ABORTED\_\-RCV // Transfert failed. (abort SDO received) SDO\_\-ABORTED\_\-INTERNAL // Transfert failed. Internal abort. SDO\_\-DOWNLOAD\_\-IN\_\-PROGRESS // Data not yet available SDO\_\-UPLOAD\_\-IN\_\-PROGRESS // Should not arrive ! abort\-Code : 0 = not available. Else : SDO abort code. (received if return SDO\_\-ABORTED\_\-RCV) example : UNS32 data = 0x50; UNS8 size; UNS32 abort\-Code; write\-Network\-Dict(0, 0x05, 0x1016, 1, size, \&data) // write the data index 1016 subindex 1 of node 5 while ( get\-Write\-Result\-Network\-Dict (0, 0x05, \&abort\-Code) != SDO\_\-DOWNLOAD\_\-IN\_\-PROGRESS); 
       
   183 
       
   184 Definition at line 1329 of file sdo.c.
       
   185 
       
   186 References struct\_\-s\_\-transfer::abort\-Code, struct\_\-s\_\-timer\_\-entry::d, get\-SDOline\-On\-Use(), MSG\_\-ERR, SDO\_\-ABORTED\_\-INTERNAL, SDO\_\-CLIENT, struct\_\-s\_\-transfer::state, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_b9c873a15f55b29112b5527a6cc6898d}{
       
   187 \index{sdo.h@{sdo.h}!initSDOline@{initSDOline}}
       
   188 \index{initSDOline@{initSDOline}!sdo.h@{sdo.h}}
       
   189 \subsubsection[initSDOline]{\setlength{\rightskip}{0pt plus 5cm}UNS8 init\-SDOline (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line}, UNS8 {\em node\-Id}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS8 {\em state})}}
       
   190 \label{sdo_8h_b9c873a15f55b29112b5527a6cc6898d}
       
   191 
       
   192 
       
   193 Initialize some fields of the structure. Returns 0 
       
   194 
       
   195 Definition at line 263 of file sdo.c.
       
   196 
       
   197 References struct\_\-s\_\-transfer::Callback, struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data\-Type, struct\_\-s\_\-transfer::index, MSG\_\-WAR, struct\_\-s\_\-transfer::node\-Id, struct\_\-s\_\-transfer::offset, SDO\_\-DOWNLOAD\_\-IN\_\-PROGRESS, SDO\_\-UPLOAD\_\-IN\_\-PROGRESS, Start\-SDO\_\-TIMER, struct\_\-s\_\-transfer::state, Stop\-SDO\_\-TIMER, struct\_\-s\_\-transfer::sub\-Index, struct\_\-s\_\-transfer::toggle, and struct\_\-CO\_\-Data::transfers.\hypertarget{sdo_8h_ad6eb8be03b832ebba4dfb87aaba4065}{
       
   198 \index{sdo.h@{sdo.h}!lineToSDO@{lineToSDO}}
       
   199 \index{lineToSDO@{lineToSDO}!sdo.h@{sdo.h}}
       
   200 \subsubsection[lineToSDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 line\-To\-SDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line}, UNS8 {\em nb\-Bytes}, UNS8 $\ast$ {\em data})}}
       
   201 \label{sdo_8h_ad6eb8be03b832ebba4dfb87aaba4065}
       
   202 
       
   203 
       
   204 copy data from an existant line in the argument \char`\"{}$\ast$ data\char`\"{} Returns 0x\-FF if error. Else, returns 0; 
       
   205 
       
   206 Definition at line 189 of file sdo.c.
       
   207 
       
   208 References struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data, MSG\_\-ERR, struct\_\-s\_\-transfer::offset, SDO\_\-MAX\_\-LENGTH\_\-TRANSFERT, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_29427a80fd1aeabff30bf0602fbc220f}{
       
   209 \index{sdo.h@{sdo.h}!objdictToSDOline@{objdictToSDOline}}
       
   210 \index{objdictToSDOline@{objdictToSDOline}!sdo.h@{sdo.h}}
       
   211 \subsubsection[objdictToSDOline]{\setlength{\rightskip}{0pt plus 5cm}UNS32 objdict\-To\-SDOline (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line})}}
       
   212 \label{sdo_8h_29427a80fd1aeabff30bf0602fbc220f}
       
   213 
       
   214 
       
   215 Copy the data from the object dictionary to the SDO line for a network transfert. Returns SDO error code if error. Else, returns 0; 
       
   216 
       
   217 Definition at line 157 of file sdo.c.
       
   218 
       
   219 References struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data, get\-ODentry(), struct\_\-s\_\-transfer::index, MSG\_\-WAR, OD\_\-SUCCESSFUL, struct\_\-s\_\-transfer::offset, struct\_\-s\_\-transfer::sub\-Index, struct\_\-CO\_\-Data::transfers, UNS32, and UNS8.\hypertarget{sdo_8h_2a93a7c780472b1d8666d89aa270f661}{
       
   220 \index{sdo.h@{sdo.h}!proceedSDO@{proceedSDO}}
       
   221 \index{proceedSDO@{proceedSDO}!sdo.h@{sdo.h}}
       
   222 \subsubsection[proceedSDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 proceed\-SDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, \hyperlink{structMessage}{Message} $\ast$ {\em m})}}
       
   223 \label{sdo_8h_2a93a7c780472b1d8666d89aa270f661}
       
   224 
       
   225 
       
   226 Treat a SDO frame reception bus\_\-id is hardware dependant call the function send\-SDO return 0x\-FF if error 0x80 if transfert aborted by the server 0x0 ok 
       
   227 
       
   228 Definition at line 447 of file sdo.c.
       
   229 
       
   230 References struct\_\-s\_\-transfer::abort\-Code, struct\_\-CO\_\-Data::b\-Device\-Node\-Id, struct\_\-s\_\-SDO::body, td\_\-indextable::b\-Sub\-Count, struct\_\-s\_\-transfer::Callback, struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, BODY::data, Message::data, failed\-SDO(), struct\_\-CO\_\-Data::first\-Index, get\-SDOc, get\-SDOcs, get\-SDOe, get\-SDOfree\-Line(), get\-SDOindex, get\-SDOline\-On\-Use(), get\-SDOline\-Rest\-Bytes(), get\-SDOn2, get\-SDOn3, get\-SDOs, get\-SDOsub\-Index, get\-SDOt, struct\_\-s\_\-transfer::index, init\-SDOline(), struct\_\-CO\_\-Data::last\-Index, line\-To\-SDO(), MSG\_\-ERR, MSG\_\-WAR, struct\_\-s\_\-SDO::node\-Id, struct\_\-CO\_\-Data::objdict, objdict\-To\-SDOline(), td\_\-subindex::p\-Object, td\_\-indextable::p\-Subindex, reset\-SDOline(), Restart\-SDO\_\-TIMER, SDO\_\-ABORTED\_\-RCV, SDO\_\-CLIENT, s\_\-quick\_\-index::SDO\_\-CLT, SDO\_\-DOWNLOAD\_\-IN\_\-PROGRESS, SDO\_\-FINISHED, SDO\_\-SERVER, s\_\-quick\_\-index::SDO\_\-SVR, SDO\_\-UNKNOWN, SDO\_\-UPLOAD\_\-IN\_\-PROGRESS, SDOABT\_\-GENERAL\_\-ERROR, SDOABT\_\-LOCAL\_\-CTRL\_\-ERROR, SDOABT\_\-TOGGLE\_\-NOT\_\-ALTERNED, SDOline\-To\-Objdict(), SDOto\-Line(), send\-SDO(), set\-SDOline\-Rest\-Bytes(), struct\_\-s\_\-transfer::state, Stop\-SDO\_\-TIMER, struct\_\-s\_\-transfer::sub\-Index, struct\_\-s\_\-transfer::toggle, struct\_\-CO\_\-Data::transfers, UNS16, UNS32, and UNS8.\hypertarget{sdo_8h_0e102a0835e4115920cd406e80a8d135}{
       
   231 \index{sdo.h@{sdo.h}!readNetworkDict@{readNetworkDict}}
       
   232 \index{readNetworkDict@{readNetworkDict}!sdo.h@{sdo.h}}
       
   233 \subsubsection[readNetworkDict]{\setlength{\rightskip}{0pt plus 5cm}UNS8 read\-Network\-Dict (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS8 {\em data\-Type})}}
       
   234 \label{sdo_8h_0e102a0835e4115920cd406e80a8d135}
       
   235 
       
   236 
       
   237 Used by the application to send a SDO request frame to read in the dictionary of a server node whose node\_\-id is ID at the index and sub\-Index indicated bus\_\-id is hardware dependant datatype (defined in \hyperlink{objdictdef_8h}{objdictdef.h}) : put \char`\"{}visible\_\-string\char`\"{} for strings, 0 for integers or reals or other value. return 0x\-FF if error, else return 0 
       
   238 
       
   239 Definition at line 1282 of file sdo.c.
       
   240 
       
   241 References \_\-read\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{sdo_8h_542a5cdd20c00aa130a39fe68295e769}{
       
   242 \index{sdo.h@{sdo.h}!readNetworkDictCallback@{readNetworkDictCallback}}
       
   243 \index{readNetworkDictCallback@{readNetworkDictCallback}!sdo.h@{sdo.h}}
       
   244 \subsubsection[readNetworkDictCallback]{\setlength{\rightskip}{0pt plus 5cm}UNS8 read\-Network\-Dict\-Callback (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS8 {\em data\-Type}, \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t} {\em Callback})}}
       
   245 \label{sdo_8h_542a5cdd20c00aa130a39fe68295e769}
       
   246 
       
   247 
       
   248 Used to send a SDO request frame to read in a distant node dictionnary. The function Callback which must be defined in the user code is called at the end of the exchange. (on succes or abort). 
       
   249 
       
   250 Definition at line 1288 of file sdo.c.
       
   251 
       
   252 References \_\-read\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{sdo_8h_1f4f07eccc4890a11ccf4f632da7740b}{
       
   253 \index{sdo.h@{sdo.h}!resetSDO@{resetSDO}}
       
   254 \index{resetSDO@{resetSDO}!sdo.h@{sdo.h}}
       
   255 \subsubsection[resetSDO]{\setlength{\rightskip}{0pt plus 5cm}void reset\-SDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
       
   256 \label{sdo_8h_1f4f07eccc4890a11ccf4f632da7740b}
       
   257 
       
   258 
       
   259 Reset all sdo buffers 
       
   260 
       
   261 Definition at line 131 of file sdo.c.
       
   262 
       
   263 References struct\_\-s\_\-timer\_\-entry::d, reset\-SDOline(), SDO\_\-MAX\_\-SIMULTANEOUS\_\-TRANSFERTS, and UNS8.\hypertarget{sdo_8h_42d33be015d4c4c83c73f1f0e588f481}{
       
   264 \index{sdo.h@{sdo.h}!resetSDOline@{resetSDOline}}
       
   265 \index{resetSDOline@{resetSDOline}!sdo.h@{sdo.h}}
       
   266 \subsubsection[resetSDOline]{\setlength{\rightskip}{0pt plus 5cm}void reset\-SDOline (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line})}}
       
   267 \label{sdo_8h_42d33be015d4c4c83c73f1f0e588f481}
       
   268 
       
   269 
       
   270 Reset an unused line. 
       
   271 
       
   272 Definition at line 253 of file sdo.c.
       
   273 
       
   274 References struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data, init\-SDOline(), MSG\_\-WAR, SDO\_\-MAX\_\-LENGTH\_\-TRANSFERT, SDO\_\-RESET, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_2eb5309dca3a7363da5e5e7230b85d58}{
       
   275 \index{sdo.h@{sdo.h}!SDOlineToObjdict@{SDOlineToObjdict}}
       
   276 \index{SDOlineToObjdict@{SDOlineToObjdict}!sdo.h@{sdo.h}}
       
   277 \subsubsection[SDOlineToObjdict]{\setlength{\rightskip}{0pt plus 5cm}UNS32 SDOline\-To\-Objdict (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line})}}
       
   278 \label{sdo_8h_2eb5309dca3a7363da5e5e7230b85d58}
       
   279 
       
   280 
       
   281 Copy the data received from the SDO line transfert to the object dictionary Returns SDO error code if error. Else, returns 0; 
       
   282 
       
   283 Definition at line 141 of file sdo.c.
       
   284 
       
   285 References struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data, struct\_\-s\_\-transfer::index, MSG\_\-WAR, OD\_\-SUCCESSFUL, set\-ODentry(), struct\_\-s\_\-transfer::sub\-Index, struct\_\-CO\_\-Data::transfers, UNS32, and UNS8.\hypertarget{sdo_8h_9309025e29b59e09026abcd3b45a5b61}{
       
   286 \index{sdo.h@{sdo.h}!SDOTimeoutAlarm@{SDOTimeoutAlarm}}
       
   287 \index{SDOTimeoutAlarm@{SDOTimeoutAlarm}!sdo.h@{sdo.h}}
       
   288 \subsubsection[SDOTimeoutAlarm]{\setlength{\rightskip}{0pt plus 5cm}void SDOTimeout\-Alarm (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em id})}}
       
   289 \label{sdo_8h_9309025e29b59e09026abcd3b45a5b61}
       
   290 
       
   291 
       
   292 Reset of a SDO exchange on timeout. Send a SDO abort 
       
   293 
       
   294 Definition at line 93 of file sdo.c.
       
   295 
       
   296 References struct\_\-s\_\-transfer::abort\-Code, struct\_\-s\_\-transfer::Callback, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::index, MSG\_\-ERR, MSG\_\-WAR, struct\_\-s\_\-transfer::node\-Id, reset\-SDOline(), SDO\_\-ABORTED\_\-INTERNAL, SDO\_\-SERVER, SDOABT\_\-TIMED\_\-OUT, send\-SDOabort(), struct\_\-s\_\-transfer::state, struct\_\-s\_\-transfer::sub\-Index, struct\_\-s\_\-transfer::timer, struct\_\-CO\_\-Data::transfers, UNS8, and struct\_\-s\_\-transfer::whoami.\hypertarget{sdo_8h_18b6f7e9c9441640a88ffef1e8720694}{
       
   297 \index{sdo.h@{sdo.h}!SDOtoLine@{SDOtoLine}}
       
   298 \index{SDOtoLine@{SDOtoLine}!sdo.h@{sdo.h}}
       
   299 \subsubsection[SDOtoLine]{\setlength{\rightskip}{0pt plus 5cm}UNS8 SDOto\-Line (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line}, UNS8 {\em nb\-Bytes}, UNS8 $\ast$ {\em data})}}
       
   300 \label{sdo_8h_18b6f7e9c9441640a88ffef1e8720694}
       
   301 
       
   302 
       
   303 Add data to an existant line Returns 0x\-FF if error. Else, returns 0; 
       
   304 
       
   305 Definition at line 210 of file sdo.c.
       
   306 
       
   307 References struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::data, MSG\_\-ERR, struct\_\-s\_\-transfer::offset, SDO\_\-MAX\_\-LENGTH\_\-TRANSFERT, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_c6b5d7d1439d537da992a96644a1ca5d}{
       
   308 \index{sdo.h@{sdo.h}!sendSDO@{sendSDO}}
       
   309 \index{sendSDO@{sendSDO}!sdo.h@{sdo.h}}
       
   310 \subsubsection[sendSDO]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-SDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em whoami}, \hyperlink{structstruct__s__SDO}{s\_\-SDO} {\em sdo})}}
       
   311 \label{sdo_8h_c6b5d7d1439d537da992a96644a1ca5d}
       
   312 
       
   313 
       
   314 Transmit a SDO frame on the bus bus\_\-id sdo is a structure which contains the sdo to transmit bus\_\-id is hardware dependant whoami takes 2 values : SDO\_\-CLIENT or SDO\_\-SERVER return can\-Send(bus\_\-id,\&m) or 0x\-FF if error 
       
   315 
       
   316 Definition at line 354 of file sdo.c.
       
   317 
       
   318 References struct\_\-s\_\-SDO::body, td\_\-indextable::b\-Sub\-Count, struct\_\-CO\_\-Data::can\-Handle, can\-Send(), Message::cob\_\-id, struct\_\-s\_\-timer\_\-entry::d, BODY::data, Message::data, struct\_\-CO\_\-Data::first\-Index, struct\_\-CO\_\-Data::last\-Index, Message::len, MSG\_\-ERR, MSG\_\-WAR, struct\_\-s\_\-SDO::node\-Id, struct\_\-CO\_\-Data::node\-State, NOT\_\-A\_\-REQUEST, struct\_\-CO\_\-Data::objdict, Operational, td\_\-subindex::p\-Object, Pre\_\-operational, td\_\-indextable::p\-Subindex, Message::rtr, s\_\-quick\_\-index::SDO\_\-CLT, SDO\_\-SERVER, s\_\-quick\_\-index::SDO\_\-SVR, UNS16, UNS32, UNS8, and SHORT\_\-CAN::w.\hypertarget{sdo_8h_b26c3f2fb63d81055809d6ccaa785b7c}{
       
   319 \index{sdo.h@{sdo.h}!sendSDOabort@{sendSDOabort}}
       
   320 \index{sendSDOabort@{sendSDOabort}!sdo.h@{sdo.h}}
       
   321 \subsubsection[sendSDOabort]{\setlength{\rightskip}{0pt plus 5cm}UNS8 send\-SDOabort (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em whoami}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS32 {\em abort\-Code})}}
       
   322 \label{sdo_8h_b26c3f2fb63d81055809d6ccaa785b7c}
       
   323 
       
   324 
       
   325 Transmit a SDO error to the client. The reasons may be : Read/Write to a undefined object Read/Write to a undefined subindex Read/write a not valid length object Write a read only object whoami takes 2 values : SDO\_\-CLIENT or SDO\_\-SERVER 
       
   326 
       
   327 Definition at line 424 of file sdo.c.
       
   328 
       
   329 References struct\_\-CO\_\-Data::b\-Device\-Node\-Id, struct\_\-s\_\-SDO::body, struct\_\-s\_\-timer\_\-entry::d, BODY::data, MSG\_\-WAR, struct\_\-s\_\-SDO::node\-Id, send\-SDO(), and UNS8.\hypertarget{sdo_8h_601a837ecb5f21bf4c66b058c5ae7810}{
       
   330 \index{sdo.h@{sdo.h}!setSDOlineRestBytes@{setSDOlineRestBytes}}
       
   331 \index{setSDOlineRestBytes@{setSDOlineRestBytes}!sdo.h@{sdo.h}}
       
   332 \subsubsection[setSDOlineRestBytes]{\setlength{\rightskip}{0pt plus 5cm}UNS8 set\-SDOline\-Rest\-Bytes (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line}, UNS8 {\em nb\-Bytes})}}
       
   333 \label{sdo_8h_601a837ecb5f21bf4c66b058c5ae7810}
       
   334 
       
   335 
       
   336 Store in the line structure the nb of bytes which must be transmited (or received) bus\_\-id is hardware dependant. return 0 if success, 0x\-FF if error. 
       
   337 
       
   338 Definition at line 342 of file sdo.c.
       
   339 
       
   340 References struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, MSG\_\-ERR, SDO\_\-MAX\_\-LENGTH\_\-TRANSFERT, and struct\_\-CO\_\-Data::transfers.\hypertarget{sdo_8h_bc20ed246e00053dcf71faa8f45ee39c}{
       
   341 \index{sdo.h@{sdo.h}!writeNetworkDict@{writeNetworkDict}}
       
   342 \index{writeNetworkDict@{writeNetworkDict}!sdo.h@{sdo.h}}
       
   343 \subsubsection[writeNetworkDict]{\setlength{\rightskip}{0pt plus 5cm}UNS8 write\-Network\-Dict (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS8 {\em count}, UNS8 {\em data\-Type}, void $\ast$ {\em data})}}
       
   344 \label{sdo_8h_bc20ed246e00053dcf71faa8f45ee39c}
       
   345 
       
   346 
       
   347 Used by the application to send a SDO request frame to write the data $\ast$data at the index and sub\-Index indicated in the dictionary of the slave whose node\_\-id is node\-Id Count : nb of bytes to write in the dictionnary. datatype (defined in \hyperlink{objdictdef_8h}{objdictdef.h}) : put \char`\"{}visible\_\-string\char`\"{} for strings, 0 for integers or reals or other value. bus\_\-id is hardware dependant return 0x\-FF if error, else return 0 
       
   348 
       
   349 Definition at line 1182 of file sdo.c.
       
   350 
       
   351 References \_\-write\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{sdo_8h_f4ec05293fb8971a1b282994498ed4f5}{
       
   352 \index{sdo.h@{sdo.h}!writeNetworkDictCallBack@{writeNetworkDictCallBack}}
       
   353 \index{writeNetworkDictCallBack@{writeNetworkDictCallBack}!sdo.h@{sdo.h}}
       
   354 \subsubsection[writeNetworkDictCallBack]{\setlength{\rightskip}{0pt plus 5cm}UNS8 write\-Network\-Dict\-Call\-Back (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em node\-Id}, UNS16 {\em index}, UNS8 {\em sub\-Index}, UNS8 {\em count}, UNS8 {\em data\-Type}, void $\ast$ {\em data}, \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t} {\em Callback})}}
       
   355 \label{sdo_8h_f4ec05293fb8971a1b282994498ed4f5}
       
   356 
       
   357 
       
   358 Used to send a SDO request frame to write in a distant node dictionnary. The function Callback which must be defined in the user code is called at the end of the exchange. (on succes or abort). 
       
   359 
       
   360 Definition at line 1190 of file sdo.c.
       
   361 
       
   362 References \_\-write\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.