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

◆ PN_API_IOD_deactivateCyclicDataExchange()

uint32_t PN_API_IOD_deactivateCyclicDataExchange ( PN_API_IOD_Handle_t *const  pnHandle)

Dectivates the exchange of IO data between the user application and Profinet stack for all ARs (RT, IRT).

This function prevents the Profinet stack from sending event information to the user application upon completing the transmission or reception of an RTC frame. i.e. it stops the process initiated using PN_API_IOD_activateCyclicDataExchange().

Remarks
If this function is called, the IO data exchange between the IO device and IO controller would still take place but on the stack level (isolated from the user application). This means, the cyclic exchange will continue but the values of input/output data won't be up to date.
Parameters
[in]pnHandleProfinet API Handle.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_NOT_OKSomething went wrong.
Example
#include "pn_api_iod_data.h"
#include "pn_api_iod_startup.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t status;
pnHandle = PN_API_IOD_new();
//Prepare and call PN_API_IOD_startup()
...
//Implement PN_API_IOD_dataWriteCbf in the user application
//Implement PN_API_IOD_dataReadCbf in the user application
...
//Register callback functions
...
status = PN_APP_IOD_initCyclicDataExchange(pnHandle); //as an example
...
uint32_t PN_API_IOD_deactivateCyclicDataExchange(PN_API_IOD_Handle_t *const pnHandle)
Dectivates the exchange of IO data between the user application and Profinet stack for all ARs (RT,...
uint32_t PN_API_IOD_activateCyclicDataExchange(PN_API_IOD_Handle_t *const pnHandle)
Activates the exchange of IO data between the user application and Profinet stack for all ARs (RT,...
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
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
uint32_t PN_APP_IOD_initCyclicDataExchange(PN_API_IOD_Handle_t *const pnHandle)
Initiates continuous exchange of IO data between the user application and Profinet stack for all ARs ...