EtherNet/IP™ Adapter  1.02.01
User Reference Manual

◆ EI_API_ADP_setDeviceType()

uint32_t EI_API_ADP_setDeviceType ( T *  pAdp_p,
uint16_t  deviceType_p 
)

Set the adapter device type (Instance Attribute ID: 2).

Function that sets the device type of the adapter selected by parameter pAdp_p. For a list of defined public device profiles and their device type see THE CIP NETWORKS LIBRARY Volume 1: Common Industrial Protocol Specification, Chapter 6: Device Profiles.

Parameters
[in]pAdp_pPointer to the adapter.
[in]deviceType_pNew device type.
Returns
EI_API_ADP_EError_t as uint32_t value.
Return values
EI_API_ADP_eERR_OKSuccess.
EI_API_ADP_eERR_GENERALGeneral error.
Example
#include <api/EI_API.h>
EI_API_ADP_T* pEI_API_ADP = NULL;
uint32_t errCode;
uint8_t numInterfaces = 1;
pEI_API_ADP = EI_API_ADP_new(numInterfaces);
// Set device type to Communication Adapter according to
// Volume 1: Common Industrial Protocol Specification,
// Chapter 6: Device Profiles
uint16_t deviceType = 0x000C;
errCode = EI_API_ADP_setDeviceType(pEI_API_ADP, deviceType);
ETHIP_API T * EI_API_ADP_new(uint8_t numInterfaces_p)
Create a new EtherNet/IP adapter.
Definition: EI_API_ADP_main.c:195
ETHIP_API uint32_t EI_API_ADP_setDeviceType(T *pAdp_p, uint16_t deviceType_p)
Set the adapter device type (Instance Attribute ID: 2).
Definition: EI_API_ADP_main.c:1080
See also
EI_API_ADP_getDeviceType EI_API_ADP_EError_t