EtherNet/IP™ Adapter  1.04.06
User Reference Manual

◆ EI_API_ADP_setTimeSyncUserDescription()

uint32_t EI_API_ADP_setTimeSyncUserDescription ( T pAdp_p,
const char *  pUserDescription_p 
)

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

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

  • A user defined name or description of the device followed by a semicolon.
  • A user defined physical location of the device.

For example: Sensor-1; Section-7 Cabinet-2 Rack-3 The format is UTF-8 Unicode. The maximum number of symbols is 128.

Parameters
[in]pAdp_pPointer to the adapter.
[in]pUserDescription_pNew User Description 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_TIMESYNC_WRONG_FORMATFormat error. User description must include a semicolon. E.g. Sensor-1; Section-7 Cabinet-2 Rack-3
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 user description in the Time Sync object
char userDecription[128] = "Sensor-1; Rack-1";
errCode = EI_API_ADP_setTimeSyncUserDescription(pEI_API_ADP, userDecription);
See also
EI_API_ADP_getTimeSyncUserDescription EI_API_ADP_EError_t
EI_API_ADP_setTimeSyncUserDescription
ETHIP_API uint32_t EI_API_ADP_setTimeSyncUserDescription(T *pAdp_p, const char *pUserDescription_p)
Set the Description member of UserDescription attribute of the Time Sync object of the adapter (Insta...
Definition: EI_API_ADP_main.c:3128
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