EasyManua.ls Logo

Sys Tec Electronic GW-003 - Dynamic Linked Library Ethcan.dll; The Concept of the Ethcan.dll

Default Icon
108 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Software Support
© SYS TEC electronic GmbH 2007 L-1032e_9 61
7.3 Dynamic Linked Library EthCan.Dll
The Dynamic Linked Library (EthCAN.Dll) is a function library for
application programs. It serves as an interface between the Windows
socket and an application program. It manages the connected CAN-
Ethernet Gateway devices and converts the CAN messages in IP
packets and vice versa.
In order to include the DLL to a project, the EthCan.Lib must also be
included. The DLL is then loaded automatically when the application
program is started. If the LIB is not linked to the project, then the DLL
has to be loaded with the Windows function LoadLibrary() and the
library function has to be added with the function GetProcAdress().
The STDCALL directive of the DLL's call function ensures a
standardized call interface for the user. This guarantees that someone
familiar with another programming language (Pascal, ...) can also use
these functions.
7.3.1 The Concept of the EthCan.Dll
With the EthCan.Dll up to 5 CAN-Ethernet Gateways can be
addressed simultaneously within an application. Furthermore, it is also
possible to access 5 CAN-Ethernet Gateways from a remote
application as long as they have the same remote address (as shown in
application 1). This is because multiple interfaces can be connected to
the CAN-Ethernet Gateway at once, so that connections from multiple
applications are possible. However, it is not possible to establish
multiple connections to one and the same CAN-Ethernet Gateway
from a single application.
When the DLL is used, two software states are generated for each
CAN-Ethernet Gateway. After the application program has been
started and the DLL has been loaded, the software will be in the state
DLL_INIT, whereby all necessary resources for the DLL are created.
If the library function EthCanInitHardware() is called, then the
software will change to the HW_INIT state. All resources that are
necessary for communication with the CAN-Ethernet Gateway are
provided here. With the library function EthCanDeinitHardware() it

Table of Contents