Hello, it seems you got source and want to alter the application.



What is this
------------

Purpose: post-operation monitoring of patients treated with retinal tears. The monitored parameter is head posture, specifically tilt difference from required position. The whole system contains a number of "layers", from top to bottom:

-------------------------------------------
                                      human
DOCTOR
 |
 | examines recorded data with
 |
-|-----------------------------------------
 |                              PC software
 V
THIS APPLICATION <-- this is "this"
 |
 | uses api
 V
FTDI DRIVERS
 |
 | work with
 |
-|-----------------------------------------
 V                PC hardware & peripherals
USB PORT
 |
 | is plugged into
 |
 V
FTDI USB / SERIAL PORT CONVERTER CHIP
 |
 | is connected to 
 V
WIRELESS COMMUNICATOR DEVICE
 |
-|-----------------------------------------
 |                                      air
 |
 | sometimes talks to (data download)
 |
-|-----------------------------------------
 V                                 hardware
WIRELESS COMMUNICATOR DEVICE
 |
 | is connected to
 V
HEAD POSTURE MONITORING (MCU + SENSOR)
 |
 | is strapped to
 |
-|-----------------------------------------
 V                                    human
PATIENT'S HEAD

-------------------------------------------

These other parts are documented elsewhere.



Build
-----

For succesful building of the application from source, you will have to...

* have Borland C++ Builder (BCB) version 6, with the assorted tools; personal ("free") version is enough.

* add BCB paths to %PATH% variable (typically done on install), so that you can run the tools easily

* download + install FTDI drivers (http://www.ftdichip.com/) and at least the DLLs (should be part of driver download)

* dowload Developer's guide from FTDI for understanding of the API

* use BCB tools to generate .lib file or linking (more below)



FTDI drivers
------------

The drivers' version, against which the application has been developed, and relevant programming guide are present in:

ftdi-driver-etc/CDM 2.06.00 WHQL Certified.zip
ftdi-driver-etc/D2XX_Programmer's_Guide(FT_000071).pdf

Files needed for actual development, separated from the rest of archive, are here:

ftdi-driver-etc\driver-dev-x86



DLL import
----------

FTDI's interfaces allow very convenient handling of their virtual serial port. To link statically with the DLL needed for this, you'll need the supplied header file and library file. Both are shipped with drivers, but the library file is not suitable for BCB's linker. You will have to re-create it yourself. You should have at least basic knowledge of using command line, so that you can eventually troubleshoot path issues if tools are not found. The procedure goes as follows:

1) open command line and browse to folder with ftd2xx.dll

2) run IMPDEF ftd2xx.def ftd2xx.dll
     -> new file ftd2xx.def (plain text describing dll's exports)

3) run IMPLIB ftd2xx.lib ftd2xx.def
     -> new file ftd2xx.lib (binary, omf format)

4) add the .lib to project

(originally described on web page saved as  doc/program_tip_4.htm )



External libraries
------------------

The only "external" dependency is ini-file library from Carsten Breuer, licensed under LGPL (unknown version). External is written in quotation marks, since it is available as source and included in the project. The archive is present as doc/inifile2.zip



    Vladimír Slávik, Brno, 2010
