CDM_Get_Attribute

The CDM entry point from which applications can retrieve attribute information for a specific attribute.

Thread Context:Non-Blocking

Syntax

    LONG CDM_Get_Attribute (
       LONG   cdmBindHandle,
       void  *infoBuffer,
       LONG   infoBufferLength,
       LONG   attributeID
       );
    
    

Parameters

cdmBindHandle
(IN) NWPA passes the value of this parameter, which is a handle to the device being targeted by the CDM message request (CDMMessageStruct).

The CDM generated the value of BindHandle during the context of CDM_Inquiry when it bound to the device.

The CDM bound to the device by calling CDI_Bind_CDM_To_Object. From this handle, the CDM locates the target device's information including the HAM-generated deviceHandle and the NWPA-generated npaBusID.

infoBuffer
(IN) This points to where the information associated with the attribute being retrieved is stored by CDM_Get_Attribute.
infoBufferLength
(IN) Size of the infoBuffer in bytes.
attributeID
(IN) The ID of the attribute selected. This is the ID that was registered by the CDM for this attribute during CDI_Register_Object_Attribute.

Return Values

The following table lists return values and descriptions.

zero

Successful

nonzero

Unsuccessful

Remarks

CDM_Get_Attribute is the entry point from which NWPA can retrieve registered device attribute information for an application. This entry point gets registered with NWPA when the CDM registers the attribute by calling CDI_Register_Object_Attribute.

The CDM registers a get-attribute function with each call to CDI_Register_Object_Attribute. Therefore, the CDM can implement either one function to handle all get-attribute calls, or distribute the calls through multiple functions. This guide uses CDM_Get_Attribute generically to refer to either case.