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

◆ EC_API_SLV_CBObjRead_t

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

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