diff -r 2cb34a4ac65a -r 6b5a4c21e061 doc/doxygen/html/sdo_8c.html --- a/doc/doxygen/html/sdo_8c.html Tue Jun 05 17:34:33 2007 +0200 +++ b/doc/doxygen/html/sdo_8c.html Tue Jun 05 18:43:21 2007 +0200 @@ -20,6 +20,9 @@ #include "canfestival.h"

+Include dependency graph for sdo.c:

+ +

Go to the source code of this file. @@ -103,7 +106,12 @@

Defines

UNS8 getWriteResultNetworkDict (CO_Data *d, UNS8 nodeId, UNS32 *abortCode)
-


Define Documentation

+

Detailed Description

+
Author:
Edouard TISSERANT and Francis DUPIN
+
Date:
Tue Jun 5 09:32:32 2007
+ +

+Definition in file sdo.c.


Define Documentation

@@ -123,7 +131,9 @@

Returns the indicator of end transmission from the first byte of the SDO

-Definition at line 75 of file sdo.c. +Definition at line 109 of file sdo.c. +

+Referenced by proceedSDO().

@@ -145,7 +155,9 @@

Returns the command specifier (cs, ccs, scs) from the first byte of the SDO

-Definition at line 55 of file sdo.c. +Definition at line 89 of file sdo.c. +

+Referenced by proceedSDO().

@@ -167,7 +179,9 @@

Returns the transfer type from the first byte of the SDO

-Definition at line 67 of file sdo.c. +Definition at line 101 of file sdo.c. +

+Referenced by proceedSDO().

@@ -192,7 +206,9 @@

Returns the index from the bytes 1 and 2 of the SDO

-Definition at line 83 of file sdo.c. +Definition at line 117 of file sdo.c. +

+Referenced by proceedSDO().

@@ -214,7 +230,9 @@

Returns the number of bytes without data from the first byte of the SDO. Coded in 2 bits

-Definition at line 59 of file sdo.c. +Definition at line 93 of file sdo.c. +

+Referenced by proceedSDO().

@@ -236,7 +254,9 @@

Returns the number of bytes without data from the first byte of the SDO. Coded in 3 bits

-Definition at line 63 of file sdo.c. +Definition at line 97 of file sdo.c. +

+Referenced by proceedSDO().

@@ -258,7 +278,9 @@

Returns the size indicator from the first byte of the SDO

-Definition at line 71 of file sdo.c. +Definition at line 105 of file sdo.c. +

+Referenced by proceedSDO().

@@ -280,7 +302,9 @@

Returns the subIndex from the byte 3 of the SDO

-Definition at line 88 of file sdo.c. +Definition at line 121 of file sdo.c. +

+Referenced by proceedSDO().

@@ -302,7 +326,9 @@

Returns the toggle from the first byte of the SDO

-Definition at line 79 of file sdo.c. +Definition at line 113 of file sdo.c. +

+Referenced by proceedSDO().

@@ -319,7 +345,7 @@

-Definition at line 34 of file sdo.c. +Definition at line 43 of file sdo.c.

@@ -336,7 +362,7 @@

-Definition at line 31 of file sdo.c. +Definition at line 40 of file sdo.c.

@@ -360,7 +386,9 @@ if(d->transfers[id].timer != TIMER_NONE) { StopSDO_TIMER(id) StartSDO_TIMER(id) }

-Definition at line 124 of file sdo.c. +Definition at line 160 of file sdo.c. +

+Referenced by proceedSDO().

@@ -384,7 +412,9 @@ d->transfers[id].timer = SetAlarm(d,id,&SDOTimeoutAlarm,MS_TO_TIMEVAL(SDO_TIMEOUT_MS),0);

-Definition at line 120 of file sdo.c. +Definition at line 156 of file sdo.c. +

+Referenced by initSDOline().

@@ -408,7 +438,9 @@ d->transfers[id].timer = DelAlarm(d->transfers[id].timer);

-Definition at line 116 of file sdo.c. +Definition at line 152 of file sdo.c. +

+Referenced by failedSDO(), initSDOline(), and proceedSDO().


Function Documentation

@@ -462,11 +494,40 @@

-Called by readNetworkDict -

-Definition at line 1198 of file sdo.c. -

-References getSDOfreeLine(), getSDOlineOnUse(), initSDOline(), resetSDOline(), and sendSDO(). +

Parameters:
+ + + + + + + +
d 
nodeId 
index 
subIndex 
dataType 
Callback 
+
+
Returns:
+ +

+Verify that there is no SDO communication yet.

+Taking the line ...

+Check which SDO to use to communicate with the node

+looking for the nodeId server

+Send the SDO to the server. Initiate upload, cs=2. +

+Definition at line 1406 of file sdo.c. +

+References getSDOfreeLine(), getSDOlineOnUse(), initSDOline(), resetSDOline(), and sendSDO(). +

+Referenced by readNetworkDict(), and readNetworkDictCallback(). +

+Here is the call graph for this function:

+ + + + + + + +

@@ -537,7 +598,22 @@

-Called by writeNetworkDict +Called by writeNetworkDict

+

Parameters:
+ + + + + + + + + + +
d 
nodeId 
index 
subIndex 
count 
dataType 
data 
Callback 
endianize 
+
+
Returns:
+

@@ -572,11 +648,27 @@

- -

-Definition at line 318 of file sdo.c. -

-References getSDOlineOnUse(), and resetSDOline(). +

Parameters:
+ + + + +
d 
nodeId 
whoami 
+
+
Returns:
+ +

+Definition at line 439 of file sdo.c. +

+References getSDOlineOnUse(), and resetSDOline(). +

+Here is the call graph for this function:

+ + + + + +

@@ -629,11 +721,34 @@

- -

-Definition at line 227 of file sdo.c. -

-References getSDOlineOnUse(), resetSDOline(), sendSDOabort(), and StopSDO_TIMER. +

Parameters:
+ + + + + + + +
d 
nodeId 
whoami 
index 
subIndex 
abortCode 
+
+
Returns:
+ +

+Definition at line 307 of file sdo.c. +

+References getSDOlineOnUse(), resetSDOline(), sendSDOabort(), and StopSDO_TIMER. +

+Referenced by proceedSDO(). +

+Here is the call graph for this function:

+ + + + + + + +

@@ -680,11 +795,30 @@

- -

-Definition at line 1295 of file sdo.c. -

-References getSDOlineOnUse(). +

Parameters:
+ + + + + + +
d 
nodeId 
data 
size 
abortCode 
+
+
Returns:
+ +

+Looking for the line tranfert.

+Transfert is finished. Put the value in the data. +

+Definition at line 1532 of file sdo.c. +

+References getSDOlineOnUse(). +

+Here is the call graph for this function:

+ + + +

@@ -719,9 +853,19 @@

- -

-Definition at line 284 of file sdo.c. +

Parameters:
+ + + + +
d 
whoami 
line 
+
+
Returns:
+ +

+Definition at line 388 of file sdo.c. +

+Referenced by _readNetworkDict(), _writeNetworkDict(), and proceedSDO().

@@ -762,9 +906,20 @@

- -

-Definition at line 301 of file sdo.c. +

Parameters:
+ + + + + +
d 
nodeId 
whoami 
line 
+
+
Returns:
+ +

+Definition at line 414 of file sdo.c. +

+Referenced by _readNetworkDict(), _writeNetworkDict(), closeSDOtransfer(), failedSDO(), getReadResultNetworkDict(), getWriteResultNetworkDict(), and proceedSDO().

@@ -799,9 +954,19 @@

- -

-Definition at line 332 of file sdo.c. +

Parameters:
+ + + + +
d 
line 
nbBytes 
+
+
Returns:
+ +

+Definition at line 461 of file sdo.c. +

+Referenced by proceedSDO().

@@ -836,11 +1001,27 @@

- -

-Definition at line 1329 of file sdo.c. -

-References getSDOlineOnUse(). +

Parameters:
+ + + + +
d 
nodeId 
abortCode 
+
+
Returns:
+ +

+Looking for the line tranfert. +

+Definition at line 1573 of file sdo.c. +

+References getSDOlineOnUse(). +

+Here is the call graph for this function:

+ + + +

@@ -893,11 +1074,24 @@

- -

-Definition at line 263 of file sdo.c. -

-References StartSDO_TIMER, and StopSDO_TIMER. +

Parameters:
+ + + + + + + +
d 
line 
nodeId 
index 
subIndex 
state 
+
+
Returns:
+ +

+Definition at line 359 of file sdo.c. +

+References StartSDO_TIMER, and StopSDO_TIMER. +

+Referenced by _readNetworkDict(), _writeNetworkDict(), proceedSDO(), and resetSDOline().

@@ -938,9 +1132,20 @@

- -

-Definition at line 189 of file sdo.c. +

Parameters:
+ + + + + +
d 
line 
nbBytes 
data 
+
+
Returns:
+ +

+Definition at line 250 of file sdo.c. +

+Referenced by proceedSDO().

@@ -969,11 +1174,28 @@

- -

-Definition at line 157 of file sdo.c. -

-References getODentry(). +

Parameters:
+ + + +
d 
line 
+
+
Returns:
+ +

+Definition at line 209 of file sdo.c. +

+References getODentry(). +

+Referenced by proceedSDO(). +

+Here is the call graph for this function:

+ + + + + +

@@ -1002,11 +1224,175 @@

- -

-Definition at line 447 of file sdo.c. -

-References failedSDO(), getSDOc, getSDOcs, getSDOe, getSDOfreeLine(), getSDOindex, getSDOlineOnUse(), getSDOlineRestBytes(), getSDOn2, getSDOn3, getSDOs, getSDOsubIndex, getSDOt, initSDOline(), lineToSDO(), objdictToSDOline(), resetSDOline(), RestartSDO_TIMER, SDOlineToObjdict(), SDOtoLine(), sendSDO(), setSDOlineRestBytes(), and StopSDO_TIMER. +

Parameters:
+ + + +
d 
m 
+
+
Returns:
+ +

+received or to be transmited.

+The node from which the SDO is received

+node id in 32 bits, for temporary use

+SDO_SERVER or SDO_CLIENT.

+while reading or writing in the local object dictionary.

+SDO to transmit

+Looking for the cobId in the object dictionary.

+Am-I a server ?

+In case of server, the node id of the client may be unknown. So we put the index minus offset

+0x1200 where the cobid received is defined.

+end while

+Am-I client ?

+a) Looking for the cobid received.

+b) cobid found, so reading the node id of the server.

+This SDO was not for us !

+Test if the size of the SDO is ok

+Testing the command specifier

+Allowed : cs = 0, 1, 2, 3, 4. (= all except those for block tranfert).

+cs = other : Not allowed -> abort.

+I am SERVER

+Receiving a download segment data.

+A SDO transfert should have been yet initiated.

+Reset the wathdog

+Toggle test.

+Nb of data to be downloaded

+Store the data in the transfert structure.

+Sending the SDO response, CS = 1

+The node id of the server, (here it is the sender).

+Inverting the toggle for the next segment.

+If it was the last segment,

+Transfering line data to object dictionary.

+The code does not use the "d" of initiate frame. So it is safe if e=s=0

+Release of the line

+I am CLIENT

+It is a request for a previous upload segment. We should find a line opened for this.

+Reset the wathdog

+test of the toggle;

+nb of data to be uploaded

+Storing the data in the line structure.

+Inverting the toggle for the next segment.

+If it was the last segment,

+Put in state finished

+The code is safe for the case e=s=0 in initiate frame.

+more segments to receive

+Sending the request for the next segment.

+I am SERVER

+Receive of an initiate download

+Search if a SDO transfert have been yet initiated

+No line on use. Great !

+Try to open a new line.

+If SDO expedited

+nb of data to be downloaded

+Storing the data in the line structure.

+SDO expedited -> transfert finished. Data can be stored in the dictionary.

+The line will be reseted when it is downloading in the dictionary.

+Transfering line data to object dictionary.

+Release of the line.

+So, if it is not an expedited transfert

+TODO : if e and s = 0, not reading m->data[4] but put nbBytes = 0

+Transfert limited to 255 bytes.

+Sending a SDO, cs=3

+The node id of the server, (here it is the sender).

+I am CLIENT

+It is a response for a previous download segment. We should find a line opened for this.

+Reset the wathdog

+test of the toggle;

+End transmission or downloading next segment. We need to know if it will be the last one.

+At least one transfer to send.

+several segments to download.

+code to send the next segment. (cs = 0; c = 0)

+Last segment.

+code to send the last segment. (cs = 0; c = 1)

+end if I am a CLIENT

+I am SERVER

+Receive of an initiate upload.

+Search if a SDO transfert have been yet initiated

+No line on use. Great !

+Try to open a new line.

+Transfer data from dictionary to the line structure.

+Preparing the response.

+Nb bytes to transfer ?

+The server node Id;

+normal transfert. (segmented).

+code to send the initiate upload response. (cs = 2)

+It takes too much memory to upgrate to 2^32 because the size of data is also coded

+in the object dictionary, at every index and subindex.

+Expedited upload. (cs = 2 ; e = 1)

+Release the line.

+end if I am SERVER

+I am CLIENT

+It is the response for the previous initiate upload request.

+We should find a line opened for this.

+Reset the wathdog

+nb of data to be uploaded

+Storing the data in the line structure.

+SDO expedited -> transfert finished. data are available via getReadResultNetworkDict().

+So, if it is not an expedited transfert

+Storing the nb of data to receive.

+Remember the limitation to 255 bytes to transfert

+Requesting next segment. (cs = 3)

+End if CLIENT

+I am SERVER

+Receiving a upload segment.

+A SDO transfert should have been yet initiated.

+Reset the wathdog

+Toggle test.

+Uploading next segment. We need to know if it will be the last one.

+The segment to transfer is not the last one.

+code to send the next segment. (cs = 0; c = 0)

+Inverting the toggle for the next tranfert.

+Last segment.

+code to send the last segment. (cs = 0; c = 1)

+The server node Id;

+Release the line

+I am CLIENT

+It is the response for the previous initiate download request.

+We should find a line opened for this.

+Reset the watchdog

+more than one request to send

+code to send the next segment. (cs = 0; c = 0)

+The server node Id;

+Last segment.

+code to send the last segment. (cs = 0; c = 1)

+The server node Id;

+Received SDO abort.

+Looking for the line concerned.

+Tips : The end user has no way to know that the server node has received an abort SDO.

+Its is ok, I think.

+If I am CLIENT

+The line *must* be released by the core program.

+Error : Unknown cs +

+Definition at line 608 of file sdo.c. +

+References failedSDO(), getSDOc, getSDOcs, getSDOe, getSDOfreeLine(), getSDOindex, getSDOlineOnUse(), getSDOlineRestBytes(), getSDOn2, getSDOn3, getSDOs, getSDOsubIndex, getSDOt, initSDOline(), lineToSDO(), objdictToSDOline(), resetSDOline(), RestartSDO_TIMER, SDOlineToObjdict(), SDOtoLine(), sendSDO(), setSDOlineRestBytes(), and StopSDO_TIMER. +

+Referenced by canDispatch(). +

+Here is the call graph for this function:

+ + + + + + + + + + + + + + + + + + + + +

@@ -1053,11 +1439,32 @@

- -

-Definition at line 1282 of file sdo.c. -

-References _readNetworkDict(). +

Parameters:
+ + + + + + +
d 
nodeId 
index 
subIndex 
dataType 
+
+
Returns:
+ +

+Definition at line 1499 of file sdo.c. +

+References _readNetworkDict(). +

+Here is the call graph for this function:

+ + + + + + + + +

@@ -1110,11 +1517,33 @@

- -

-Definition at line 1288 of file sdo.c. -

-References _readNetworkDict(). +

Parameters:
+ + + + + + + +
d 
nodeId 
index 
subIndex 
dataType 
Callback 
+
+
Returns:
+ +

+Definition at line 1516 of file sdo.c. +

+References _readNetworkDict(). +

+Here is the call graph for this function:

+ + + + + + + + +

@@ -1134,11 +1563,28 @@

-Reset all sdo buffers -

-Definition at line 131 of file sdo.c. -

-References resetSDOline(). +Reset all sdo buffers

+

Parameters:
+ + +
d 
+
+ +

+transfer structure initialization +

+Definition at line 169 of file sdo.c. +

+References resetSDOline(). +

+Referenced by switchCommunicationState(). +

+Here is the call graph for this function:

+ + + + +

@@ -1167,11 +1613,25 @@

- -

-Definition at line 253 of file sdo.c. -

-References initSDOline(). +

Parameters:
+ + + +
d 
line 
+
+ +

+Definition at line 338 of file sdo.c. +

+References initSDOline(). +

+Referenced by _readNetworkDict(), _writeNetworkDict(), closeSDOtransfer(), failedSDO(), proceedSDO(), resetSDO(), and SDOTimeoutAlarm(). +

+Here is the call graph for this function:

+ + + +

@@ -1200,11 +1660,28 @@

- -

-Definition at line 141 of file sdo.c. -

-References setODentry(). +

Parameters:
+ + + +
d 
line 
+
+
Returns:
+ +

+Definition at line 186 of file sdo.c. +

+References setODentry(). +

+Referenced by proceedSDO(). +

+Here is the call graph for this function:

+ + + + + +

@@ -1233,11 +1710,26 @@

- -

-Definition at line 93 of file sdo.c. -

-References resetSDOline(), and sendSDOabort(). +

Parameters:
+ + + +
d 
id 
+
+ +

+Definition at line 129 of file sdo.c. +

+References resetSDOline(), and sendSDOabort(). +

+Here is the call graph for this function:

+ + + + + + +

@@ -1278,9 +1770,20 @@

- -

-Definition at line 210 of file sdo.c. +

Parameters:
+ + + + + +
d 
line 
nbBytes 
data 
+
+
Returns:
+ +

+Definition at line 279 of file sdo.c. +

+Referenced by proceedSDO().

@@ -1315,9 +1818,28 @@

- -

-Definition at line 354 of file sdo.c. +

Parameters:
+ + + + +
d 
whoami 
sdo 
+
+
Returns:
+ +

+get the server->client cobid

+case server. Easy because today only one server SDO is authorized in CanFestival

+case client

+Get the client->server cobid.

+First, have to find at the index where is defined the communication with the server node

+Second, read the cobid client->server

+message copy for sending

+the length of SDO must be 8 +

+Definition at line 498 of file sdo.c. +

+Referenced by _readNetworkDict(), _writeNetworkDict(), proceedSDO(), and sendSDOabort().

@@ -1364,11 +1886,29 @@

- -

-Definition at line 424 of file sdo.c. -

-References sendSDO(). +

Parameters:
+ + + + + + +
d 
whoami 
index 
subIndex 
abortCode 
+
+
Returns:
+ +

+Definition at line 578 of file sdo.c. +

+References sendSDO(). +

+Referenced by failedSDO(), and SDOTimeoutAlarm(). +

+Here is the call graph for this function:

+ + + +

@@ -1403,9 +1943,19 @@

- -

-Definition at line 342 of file sdo.c. +

Parameters:
+ + + + +
d 
line 
nbBytes 
+
+
Returns:
+ +

+Definition at line 479 of file sdo.c. +

+Referenced by proceedSDO().

@@ -1464,11 +2014,34 @@

- -

-Definition at line 1182 of file sdo.c. -

-References _writeNetworkDict(). +

Parameters:
+ + + + + + + + +
d 
nodeId 
index 
subIndex 
count 
dataType 
data 
+
+
Returns:
+ +

+Definition at line 1368 of file sdo.c. +

+References _writeNetworkDict(). +

+Here is the call graph for this function:

+ + + + + + + + +

@@ -1533,14 +2106,38 @@

- -

-Definition at line 1190 of file sdo.c. -

-References _writeNetworkDict(). -

-

-


Generated on Mon Jun 4 17:09:27 2007 for CanFestival by  +
Parameters:
+ + + + + + + + + +
d 
nodeId 
index 
subIndex 
count 
dataType 
data 
Callback 
+
+
Returns:
+ +

+Definition at line 1388 of file sdo.c. +

+References _writeNetworkDict(). +

+Here is the call graph for this function:

+ + + + + + + + + + +

+


Generated on Tue Jun 5 18:32:09 2007 for CanFestival by  doxygen 1.5.1