The examples show how oscilloscopes and generators can be controlled using LibTiePie in C++.
Contents
- 1 Downloads
- 2 Requirements
- 3 Building the examples
- 3.1 Microsoft Visual C++
- 3.1.1 Creating a .lib file
- 3.2 Qt Creator
- 3.3 GNU C++
- 3.4 Cygwin
- 3.1 Microsoft Visual C++
- 4 Examples
It is recommended to use the libtiepie-hw SDK for new developments.
Downloads
Description | Version | Remarks | Size | |
---|---|---|---|---|
LibTiePie C++ examples | 0.6.2 | for GNU Make | 25.86 kB | download |
LibTiePie C++ examples | 0.6.2 | for Qt Creator | 34.25 kB | download |
LibTiePie C++ examples | 0.6.2 | for Visual Studio 2012 or newer | 55.72 kB | download |
C and C++ headers are included in the LibTiePie library downloads.
Requirements
Building the examples
The examples are tested to work with the following C++ compilers:
Microsoft Visual C++
The libtiepie.dll file must be located in the subfolder LibTiePie/x86 or LibTiePie/x86-64 in the main folder of the examples, depending on the library. The corresponding header files libtiepie.h and libtiepie++.h must be located in the LibTiePie subfolder in the main folder of the examples.
The examples can be built by opening and building the solution file LibTiePie_Cpp_examples.sln in the main folder of the examples.
Creating a .lib file
Microsoft Visual C++ requires a .lib file to be able to use the LibTiePie library. This .lib file is compiler and platform dependent and is therefore not supplied with the LibTiePie library. Microsoft does supply a utility with Visual Studio to create the .lib file, this utility requires a .def file, which is supplied with LibTiePie.
For the examples on this page, the supplied make file contains instructions to create the required .lib file automatically. For that, the .def file must be placed in the same location as the libtiepie.dll file. When developing software not based on these examples, the .lib file will have to be created independently.
To create a .lib file for the LibTiePie library, the following steps need to be executed:
- Open the Visual Studio Command Prompt, its shortcut is found in
-
Type lib /def:"C:\mypath\libtiepie.def" /machine:X86 /OUT:"C:\mypath\libtiepie.lib"
- mypath is the path where the libtiepie.def file is located.
- /machine: Specify X64 for 64 bit LibTiePie, specify X86 for 32 bit LibTiePie
Qt Creator
Windows
The libtiepie.dll file must be located in the subfolder LibTiePie/x86 or LibTiePie/x86-64 in the main folder of the examples, depending on the library. The corresponding header files libtiepie.h and libtiepie++.h must be located in the LibTiePie subfolder in the main folder of the examples.
The examples can be built by opening and building the project file LibTiePie_Cpp_examples.pro in the main folder of the examples.
Linux
The LibTiePie library must be installed in the system folder.
The examples can be built by opening and building the project file LibTiePie_Cpp_examples.pro in the main folder of the examples.
GNU C++
Windows
The libtiepie.dll file must be located in the subfolder LibTiePie/x86 or LibTiePie/x86-64 in the main folder of the examples, depending on the library. The corresponding header files libtiepie.h and libtiepie++.h must be located in the LibTiePie subfolder in the main folder of the examples.
The examples can be built by executing mingw32-make in the main folder of the examples.
Linux
The LibTiePie library must be installed in the system folder.
The examples can be built by executing make in the main folder of the examples.
Cygwin
The libtiepie.dll file must be located in the subfolder LibTiePie/x86 or LibTiePie/x86-64 in the main folder of the examples, depending on the library. The corresponding header files libtiepie.h and libtiepie++.h must be located in the LibTiePie subfolder in the main folder of the examples.
The examples can be built by executing make in the main folder of the examples.
Examples
List of available example programs:
- Generator.cpp
- GeneratorArbitrary.cpp
- GeneratorBurst.cpp
- GeneratorGatedBurst.cpp
- GeneratorTriggeredBurst.cpp
- I2CDAC.cpp
- ListDevices.cpp
- OscilloscopeBlock.cpp
- OscilloscopeBlockSegmented.cpp
- OscilloscopeCombineHS3HS4.cpp
- OscilloscopeConnectionTest.cpp
- OscilloscopeGeneratorTrigger.cpp
- OscilloscopeStream.cpp