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

◆ PN_APP_IOD_cbRecordWrite()

uint32_t PN_APP_IOD_cbRecordWrite ( 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,
const uint32_t *  bufLen,
const uint8_t *  buffer,
PN_API_IOD_ErrState_t errState 
)

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

This function first checks if the asynchronous record write mode is activated. If not, it writes the record data from the buffer provided by Profinet stack to the corresponding array element. Otherwise, it sends a notification to the stack informing it that the write 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 write.
[in]bufferBuffer containing data to be written.
[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_recordWriteCbf