EtherNet/IP™ Adapter  1.04.06
User Reference Manual

◆ EI_API_CIP_getAttr_uint()

uint32_t EI_API_CIP_getAttr_uint ( T pCipNode_p,
uint16_t  classId_p,
uint16_t  instanceId_p,
uint16_t  attrId_p,
ei_api_cip_edt_uint *  pValue_p 
)

Get attribute of type UINT.

This function returns the attribute value of the CIP specified elementary data type UINT.

Parameters
[in]pCipNode_pPointer to the CIP node.
[in]classId_pClass identifier.
[in]instanceId_pInstance identifier.
[in]attrId_pAttribute identifier.
[out]pValue_pPointer to store the value of an attribute of type ei_api_cip_edt_uint.
Returns
EI_API_CIP_EError_t as uint32_t value.
Return values
EI_API_CIP_eERR_OKSuccess.
EI_API_CIP_eERR_GENERALGeneral CIP error.
EI_API_CIP_eERR_NODE_INVALIDCIP node is invalid, possibly EI_API_CIP_NODE_new() was not called.
EI_API_CIP_eERR_CLASS_DOES_NOT_EXISTClass does not exists in CIP node dictionary.
EI_API_CIP_eERR_INSTANCE_DOES_NOT_EXISTInstance does not exist in CIP node dictionary.
EI_API_CIP_eERR_ATTRIBUTE_DOES_NOT_EXISTAttribute does not exist in class or instance.
EI_API_CIP_eERR_ATTRIBUTE_INVALID_VALUEInvalid data pointer.
EI_API_CIP_eERR_ATTRIBUTE_INVALID_TYPEAttribute type is invalid.
EI_API_CIP_eERR_ATTRIBUTE_UNKNOWN_STATEUnknown state during attribute operation reached.
Example
#include <api/EI_API.h>
// Elementary data type UINT
ei_api_cip_edt_uint attrUintValue;
uint32_t errCode;
classId = 0x0064;
instanceId = 0x0001;
attrId = 0x0002;
// Get attribute with identifier 0x0002 from class 0x0064 and instance 0x0001
errCode = EI_API_CIP_getAttr_uint(pEI_API_CIP_NODE, classId, instanceId, attrId, &attrUintValue);
See also
EI_API_CIP_setAttr_uint ei_api_cip_edt_uint EI_API_CIP_EError_t
EI_API_CIP_getAttr_uint
ETHIP_API uint32_t EI_API_CIP_getAttr_uint(T *pCipNode_p, uint16_t classId_p, uint16_t instanceId_p, uint16_t attrId_p, ei_api_cip_edt_uint *pValue_p)
Get attribute of type UINT.
Definition: EI_API_CIP_main.c:3006