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

◆ PN_API_IOD_resetToFactoryCbf

typedef uint32_t(* PN_API_IOD_resetToFactoryCbf) (PN_API_IOD_Handle_t *const pnHandle, const PN_API_IOD_RtfOption_t rtfOption)

Callback function prototype to reset IO device to factory settings.

When the stack receives a "reset to factory settings" DCP request from the IO controller, it calls this callback function which needs to be implemented by the user application to reset the IO device settings to the factory defaults.

Parameters
[in]pnHandleProfinet API Handle.
[in]rtfOptionReset option (data to be reset).
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
Example
#include "pn_api_iod_callbacks.h"
#include "pn_api_iod_settings.h"
#include "pn_api_iod_startup.h"
//Implement the callback function in the user application
const PN_API_IOD_RtfOption_t rtfOption)
{...}
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t status;
pnHandle = PN_API_IOD_new();
//Store callback functions implemented by the user application
...}
//Register callback function
status = PN_API_IOD_registerCallbacks(pnHandle, &callbacks);
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
uint32_t PN_API_IOD_registerCallbacks(PN_API_IOD_Handle_t *const pnHandle, PN_API_IOD_Callbacks_t *callbacksInst)
Register callback functions.
PN_API_IOD_RtfOption_t
Reset To Factory option.
Definition pn_api_iod_types.h:310
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_cbResetToFactory(PN_API_IOD_Handle_t *const pnHandle, const PN_API_IOD_RtfOption_t rtfOption)
Callback function to reset IO device to factory settings.
PN_API_IOD_resetToFactoryCbf resetToFactory
Definition pn_api_iod_callbacks.h:45
Structure representing a set of callbacks.
Definition pn_api_iod_callbacks.h:41