|
|
udi_instance_attr_list_t(3udi)
Enumeration instance attribute list
#include <udi.h>typedef struct { char attr_name[UDI_MAX_ATTR_NAMELEN]; udi_ubit8_t attr_value[UDI_MAX_ATTR_SIZE]; udi_ubit8_t attr_length; udi_instance_attr_type_t attr_type; } udi_instance_attr_list_t; /* Instance attribute limits */#define UDI_MAX_ATTR_NAMELEN 32 #define UDI_MAX_ATTR_SIZE 64MEMBERS attr_name is the name of the instance attribute.
attr_value is the value of this instance attribute.
attr_length is the valid length (in bytes) of the attr_value and must not be zero.
attr_type is the attribute type as specified for udi_instance_attr_type_t. Must not be UDI_ATTR_NONE or UDI_ATTR_FILE.
DESCRIPTION The udi_instance_attr_list_t structure is used to hold a value used to pre-load an enumeration instance attribute. The MA allocates space for a contiguous array of these structures as a movable memory block in order to provide information describing a child instance in an enumeration operation (see "Enumeration Operations").
If attr_type is UDI_ATTR_UBIT32, the 32-bit value is encoded as a little-endian value in the first four bytes of attr_value, and attr_length must be 4. In this case, UDI_ATTR32_SET and UDI_ATTR32_GET must be used to access attr_value, or UDI_ATTR32_INIT must be used to statically initialize such a value before copying it into this structure.
REFERENCES udi_mem_alloc, udi_instance_attr_type_t, UDI_ATTR32_SET, UDI_ATTR32_GET, UDI_ATTR32_INIT