...
feature | Dewesoft C++ DLL | Simplified Trenz Electronic C++ DLL |
programming language | C, C++, Python | C, C++, Python |
architecture | standard | Standard (the stacked nature of the solution is hidden) |
Handles | present | absent |
structures | embedded | Embedded (defined in Cypress CyAPI.h but invisible to user) |
parameters* | less | more |
freedom* | less | more |
...
Dewesoft C++ DLL | Simplified Trenz Electronic C++ DLL | |
HANDLE m_handle = 0; | Nothing (you must charge the DLL) | |
cout << endl << TE0300_ScanCards() << endl; | cout << endl << TE_USB_FX2_ScanCards() << endl; | |
TE0300_Open(&m_handle, 0)
=0 | ||
TE0300_Open(&m_handle, 1)
=0 | ||
TE0300_Close(&m_handle); | TE_USB_FX2_Close(); | |
TE0300_SendCommand(handle, cmd, cmd_length, reply, &reply_length, timeout) | TE_USB_FX2_SendCommand( cmd, cmd_length, reply, reply_length, timeout) |
Internal notes:
TimeOut, DriverBufferSize : it is possible that these parameters can be moved to another function like TE_USB_FX2_SetTimeOut and
TE_USB_FX2_SetDriverBufferSize or erased (internally fixed) if Trenz Electronic decides in this direction.
The instantiation of driver buffer happens in TE_USB_FX2_Open(): the user must specify TimeOut and DriverBufferSize.
A future extension is the possibility to set TimeOut = 1000 (1 ms) and DriverBufferSize = 131,072 if the respective value passed to the function is 0.
Dewesoft C++ DLL | Simplified Trenz Electronic C++ DLL |
//test code, not production code | //test code, not production code |
...
Dewesoft C++ DLL | Simplified Trenz Electronic C++ DLL |
void WriteData(unsigned int handle) | void WriteData() |
Two different header files exist.
One is used for the creation of TE_USB_FX2_CyAPI.dll DLL.
Another header file (with the same name) is exported for the creation of application programs that use TE_USB_FX2_CyAPI.dll DLL.
The latter has some additional lines with regard to the former. This happens to solve some problems with the include files in applications.
The lines of difference are the followings (added to TE_USB_FX2_CyAPI.h used for applications).
#pragma once
//#include <WinDef.h> NO, it fails at 32 bit
#include <windows.h>
#include "CyAPI.h"
typedef unsigned char byte;
Internal note: The file to use is in C:\Project3264bit\TE_USB_FX2_CyAPI\FileToExportForApplication
See document "C++ TE_USB_FX2 API reference manual"
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE-USB-Suite/d2/generation_3/d3/APIs.html
section 3.0 "API Functions" ("Exported function list" excluded).
See document "C++ TE_USB_FX2 API reference manual"
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE-USB-Suite/d2/generation_3/d3/APIs.html
section 7 "Appendix A : Open the Visual Studio 2010 project".
See document "C++ TE_USB_FX2 API reference manual"
http://www.trenz-electronic.de/download/d0/Trenz_Electronic/d1/TE-USB-Suite/d2/generation_3/d3/APIs.html
section 8 "Appendix B : use of pdb file (symbolic debugging)".
version | date | author | description |
0.1 | 2012-09-24 | SP, FDR | Release Preview. |
0.2 | 2013-04-09 | FDR | Updated documentation links. |
0.3 | 2013-04-12 | FDR | Added note about support restrictions. |