EtherNet/IP™ Adapter  1.04.06
User Reference Manual

◆ EI_API_ADP_setTimeSyncProductDescription()

uint32_t EI_API_ADP_setTimeSyncProductDescription ( T pAdp_p,
const char *  pProductDesc_p 
)

Set the Description member of the ProductDescription attribute of the Time Sync object of the adapter (Instance Attribute ID: 21).

Function that sets the Description member of ProductDescription attribute of the Time Sync object of the adapter selected by parameter pAdp_p. ProductDescription specifies the product description of the device that contains the clock. The format is:

  • The name of manufacture of the device followed by a semicolon.
  • The model number of the device followed by a semicolon.
  • The serial number.

For example: ACME Manufacturing;C2901;123456 The format is UTF-8 Unicode. The maximum number of symbols is 64.

Remarks
The maximum length of the product description is set to 64. If parameter pProductDesc_p exceeds 64 characters an error EI_API_ADP_eERR_LENGTH is returned. The format must be like the format described above. Otherwise it is returned EI_API_ADP_eERR_TIMESYNC_WRONG_FORMAT.
Parameters
[in]pAdp_pPointer to the adapter.
[in]pProductDesc_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.
EI_API_ADP_eERR_TIMESYNC_WRONG_FORMATFormat not accepted. E.g. format "ACME Manufacturing;C2901;123456"
Example
#include <api/EI_API.h>
EI_API_ADP_T* pEI_API_ADP = NULL;
uint32_t errCode;
uint8_t numInterfaces = 1;
char productDescrition[] = "ACME Manufacturing;C2901;123456";
pEI_API_ADP = EI_API_ADP_new(numInterfaces);
errCode = EI_API_ADP_setProductName(pEI_API_ADP, productDescrition);
See also
EI_API_ADP_getTimeSyncProductDescription EI_API_ADP_EError_t
EI_API_ADP_new
ETHIP_API T * EI_API_ADP_new(uint8_t numInterfaces_p)
Create a new EtherNet/IP adapter.
Definition: EI_API_ADP_main.c:235
EI_API_ADP_setProductName
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:1675