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

◆ PN_API_IOD_getLastError()

uint32_t PN_API_IOD_getLastError ( PN_API_IOD_Handle_t *const  pnHandle)

Provides to the application a greater deteiled error value.

The value, saved as a result of the last CM request, is converted into a user-error number.

Parameters
[in]pnHandleProfinet API Handle.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_NOT_OKSomething went wrong.
PN_API_ERR_PARAMInvalid parameter.
seeError.
Example
#include "pn_api_iod_utils.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t error;
pnHandle = PN_API_IOD_new();
error = PN_API_IOD_getLastError(pnHandle);
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_API_IOD_getLastError(PN_API_IOD_Handle_t *const pnHandle)
Provides to the application a greater deteiled error value.