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

◆ PN_API_IOD_recordSetResponseAsync()

uint32_t PN_API_IOD_recordSetResponseAsync ( PN_API_IOD_Handle_t *const  pnHandle,
void **  requestHandle 
)

Informs Profinet stack that data provisioning will happen asynchronously.

Once the user application receives a record read/write request from the IO controller, it needs to send a response. Within the implementation of the read/write record callback function, the user application can decide either to send the response directly or to inform the stack (using this function) to expect the response later as an asynchronous action.

Parameters
[in]pnHandleProfinet API Handle.
[out]requestHandleRequest handle given by the stack to be used in response.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_ERR_PARAMInvalid parameter.
Example
#include "pn_api_iod_record.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
pnHandle = PN_API_IOD_new();
//Within the implementation of record read/write callback function
uint32_t status;
void* asyncHandle = NULL;
status = PN_API_IOD_recordSetResponseAsync(pnHandle, &asyncHandle);
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
uint32_t PN_API_IOD_recordSetResponseAsync(PN_API_IOD_Handle_t *const pnHandle, void **requestHandle)
Informs Profinet stack that data provisioning will happen asynchronously.
struct PN_API_IOD_Handle PN_API_IOD_Handle_t
API handle instance which holds IO device's info.
Definition pn_api_iod_types.h:61