NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
Collaboration diagram for SDO:

Functions

void SDOTimeoutAlarm (CO_Data *d, UNS32 id)
 Reset of a SDO exchange on timeout. Send a SDO abort.
 
void resetSDO (CO_Data *d)
 Reset all SDO buffers.
 
UNS32 SDOlineToObjdict (CO_Data *d, UNS8 line)
 Copy the data received from the SDO line transfert to the object dictionary.
 
UNS32 objdictToSDOline (CO_Data *d, UNS8 line)
 Copy the data from the object dictionary to the SDO line for a network transfert.
 
UNS32 objdictToSDOBlockline (CO_Data *d, UNS8 line, UNS8 numberOfIndexes)
 Copy the data from the object dictionary to the SDO line for a network transfert.
 
UNS8 lineToSDO (CO_Data *d, UNS8 line, UNS32 nbBytes, UNS8 *data)
 Copy data from an existant line in the argument "* data".
 
UNS8 SDOtoLine (CO_Data *d, UNS8 line, UNS32 nbBytes, UNS8 *data)
 Add data to an existant line.
 
UNS8 failedSDO (CO_Data *d, UNS8 nodeId, UNS8 whoami, UNS16 index, UNS8 subIndex, UNS32 abortCode)
 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.
 
void resetSDOline (CO_Data *d, UNS8 line)
 Reset an unused line.
 
UNS8 initSDOline (CO_Data *d, UNS8 line, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 state)
 Initialize some fields of the structure.
 
UNS8 getSDOfreeLine (CO_Data *d, UNS8 whoami, UNS8 *line)
 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.
 
UNS8 getSDOlineOnUse (CO_Data *d, UNS8 nodeId, UNS8 whoami, UNS8 *line)
 Search for the line, in the transfers array, which contains the beginning of the reception of a fragmented SDO.
 
UNS8 getSDOlineRestBytes (CO_Data *d, UNS8 line, UNS32 *nbBytes)
 Bytes in the line structure which must be transmited (or received)
 
UNS8 setSDOlineRestBytes (CO_Data *d, UNS8 line, UNS32 nbBytes)
 Store in the line structure the nb of bytes which must be transmited (or received)
 
UNS8 sendSDO (CO_Data *d, UNS8 whoami, s_SDO sdo)
 Transmit a SDO frame on the bus bus_id.
 
UNS8 sendSDOabort (CO_Data *d, UNS8 whoami, UNS8 nodeID, UNS16 index, UNS8 subIndex, UNS32 abortCode)
 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.
 
UNS8 processSDO (CO_Data *d, Message *m)
 Treat a SDO frame reception call the function sendSDO.
 
INLINE UNS8 _writeNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS32 count, UNS8 dataType, void *data, SDOCallback_t Callback, UNS8 endianize)
 Used to send a SDO request frame to write in a distant node dictionnary.
 
UNS8 writeNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS32 count, UNS8 dataType, void *data)
 Used to send a SDO request frame to write the data at the index and subIndex indicated.
 
UNS8 writeNetworkDictCallBack (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS32 count, UNS8 dataType, void *data, SDOCallback_t Callback)
 Used to send a SDO request frame to write in a distant node dictionnary.
 
UNS8 writeNetworkDictCallBackAI (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS32 count, UNS8 dataType, void *data, SDOCallback_t Callback, UNS8 endianize)
 Used to send a SDO request frame to write in a distant node dictionnary.
 
INLINE UNS8 _readNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, SDOCallback_t Callback)
 Used to send a SDO request frame to read.
 
INLINE UNS8 _readBlockNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 numberOfIndexes, UNS8 dataType, SDOCallback_t Callback)
 Used to send a SDO request frame to read in a distant node dictionnary.
 
UNS8 readBlockNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 size, UNS8 dataType)
 Used to send a SDO request frame to read in a distant node dictionnary.
 
UNS8 readNetworkDict (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType)
 Used to send a SDO request frame to read.
 
UNS8 readNetworkDictCallback (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, SDOCallback_t Callback)
 Used to send a SDO request frame to read in a distant node dictionnary.
 
UNS8 readNetworkDictCallbackAI (CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType, SDOCallback_t Callback)
 Used to send a SDO request frame to read in a distant node dictionnary.
 
UNS8 getReadResultNetworkDict (CO_Data *d, UNS8 nodeId, void *data, UNS32 *size, UNS32 *abortCode)
 Use this function after calling readNetworkDict to get the result.
 
UNS8 getWriteResultNetworkDict (CO_Data *d, UNS8 nodeId, UNS32 *abortCode)
 Use this function after calling writeNetworkDict function to get the result of the write.
 

Detailed Description

Function Documentation

◆ _readBlockNetworkDict()

INLINE UNS8 _readBlockNetworkDict ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 numberOfIndexes,
UNS8 dataType,
SDOCallback_t Callback )

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

Parameters
*dPointer on a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
dataType(defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value.
CallbackCallback function
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Definition at line 1808 of file sdo.c.

Referenced by readBlockNetworkDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _readNetworkDict()

INLINE UNS8 _readNetworkDict ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 dataType,
SDOCallback_t Callback )

Used to send a SDO request frame to read.

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
dataType(defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value.
Callback
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Definition at line 1699 of file sdo.c.

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _writeNetworkDict()

INLINE UNS8 _writeNetworkDict ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS32 count,
UNS8 dataType,
void * data,
SDOCallback_t Callback,
UNS8 endianize )

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

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
countnumber 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.
*dataPointer to data
CallbackCallback function
endiansize
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Normal transfert

Definition at line 1454 of file sdo.c.

Referenced by writeNetworkDict(), writeNetworkDictCallBack(), and writeNetworkDictCallBackAI().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ failedSDO()

UNS8 failedSDO ( CO_Data * d,
UNS8 nodeId,
UNS8 whoami,
UNS16 index,
UNS8 subIndex,
UNS32 abortCode )

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.

Parameters
*dPointer on a CAN object data structure
nodeId
whoami
index
subIndex
abortCode
Returns
0

Definition at line 326 of file sdo.c.

Referenced by processSDO().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getReadResultNetworkDict()

UNS8 getReadResultNetworkDict ( CO_Data * d,
UNS8 nodeId,
void * data,
UNS32 * size,
UNS32 * abortCode )

Use this function after calling readNetworkDict to get the result.

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
*dataPointer to the datas
*sizePointer to the size
*abortCodePointer to the abortcode. (0 = not available. Else : SDO abort code. (received if return SDO_ABORTED_RCV)
Returns
  • SDO_FINISHED // datas are available
  • SDO_ABORTED_RCV // Transfert failed (abort SDO received)
  • SDO_ABORTED_INTERNAL // Transfert failed (internal abort)
  • SDO_UPLOAD_IN_PROGRESS // Datas are not yet available
  • SDO_DOWNLOAD_IN_PROGRESS // Download is in progress

    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);
    #define UNS8
    Unsigned int8 representation in CANFest.
    Definition applicfg.h:25
    #define UNS32
    Unsigned int32 representation in CANFest.
    Definition applicfg.h:27
    UNS8 readNetworkDict(CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS8 dataType)
    Used to send a SDO request frame to read.
    Definition sdo.c:1936
    UNS8 getReadResultNetworkDict(CO_Data *d, UNS8 nodeId, void *data, UNS32 *size, UNS32 *abortCode)
    Use this function after calling readNetworkDict to get the result.
    Definition sdo.c:2054

Definition at line 2054 of file sdo.c.

Here is the call graph for this function:

◆ getSDOfreeLine()

UNS8 getSDOfreeLine ( CO_Data * d,
UNS8 whoami,
UNS8 * line )

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.

Parameters
*dPointer on a CAN object data structure
whoamiCreate the line for a SDO_SERVER or SDO_CLIENT.
*linePointer on a SDO line
Returns
0xFF if all the lines are on use. Else, return 0.

Definition at line 412 of file sdo.c.

Referenced by _readBlockNetworkDict(), _readNetworkDict(), _writeNetworkDict(), and processSDO().

Here is the caller graph for this function:

◆ getSDOlineOnUse()

UNS8 getSDOlineOnUse ( CO_Data * d,
UNS8 nodeId,
UNS8 whoami,
UNS8 * line )

Search for the line, in the transfers array, which contains the beginning of the reception of a fragmented SDO.

Parameters
*dPointer on a CAN object data structure
nodeIdcorrespond to the message node-id
whoamitakes 2 values : look for a line opened as SDO_CLIENT or SDO_SERVER
*linePointer on a SDO line
Returns
0xFF if error. Else, return 0

Definition at line 439 of file sdo.c.

Referenced by _readBlockNetworkDict(), _readNetworkDict(), _writeNetworkDict(), failedSDO(), getReadResultNetworkDict(), getWriteResultNetworkDict(), and processSDO().

Here is the caller graph for this function:

◆ getSDOlineRestBytes()

UNS8 getSDOlineRestBytes ( CO_Data * d,
UNS8 line,
UNS32 * nbBytes )

Bytes in the line structure which must be transmited (or received)

Parameters
*dPointer on a CAN object data structure
lineSDO line
*nbBytesPointer on nbBytes
Returns
0.

Definition at line 479 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ getWriteResultNetworkDict()

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

Use this function after calling writeNetworkDict function to get the result of the write.

It is mandatory to call this function because it is releasing the line used for the transfer.

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
*abortCodePointer to the abortcode
  • 0 = not available.
  • SDO abort code (received if return SDO_ABORTED_RCV)
Returns
:
  • SDO_FINISHED // datas are available
  • SDO_ABORTED_RCV // Transfert failed (abort SDO received)
  • SDO_ABORTED_INTERNAL // Transfert failed (Internal abort)
  • SDO_DOWNLOAD_IN_PROGRESS // Datas are not yet available
  • SDO_UPLOAD_IN_PROGRESS // Upload in progress

    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);
    UNS8 writeNetworkDict(CO_Data *d, UNS8 nodeId, UNS16 index, UNS8 subIndex, UNS32 count, UNS8 dataType, void *data)
    Used to send a SDO request frame to write the data at the index and subIndex indicated.
    Definition sdo.c:1583
    UNS8 getWriteResultNetworkDict(CO_Data *d, UNS8 nodeId, UNS32 *abortCode)
    Use this function after calling writeNetworkDict function to get the result of the write.
    Definition sdo.c:2120

Definition at line 2120 of file sdo.c.

Here is the call graph for this function:

◆ initSDOline()

UNS8 initSDOline ( CO_Data * d,
UNS8 line,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 state )

Initialize some fields of the structure.

Parameters
*dPointer on a CAN object data structure
line
nodeId
index
subIndex
state
Returns
0

Definition at line 379 of file sdo.c.

Referenced by _readBlockNetworkDict(), _readNetworkDict(), _writeNetworkDict(), processSDO(), and resetSDOline().

Here is the caller graph for this function:

◆ lineToSDO()

UNS8 lineToSDO ( CO_Data * d,
UNS8 line,
UNS32 nbBytes,
UNS8 * data )

Copy data from an existant line in the argument "* data".

Parameters
dPointer on a CAN object data structure
lineSDO line
nbBytes
*dataPointer on the data
Returns
0xFF if error. Else, returns 0.

Definition at line 266 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ objdictToSDOBlockline()

UNS32 objdictToSDOBlockline ( CO_Data * d,
UNS8 line,
UNS8 numberOfIndexes )

Copy the data from the object dictionary to the SDO line for a network transfert.

Parameters
*dPointer on a CAN object data structure
lineSDO line
Returns
SDO error code if error. Else, returns 0.

Definition at line 191 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ objdictToSDOline()

UNS32 objdictToSDOline ( CO_Data * d,
UNS8 line )

Copy the data from the object dictionary to the SDO line for a network transfert.

Parameters
*dPointer on a CAN object data structure
lineSDO line
Returns
SDO error code if error. Else, returns 0.

Definition at line 161 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ processSDO()

UNS8 processSDO ( CO_Data * d,
Message * m )

Treat a SDO frame reception call the function sendSDO.

Parameters
*dPointer on a CAN object data structure
*mPointer on a CAN message structure
Returns
code :
  • 0xFF if error
  • 0x80 if transfert aborted by the server
  • 0x0 ok

The server node Id;

The server node Id;

Definition at line 649 of file sdo.c.

Referenced by canDispatch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readBlockNetworkDict()

UNS8 readBlockNetworkDict ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 size,
UNS8 dataType )

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). First free SDO client parameter is automatically initialized for specific node if not already defined.

Parameters
*dPointer on a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
dataType(defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value.
Returns
  • 0 is returned upon success.
  • 0xFF is returned when error occurs.

Definition at line 1917 of file sdo.c.

Here is the call graph for this function:

◆ readNetworkDict()

UNS8 readNetworkDict ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 dataType )

Used to send a SDO request frame to read.

calls _readNetworkDict with Callback = NULL

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
dataType(defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value.
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Definition at line 1936 of file sdo.c.

Here is the call graph for this function:

◆ readNetworkDictCallback()

UNS8 readNetworkDictCallback ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 dataType,
SDOCallback_t Callback )

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). calls _readNetworkDict with Callback = Callback

Parameters
*dPointer on a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
dataType(defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value.
CallbackCallback function
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Definition at line 1958 of file sdo.c.

Here is the call graph for this function:

◆ readNetworkDictCallbackAI()

UNS8 readNetworkDictCallbackAI ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS8 dataType,
SDOCallback_t Callback )

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). First free SDO client parameter is automatically initialized for specific node if not already defined.

Parameters
*dPointer on a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
dataType(defined in objdictdef.h) : put "visible_string" for strings, 0 for integers or reals or other value.
CallbackCallback function
Returns
  • 0 is returned upon success.
  • 0xFF is returned when error occurs.

Definition at line 1979 of file sdo.c.

Here is the call graph for this function:

◆ resetSDO()

void resetSDO ( CO_Data * d)

Reset all SDO buffers.

Parameters
*dPointer on a CAN object data structure

Definition at line 120 of file sdo.c.

Referenced by switchCommunicationState().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetSDOline()

void resetSDOline ( CO_Data * d,
UNS8 line )

Reset an unused line.

Parameters
*dPointer on a CAN object data structure
lineSDO line

Definition at line 357 of file sdo.c.

Referenced by _readBlockNetworkDict(), _readNetworkDict(), _writeNetworkDict(), failedSDO(), processSDO(), resetSDO(), and SDOTimeoutAlarm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SDOlineToObjdict()

UNS32 SDOlineToObjdict ( CO_Data * d,
UNS8 line )

Copy the data received from the SDO line transfert to the object dictionary.

Parameters
*dPointer on a CAN object data structure
lineSDO line
Returns
SDO error code if error. Else, returns 0.

Definition at line 136 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ SDOTimeoutAlarm()

void SDOTimeoutAlarm ( CO_Data * d,
UNS32 id )

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

Parameters
*dPointer on a CAN object data structure
id

Definition at line 79 of file sdo.c.

Here is the call graph for this function:

◆ SDOtoLine()

UNS8 SDOtoLine ( CO_Data * d,
UNS8 line,
UNS32 nbBytes,
UNS8 * data )

Add data to an existant line.

Parameters
dPointer on a CAN object data structure
lineSDO line
nbBytes
*dataPointer on the data
Returns
0xFF if error. Else, returns 0.

Definition at line 294 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ sendSDO()

UNS8 sendSDO ( CO_Data * d,
UNS8 whoami,
s_SDO sdo )

Transmit a SDO frame on the bus bus_id.

Parameters
*dPointer on a CAN object data structure
whoamiTakes 2 values : SDO_CLIENT or SDO_SERVER
sdoSDO Structure which contains the sdo to transmit
Returns
canSend(bus_id,&m) or 0xFF if error.

Definition at line 517 of file sdo.c.

Referenced by _readBlockNetworkDict(), _readNetworkDict(), _writeNetworkDict(), processSDO(), and sendSDOabort().

Here is the caller graph for this function:

◆ sendSDOabort()

UNS8 sendSDOabort ( CO_Data * d,
UNS8 whoami,
UNS8 nodeID,
UNS16 index,
UNS8 subIndex,
UNS32 abortCode )

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.

Parameters
*dPointer on a CAN object data structure
whoamitakes 2 values : SDO_CLIENT or SDO_SERVER
nodeId
index
subIndex
abortCode
Returns
0

Definition at line 608 of file sdo.c.

Referenced by failedSDO(), and SDOTimeoutAlarm().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSDOlineRestBytes()

UNS8 setSDOlineRestBytes ( CO_Data * d,
UNS8 line,
UNS32 nbBytes )

Store in the line structure the nb of bytes which must be transmited (or received)

Parameters
*dPointer on a CAN object data structure
lineSDO line
nbBytes
Returns
0 if success, 0xFF if error.

Definition at line 499 of file sdo.c.

Referenced by processSDO().

Here is the caller graph for this function:

◆ writeNetworkDict()

UNS8 writeNetworkDict ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS32 count,
UNS8 dataType,
void * data )

Used to send a SDO request frame to write the data at the index and subIndex indicated.

calls _writeNetworkDict with Callback = NULL and endiansize = 1.

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
countnumber 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.
*dataPointer to data
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Definition at line 1583 of file sdo.c.

Here is the call graph for this function:

◆ writeNetworkDictCallBack()

UNS8 writeNetworkDictCallBack ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS32 count,
UNS8 dataType,
void * data,
SDOCallback_t Callback )

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). calls _writeNetworkDict with Callback = Callback and endiansize = 1.

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
countnumber 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.
*dataPointer to data
CallbackCallback function
Returns
  • 0 is returned upon success.
  • 0xFE is returned when no sdo client to communicate with node.
  • 0xFF is returned when error occurs.

Definition at line 1608 of file sdo.c.

Here is the call graph for this function:

◆ writeNetworkDictCallBackAI()

UNS8 writeNetworkDictCallBackAI ( CO_Data * d,
UNS8 nodeId,
UNS16 index,
UNS8 subIndex,
UNS32 count,
UNS8 dataType,
void * data,
SDOCallback_t Callback,
UNS8 endianize )

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). First free SDO client parameter is automatically initialized for specific node if not already defined.

Parameters
*dPointer to a CAN object data structure
nodeIdNode Id of the slave
indexAt index indicated
subIndexAt subIndex indicated
countnumber 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.
*dataPointer to data
CallbackCallback function
endianizeWhen not 0, data is endianized into network byte order when 0, data is not endianized and copied in machine native endianness
Returns
  • 0 is returned upon success.
  • 0xFF is returned when error occurs.

Definition at line 1635 of file sdo.c.

Here is the call graph for this function: