EtherCAT Slave  1.06.01

◆ EC_API_SLV_CBObjRead_t

typedef uint8_t(* EC_API_SLV_CBObjRead_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 Upload operation.

The function is called when the EtherCAT Master sends a object read request. If no callback function is registered then the value contained in the object is returned. If a callback function is registered it is the reponsability of the callback function to update the value pointed to by pData. pData is returned within the SDO Response datagram.

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_pRead all subIndexes of the object.
Returns
result of the upload operation. Set 0 if operation succeeded or an abort code declared on the Beckhoff Slave Stack (ABORTIDX_ in sdoserv.h).