The ETH32 API (Application Programming Interface) is a set of programming libraries provided by Winford Engineering to make the control of the ETH32 I/O device easier for customers. You can use the API in the applications you develop so you don't have to get involved in all the details of communicating with the ETH32. This greatly increases the speed of development and reduces the opportunities for bugs and errors. Although Winford Engineering recommends using the API in your application development, it is not required. The communication protocol used by the ETH32 is fully documented (in another document), allowing you to directly communicate with it over your own TCP/IP connection.
The ETH32 API is available for the following platforms:
Microsoft Windows 95, NT4, 98, 98SE, Me, 2000, XP, Vista, Windows 7
A 64-bit version of the ETH32 API DLL is included for 64-bit Windows platforms, in addition to the standard 32-bit version.
Linux
The following programming languages are supported:
C
C++
Microsoft Visual Basic 6 and .NET
Microsoft Visual Studio .NET Languages
The ETH32 API is thread-safe, meaning that if your application is multithreaded, it is permissible to have multiple threads simultaneously calling API functions on the same handle (or object). The API itself is also multithreaded, creating and managing its own threads for each device connection. For the most part, this is transparent to you, the programmer. The only area you need to be aware of it is in event handling. If you use a callback function to receive events, your callback function will execute in a thread created by the API. Alternately, if you want to receive events without involving another thread, you can use one of the other event handler mechanisms.
In Visual Basic 6, multithreading can be very troublesome. For this reason, the VB 6 Eth32 class implements event handling internally without using extra threads or callback functions. From the programmer's perspective, you simply need to write an event routine and the rest is automatically taken care of within the class.
In Visual Studio .NET languages, multithreading is fully supported, so the Eth32 .NET class implements event handling with a separate thread. This is all handled automatically within the class, so you simply need to write your own event routine. The advantage of being implemented with a separate thread is that events can be received and processed at the same time that the rest of your application is tied up with other tasks. Because it is executed in a separate thread, you must be careful that any operations you perform within your event routine are thread safe.