PROFINET Device  v1.04.03

◆ PN_API_ETH_applyPermanentDcpData()

uint32_t PN_API_ETH_applyPermanentDcpData ( const PN_API_ETH_SPermanentDcpData_t pData_p)

Apply permanent DCP data of ethernet interface.

Typically called by factory reset or reset to factory callback.

Parameters
[in]pData_pPermanent DCP data of ethernet interface.
Returns
PN_API_ETH_EError_t as uint32_t
Return values
PN_API_ETH_eOK
PN_API_ETH_eERROR_WRONG_STATE
PN_API_ETH_eERROR_MISSING_PARAMETER_POINTER
Example
#include <PN_API_ETH.h>
uint32_t result;
APPL_SPermanentData_t *pPermanentData = APPL_getPermStorage ();
dcpData.ipAddress = pPermanentData->ipAddress;
dcpData.subnetMask = pPermanentData->subNetMask;
dcpData.gateway = pPermanentData->gateWayAddress;
dcpData.stationNameLength = pPermanentData->stationNameLength;
memcpy (dcpData.aStationName, pPermanentData->aStationName, pPermanentData->stationNameLength);
See also
PN_API_PDEV_start PN_API_PDEV_run
PN_API_ETH_SPermanentDcpData
Definition: PN_API_ETH.h:118
PN_API_ETH_SPermanentDcpData::aStationName
uint8_t aStationName[PN_API_ETH_MAX_STATION_NAME_LENGTH]
Definition: PN_API_ETH.h:123
PN_API_ETH_SPermanentDcpData::stationNameLength
uint16_t stationNameLength
Definition: PN_API_ETH.h:122
PN_API_ETH_SPermanentDcpData::ipAddress
uint32_t ipAddress
Definition: PN_API_ETH.h:119
PN_API_ETH_SPermanentDcpData::gateway
uint32_t gateway
Definition: PN_API_ETH.h:121
PN_API_ETH_SPermanentDcpData::subnetMask
uint32_t subnetMask
Definition: PN_API_ETH.h:120
PN_API_ETH_applyPermanentDcpData
uint32_t PN_API_ETH_applyPermanentDcpData(const PN_API_ETH_SPermanentDcpData_t *pData_p)
Apply permanent DCP data of ethernet interface.
Definition: PN_API_main.c:604