Changes between WDM driver v6 and v7

TMSi Data Acquisition SDK

 
TMS International BV

 

Changes between WDM driver v6.* and TMSi SDK v7.*

This TMSi SDK version 7 is the successor of WDM driver 6.*.
TMSi SDK version 7 is newly build from the ground up to provide an easier way to connect to TMSi front ends, and to unify access methods over different communication interfaces such as WLAN, Bluetooth and USB. 

As a result of this, there are several significant differences between this driver and the WDM driver v6.*, which makes it impossible to simply recompile your current software to use this TMSi SDK version 7.


Compared to WDM driver 6.*,  all functions which were marked as deprecated in the SDK of WDM driver v6.* are removed. These are functions GetNrDevices,GetDevicePath,  GetSADHandle, GetManufacturer, GetDescription, GetId GetSignalInfo, GetDeviceKey, ans structures DEVICE_FEATURE_GAIN, DEVICE_FEATURE_HIGHPASS, DEVICE_FEATURE_LOWPASS, DEVICE_FEATURE_OFFSET.


It is no longer necessary to interrogate the registry to find out if a TMSi USB device is connected (like Fusbi, Synfi or Mobita).

Functions GetInstanceId, OpenRegKey, structures SP_DEVICE_PATH are not present in this SDK.


It is no longer possible to use master/slave devices directly using Fiber cables.

Functions AddSlave, GetSlaveHandle are not present in this SDK.

Functions GetSamples is changed and now always delivers a sample value of 4 bytes per channel.


New functions are added for acquiring samples that are stored in the internal memory of Mobita: CloseCardFile, OpenCardFile, StartCardFile, StopCardFile, GetCardFileSamples, GetCardFileSignalFormat, GetCardFileList.

For USB connected devices (like Fusbi, Synfi or Mobita) Windows only displays the device itself in de Windows device manager, and not the frontend(s) that is (are) connected to this device.  So if you connect a Refa to a Fusbi, you will only see the Fusbi in the Windows device manager, not the Refa.

The average reference calculation in the driver is now deactivated by default for all devices. This means that all EXG channels now have the unmodified signals, i.e. without the common average removed from the signals. If you want the driver to perform the average reference calculation use the SetRefCalculation() function to turn it on.

WARNING: when using Synfi to acquire EXG signals from two TMSi frontends simultaneously, the average reference calculation in the driver should always be switched off. Please refer to the Synfi User Manual for more details.

Compilation

First install the TMSi SDK on your PC using the CD delivered with your frontend. Please follow the instructions in the installation manual carefully.

After installation, TMSiSDK.dll is located in the C:/Windows/system32 directory. The TMSi SDK also contains a TMSiSDK.h include file, which contains definitions of all structures and prototypes of all functions.  This file is not installed, but must be copied from installation CD to the directory in which you keep your development files.

The TMSi SDK files are created using Visual Studio 2010 on a Windows 7 64-bit platform, and are compiled for Windows 7 and 8.1.

In order to test if you can compile, link, and run the SDK, first use the example code on the CD to see if you can communicate with your frontend. The example code has been tested thoroughly, which means that any error occurs during compilation, linking and running are most likely due to a misconfiguration in your development environment.

WARNING: If you run the ExampleCode.exe without Visual Studio 2010 installed, loading the TmsiSDK.dll will fail. Please install the vcredist_vs2010_x86.exe from the ExampleCode directory.


If the test with the example code was successful, you can start with writing code for this version of the SDK.

WARNING: The TMSiSDK.h file and SADIO.h file from the WDM 6.* driver have the same C structures. This is done to minimize the amount of work needed for development with this driver. As a result, including both TMSiSDK.h file and SADIO.h in one C file result in compile errors and warnings.

The concept of the SDK is that you start the library with the desired communication interface(WLAN, Bluetooth, USB), perform the desired actions (acquiring samples, reading samples from memory card) and close the library.  For each desired communication interface you need to start the library, but is is possible to start several libraries parallel to each other, with each library using a different communication interface. In order to select a device, call GetDeviceList to get a list of all connected TMSi devices.

The error handling of the library is designed to be as uniform as possible. For each function which returns a Boolean FALSE, you can call the GetErrorCode() function to retrieve the specific error code for that function.

The order in which you need to call functions from the SDK, and the naming of those functions is mostly unchanged with respect the WDM driver 6.*. However, it is possible that parameters or return type have a different type.

If you do not have any code for the previous WDM driver 6.*, the fastest way to get started is to copy the example code, and modify that.

If you already have code used with the previous WDM driver 6.*, the fastest way to get started is to copy your code,  rename it,  remove the SADIO.h from the code, include TMSiSDK.h, and recompile. This will not work at once, because parameters or return types of functions can have a different type. First fix all code which gives an compiler error, using the example code and this reference documentation. Then fix all code which gives an compiler warning, using the example code and this reference documentation.


The following functions have changed:

GetMeasuringMode is still present, but does not work, and always return FALSE.
SetMeasuringMode has changed parameters, and does work.
SetSignalBuffer is still present, does set the size of the buffer. Getting and setting the sample rate does work.
GetSignalFormat has a parameter changed.
GetSamples returns now a signed long.

GetDeviceState is removed.

Installation

During installation on a 32 bit platform, the TMSiSDK.dll is installed in the %windir%\System32 directory.

During installation on a 64 bit platform, the 64 bit TMSiSDK.dll is installed in the %windir%\System32 directory and the 32 bit TMSiSDK32bit.dll is installed in the %windir%\SysWOW64 directory.

See http://msdn.microsoft.com/en-us/library/aa384249%28v=VS.85%29.aspx for more information on how Windows handles 32-bit applications and dlls on 64-bit platforms.


Because the Microsoft installer enforces unique names for all files, it is not possible to use the TMSiSDK.dll name in both directories.