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

◆ PN_API_IOD_setDeviceVersionNumber()

uint32_t PN_API_IOD_setDeviceVersionNumber ( const PN_API_IOD_Handle_t *const  pnHandle,
const char *const  prefix,
const uint32_t  hh,
const uint32_t  h,
const uint32_t  l,
const uint32_t  ll 
)

Momentarily sets device version number within the Profinet stack.

Sets device version numbern and sends the new value to Profinet stack to be used. However, the modified values are not retained within the NV memory, so they are lost after device restarts.

Warning
Must be called only when no AR is running.
Parameters
[in]pnHandleProfinet API Handle.
[in]prefixPrefix of the versions info (e.g. R for release).
[in]hhProject versions info.
[in]hIncrement versions info.
[in]lIntegration version info.
[in]llGeneration version info.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_NOT_OKSomething went wrong or an AR is running.
PN_API_ERR_PARAMInvalid parameter.
Example
#include "pn_api_iod_settings.h"
#include "pn_api_iod_startup.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t status;
pnHandle = PN_API_IOD_new();
status = PN_API_IOD_setDeviceVersionNumber(pnHandle, "V", 4, 1, 1, 0);
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
uint32_t PN_API_IOD_setDeviceVersionNumber(const PN_API_IOD_Handle_t *const pnHandle, const char *const prefix, const uint32_t hh, const uint32_t h, const uint32_t l, const uint32_t ll)
Momentarily sets device version number within the Profinet stack.
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