equal
deleted
inserted
replaced
69 * Used only to tranfer part of a line to or from a SDO. |
69 * Used only to tranfer part of a line to or from a SDO. |
70 * offset is always pointing on the next free cell of data[]. |
70 * offset is always pointing on the next free cell of data[]. |
71 * WARNING s_transfer.data is subject to ENDIANISATION |
71 * WARNING s_transfer.data is subject to ENDIANISATION |
72 * (with respect to CANOPEN_BIG_ENDIAN) |
72 * (with respect to CANOPEN_BIG_ENDIAN) |
73 */ |
73 */ |
74 UNS8 data [SDO_MAX_LENGTH_TRANSFERT]; |
74 UNS8 data [SDO_MAX_LENGTH_TRANSFER]; |
75 #ifdef SDO_DYNAMIC_BUFFER_ALLOCATION |
75 #ifdef SDO_DYNAMIC_BUFFER_ALLOCATION |
76 UNS8 *dynamicData; |
76 UNS8 *dynamicData; |
77 UNS32 dynamicDataSize; |
77 UNS32 dynamicDataSize; |
78 #endif //SDO_DYNAMIC_BUFFER_ALLOCATION |
78 #endif //SDO_DYNAMIC_BUFFER_ALLOCATION |
79 |
79 |
118 */ |
118 */ |
119 void resetSDO (CO_Data* d); |
119 void resetSDO (CO_Data* d); |
120 |
120 |
121 |
121 |
122 /** |
122 /** |
123 * @brief Copy the data received from the SDO line transfert to the object dictionary. |
123 * @brief Copy the data received from the SDO line transfer to the object dictionary. |
124 * @param *d Pointer on a CAN object data structure |
124 * @param *d Pointer on a CAN object data structure |
125 * @param line SDO line |
125 * @param line SDO line |
126 * @return SDO error code if error. Else, returns 0. |
126 * @return SDO error code if error. Else, returns 0. |
127 */ |
127 */ |
128 UNS32 SDOlineToObjdict (CO_Data* d, UNS8 line); |
128 UNS32 SDOlineToObjdict (CO_Data* d, UNS8 line); |
129 |
129 |
130 /** |
130 /** |
131 * @brief Copy the data from the object dictionary to the SDO line for a network transfert. |
131 * @brief Copy the data from the object dictionary to the SDO line for a network transfer. |
132 * @param *d Pointer on a CAN object data structure |
132 * @param *d Pointer on a CAN object data structure |
133 * @param line SDO line |
133 * @param line SDO line |
134 * @return SDO error code if error. Else, returns 0. |
134 * @return SDO error code if error. Else, returns 0. |
135 */ |
135 */ |
136 UNS32 objdictToSDOline (CO_Data* d, UNS8 line); |
136 UNS32 objdictToSDOline (CO_Data* d, UNS8 line); |
286 * call the function sendSDO |
286 * call the function sendSDO |
287 * @param *d Pointer on a CAN object data structure |
287 * @param *d Pointer on a CAN object data structure |
288 * @param *m Pointer on a CAN message structure |
288 * @param *m Pointer on a CAN message structure |
289 * @return code : |
289 * @return code : |
290 * - 0xFF if error |
290 * - 0xFF if error |
291 * - 0x80 if transfert aborted by the server |
291 * - 0x80 if transfer aborted by the server |
292 * - 0x0 ok |
292 * - 0x0 ok |
293 */ |
293 */ |
294 UNS8 proceedSDO (CO_Data* d, Message *m); |
294 UNS8 proceedSDO (CO_Data* d, Message *m); |
295 |
295 |
296 /** |
296 /** |
419 * @param *abortCode Pointer to the abortcode. (0 = not available. Else : SDO abort code. (received if return SDO_ABORTED_RCV) |
419 * @param *abortCode Pointer to the abortcode. (0 = not available. Else : SDO abort code. (received if return SDO_ABORTED_RCV) |
420 * |
420 * |
421 * |
421 * |
422 * @return |
422 * @return |
423 * - SDO_FINISHED // datas are available |
423 * - SDO_FINISHED // datas are available |
424 * - SDO_ABORTED_RCV // Transfert failed (abort SDO received) |
424 * - SDO_ABORTED_RCV // Transfer failed (abort SDO received) |
425 * - SDO_ABORTED_INTERNAL // Transfert failed (internal abort) |
425 * - SDO_ABORTED_INTERNAL // Transfer failed (internal abort) |
426 * - SDO_UPLOAD_IN_PROGRESS // Datas are not yet available |
426 * - SDO_UPLOAD_IN_PROGRESS // Datas are not yet available |
427 * - SDO_DOWNLOAD_IN_PROGRESS // Download is in progress |
427 * - SDO_DOWNLOAD_IN_PROGRESS // Download is in progress |
428 * - SDO_PROVIDED_BUFFER_TOO_SMALL //The value *size is not enough to store the received data |
428 * - SDO_PROVIDED_BUFFER_TOO_SMALL //The value *size is not enough to store the received data |
429 * \n\n |
429 * \n\n |
430 * example : |
430 * example : |
447 * - 0 = not available. |
447 * - 0 = not available. |
448 * - SDO abort code (received if return SDO_ABORTED_RCV) |
448 * - SDO abort code (received if return SDO_ABORTED_RCV) |
449 * |
449 * |
450 * @return : |
450 * @return : |
451 * - SDO_FINISHED // datas are available |
451 * - SDO_FINISHED // datas are available |
452 * - SDO_ABORTED_RCV // Transfert failed (abort SDO received) |
452 * - SDO_ABORTED_RCV // Transfer failed (abort SDO received) |
453 * - SDO_ABORTED_INTERNAL // Transfert failed (Internal abort) |
453 * - SDO_ABORTED_INTERNAL // Transfer failed (Internal abort) |
454 * - SDO_DOWNLOAD_IN_PROGRESS // Datas are not yet available |
454 * - SDO_DOWNLOAD_IN_PROGRESS // Datas are not yet available |
455 * - SDO_UPLOAD_IN_PROGRESS // Upload in progress |
455 * - SDO_UPLOAD_IN_PROGRESS // Upload in progress |
456 * \n\n |
456 * \n\n |
457 * example : |
457 * example : |
458 * @code |
458 * @code |