Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezfit:clarujust:ezorange_api [2009/11/17 12:24]
smayr
ezfit:clarujust:ezorange_api [2009/11/20 16:52] (current)
smayr
Line 1: Line 1:
 == ezOrange API == == ezOrange API ==
 Following is the Application Programming Interface (API) for the ezOrange application. Following is the Application Programming Interface (API) for the ezOrange application.
 +
 +=== API 3.6 ===
 +<code vb>
 +'// NOTE: All returns are Error Codes
 +
 +function SetInterface(ProgIntfIdx: Integer): Integer; safecall;         // 0-Simulation, Nonzero-Live
 +function GetInterface(var ProgIntfIdx: Integer): Integer; safecall; // 0-Simulation, Nonzero-Live
 +
 +'//--- Not used by Clarujust ---
 +function SetEar(EarSideIdx: Integer): Integer; safecall;
 +function GetEar(): Integer; safecall;
 +function SetMemory(MemIdx: Integer): Integer; safecall;
 +function GetMemory(): Integer; safecall;
 +function SetHAInitialize(): Integer; safecall;
 +function SetHARead(): Integer; safecall;
 +function SetHAWrite(): Integer; safecall;
 +function SetHABurn(): Integer; safecall;
 +function SetHAClose(): Integer; safecall;
 +procedure SetParams(Params: OleVariant); safecall; // Not needed by Clarujust
 +function GetParams: OleVariant; safecall;    // Not needed by Clarujust
 +procedure LaunchClarujustApp(); safecall;     // Not needed by Clarujust
 +
 +'//--- Debugging ---
 +function SetSilentErrors(Silent: WordBool): Integer; safecall;
 +function GetSilentErrors(): WordBool; safecall;
 +
 +'//--- Bump, Tilt, and Gain ---
 +function SetBumpQ(BumpQIdx: Integer): Integer; safecall;
 +function GetBumpQ(var BumpQIdx: Integer, var BumpQVal: Single): Integer; safecall;
 +function SetBumpGain(BumpGainIdx: Integer): Integer; safecall;
 +function GetBumpGain(var BumpQIdx: Integer, var BumpGainVal: Single): Integer; safecall;
 +function SetBumpCF(BumpCFIdx: Integer): Integer; safecall;
 +function GetBumpCF(var BumpCFIdx: Integer, var BumpCFVal: Single): Integer; safecall;
 +function SetTiltCF(TiltCFIdx: Integer): Integer; safecall;
 +function GetTiltCF(var TiltCFIdx: Integer, var TiltCFVal: Single): Integer; safecall;
 +function SetTiltSlope(TiltSlopeIdx: Integer): Integer; safecall;
 +function GetTiltSlope(var TiltSlopeIdx: Integer, var TiltSlopeVal: Single): Integer; safecall;
 +function SetGain(GainIdx: Integer): Integer; safecall;
 +function GetGain(var GainIdx: Integer, var GainVal: Single): Integer; safecall;
 +function SetBias(Bias: Integer): Integer; safecall;
 +function GetBias(var Bias: Integer): Integer; safecall;
 +function GetEthosArray(out Arr: PSafeArray): Integer; safecall;
 +
 +function SetCompression(BumpGain60: Integer; BumpQ60: Integer; BumpCF60: Integer;
 +   TiltSlope60: Integer; OverallGain60: Integer; GainBias60: Integer;
 +   BumpGain80: Integer; BumpQ80: Integer; BumpCF80: Integer;
 +   TiltSlope80: Integer; OverallGain80: Integer; GainBias80: Integer): Integer; safecall;
 +
 +'//--- Revised functionality ---
 +function SetAudiogram(AnAudiogram: PSafeArray): Integer; safecall; // Not needed by Clarujust
 +function GetAudiogram(var AnAudiogram: PSafeArray; EarSideIdx: integer): Integer; safecall;
 +
 +function SetSerialNumber(SerialNum: PChar; EarSideIdx: integer): Integer; safecall; // Not needed by Clarujust
 +function GetSerialNumber(var SerialNumber: PChar; EarSideIdx: integer): Integer; safecall;
 +
 +'//--- New functionality ---
 +function Setup60(): Integer; safecall; // Prepares the HI settings before running
 +function Setup80(): Integer; safecall; // a test
 +function ApplySettings: Integer; safecall;
 +function GetHAInitialized(var IsInitialized: WordBool): Integer; safecall;
 +function GetEarCount(var EarCount: Integer) : Integer; safecall;  // 0–none, 1-left, 2-right, 3-both
 +
 +</code>
  
 === API 3.5 === === API 3.5 ===
Line 154: Line 217:
 == Data Types == == Data Types ==
  
 +==== Programming Interface ====
 Return or Set values for ''GetInterface()'' and ''SetInterface()'' routines: Return or Set values for ''GetInterface()'' and ''SetInterface()'' routines:
 ^ Code ^ Value      ^ Description ^ ^ Code ^ Value      ^ Description ^
Line 160: Line 224:
 |  2   | EMiniTec   | EMiniTec is programmer interface. | |  2   | EMiniTec   | EMiniTec is programmer interface. |
  
 +==== Audiogram ====
 Audiogram array to pass to Optimizer (''SetAudiogram()'' and ''GetAudiogram()''): Audiogram array to pass to Optimizer (''SetAudiogram()'' and ''GetAudiogram()''):
 ^ Index ^ Frequency ^  ^ Index ^ Frequency ^ 
Line 173: Line 238:
 |  9    8000 |  |  9    8000 | 
  
 +==== Circuit Parameters ====
 For ''SetParams()'', ''GetParams()'', and ''GetEthosParams()'', array format for Ethos-based circuit: For ''SetParams()'', ''GetParams()'', and ''GetEthosParams()'', array format for Ethos-based circuit:
 <code delphi> <code delphi>
Line 224: Line 290:
 </code> </code>
  
-==== Ethos Error Values  ==== +==== Circuit I/O Operation Error Values ==== 
-^ Error Code  ^ Error Description ^ +^ Error Value ^ Error Code      ^ Error Description ^ 
-| 0  Ethos OK  +| 0           | OK              | Operation was successful. 
-| 1  Ethos NoProgrammer | +| 1           | NoProgrammer    | Valid programmer has not been set. 
-| 2  Ethos NoInstrument | +| 2           | NoInstrument    | No or invalid hearing instrument (HI) connected. 
-| 3  Ethos BadArgument | +| 3           | BadArgument     | Bad Argument provided.  Check one of these: <code> 
-| 4  Ethos NotInitialized | +  - Invalid programming interface 
-| 5  Ethos NotRead | +  - Invalid platformID specified 
-| 6  Ethos ChecksumError | +  - Invalid program specified 
-| 7  Ethos InvalidVersion | +  - Invalid channel specified 
-| 8  Ethos ProgrammerError | +  - Invalid data in params or config structure 
-| 9  Ethos CMFError | +  - Page argument invalid</code> 
-| 10 | Ethos WrongInstrument | +| 4           | NotInitialized  | Programmer has not been initialized yet. 
-| 11 | Ethos BootError | +| 5           | NotRead         | Not Read. 
-| 12 | Ethos NoNLDriver | +| 6           | ChecksumError   | Invalid data received. 
-| 13 | Ethos NLInUse |+| 7           | InvalidVersion  | Invalid parameter version passed in. 
 +| 8           | ProgrammerError | Error occurred trying to initialize programmer. 
 +| 9           | CMFError        | Error during previous load. 
 +| 10          | WrongInstrument | Invalid security ID of the connected device. 
 +| 11          | BootError       | Boot Error. 
 +| 12          | NoNLDriver      | Noahlink drivers have not been installed. 
 +| 13          | NLInUse         | Noahlink in use by another software package. |