User manual

3 © 2007-2010 Analytica GmbH
Chapter 1. The Programming interface
of AnaGate devices
The AnaGate product line consist of several hardware devices, which offers access to different bus systems
(I2C, SPI, CAN) or processors (Renesas) via standard network protocol.
The communication to the individual devices always is done through a documented and disclosed
proprietary network protocol. Thus, all products which incorporates a socket interface (like personal
computers, PLC, ...) are allowed to access the devices of the AnaGate product line.
Analytica provides a programming interface for users of Windows and Linux operating systems (X86)
which implements the proprietary communication protocol and make it available through simple function
calls. The software API (Application Programming Interface) is available free of charge for Windows and
Linux operarting systems.
Table 1.1. Library files for Windows
Device Windows library
AnaGate CAN AnaGateCAN.dll
AnaGate CAN uno / duo / quattro AnaGateCAN.dll
AnaGate CAN USB AnaGateCAN.dll
AnaGate SPI AnaGateSPI.dll
AnaGate I2C AnaGateI2C.dll
AnaGate Universal Programmer AnaGateSPI.dll, AnaGateI2C.dll
Note
To provide a widespread support of differrent programming languages like C++, Visual
Basic, Delphi and the programming languages of the .NET family, the cdecl calling
convention is used in all function calls. Using this calling convention means that all function
parameters are pushed on the stack in reverse order (from right to left) and that the caller
is responsible for the stack handling. Most programming languages support this calling
convention.
Table 1.2. Library files for Linux
Device Linux library (X86) ARM9
AnaGate CAN libCANdll.a, libAnaCommon.a -
AnaGate CAN uno / duo / quattro libCANdll.a, libAnaCommon.a available
AnaGate CAN USB libCANdll.a, libAnaCommon.a available
AnaGate SPI libSPIdll.a, libAnaCommon.a -
AnaGate I2C libI2Cdll.a, libAnaCommon.a -
AnaGate Universal Programmer libSPIdll.a, libI2Cdll.a,
libAnaCommon.a
available
The different libraries include common and specific functions which are neccessary for accessing and
controlling the devices of the AnaGate product line. In the following, all library functions of the software
API are documented in detail.