EtherNet/IP™ Adapter  1.02.01
User Reference Manual

◆ EI_API_ADP_setProductName()

uint32_t EI_API_ADP_setProductName ( T *  pAdp_p,
const char *  pProductName_p 
)

Set the adapter product name (Instance Attribute ID: 7).

Function to set the product name of the adapter selected by parameter pAdp_p.

Remarks
The maximum length of the product name is set to 32. If parameter productName exceeds 32 characters it will be truncated before being written to the internal adapter structures and a warning EI_API_ADP_eERR_LENGTH is returned.
Parameters
[in]pAdp_pPointer to the adapter.
[in]pProductName_pNew product name as NULL (\0) terminated cstring.
Returns
EI_API_ADP_EError_t as uint32_t value.
Return values
EI_API_ADP_eERR_OKSuccess.
EI_API_ADP_eERR_GENERALGeneral error.
EI_API_ADP_eERR_LENGTHIllegal parameter length, parameter pProductName_p is truncated.
Example
#include <api/EI_API.h>
EI_API_ADP_T* pEI_API_ADP = NULL;
uint32_t errCode;
uint8_t numInterfaces = 1;
char aProductName[] = "This is our product name";
pEI_API_ADP = EI_API_ADP_new(numInterfaces);
errCode = EI_API_ADP_setProductName(pEI_API_ADP, aProductName);
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_setProductName(T *pAdp_p, const char *pProductName_p)
Set the adapter product name (Instance Attribute ID: 7).
Definition: EI_API_ADP_main.c:1622
See also
EI_API_ADP_getProductName EI_API_ADP_EError_t