nico@207: nico@207:
nico@207:#include "objacces.h"
#include "sdo.h"
#include "canfestival.h"
nico@210: Include dependency graph for sdo.c:
nico@207: Go to the source code of this file.
Defines | |
#define | NO_INLINE |
#define | INLINE |
#define | getSDOcs(byte) (byte >> 5) |
#define | getSDOn2(byte) ((byte >> 2) & 3) |
#define | getSDOn3(byte) ((byte >> 1) & 7) |
#define | getSDOe(byte) ((byte >> 1) & 1) |
#define | getSDOs(byte) (byte & 1) |
#define | getSDOc(byte) (byte & 1) |
#define | getSDOt(byte) ((byte >> 4) & 1) |
#define | getSDOindex(byte1, byte2) ((byte2 << 8) | (byte1)) |
#define | getSDOsubIndex(byte3) (byte3) |
#define | StopSDO_TIMER(id) |
#define | StartSDO_TIMER(id) |
#define | RestartSDO_TIMER(id) |
Functions | |
INLINE UNS8 | _writeNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 count, UNS8 dataType, void *data, SDOCallback_t Callback, UNS8 endianize) |
INLINE UNS8 | _readNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, SDOCallback_t Callback) |
void | SDOTimeoutAlarm (CO_Data *d, UNS32 id) |
void | resetSDO (CO_Data *d) |
UNS32 | SDOlineToObjdict (CO_Data *d, UNS8 line) |
UNS32 | objdictToSDOline (CO_Data *d, UNS8 line) |
UNS8 | lineToSDO (CO_Data *d, UNS8 line, UNS8 nbBytes, UNS8 *data) |
UNS8 | SDOtoLine (CO_Data *d, UNS8 line, UNS8 nbBytes, UNS8 *data) |
UNS8 | failedSDO (CO_Data *d, UNS8 nodeId, UNS8 whoami, UNS16 index, UNS8 subIndex, UNS32 abortCode) |
void | resetSDOline (CO_Data *d, UNS8 line) |
UNS8 | initSDOline (CO_Data *d, UNS8 line, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 state) |
UNS8 | getSDOfreeLine (CO_Data *d, UNS8 whoami, UNS8 *line) |
UNS8 | getSDOlineOnUse (CO_Data *d, UNS8 nodeId, UNS8 whoami, UNS8 *line) |
UNS8 | closeSDOtransfer (CO_Data *d, UNS8 nodeId, UNS8 whoami) |
UNS8 | getSDOlineRestBytes (CO_Data *d, UNS8 line, UNS8 *nbBytes) |
UNS8 | setSDOlineRestBytes (CO_Data *d, UNS8 line, UNS8 nbBytes) |
UNS8 | sendSDO (CO_Data *d, UNS8 whoami, s_SDO sdo) |
UNS8 | sendSDOabort (CO_Data *d, UNS8 whoami, UNS16 index, UNS8 subIndex, UNS32 abortCode) |
UNS8 | proceedSDO (CO_Data *d, Message *m) |
UNS8 | writeNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 count, UNS8 dataType, void *data) |
UNS8 | writeNetworkDictCallBack (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 count, UNS8 dataType, void *data, SDOCallback_t Callback) |
UNS8 | readNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType) |
UNS8 | readNetworkDictCallback (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, SDOCallback_t Callback) |
UNS8 | getReadResultNetworkDict (CO_Data *d, UNS8 nodeId, void *data, UNS8 *size, UNS32 *abortCode) |
UNS8 | getWriteResultNetworkDict (CO_Data *d, UNS8 nodeId, UNS32 *abortCode) |
nico@210: Definition in file sdo.c.
#define getSDOc | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:(byte & 1) | nico@207:
nico@207: Returns the indicator of end transmission from the first byte of the SDO nico@207:
nico@210: Definition at line 109 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOcs | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:(byte >> 5) | nico@207:
nico@207: Returns the command specifier (cs, ccs, scs) from the first byte of the SDO nico@207:
nico@210: Definition at line 89 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOe | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:((byte >> 1) & 1) | nico@207:
nico@207: Returns the transfer type from the first byte of the SDO nico@207:
nico@210: Definition at line 101 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOindex | nico@207:( | nico@207:byte1, | |||
nico@207: | nico@207: | byte2 | nico@207:nico@207: | ) | nico@207:((byte2 << 8) | (byte1)) | nico@207:
nico@207: Returns the index from the bytes 1 and 2 of the SDO nico@207:
nico@210: Definition at line 117 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOn2 | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:((byte >> 2) & 3) | nico@207:
nico@207: Returns the number of bytes without data from the first byte of the SDO. Coded in 2 bits nico@207:
nico@210: Definition at line 93 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOn3 | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:((byte >> 1) & 7) | nico@207:
nico@207: Returns the number of bytes without data from the first byte of the SDO. Coded in 3 bits nico@207:
nico@210: Definition at line 97 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOs | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:(byte & 1) | nico@207:
nico@207: Returns the size indicator from the first byte of the SDO nico@207:
nico@210: Definition at line 105 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOsubIndex | nico@207:( | nico@207:byte3 | nico@207:nico@207: | ) | nico@207:(byte3) | nico@207:
nico@207: Returns the subIndex from the byte 3 of the SDO nico@207:
nico@210: Definition at line 121 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define getSDOt | nico@207:( | nico@207:byte | nico@207:nico@207: | ) | nico@207:((byte >> 4) & 1) | nico@207:
nico@207: Returns the toggle from the first byte of the SDO nico@207:
nico@210: Definition at line 113 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define INLINE | nico@207:
#define NO_INLINE | nico@207:
#define RestartSDO_TIMER | nico@207:( | nico@207:id | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: Value:
MSG_WAR(0x3A07, "restartSDO_TIMER for line : ", line);\ nico@207: if(d->transfers[id].timer != TIMER_NONE) { StopSDO_TIMER(id) StartSDO_TIMER(id) } nico@207:
nico@210: Definition at line 160 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
#define StartSDO_TIMER | nico@207:( | nico@207:id | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: Value:
MSG_WAR(0x3A06, "StartSDO_TIMER for line : ", line);\ nico@207: d->transfers[id].timer = SetAlarm(d,id,&SDOTimeoutAlarm,MS_TO_TIMEVAL(SDO_TIMEOUT_MS),0); nico@207:
nico@210: Definition at line 156 of file sdo.c. nico@210:
nico@210: Referenced by initSDOline(). nico@207:
#define StopSDO_TIMER | nico@207:( | nico@207:id | nico@207:nico@207: | ) | nico@207:nico@207: |
nico@207: Value:
MSG_WAR(0x3A05, "StopSDO_TIMER for line : ", line);\ nico@207: d->transfers[id].timer = DelAlarm(d->transfers[id].timer); nico@207:
nico@210: Definition at line 152 of file sdo.c. nico@210:
nico@210: Referenced by failedSDO(), initSDOline(), and proceedSDO(). nico@207:
nico@207:
INLINE UNS8 _readNetworkDict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:dataType, | nico@207:|
nico@207: | nico@207: | SDOCallback_t | nico@207:Callback | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
index | ||
subIndex | ||
dataType | ||
Callback |
nico@210: Verify that there is no SDO communication yet.
nico@210: Taking the line ...
nico@210: Check which SDO to use to communicate with the node
nico@210: looking for the nodeId server
nico@210: Send the SDO to the server. Initiate upload, cs=2. nico@210:
nico@210: Definition at line 1406 of file sdo.c. nico@210:
nico@210: References getSDOfreeLine(), getSDOlineOnUse(), initSDOline(), resetSDOline(), and sendSDO(). nico@210:
nico@210: Referenced by readNetworkDict(), and readNetworkDictCallback(). nico@210:
nico@210: Here is the call graph for this function:
INLINE UNS8 _writeNetworkDict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:count, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:dataType, | nico@207:|
nico@207: | nico@207: | void * | nico@207:data, | nico@207:|
nico@207: | nico@207: | SDOCallback_t | nico@207:Callback, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:endianize | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210: Called by writeNetworkDict
nico@210:
d | ||
nodeId | ||
index | ||
subIndex | ||
count | ||
dataType | ||
data | ||
Callback | ||
endianize |
UNS8 closeSDOtransfer | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:whoami | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
whoami |
nico@210: Definition at line 439 of file sdo.c. nico@210:
nico@210: References getSDOlineOnUse(), and resetSDOline(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 failedSDO | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:whoami, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS32 | nico@207:abortCode | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
whoami | ||
index | ||
subIndex | ||
abortCode |
nico@210: Definition at line 307 of file sdo.c. nico@210:
nico@210: References getSDOlineOnUse(), resetSDOline(), sendSDOabort(), and StopSDO_TIMER. nico@210:
nico@210: Referenced by proceedSDO(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 getReadResultNetworkDict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | void * | nico@207:data, | nico@207:|
nico@207: | nico@207: | UNS8 * | nico@207:size, | nico@207:|
nico@207: | nico@207: | UNS32 * | nico@207:abortCode | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
data | ||
size | ||
abortCode |
nico@210: Looking for the line tranfert.
nico@210: Transfert is finished. Put the value in the data. nico@210:
nico@210: Definition at line 1532 of file sdo.c. nico@210:
nico@210: References getSDOlineOnUse(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 getSDOfreeLine | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:whoami, | nico@207:|
nico@207: | nico@207: | UNS8 * | nico@207:line | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
whoami | ||
line |
nico@210: Definition at line 388 of file sdo.c. nico@210:
nico@210: Referenced by _readNetworkDict(), _writeNetworkDict(), and proceedSDO(). nico@207:
UNS8 getSDOlineOnUse | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:whoami, | nico@207:|
nico@207: | nico@207: | UNS8 * | nico@207:line | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
whoami | ||
line |
nico@210: Definition at line 414 of file sdo.c. nico@210:
nico@210: Referenced by _readNetworkDict(), _writeNetworkDict(), closeSDOtransfer(), failedSDO(), getReadResultNetworkDict(), getWriteResultNetworkDict(), and proceedSDO(). nico@207:
UNS8 getSDOlineRestBytes | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line, | nico@207:|
nico@207: | nico@207: | UNS8 * | nico@207:nbBytes | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line | ||
nbBytes |
nico@210: Definition at line 461 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
UNS8 getWriteResultNetworkDict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS32 * | nico@207:abortCode | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
abortCode |
nico@210: Looking for the line tranfert. nico@210:
nico@210: Definition at line 1573 of file sdo.c. nico@210:
nico@210: References getSDOlineOnUse(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 initSDOline | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:state | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line | ||
nodeId | ||
index | ||
subIndex | ||
state |
nico@210: Definition at line 359 of file sdo.c. nico@210:
nico@210: References StartSDO_TIMER, and StopSDO_TIMER. nico@210:
nico@210: Referenced by _readNetworkDict(), _writeNetworkDict(), proceedSDO(), and resetSDOline(). nico@207:
UNS8 lineToSDO | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nbBytes, | nico@207:|
nico@207: | nico@207: | UNS8 * | nico@207:data | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line | ||
nbBytes | ||
data |
nico@210: Definition at line 250 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
UNS32 objdictToSDOline | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line |
nico@210: Definition at line 209 of file sdo.c. nico@210:
nico@210: References getODentry(). nico@210:
nico@210: Referenced by proceedSDO(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 proceedSDO | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | Message * | nico@207:m | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
m |
nico@210: received or to be transmited.
nico@210: The node from which the SDO is received
nico@210: node id in 32 bits, for temporary use
nico@210: SDO_SERVER or SDO_CLIENT.
nico@210: while reading or writing in the local object dictionary.
nico@210: SDO to transmit
nico@210: Looking for the cobId in the object dictionary.
nico@210: Am-I a server ?
nico@210: In case of server, the node id of the client may be unknown. So we put the index minus offset
nico@210: 0x1200 where the cobid received is defined.
nico@210: end while
nico@210: Am-I client ?
nico@210: a) Looking for the cobid received.
nico@210: b) cobid found, so reading the node id of the server.
nico@210: This SDO was not for us !
nico@210: Test if the size of the SDO is ok
nico@210: Testing the command specifier
nico@210: Allowed : cs = 0, 1, 2, 3, 4. (= all except those for block tranfert).
nico@210: cs = other : Not allowed -> abort.
nico@210: I am SERVER
nico@210: Receiving a download segment data.
nico@210: A SDO transfert should have been yet initiated.
nico@210: Reset the wathdog
nico@210: Toggle test.
nico@210: Nb of data to be downloaded
nico@210: Store the data in the transfert structure.
nico@210: Sending the SDO response, CS = 1
nico@210: The node id of the server, (here it is the sender).
nico@210: Inverting the toggle for the next segment.
nico@210: If it was the last segment,
nico@210: Transfering line data to object dictionary.
nico@210: The code does not use the "d" of initiate frame. So it is safe if e=s=0
nico@210: Release of the line
nico@210: I am CLIENT
nico@210: It is a request for a previous upload segment. We should find a line opened for this.
nico@210: Reset the wathdog
nico@210: test of the toggle;
nico@210: nb of data to be uploaded
nico@210: Storing the data in the line structure.
nico@210: Inverting the toggle for the next segment.
nico@210: If it was the last segment,
nico@210: Put in state finished
nico@210: The code is safe for the case e=s=0 in initiate frame.
nico@210: more segments to receive
nico@210: Sending the request for the next segment.
nico@210: I am SERVER
nico@210: Receive of an initiate download
nico@210: Search if a SDO transfert have been yet initiated
nico@210: No line on use. Great !
nico@210: Try to open a new line.
nico@210: If SDO expedited
nico@210: nb of data to be downloaded
nico@210: Storing the data in the line structure.
nico@210: SDO expedited -> transfert finished. Data can be stored in the dictionary.
nico@210: The line will be reseted when it is downloading in the dictionary.
nico@210: Transfering line data to object dictionary.
nico@210: Release of the line.
nico@210: So, if it is not an expedited transfert
nico@210: TODO : if e and s = 0, not reading m->data[4] but put nbBytes = 0
nico@210: Transfert limited to 255 bytes.
nico@210: Sending a SDO, cs=3
nico@210: The node id of the server, (here it is the sender).
nico@210: I am CLIENT
nico@210: It is a response for a previous download segment. We should find a line opened for this.
nico@210: Reset the wathdog
nico@210: test of the toggle;
nico@210: End transmission or downloading next segment. We need to know if it will be the last one.
nico@210: At least one transfer to send.
nico@210: several segments to download.
nico@210: code to send the next segment. (cs = 0; c = 0)
nico@210: Last segment.
nico@210: code to send the last segment. (cs = 0; c = 1)
nico@210: end if I am a CLIENT
nico@210: I am SERVER
nico@210: Receive of an initiate upload.
nico@210: Search if a SDO transfert have been yet initiated
nico@210: No line on use. Great !
nico@210: Try to open a new line.
nico@210: Transfer data from dictionary to the line structure.
nico@210: Preparing the response.
nico@210: Nb bytes to transfer ?
nico@210: The server node Id;
nico@210: normal transfert. (segmented).
nico@210: code to send the initiate upload response. (cs = 2)
nico@210: It takes too much memory to upgrate to 2^32 because the size of data is also coded
nico@210: in the object dictionary, at every index and subindex.
nico@210: Expedited upload. (cs = 2 ; e = 1)
nico@210: Release the line.
nico@210: end if I am SERVER
nico@210: I am CLIENT
nico@210: It is the response for the previous initiate upload request.
nico@210: We should find a line opened for this.
nico@210: Reset the wathdog
nico@210: nb of data to be uploaded
nico@210: Storing the data in the line structure.
nico@210: SDO expedited -> transfert finished. data are available via getReadResultNetworkDict().
nico@210: So, if it is not an expedited transfert
nico@210: Storing the nb of data to receive.
nico@210: Remember the limitation to 255 bytes to transfert
nico@210: Requesting next segment. (cs = 3)
nico@210: End if CLIENT
nico@210: I am SERVER
nico@210: Receiving a upload segment.
nico@210: A SDO transfert should have been yet initiated.
nico@210: Reset the wathdog
nico@210: Toggle test.
nico@210: Uploading next segment. We need to know if it will be the last one.
nico@210: The segment to transfer is not the last one.
nico@210: code to send the next segment. (cs = 0; c = 0)
nico@210: Inverting the toggle for the next tranfert.
nico@210: Last segment.
nico@210: code to send the last segment. (cs = 0; c = 1)
nico@210: The server node Id;
nico@210: Release the line
nico@210: I am CLIENT
nico@210: It is the response for the previous initiate download request.
nico@210: We should find a line opened for this.
nico@210: Reset the watchdog
nico@210: more than one request to send
nico@210: code to send the next segment. (cs = 0; c = 0)
nico@210: The server node Id;
nico@210: Last segment.
nico@210: code to send the last segment. (cs = 0; c = 1)
nico@210: The server node Id;
nico@210: Received SDO abort.
nico@210: Looking for the line concerned.
nico@210: Tips : The end user has no way to know that the server node has received an abort SDO.
nico@210: Its is ok, I think.
nico@210: If I am CLIENT
nico@210: The line *must* be released by the core program.
nico@210: Error : Unknown cs nico@210:
nico@210: Definition at line 608 of file sdo.c. nico@210:
nico@210: 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. nico@210:
nico@210: Referenced by canDispatch(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 readNetworkDict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:dataType | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
index | ||
subIndex | ||
dataType |
nico@210: Definition at line 1499 of file sdo.c. nico@210:
nico@210: References _readNetworkDict(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 readNetworkDictCallback | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:dataType, | nico@207:|
nico@207: | nico@207: | SDOCallback_t | nico@207:Callback | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
index | ||
subIndex | ||
dataType | ||
Callback |
nico@210: Definition at line 1516 of file sdo.c. nico@210:
nico@210: References _readNetworkDict(). nico@210:
nico@210: Here is the call graph for this function:
void resetSDO | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
nico@210: Reset all sdo buffers
nico@210:
d |
nico@210: transfer structure initialization nico@210:
nico@210: Definition at line 169 of file sdo.c. nico@210:
nico@210: References resetSDOline(). nico@210:
nico@210: Referenced by switchCommunicationState(). nico@210:
nico@210: Here is the call graph for this function:
void resetSDOline | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line |
nico@210: Definition at line 338 of file sdo.c. nico@210:
nico@210: References initSDOline(). nico@210:
nico@210: Referenced by _readNetworkDict(), _writeNetworkDict(), closeSDOtransfer(), failedSDO(), proceedSDO(), resetSDO(), and SDOTimeoutAlarm(). nico@210:
nico@210: Here is the call graph for this function:
UNS32 SDOlineToObjdict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line |
nico@210: Definition at line 186 of file sdo.c. nico@210:
nico@210: References setODentry(). nico@210:
nico@210: Referenced by proceedSDO(). nico@210:
nico@210: Here is the call graph for this function:
void SDOTimeoutAlarm | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS32 | nico@207:id | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
id |
nico@210: Definition at line 129 of file sdo.c. nico@210:
nico@210: References resetSDOline(), and sendSDOabort(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 SDOtoLine | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nbBytes, | nico@207:|
nico@207: | nico@207: | UNS8 * | nico@207:data | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line | ||
nbBytes | ||
data |
nico@210: Definition at line 279 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
UNS8 sendSDO | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:whoami, | nico@207:|
nico@207: | nico@207: | s_SDO | nico@207:sdo | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
whoami | ||
sdo |
nico@210: get the server->client cobid
nico@210: case server. Easy because today only one server SDO is authorized in CanFestival
nico@210: case client
nico@210: Get the client->server cobid.
nico@210: First, have to find at the index where is defined the communication with the server node
nico@210: Second, read the cobid client->server
nico@210: message copy for sending
nico@210: the length of SDO must be 8 nico@210:
nico@210: Definition at line 498 of file sdo.c. nico@210:
nico@210: Referenced by _readNetworkDict(), _writeNetworkDict(), proceedSDO(), and sendSDOabort(). nico@207:
UNS8 sendSDOabort | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:whoami, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS32 | nico@207:abortCode | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
whoami | ||
index | ||
subIndex | ||
abortCode |
nico@210: Definition at line 578 of file sdo.c. nico@210:
nico@210: References sendSDO(). nico@210:
nico@210: Referenced by failedSDO(), and SDOTimeoutAlarm(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 setSDOlineRestBytes | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:line, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nbBytes | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
line | ||
nbBytes |
nico@210: Definition at line 479 of file sdo.c. nico@210:
nico@210: Referenced by proceedSDO(). nico@207:
UNS8 writeNetworkDict | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:count, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:dataType, | nico@207:|
nico@207: | nico@207: | void * | nico@207:data | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
index | ||
subIndex | ||
count | ||
dataType | ||
data |
nico@210: Definition at line 1368 of file sdo.c. nico@210:
nico@210: References _writeNetworkDict(). nico@210:
nico@210: Here is the call graph for this function:
UNS8 writeNetworkDictCallBack | nico@207:( | nico@207:CO_Data * | nico@207:d, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:nodeId, | nico@207:|
nico@207: | nico@207: | UNS16 | nico@207:index, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:subIndex, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:count, | nico@207:|
nico@207: | nico@207: | UNS8 | nico@207:dataType, | nico@207:|
nico@207: | nico@207: | void * | nico@207:data, | nico@207:|
nico@207: | nico@207: | SDOCallback_t | nico@207:Callback | nico@207: |
nico@207: | ) | nico@207:nico@207: |
nico@210:
d | ||
nodeId | ||
index | ||
subIndex | ||
count | ||
dataType | ||
data | ||
Callback |
nico@210: Definition at line 1388 of file sdo.c. nico@210:
nico@210: References _writeNetworkDict(). nico@210:
nico@210: Here is the call graph for this function:
nico@210: