doc/doxygen/latex/sdo_8h.tex
author nico
Mon, 04 Jun 2007 17:59:50 +0200
changeset 207 b6572d0336c3
permissions -rw-r--r--
First doxygen implementation
\hypertarget{sdo_8h}{
\section{/home/epimerde/documents/tc11/Can\-Festival-3/include/sdo.h File Reference}
\label{sdo_8h}\index{/home/epimerde/documents/tc11/CanFestival-3/include/sdo.h@{/home/epimerde/documents/tc11/CanFestival-3/include/sdo.h}}
}
{\tt \#include \char`\"{}timer.h\char`\"{}}\par
{\tt \#include \char`\"{}data.h\char`\"{}}\par
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct \hyperlink{structstruct__s__transfer}{struct\_\-s\_\-transfer}
\item 
struct \hyperlink{structBODY}{BODY}
\item 
struct \hyperlink{structstruct__s__SDO}{struct\_\-s\_\-SDO}
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef void($\ast$) \hyperlink{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{SDOCallback\_\-t} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id)
\item 
typedef \hyperlink{structstruct__s__transfer}{struct\_\-s\_\-transfer} \hyperlink{sdo_8h_0c41985ac8cf4546cbce64eb0f2ac897}{s\_\-transfer}
\item 
typedef \hyperlink{structstruct__s__SDO}{struct\_\-s\_\-SDO} \hyperlink{sdo_8h_f9e5cbdc9fba242ca4060f6bffa6d7c8}{s\_\-SDO}
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{sdo_8h_9309025e29b59e09026abcd3b45a5b61}{SDOTimeout\-Alarm} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS32 id)
\item 
void \hyperlink{sdo_8h_1f4f07eccc4890a11ccf4f632da7740b}{reset\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d)
\item 
UNS32 \hyperlink{sdo_8h_2eb5309dca3a7363da5e5e7230b85d58}{SDOline\-To\-Objdict} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line)
\item 
UNS32 \hyperlink{sdo_8h_29427a80fd1aeabff30bf0602fbc220f}{objdict\-To\-SDOline} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line)
\item 
UNS8 \hyperlink{sdo_8h_ad6eb8be03b832ebba4dfb87aaba4065}{line\-To\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 nb\-Bytes, UNS8 $\ast$data)
\item 
UNS8 \hyperlink{sdo_8h_18b6f7e9c9441640a88ffef1e8720694}{SDOto\-Line} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 nb\-Bytes, UNS8 $\ast$data)
\item 
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)
\item 
void \hyperlink{sdo_8h_42d33be015d4c4c83c73f1f0e588f481}{reset\-SDOline} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line)
\item 
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)
\item 
UNS8 \hyperlink{sdo_8h_58d1f9691977617601beb9e5b4123252}{get\-SDOfree\-Line} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 whoami, UNS8 $\ast$line)
\item 
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)
\item 
UNS8 \hyperlink{sdo_8h_555a772d3a88a29c495f33513f8b2d58}{close\-SDOtransfer} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 node\-Id, UNS8 whoami)
\item 
UNS8 \hyperlink{sdo_8h_acceb714c6e457e98deb9ba164ba2a2f}{get\-SDOline\-Rest\-Bytes} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 $\ast$nb\-Bytes)
\item 
UNS8 \hyperlink{sdo_8h_601a837ecb5f21bf4c66b058c5ae7810}{set\-SDOline\-Rest\-Bytes} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 line, UNS8 nb\-Bytes)
\item 
UNS8 \hyperlink{sdo_8h_c6b5d7d1439d537da992a96644a1ca5d}{send\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, UNS8 whoami, \hyperlink{structstruct__s__SDO}{s\_\-SDO} sdo)
\item 
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)
\item 
UNS8 \hyperlink{sdo_8h_2a93a7c780472b1d8666d89aa270f661}{proceed\-SDO} (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$d, \hyperlink{structMessage}{Message} $\ast$m)
\item 
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)
\item 
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)
\item 
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)
\item 
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)
\item 
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)
\item 
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)
\end{CompactItemize}


\subsection{Typedef Documentation}
\hypertarget{sdo_8h_f9e5cbdc9fba242ca4060f6bffa6d7c8}{
\index{sdo.h@{sdo.h}!s_SDO@{s\_\-SDO}}
\index{s_SDO@{s\_\-SDO}!sdo.h@{sdo.h}}
\subsubsection[s\_\-SDO]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__SDO}{struct\_\-s\_\-SDO} \hyperlink{structstruct__s__SDO}{s\_\-SDO}}}
\label{sdo_8h_f9e5cbdc9fba242ca4060f6bffa6d7c8}




Definition at line 86 of file sdo.h.\hypertarget{sdo_8h_0c41985ac8cf4546cbce64eb0f2ac897}{
\index{sdo.h@{sdo.h}!s_transfer@{s\_\-transfer}}
\index{s_transfer@{s\_\-transfer}!sdo.h@{sdo.h}}
\subsubsection[s\_\-transfer]{\setlength{\rightskip}{0pt plus 5cm}typedef struct \hyperlink{structstruct__s__transfer}{struct\_\-s\_\-transfer} \hyperlink{structstruct__s__transfer}{s\_\-transfer}}}
\label{sdo_8h_0c41985ac8cf4546cbce64eb0f2ac897}




Definition at line 69 of file sdo.h.\hypertarget{sdo_8h_606eccfef67e572723e1efba3f0d87ba}{
\index{sdo.h@{sdo.h}!SDOCallback_t@{SDOCallback\_\-t}}
\index{SDOCallback_t@{SDOCallback\_\-t}!sdo.h@{sdo.h}}
\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)}}
\label{sdo_8h_606eccfef67e572723e1efba3f0d87ba}




Definition at line 30 of file sdo.h.

\subsection{Function Documentation}
\hypertarget{sdo_8h_555a772d3a88a29c495f33513f8b2d58}{
\index{sdo.h@{sdo.h}!closeSDOtransfer@{closeSDOtransfer}}
\index{closeSDOtransfer@{closeSDOtransfer}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_555a772d3a88a29c495f33513f8b2d58}


Close a transmission. node\-Id : Node id of the server if both server or client whoami : Line opened as SDO\_\-CLIENT or SDO\_\-SERVER 

Definition at line 318 of file sdo.c.

References struct\_\-s\_\-timer\_\-entry::d, get\-SDOline\-On\-Use(), MSG\_\-WAR, reset\-SDOline(), and UNS8.\hypertarget{sdo_8h_2019db2a4d17e6d29c055cbae173e2b9}{
\index{sdo.h@{sdo.h}!failedSDO@{failedSDO}}
\index{failedSDO@{failedSDO}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_2019db2a4d17e6d29c055cbae173e2b9}


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 

Definition at line 227 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!getReadResultNetworkDict@{getReadResultNetworkDict}}
\index{getReadResultNetworkDict@{getReadResultNetworkDict}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_05b0c8eee1faee3c7a2f6e2ba3a16533}


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 !

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); 

Definition at line 1295 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!getSDOfreeLine@{getSDOfreeLine}}
\index{getSDOfreeLine@{getSDOfreeLine}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_58d1f9691977617601beb9e5b4123252}


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 

Definition at line 284 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!getSDOlineOnUse@{getSDOlineOnUse}}
\index{getSDOlineOnUse@{getSDOlineOnUse}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_bb0c376b048ab2c6e0524b135b62376f}


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 

Definition at line 301 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!getSDOlineRestBytes@{getSDOlineRestBytes}}
\index{getSDOlineRestBytes@{getSDOlineRestBytes}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_acceb714c6e457e98deb9ba164ba2a2f}


Bytes in the line structure which must be transmited (or received) bus\_\-id is hardware dependant. return 0. 

Definition at line 332 of file sdo.c.

References struct\_\-s\_\-transfer::count, struct\_\-s\_\-timer\_\-entry::d, struct\_\-s\_\-transfer::offset, struct\_\-CO\_\-Data::transfers, and UNS8.\hypertarget{sdo_8h_8671e306873f19362c60bb50ab930d1d}{
\index{sdo.h@{sdo.h}!getWriteResultNetworkDict@{getWriteResultNetworkDict}}
\index{getWriteResultNetworkDict@{getWriteResultNetworkDict}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_8671e306873f19362c60bb50ab930d1d}


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); 

Definition at line 1329 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!initSDOline@{initSDOline}}
\index{initSDOline@{initSDOline}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_b9c873a15f55b29112b5527a6cc6898d}


Initialize some fields of the structure. Returns 0 

Definition at line 263 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!lineToSDO@{lineToSDO}}
\index{lineToSDO@{lineToSDO}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_ad6eb8be03b832ebba4dfb87aaba4065}


copy data from an existant line in the argument \char`\"{}$\ast$ data\char`\"{} Returns 0x\-FF if error. Else, returns 0; 

Definition at line 189 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!objdictToSDOline@{objdictToSDOline}}
\index{objdictToSDOline@{objdictToSDOline}!sdo.h@{sdo.h}}
\subsubsection[objdictToSDOline]{\setlength{\rightskip}{0pt plus 5cm}UNS32 objdict\-To\-SDOline (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line})}}
\label{sdo_8h_29427a80fd1aeabff30bf0602fbc220f}


Copy the data from the object dictionary to the SDO line for a network transfert. Returns SDO error code if error. Else, returns 0; 

Definition at line 157 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!proceedSDO@{proceedSDO}}
\index{proceedSDO@{proceedSDO}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_2a93a7c780472b1d8666d89aa270f661}


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 

Definition at line 447 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!readNetworkDict@{readNetworkDict}}
\index{readNetworkDict@{readNetworkDict}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_0e102a0835e4115920cd406e80a8d135}


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 

Definition at line 1282 of file sdo.c.

References \_\-read\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{sdo_8h_542a5cdd20c00aa130a39fe68295e769}{
\index{sdo.h@{sdo.h}!readNetworkDictCallback@{readNetworkDictCallback}}
\index{readNetworkDictCallback@{readNetworkDictCallback}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_542a5cdd20c00aa130a39fe68295e769}


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). 

Definition at line 1288 of file sdo.c.

References \_\-read\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{sdo_8h_1f4f07eccc4890a11ccf4f632da7740b}{
\index{sdo.h@{sdo.h}!resetSDO@{resetSDO}}
\index{resetSDO@{resetSDO}!sdo.h@{sdo.h}}
\subsubsection[resetSDO]{\setlength{\rightskip}{0pt plus 5cm}void reset\-SDO (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d})}}
\label{sdo_8h_1f4f07eccc4890a11ccf4f632da7740b}


Reset all sdo buffers 

Definition at line 131 of file sdo.c.

References struct\_\-s\_\-timer\_\-entry::d, reset\-SDOline(), SDO\_\-MAX\_\-SIMULTANEOUS\_\-TRANSFERTS, and UNS8.\hypertarget{sdo_8h_42d33be015d4c4c83c73f1f0e588f481}{
\index{sdo.h@{sdo.h}!resetSDOline@{resetSDOline}}
\index{resetSDOline@{resetSDOline}!sdo.h@{sdo.h}}
\subsubsection[resetSDOline]{\setlength{\rightskip}{0pt plus 5cm}void reset\-SDOline (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line})}}
\label{sdo_8h_42d33be015d4c4c83c73f1f0e588f481}


Reset an unused line. 

Definition at line 253 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!SDOlineToObjdict@{SDOlineToObjdict}}
\index{SDOlineToObjdict@{SDOlineToObjdict}!sdo.h@{sdo.h}}
\subsubsection[SDOlineToObjdict]{\setlength{\rightskip}{0pt plus 5cm}UNS32 SDOline\-To\-Objdict (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS8 {\em line})}}
\label{sdo_8h_2eb5309dca3a7363da5e5e7230b85d58}


Copy the data received from the SDO line transfert to the object dictionary Returns SDO error code if error. Else, returns 0; 

Definition at line 141 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!SDOTimeoutAlarm@{SDOTimeoutAlarm}}
\index{SDOTimeoutAlarm@{SDOTimeoutAlarm}!sdo.h@{sdo.h}}
\subsubsection[SDOTimeoutAlarm]{\setlength{\rightskip}{0pt plus 5cm}void SDOTimeout\-Alarm (\hyperlink{structstruct__CO__Data}{CO\_\-Data} $\ast$ {\em d}, UNS32 {\em id})}}
\label{sdo_8h_9309025e29b59e09026abcd3b45a5b61}


Reset of a SDO exchange on timeout. Send a SDO abort 

Definition at line 93 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!SDOtoLine@{SDOtoLine}}
\index{SDOtoLine@{SDOtoLine}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_18b6f7e9c9441640a88ffef1e8720694}


Add data to an existant line Returns 0x\-FF if error. Else, returns 0; 

Definition at line 210 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!sendSDO@{sendSDO}}
\index{sendSDO@{sendSDO}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_c6b5d7d1439d537da992a96644a1ca5d}


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 

Definition at line 354 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!sendSDOabort@{sendSDOabort}}
\index{sendSDOabort@{sendSDOabort}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_b26c3f2fb63d81055809d6ccaa785b7c}


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 

Definition at line 424 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!setSDOlineRestBytes@{setSDOlineRestBytes}}
\index{setSDOlineRestBytes@{setSDOlineRestBytes}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_601a837ecb5f21bf4c66b058c5ae7810}


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. 

Definition at line 342 of file sdo.c.

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}{
\index{sdo.h@{sdo.h}!writeNetworkDict@{writeNetworkDict}}
\index{writeNetworkDict@{writeNetworkDict}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_bc20ed246e00053dcf71faa8f45ee39c}


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 

Definition at line 1182 of file sdo.c.

References \_\-write\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.\hypertarget{sdo_8h_f4ec05293fb8971a1b282994498ed4f5}{
\index{sdo.h@{sdo.h}!writeNetworkDictCallBack@{writeNetworkDictCallBack}}
\index{writeNetworkDictCallBack@{writeNetworkDictCallBack}!sdo.h@{sdo.h}}
\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})}}
\label{sdo_8h_f4ec05293fb8971a1b282994498ed4f5}


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). 

Definition at line 1190 of file sdo.c.

References \_\-write\-Network\-Dict(), and struct\_\-s\_\-timer\_\-entry::d.