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

◆ PN_API_IOD_readyForInputUpdateCbf

typedef void(* PN_API_IOD_readyForInputUpdateCbf) (PN_API_IOD_Handle_t *const pnHandle, const uint16_t arNum, const PN_API_IOD_InputUpdateState_t inputUpdateState)

Callback function prototype to notify the user application that the stack is ready to receive the first valid input data.

Prior to sending a "application ready" message to the participating submodule, the Profinet stack calls this function either after establishing a connection or after plugging and reconfiguring an operational submodule. Its purpose is to alert the user application to the necessity to write valid input data within this callback.

Parameters
[in]pnHandleProfinet API Handle.
[in]arNumAR number.
[in]inputUpdateStateInput update state (see PN_API_IOD_InputUpdateState_t).
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 uint16_t arNum,
const PN_API_IOD_InputUpdateState_t inputUpdateState)
{...}
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_InputUpdateState_t
Input update state.
Definition pn_api_iod_types.h:182
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_cbReadyForInputUpdate(PN_API_IOD_Handle_t *const pnHandle, const uint16_t arNum, const PN_API_IOD_InputUpdateState_t inputUpdateState)
Callback function to notify that the stack is ready to receive the first valid input data.
PN_API_IOD_readyForInputUpdateCbf readyForInputUpdate
Definition pn_api_iod_callbacks.h:63
Structure representing a set of callbacks.
Definition pn_api_iod_callbacks.h:41