Last published: March 3, 2021 by 'nice'
Defines 5 Classes
Extends 5 Classes
NITDMSLibrary is a package providing an interface via DLLCC to the proprietary DLL provided by National Instrument for reading and writing TDMS format 1.0 and 2.0.
The library is available for example at the end of this page:
The library provides a set of functions with C API interacting thru opaque handles to C objects.
Please consult National Instrument documentation for getting a copy of the proprietary binaries.
Also consult the copyright or eventual restrictions of usage and redistribution ditributed with the binaries.
At this time of writing, the library was available at https://www.ni.com/content/dam/web/product-documentation/c_dll_tdm.zip
Note that the path to DLL should be adapted to your own disk location.
This Smalltalk interface is distributed freely, with MIT license, on an as-is basis, in the hope it is useful.
Example of usage:
library := NITDMSReaderWriterLibrary new.
file := FormatTDMSFile fromFilename: fileName library: library.
file readHeaderUsingLibrary: library.
identifiers := file fields.
units := file units.
columns := file readValuesUsingLibrary: NITDMSReaderWriterLibrary new.
Currently, the implementation is limited to read single and double precision floating point data.
But this could be easily extended. It's a matter of handling complementary types in #getValuesOfType:ofChannelHandle:name:
This interface has been used and known to work on non commercial 32-bit VW 7.8 for windows.
Portability to more recent version should not be a problem.
Compatibility with other OS or 64bits VM is as yet unknown.
I also distribute a NITDMSReader which decode the TDMS format entirely in Smalltalk.