== ezOrange API ==
Following is the Application Programming Interface (API) for the ezOrange application.
=== API 3.6 ===
'// 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
=== API 3.5 ===
Added these functions to the existing 3.4 API:
Public Function SetParams(Arr: OleVariant);
Public Function GetParams(): OleVariant;
Public Function SetAudiogram(Audiogram: PSafeArray);
Public Function GetAudiogram(): PSafearray;
Public Function SetSerialNum(SerialNum: string);
Public Function GetSerialNum(): string;
=== API 3.4 ===
Public Function SetShowForm(ByVal Visible As Boolean) As Integer
Public Function GetShowForm() As Boolean
Public Function SetEar(ByVal index As Integer) As Integer
Public Function GetEar() As Integer
Public Function SetMemory(ByVal index As Integer) As Integer
Public Function GetMemory() As Integer
Public Function SetInterface(ByVal index As Integer) As Integer
Public Function GetInterface() As Integer
Public Function SetHAIntialize() As Integer
Public Function SetHARead() As Integer
Public Function SetHAWrite() As Integer
Public Function SetHABurn() As Integer
Public Function SetHAClose() As Integer
Public Function GetHAIntialized() As Boolean
Public Function SetBumpQ(ByVal index As Integer) As Integer
Public Function GetBumpQ(ByRef Value as Single) As Integer
Public Function SetBumpGain(ByVal index As Integer) As Integer
Public Function GetBumpGain(ByRef Value as Single) As Integer
Public Function SetBumpCF(ByVal index As Integer) As Integer
Public Function GetBumpCF(ByRef Value as Single) As Integer
Public Function SetTiltCF(ByVal index As Integer) As Integer
Public Function GetTiltCF(ByRef Value as Single) As Integer
Public Function SetTiltSlope(ByVal index As Integer) As Integer
Public Function GetTiltSlope(ByRef Value as Single) As Integer
Public Function SetGain(ByVal index As Integer) As Integer
Public Function GetGain(ByRef Value as Single) As Integer
Public Function SetBias(Bias As Integer) As Integer
Public Function GetBias(Bias As Integer) As Integer
Public Function SetSilentErrors(ByVal Silent As Boolean) As Integer
Public Function GetSilentErrors() As Boolean
Public Sub GetEthosArray(arr() As Long)
Public Function SetCompression(
ByVal BumpGain60 As Integer,
ByVal BumpQ60 As Integer,
ByVal BumpCF60 As Integer,
ByVal TiltSlope60 As Integer,
ByVal OverallGain60 As Integer,
ByVal Bias60 as integer
ByVal BumpGain80 As Integer,
ByVal BumpQ80 As Integer,
ByVal BumpCF80 As Integer,
ByVal TiltSlope80 As Integer,
ByVal OverallGain80 As Integer
ByVal GainBias80 as Integer
) As Integer
=== API 1.1 ===
Public Function SetShowForm(ByVal Visible As Boolean) As Integer
Public Function GetShowForm() As Boolean
Public Function SetEar(ByVal index As Integer) As Integer
Public Function GetEar() As Integer
Public Function SetMemory(ByVal index As Integer) As Integer
Public Function GetMemory() As Integer
Public Function SetInterface(ByVal index As Integer) As Integer
Public Function GetInterface() As Integer
Public Function SetHAIntialize() As Integer
Public Function SetHARead() As Integer
Public Function SetHAWrite() As Integer
Public Function SetHABurn() As Integer
Public Function SetHAClose() As Integer
Public Function GetHAIntialized() As Boolean
Public Function SetBumpQ(ByVal index As Integer) As Integer
Public Function GetBumpQ(ByRef Value as Single) As Integer
Public Function SetBumpGain(ByVal index As Integer) As Integer
Public Function GetBumpGain(ByRef Value as Single) As Integer
Public Function SetBumpCF(ByVal index As Integer) As Integer
Public Function GetBumpCF(ByRef Value as Single) As Integer
Public Function SetTiltCF(ByVal index As Integer) As Integer
Public Function GetTiltCF(ByRef Value as Single) As Integer
Public Function SetTiltSlope(ByVal index As Integer) As Integer
Public Function GetTiltSlope(ByRef Value as Single) As Integer
Public Function SetGain(ByVal index As Integer) As Integer
Public Function GetGain(ByRef Value as Single) As Integer
Public Function SetSilentErrors(ByVal Silent As Boolean) As Integer
Public Function GetSilentErrors() As Boolean
=== API 1.0 ===
Following is the Application Programming Interface for the ezOrange application.
Public Function SetShowForm(ByVal Visible As Boolean) As Integer
Public Function GetShowForm() As Boolean
Public Function SetEar(ByVal index As Integer) As Integer
Public Function GetEar() As Integer
Public Function SetMemory(ByVal index As Integer) As Integer
Public Function GetMemory() As Integer
Public Function SetHAInitialize() As Integer
Public Function SetHARead() As Integer
Public Function SetHAWrite() As Integer
Public Function SetHABurn() As Integer
Public Function SetHAClose() As Integer
Public Function SetBumpQ(ByVal index As Integer) As Integer
Public Function GetBumpQ() As Integer
Public Function SetBumpGain(ByVal index As Integer) As Integer
Public Function GetBumpGain() As Integer
Public Function SetBumpCF(ByVal index As Integer) As Integer
Public Function GetBumpCF() As Integer
Public Function SetTiltCF(ByVal index As Integer) As Integer
Public Function GetTiltCF(ByVal index As Integer) As Integer
Public Function SetTiltSlope(ByVal index As Integer) As Integer
Public Function GetTiltSlope() As Integer
Public Function SetGain(ByVal index As Integer) As Integer
Public Function GetGain() As Integer
== Data Types ==
==== Programming Interface ====
Return or Set values for ''GetInterface()'' and ''SetInterface()'' routines:
^ Code ^ Value ^ Description ^
| 0 | Simulation | There is no programmer interface. |
| 1 | HiPro | HiPro is programmer interface. |
| 2 | EMiniTec | EMiniTec is programmer interface. |
==== Audiogram ====
Audiogram array to pass to Optimizer (''SetAudiogram()'' and ''GetAudiogram()''):
^ Index ^ Frequency ^
| 0 | 250 |
| 1 | 500 |
| 2 | 750 |
| 3 | 1000 |
| 4 | 1500 |
| 5 | 2000 |
| 6 | 3000 |
| 7 | 4000 |
| 8 | 6000 |
| 9 | 8000 |
==== Circuit Parameters ====
For ''SetParams()'', ''GetParams()'', and ''GetEthosParams()'', array format for Ethos-based circuit:
paramsArray[0] := BEQ1_gain;
paramsArray[1] := BEQ2_gain;
paramsArray[2] := BEQ3_gain;
paramsArray[3] := BEQ4_gain;
paramsArray[4] := BEQ5_gain;
paramsArray[5] := BEQ6_gain;
paramsArray[6] := BEQ7_gain;
paramsArray[7] := BEQ8_gain;
paramsArray[8] := BEQ9_gain;
paramsArray[9] := BEQ10_gain;
paramsArray[10] := BEQ11_gain;
paramsArray[11] := BEQ12_gain;
paramsArray[12] := C1_MPO;
paramsArray[13] := C2_MPO;
paramsArray[14] := C3_MPO;
paramsArray[15] := C4_MPO;
paramsArray[16] := C5_MPO;
paramsArray[17] := C6_MPO;
paramsArray[18] := C7_MPO;
paramsArray[19] := C8_MPO;
paramsArray[20] := C1_Ratio;
paramsArray[21] := C2_Ratio;
paramsArray[22] := C3_Ratio;
paramsArray[23] := C4_Ratio;
paramsArray[24] := C5_Ratio;
paramsArray[25] := C6_Ratio;
paramsArray[26] := C7_Ratio;
paramsArray[27] := C8_Ratio;
paramsArray[28] := C1_TK;
paramsArray[29] := C2_TK;
paramsArray[30] := C3_TK;
paramsArray[31] := C4_TK;
paramsArray[32] := C5_TK;
paramsArray[33] := C6_TK;
paramsArray[34] := C7_TK;
paramsArray[35] := C8_TK;
paramsArray[36] := FBC_Enable;
paramsArray[37] := input_mux;
paramsArray[38] := matrix_gain;
paramsArray[39] := Noise_Reduction;
paramsArray[40] := preamp_gain0;
paramsArray[41] := preamp_gain1;
paramsArray[42] := TimeConstants;
==== Circuit I/O Operation Error Values ====
^ Error Value ^ Error Code ^ Error Description ^
| 0 | OK | Operation was successful. |
| 1 | NoProgrammer | Valid programmer has not been set. |
| 2 | NoInstrument | No or invalid hearing instrument (HI) connected. |
| 3 | BadArgument | Bad Argument provided. Check one of these:
- Invalid programming interface
- Invalid platformID specified
- Invalid program specified
- Invalid channel specified
- Invalid data in params or config structure
- Page argument invalid
|
| 4 | NotInitialized | Programmer has not been initialized yet. |
| 5 | NotRead | Not Read. |
| 6 | ChecksumError | Invalid data received. |
| 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. |