Bourgogne ET Grasset SAS VEGRDE2 Manuel D’Utilisation
Vegas Long Range Read/Write Device
27-07-2002
Vegrde3/EG
Confidentiality Level 1
Page 48 (48)
Bourgogne et Grasset -– ZI Beaune Savigny -– 21200 Beaune – France – Tel. +33 380 26 26 26 – Fax. +33 3 80 26 26 00
Appendix: Header File PROLIB5.H (Listing)
Demo-C-Library PROLIB5.H Description
A library programmed in Standard-C with the Borland C++ Compiler Version 3.1. is available
on request from B&G.
on request from B&G.
General Remarks
Communication between the library and the read/write device is provided by the serial interface.
This communication is controlled via interrupts. As a consequence a PC-program is not forced
into a waiting loop and can execute other functions while the data transfer is running in the
background.
To do this, however, some flags are needed:
This communication is controlled via interrupts. As a consequence a PC-program is not forced
into a waiting loop and can execute other functions while the data transfer is running in the
background.
To do this, however, some flags are needed:
• RWDEot:
Is set to 0 at a library function request and to 1 at the end of the
serial
protocol.
This helps to identify the end of the data transmission.
• RWDErr:
Saves the error code.
0 means: errorfree execution
< 0 means: error processing the commands
• RWDDataLen:
Saves the number of data bytes received via the serial interface.
Can take any value between 0 and 24.
The PROLIB5.H file contains short examples to illustrate each of the commands.