Programming with FIPP for Fonix Instruments
   10 October 2010 
    Michael Day

FIPP stands for Fonix Instrument Packet Protocol.

Fipp was developed to provide a reliable means to communicate 
with Fonix analyzers and audiometers. The protocol provides
a self-synchronizing and error detection mechanism to insure 
safe and reliable transfer of data and commands. 

The original Fryers protocol was developed for MSDOS based 
computers (FRYERS.COM). Later this was adapted to run on Windows 
based computers (FRYERS32.DLL). Because of the MSDOS roots, the 
original driver was somewhat cumbersome to write to and manage 
the program interface (using a register based interface). 

While Frye is still supporting the Fryers32.DLL interface, the
old MSDOS Fryers.COM driver is considered obsolete and is no 
longer being supported.  

Because of the complexity of managing the program interface for 
the Fryers32.DLL, a new DLL (FRYECOM.DLL) has been developed to 
make it easier to use.  

The FryeCom.DLL is a superset of the older Fryers32.DLL. 
It still retains the old Fryers32 interface for programs that
have been built around the old interface method, but it also
provides a newer call interface to make things easier.

The new DLL uses a procedure based interface and provides much 
of the error handling management for you. 

See the file FryeComDLL-API.txt for a detailed description of the
the FryeCom API.  

We recommend that all new programming be done using the FryeCom
DLL. While Frye will still provide the Fryers32.DLL for those
that need it, eventually we will be migrating all programming
to the FryeCom DLL. 

Even if you are not yet ready to rewrite your applications to 
use the new DLL procedure based calls, you can still use the 
new FryeCom DLL by loading it as your interface DLL instead of 
Fryers32. The FryeCom DLL is fully backwards compatible to the
older Fryers32 DLL (because it is a wrapper around Fryers32).

If you do decide to switch to the new call interface, 
you should do so completely and avoid using the older register
based call interface. Mixing send and receive commands between
the two interface methods will potentially confuse the FryeCom
DLL as it expects the new calls to be used to be able to
properly manage the calls using the procedure based method. 
(Although you can still use some of the status calls that 
do not affect the command control flags.)

The file FryeCom-Example.txt provides a quick overview of how
to write a program to interface with the DLL (in C). 

If you are programming in C you may want to consider including 
the FryeComD (or FryeComS) file in your project. The FryeComS
provides the code to statically link the FryeCom DLL to your 
program. The FryeComD file provides the code to dynamically
link the FryeCom DLL to your program. We recommend using the
FryeComD method as it provides better management of the code. 

If you are using C++, you may want to consider adding the 
FippCore.cpp file to your project. It provides an object based 
core for communicating with the FryeCom DLL. You can either use 
the object by itself, or include it in your own object to add 
your own code to the call interface. The FippUnit.cpp file
shows an example of doing this. If you are writing your code 
in Pascal (Delphi), you can use the Pascal versions of the files. 

If you wish, you can include the FippUnit.cpp file in your 
program. It provides a procedure based interface for almost all
of the current (as of this writing) FIPP commands available. 
This can potentially make things easier for you to write your
own application. 

The directory "Sources" contains the source code for the TestCom 
and FBatCom programs (in Pascal), and for the BCrv example programs
(in C++). You can use these as a reference on how to use the
FryeCom DLL. 

The FBatCom program is an updated version of the old batch 
program (Fbat32) that allows sending commands via a batch program 
file. See the examples and documentation for details. 

The TestCom program is an updated version of the old Test32
program which is provided to allow testing the FIPP commands. 
TestCom is used internally at Frye for testing the FIPP commands.

<eof>


 