nico@207: nico@207:
nico@207:#include "timer.h"
#include "data.h"
nico@207: Go to the source code of this file.
Data Structures | |
struct | struct_s_transfer |
struct | BODY |
struct | struct_s_SDO |
Typedefs | |
typedef void(*) | SDOCallback_t (CO_Data *d, UNS8 nodeId) |
typedef struct_s_transfer | s_transfer |
typedef struct_s_SDO | s_SDO |
Functions | |
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) |
typedef struct struct_s_SDO s_SDO | nico@207:
typedef struct struct_s_transfer s_transfer | nico@207:
typedef void(*) SDOCallback_t(CO_Data *d, UNS8 nodeId) | nico@207:
nico@207:
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@207: Close a transmission. nodeId : Node id of the server if both server or client whoami : Line opened as SDO_CLIENT or SDO_SERVER nico@207:
nico@207: Definition at line 318 of file sdo.c. nico@207:
nico@207: References struct_s_timer_entry::d, getSDOlineOnUse(), MSG_WAR, resetSDOline(), and UNS8. nico@207:
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@207: Called when an internal SDO abort occurs. Release the line * Only if server * 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[][] 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 nico@207:
nico@207: Definition at line 227 of file sdo.c. nico@207:
nico@207: References struct_s_timer_entry::d, getSDOlineOnUse(), MSG_WAR, resetSDOline(), SDO_ABORTED_INTERNAL, SDO_CLIENT, SDO_SERVER, sendSDOabort(), struct_s_transfer::state, StopSDO_TIMER, struct_CO_Data::transfers, and UNS8. nico@207:
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@207: Use this function after a readNetworkDict 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 !
nico@207: dataType (defined in objdictdef.h) : type expected. put "visible_string" for strings, 0 for integers or reals. abortCode : 0 = not available. Else : SDO abort code. (received if return SDO_ABORTED_RCV) example : UNS32 data; UNS8 size; readNetworkDict(0, 0x05, 0x1016, 1, 0) // get the data index 1016 subindex 1 of node 5 while (getReadResultNetworkDict (0, 0x05, &data, &size) != SDO_UPLOAD_IN_PROGRESS); nico@207:
nico@207: Definition at line 1295 of file sdo.c. nico@207:
nico@207: References CANOPEN_BIG_ENDIAN, struct_s_transfer::count, struct_s_timer_entry::d, struct_s_transfer::data, struct_s_transfer::dataType, getSDOlineOnUse(), MSG_ERR, SDO_ABORTED_INTERNAL, SDO_CLIENT, SDO_FINISHED, struct_s_transfer::state, struct_CO_Data::transfers, UNS8, and visible_string. nico@207:
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@207: Search for an unused line in the transfers array to store a new SDO. ie a line which value of the field "state" is "SDO_RESET" An unused line have the field "state" at the value SDO_RESET bus_id is hardware dependant whoami : create the line for a SDO_SERVER or SDO_CLIENT. return 0xFF if all the lines are on use. Else, return 0 nico@207:
nico@207: Definition at line 284 of file sdo.c. nico@207:
nico@207: 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. 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@207: 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 nodeId correspond to the message node-id return 0xFF if error. Else, return 0 nico@207:
nico@207: Definition at line 301 of file sdo.c. nico@207:
nico@207: References struct_s_timer_entry::d, struct_s_transfer::nodeId, SDO_MAX_SIMULTANEOUS_TRANSFERTS, SDO_RESET, struct_s_transfer::state, struct_CO_Data::transfers, UNS8, and struct_s_transfer::whoami. 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@207: Bytes in the line structure which must be transmited (or received) bus_id is hardware dependant. return 0. nico@207:
nico@207: Definition at line 332 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::count, struct_s_timer_entry::d, struct_s_transfer::offset, struct_CO_Data::transfers, and UNS8. 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@207: Use this function after a writeNetworkDict 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 ! abortCode : 0 = not available. Else : SDO abort code. (received if return SDO_ABORTED_RCV) example : UNS32 data = 0x50; UNS8 size; UNS32 abortCode; writeNetworkDict(0, 0x05, 0x1016, 1, size, &data) // write the data index 1016 subindex 1 of node 5 while ( getWriteResultNetworkDict (0, 0x05, &abortCode) != SDO_DOWNLOAD_IN_PROGRESS); nico@207:
nico@207: Definition at line 1329 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::abortCode, struct_s_timer_entry::d, getSDOlineOnUse(), MSG_ERR, SDO_ABORTED_INTERNAL, SDO_CLIENT, struct_s_transfer::state, struct_CO_Data::transfers, and UNS8. nico@207:
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@207: Initialize some fields of the structure. Returns 0 nico@207:
nico@207: Definition at line 263 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::Callback, struct_s_transfer::count, struct_s_timer_entry::d, struct_s_transfer::dataType, struct_s_transfer::index, MSG_WAR, struct_s_transfer::nodeId, struct_s_transfer::offset, SDO_DOWNLOAD_IN_PROGRESS, SDO_UPLOAD_IN_PROGRESS, StartSDO_TIMER, struct_s_transfer::state, StopSDO_TIMER, struct_s_transfer::subIndex, struct_s_transfer::toggle, and struct_CO_Data::transfers. 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@207: copy data from an existant line in the argument "* data" Returns 0xFF if error. Else, returns 0; nico@207:
nico@207: Definition at line 189 of file sdo.c. nico@207:
nico@207: 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. 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@207: Copy the data from the object dictionary to the SDO line for a network transfert. Returns SDO error code if error. Else, returns 0; nico@207:
nico@207: Definition at line 157 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::count, struct_s_timer_entry::d, struct_s_transfer::data, getODentry(), struct_s_transfer::index, MSG_WAR, OD_SUCCESSFUL, struct_s_transfer::offset, struct_s_transfer::subIndex, struct_CO_Data::transfers, UNS32, and UNS8. nico@207:
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@207: Treat a SDO frame reception bus_id is hardware dependant call the function sendSDO return 0xFF if error 0x80 if transfert aborted by the server 0x0 ok nico@207:
nico@207: Definition at line 447 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::abortCode, struct_CO_Data::bDeviceNodeId, struct_s_SDO::body, td_indextable::bSubCount, struct_s_transfer::Callback, struct_s_transfer::count, struct_s_timer_entry::d, BODY::data, Message::data, failedSDO(), struct_CO_Data::firstIndex, getSDOc, getSDOcs, getSDOe, getSDOfreeLine(), getSDOindex, getSDOlineOnUse(), getSDOlineRestBytes(), getSDOn2, getSDOn3, getSDOs, getSDOsubIndex, getSDOt, struct_s_transfer::index, initSDOline(), struct_CO_Data::lastIndex, lineToSDO(), MSG_ERR, MSG_WAR, struct_s_SDO::nodeId, struct_CO_Data::objdict, objdictToSDOline(), td_subindex::pObject, td_indextable::pSubindex, resetSDOline(), RestartSDO_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, SDOlineToObjdict(), SDOtoLine(), sendSDO(), setSDOlineRestBytes(), struct_s_transfer::state, StopSDO_TIMER, struct_s_transfer::subIndex, struct_s_transfer::toggle, struct_CO_Data::transfers, UNS16, UNS32, and UNS8. nico@207:
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@207: 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 subIndex indicated bus_id is hardware dependant datatype (defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value. return 0xFF if error, else return 0 nico@207:
nico@207: Definition at line 1282 of file sdo.c. nico@207:
nico@207: References _readNetworkDict(), and struct_s_timer_entry::d. nico@207:
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@207: 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). nico@207:
nico@207: Definition at line 1288 of file sdo.c. nico@207:
nico@207: References _readNetworkDict(), and struct_s_timer_entry::d. nico@207:
void resetSDO | nico@207:( | nico@207:CO_Data * | nico@207:d | nico@207:) | nico@207:nico@207: |
nico@207: Reset all sdo buffers nico@207:
nico@207: Definition at line 131 of file sdo.c. nico@207:
nico@207: References struct_s_timer_entry::d, resetSDOline(), SDO_MAX_SIMULTANEOUS_TRANSFERTS, and UNS8. nico@207:
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@207: Reset an unused line. nico@207:
nico@207: Definition at line 253 of file sdo.c. nico@207:
nico@207: References struct_s_timer_entry::d, struct_s_transfer::data, initSDOline(), MSG_WAR, SDO_MAX_LENGTH_TRANSFERT, SDO_RESET, struct_CO_Data::transfers, and UNS8. nico@207:
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@207: Copy the data received from the SDO line transfert to the object dictionary Returns SDO error code if error. Else, returns 0; nico@207:
nico@207: Definition at line 141 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::count, struct_s_timer_entry::d, struct_s_transfer::data, struct_s_transfer::index, MSG_WAR, OD_SUCCESSFUL, setODentry(), struct_s_transfer::subIndex, struct_CO_Data::transfers, UNS32, and UNS8. nico@207:
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@207: Reset of a SDO exchange on timeout. Send a SDO abort nico@207:
nico@207: Definition at line 93 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::abortCode, struct_s_transfer::Callback, struct_s_timer_entry::d, struct_s_transfer::index, MSG_ERR, MSG_WAR, struct_s_transfer::nodeId, resetSDOline(), SDO_ABORTED_INTERNAL, SDO_SERVER, SDOABT_TIMED_OUT, sendSDOabort(), struct_s_transfer::state, struct_s_transfer::subIndex, struct_s_transfer::timer, struct_CO_Data::transfers, UNS8, and struct_s_transfer::whoami. nico@207:
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@207: Add data to an existant line Returns 0xFF if error. Else, returns 0; nico@207:
nico@207: Definition at line 210 of file sdo.c. nico@207:
nico@207: 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. 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@207: 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 canSend(bus_id,&m) or 0xFF if error nico@207:
nico@207: Definition at line 354 of file sdo.c. nico@207:
nico@207: References struct_s_SDO::body, td_indextable::bSubCount, struct_CO_Data::canHandle, canSend(), Message::cob_id, struct_s_timer_entry::d, BODY::data, Message::data, struct_CO_Data::firstIndex, struct_CO_Data::lastIndex, Message::len, MSG_ERR, MSG_WAR, struct_s_SDO::nodeId, struct_CO_Data::nodeState, NOT_A_REQUEST, struct_CO_Data::objdict, Operational, td_subindex::pObject, Pre_operational, td_indextable::pSubindex, Message::rtr, s_quick_index::SDO_CLT, SDO_SERVER, s_quick_index::SDO_SVR, UNS16, UNS32, UNS8, and SHORT_CAN::w. 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@207: 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 nico@207:
nico@207: Definition at line 424 of file sdo.c. nico@207:
nico@207: References struct_CO_Data::bDeviceNodeId, struct_s_SDO::body, struct_s_timer_entry::d, BODY::data, MSG_WAR, struct_s_SDO::nodeId, sendSDO(), and UNS8. nico@207:
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@207: Store in the line structure the nb of bytes which must be transmited (or received) bus_id is hardware dependant. return 0 if success, 0xFF if error. nico@207:
nico@207: Definition at line 342 of file sdo.c. nico@207:
nico@207: References struct_s_transfer::count, struct_s_timer_entry::d, MSG_ERR, SDO_MAX_LENGTH_TRANSFERT, and struct_CO_Data::transfers. 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@207: Used by the application to send a SDO request frame to write the data *data at the index and subIndex indicated in the dictionary of the slave whose node_id is nodeId Count : nb of bytes to write in the dictionnary. datatype (defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value. bus_id is hardware dependant return 0xFF if error, else return 0 nico@207:
nico@207: Definition at line 1182 of file sdo.c. nico@207:
nico@207: References _writeNetworkDict(), and struct_s_timer_entry::d. nico@207:
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@207: 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). nico@207:
nico@207: Definition at line 1190 of file sdo.c. nico@207:
nico@207: References _writeNetworkDict(), and struct_s_timer_entry::d. nico@207:
nico@207: