© 2011 Thorlabs
127Computer Interface
This interface must be included in your application:
#include "IBeamProfiler.h"
To load modules, a QPluginLoader is used. It looks up in all libraries in the
addressed folder for QT plug-in interface and attempts to load the plug-ins:
QPluginLoader loader(fileName);
QObject *plugin = loader.instance();
If the plug-in has been loaded, the interface IBeamProfiler can be extracted from the
module:
IBeamProfiler* deviceClass = qobject_cast
<IBeamProfiler*>(plugin);
Now, all functions can be accessed via the interface.
The function deviceList() generates a list of all connected devices:
const QList<DEVICE_SETTINGS>* deviceList =
deviceClass->deviceList();
Device Settings include the essential device parameters. Not all beam profiler
devices support all Device Settings parameters. Some parameters are valid only for
the Camera beam profiler BC106* (Trigger, Exposure, Gain, Corrections), other
parameters only for the Scanning Slit beam profiler BP10x (Target Resolution, Scan
Rate, Auto Gain, Bandwidth and DC).
A set of device parameters is required to initialize a connected device:
DEVICE_SETTINGS deviceSettings = deviceList->at
(0);
deviceClass->initializeDevice(&deviceSettings);
When terminate your own application, devices must be released:
deviceClass->releaseDevice();
2. Thorlabs Beam Library application
Thorlabs Beam Library is a library handling the device modules and providing
simple functions for device access.
Prior to all, a library instance must be created. Device modules are searched and
loaded:
CreateThorlabsBeamInstance();
The function below returns the number of connected devices: