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

◆ PN_API_IOD_paramEndCbf

typedef PN_API_IOD_SubmodStatus_t(* PN_API_IOD_paramEndCbf) (PN_API_IOD_Handle_t *const pnHandle, const uint16_t arNum, const uint16_t sessionKey, const uint32_t api, const uint16_t slot, const uint16_t subslot, const bool moreFollows)

Callback function prototype to notify the user application that the parameter assignment for all modules has been completed.

The user application is required to confirm this operation by using the PN_API_IOD_SubmodStatusRun return value, triggering the automatic transmission of the "application ready" message to the IO controller. In this scenario, there is no requirement for PN_API_IOD_asyncApplReady(). Conversely, if the user application is not ready, it can acknowledge this state with a return value of PN_API_IOD_SubmodStatusAppReadyFollows. Later, when ready, the application can call PN_API_IOD_asyncApplReady().

Parameters
[in]pnHandleProfinet API Handle.
[in]arNumAR number.
[in]sessionKeySession key.
[in]apiApplication Process Identifier.
[in]slotSlot number, can not be 0.
[in]subslotSubslot number, which can be:
0: paramEnd for all submodules.
not 0: paramEnd for the specific module.
[in]moreFollowsMore calls of this function for additional submodules is to be expected.
Returns
Submodule status as PN_API_IOD_SubmodStatus_t.
Return values
PN_API_IOD_SubmodStatusRunSuccess, generate "application ready".
PN_API_IOD_SubmodStatusStopSomething went wrong.
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
const uint16_t arNum, const uint16_t sessionKey, const uint32_t api,
const uint16_t slot, const uint16_t subslot, const bool moreFollows)
{...}
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_SubmodStatus_t
Submodule status.
Definition pn_api_iod_types.h:207
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
PN_API_IOD_SubmodStatus_t PN_APP_IOD_cbParamEnd(PN_API_IOD_Handle_t *const pnHandle, const uint16_t arNum, const uint16_t sessionKey, const uint32_t api, const uint16_t slot, const uint16_t subslot, const bool moreFollows)
Callback function to notify that the parameter assignment for all modules has been completed.
PN_API_IOD_paramEndCbf paramEnd
Definition pn_api_iod_callbacks.h:53
Structure representing a set of callbacks.
Definition pn_api_iod_callbacks.h:41