CDM_Set_Attribute
This is the local CDM entry point responsible for setting
attribute information for a specific attribute.
- Thread Context:Non-Blocking
Syntax
LONG CDM_Set_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 cdmBindHandle during the context of CDM_Inquiry when it 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 CDM_Set_Attribute finds the information regarding the desired
setting of the selected attribute.
- infoBufferLength
- (IN) Size of the infoBuffer in
bytes.
- attributeID
- (IN) The ID of the attribute to be set. 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.
Remarks
CDM_Set_Attribute is the entry point from
which NWPA can set a registered device attribute 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 set-attribute function with each call
to CDI_Register_Object_Attribute. Therefore,
the CDM can implement either one function to handle all set-attribute
calls, or distribute the calls through multiple functions. This
guide uses CDM_Set_Attribute generically to refer
to either case.