EtherNet/IP™ Adapter  1.02.01
User Reference Manual

◆ EI_API_ADP_setRevision()

uint32_t EI_API_ADP_setRevision ( T *  pAdp_p,
EI_API_ADP_SRevision_t  revision_p 
)

Set the adapter revision (Instance Attribute ID: 4).

Function that sets the revision of the adapter selected by parameter pAdp_p. The revision is divided into major and minor revision number, each of type uint8_t. The Major Revision is limited to values between 1 and 127, bit 7 of the major revision field (for values 128 to 255) is reserved by CIP and shall have a value of zero.

Parameters
[in]pAdp_pPointer to the adapter.
[in]revision_pStructure with new revision.
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 major revision to 2 and minor revision to 1
revision.major = 0x01;
revision.minor = 0x02;
errCode = EI_API_ADP_setRevision(pEI_API_ADP, revision);
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_setRevision(T *pAdp_p, EI_API_ADP_SRevision_t revison_p)
Set the adapter revision (Instance Attribute ID: 4).
Definition: EI_API_ADP_main.c:1350
uint8_t major
Definition: EI_API_ADP.h:127
uint8_t minor
Definition: EI_API_ADP.h:129
Definition: EI_API_ADP.h:126
See also
EI_API_ADP_getRevision EI_API_ADP_SRevision_t EI_API_ADP_EError_t