Main Page | Data Structures | File List | Data Fields | Globals

CAN-GW client library

Introduction

ETH2CAN is a (device) Gateway between Ethernet and CAN networks. TCP/IP is used as a communication protocol between CAN-GW and user's application (via client library, described below). For details on Hardware see http://parabel.inc.ru/products/cangw/

Client's library consists of a few headers, libraries, and dll's. It's:

To initiate communication with ETH2CAN gateway you must esteblish a connection with CanGwConnect(). To obtain number of CAN ports and description, you must use CanGwConnect() and CanGwGetPortName().

Now you can set CAN port mode with CanGwSetMode(), and bind specified CAN port with this TCP connection with CanGwBindPort(). Note, that one CAN port can be used from multiple applications.

To send packets you must use CanGwSend(), to receive packets you must use CanGwRecv(). Both functions have timeout parameter, to protect application from blocking.

Compiling application

To run custom application you must have cangw.dll and pthreadvc.dll(for Windows) dynamic libraries. If you're develping your application with C/C++ compiler-you can use the following headers:

If you're using non-MSVC-object-compatible compiler/linker compiler (like C++ Builder, Labwindows) - you have to bind functions manually (like for any other DLL).


Generated on Thu Oct 28 12:08:01 2004 for CANGW client library by doxygen 1.3.5