NPA_Register_CDM_Module
Registers a CDM with NWPA.
- Thread Context:Non-Blocking
- Requirements:This function is
the first API called during CDM_Load. Additionally, the
module must provide the storage locations for the outputs it receives
during this call.
Syntax
LONG NPA_Register_CDM_Module (
LONG *npaHandle,
LONG novellAssignedModuleID,
LONG loadHandle,
LONG (*CDM_Check_Option)(),
LONG (*CDM_Execute_CDMMessage)(),
LONG (*CDM_Inquiry)(),
LONG instance
);
Parameters
- npaHandle
- (OUT) Receives a unique NWPA handle for the CDM
module. This handle is a tag NWPA uses to track the CDM module,
and it is a required argument for using the NPA APIs.
- novellAssignedModuleID
- (IN) Unique ID for this CDM. These IDs are assigned
to a vendor upon request from Developer Services.
- loadHandle
- (IN) Handle that the OS assigned to the CDM at load
time. The value for this parameter was passed into the CDM's load-time
entry point, CDM_Load.
- CDM_Check_Option
- (IN) Points to the CDM_Check_Option entry point called during the parsing
of load-time command line options and again at option registration.
For a CDM, command line options should indicate only operational
modes for the software module. They must not indicate hardware options
such as interrupts, ports, or DMA channels. If the CDM does not
support command line options, this parameter should be set to zero.
- CDM_Execute_CDMMessage
- (IN) Points to the CDM_Execute_CDMMessage function, which is the CDM's main entry
point for receiving and routing CDM messages.
- CDM_Inquiry
- (IN) Points to the CDM_Inquiry entry point, which is the CDM's function
for checking device information and determining whether or not to
bind to a device.
- instance
- (IN) A CDM-generated number identifying a device
instance. NWPA uses this number to associate different groups of
options with a particular device being managed by the CDM.
This value must be ORed with 0x00010000 if the CDM is multi
processor enabled.
If the CDM does not support command line options, this parameter
should be set to zero.
Return Values
The following table lists return values and descriptions.
Remarks
NPA_Register_CDM_Module is used
to register the CDM module with the NPA, along with the application's
entry points. This function should be the first API called during
the module's load-time entry point, CDM_Load. It is during the context of this API
that the CDM receives its unique NWPA handle. This handle is a necessary
argument for using the other NPA APIs that provide system resources
to the module.