PROFINET Device4.2.0
 
Loading...
Searching...
No Matches

◆ PN_APP_IOD_cbRecordRead()

uint32_t PN_APP_IOD_cbRecordRead ( PN_API_IOD_Handle_t *const  pnHandle,
uint32_t  api,
uint16_t  arNum,
uint16_t  sessionKey,
uint32_t  sequenceNum,
const PN_API_IOD_DevAddr_t *const  addr,
uint32_t  recordIndex,
uint32_t *  bufLen,
uint8_t *  buffer,
PN_API_IOD_ErrState_t errState 
)

Callback function to read user record data requested by the IO controller.

This function first checks if the asynchronous record read mode is activated. If not, it reads the record data from the corresponding array element and stores it in the buffer returned to Profinet stack. Otherwise, it sends a notification to the stack informing it that the read response will follow later.

Parameters
[in]pnHandleProfinet API Handle.
[in]apiApplication Process Identifier.
[in]arNumAR number.
[in]sessionKeyAR session key.
[in]sequenceNumSequence number.
[in]addrGeographical address (slot/subslot) of the module/submodule.
[in]recordIndexIndex of the record.
[in]bufLenLength of data to read.
[in]bufferBuffer to store the read data.
[in,out]errStateProfinet status.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_NOT_OKSomething went wrong.
PN_API_ERR_PARAMInvalid parameter.
See also
PN_API_IOD_recordReadCbf