EtherCAT Slave  1.06.01

◆ EC_API_SLV_CBObjWrite_t

typedef uint8_t(* EC_API_SLV_CBObjWrite_t) (void *pContext_p, uint16_t index_p, uint8_t subindex_p, uint32_t length_p, uint16_t *pData_p, uint8_t completeAccess_p)

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]pContext_pfunction context
[in]index_pIndex of the requested object.
[in]subindex_pSubIndex of the requested object.
[in]length_pLength of the received data buffer.
[in]pData_pPointer to the data buffer.
[in]completeAccess_pWrite 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).