OpenScanDeviceLib
OpenScan Device Programming Interface
Data Fields
OScDev_ModuleImpl Struct Reference

The module implementation function table. More...

#include <OpenScanDeviceLib.h>

Data Fields

OScDev_Error(* Close )(void)
 Called after OpenScanLib has finished accessing this module. More...
 
const char * displayName
 Human-readable name of this module. More...
 
OScDev_Error(* GetDeviceImpls )(OScDev_PtrArray **deviceImpls)
 Return the device implementations available in this module. More...
 
OScDev_Error(* Open )(void)
 Called before OpenScanLib accesses any other functions in this module. More...
 
const bool supportsRichErrors
 Whether the device module supports RichErrors.
 

Detailed Description

The module implementation function table.

Modules define an instance of this struct using the macro OScDev_MODULE_IMPL.

Fields marked Optional can be left NULL. Required fields must be set.

See also
OScDev_MODULE_IMPL

Definition at line 449 of file OpenScanDeviceLib.h.

Field Documentation

◆ displayName

const char* displayName

Human-readable name of this module.

Implementations should set this to a string constant.

Note that this should be a human-readable name (e.g. "OpenScan NIDAQ"). The module name for programmatic access is taken from the module's filename and is not affected by this string.

Required, must not be NULL.

Definition at line 460 of file OpenScanDeviceLib.h.

◆ Open

OScDev_Error(* Open) (void)

Called before OpenScanLib accesses any other functions in this module.

This can be used, for example, to dynamically load a device SDK library or to initialize an SDK library.

Optional

Definition at line 480 of file OpenScanDeviceLib.h.

◆ Close

OScDev_Error(* Close) (void)

Called after OpenScanLib has finished accessing this module.

This can be used, for example, to uninitialize a device SDK library if required.

Optional

Definition at line 489 of file OpenScanDeviceLib.h.

◆ GetDeviceImpls

OScDev_Error(* GetDeviceImpls) (OScDev_PtrArray **deviceImpls)

Return the device implementations available in this module.

A device implementation defines the code to handle a particular type of device. Many modules will only have one device implementation.

Required

deviceImpls must be an array of struct OScDev_DeviceImpl objects. OpenScanLib takes ownership of the array (unless the array is statically defined). The device implementation objects must remain valid while this module remains loaded (i.e. indefinitely since we do not support unloading).

Definition at line 504 of file OpenScanDeviceLib.h.


The documentation for this struct was generated from the following file: