EtherCAT Slave
 
Loading...
Searching...
No Matches

◆ EC_API_SLV_CBObjWrite_t

typedef uint8_t(* EC_API_SLV_CBObjWrite_t) (void *pContext, uint16_t index, uint8_t subindex, uint32_t length, uint16_t *pData, uint8_t completeAccess)

Callback trigered by a SDO Download operation.

The function is called when the EtherCAT Master sends a object write request. If no callback function is registered then the value pointed to by pData is directly written to the object entry. If a callback function is registered it is the reponsability of the callback function to copy the value pointed to by pData to object entry.

Parameters
[in]pContextfunction context
[in]indexIndex of the requested object.
[in]subindexSubIndex of the requested object.
[in]lengthLength of the received data buffer.
[in]pDataPointer to the data buffer.
[in]completeAccessWrite all subIndexes of the object.
Returns
result of the download operation. Set 0 if operation succeeded or an abort code declared on the Beckhoff Slave Stack (ABORTIDX_ in sdoserv.h).