EtherNet/IP™ Adapter  1.04.06
User Reference Manual

◆ EI_API_ADP_setPortLogSyncInterval()

uint32_t EI_API_ADP_setPortLogSyncInterval ( T pAdp_p,
int16_t  portLogSyncInterval_p 
)

Set the PortLogSyncInterval in attribute of the Time Sync object of the adapter (Instance Attribute ID: 15).

Function that sets the PortLogSyncInterval value for the adapter selected by parameter pAdp_p. Within the PortLogSyncIntervalCfg structure (attribute 15) this value specifies the PTP sync interval between successive Sync messages issued by a master clock on each PTP port of the device. The units of the PortLogSyncInterval member are log base 2 seconds. The datatype of PortLogSyncInterval is int16_t (INT). The permitted value range is between -3 and 2.

Note
The A port's PortLogSyncInterval member should be less than or equal to its PortLogAnnounceInterval member.
Parameters
[in]pAdp_pPointer to the adapter.
[in]portLogSyncInterval_pint16_t value of PTP Sync frame interval.
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 portLogSyncInterval in attribute 15 of the Time Sync object
int16_t portLogSyncInterval = 1;
errCode = EI_API_ADP_setPortLogSyncInterval(pEI_API_ADP, portLogSyncInterval);
See also
EI_API_ADP_getPortLogSyncInterval EI_API_ADP_EError_t
EI_API_ADP_setPortLogSyncInterval
ETHIP_API uint32_t EI_API_ADP_setPortLogSyncInterval(T *pAdp_p, int16_t portLogSyncInterval_p)
Set the PortLogSyncInterval in attribute of the Time Sync object of the adapter (Instance Attribute I...
Definition: EI_API_ADP_main.c:2360
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