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

◆ PN_API_IOD_reportArFsuRecordCbf

typedef void(* PN_API_IOD_reportArFsuRecordCbf) (PN_API_IOD_Handle_t *const pnHandle, const uint8_t arFsuEnabled, const uint8_t arFsuChanged)

Callback function prototype to notify the user application about an AR FSU update.

Upon receiving a new ARFSU write record, the Profinet stack calls this function. If the ARFSU_UUID (Universal Unique IDentifier) kept in the NV memory has changed, or if FSU has been enabled, it notifies the user program.

Parameters
[in]pnHandleProfinet API Handle.
[in]arFsuEnabledPN_API_IOD_ARFSU_ENABLED or PN_API_IOD_ARFSU_DISABLED.
[in]arFsuChangedPN_API_IOD_ARFSU_CHANGED or PN_API_IOD_ARFSU_NOT_CHANGED.
Example
#include "pn_api_iod_callbacks.h"
#include "pn_api_iod_communication.h"
#include "pn_api_iod_startup.h"
//Implement the callback function in the user application
PN_API_IOD_Handle_t *const pnHandle,
const uint8_t arFsuEnabled,
const uint8_t arFsuChanged)
{...}
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.
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
void PN_APP_IOD_cbReportArFSURecord(PN_API_IOD_Handle_t *const pnHandle, const uint8_t arFsuEnabled, const uint8_t arFsuChanged)
Callback function to notify about an AR FSU update.
PN_API_IOD_reportArFsuRecordCbf reportArFsuRecord
Definition pn_api_iod_callbacks.h:58
Structure representing a set of callbacks.
Definition pn_api_iod_callbacks.h:41