Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ezfit:clarujust:ezfit_optimizer_clarujust_api [2010/07/21 11:46] smayr |
ezfit:clarujust:ezfit_optimizer_clarujust_api [2010/10/12 11:25] (current) smayr |
||
---|---|---|---|
Line 1: | Line 1: | ||
== ezFIT Optimizer (for Clarujust) API == | == ezFIT Optimizer (for Clarujust) API == | ||
Following is the Application Programming Interface (API) for the ezFIT Optimizer application. | Following is the Application Programming Interface (API) for the ezFIT Optimizer application. | ||
- | === API 1.27 === | + | === API 1.28 === |
This API is based on [[ezfit: | This API is based on [[ezfit: | ||
<code delphi> | <code delphi> | ||
- | IEzFITOptimizerClarujust = interface(IDispatch) | + | |
[' | [' | ||
function SetEar(EarSideIdx: | function SetEar(EarSideIdx: | ||
Line 72: | Line 72: | ||
function GetOutputParams(BaselineIdx: | function GetOutputParams(BaselineIdx: | ||
function GetSessionRunTime: | function GetSessionRunTime: | ||
- | function ApplyOptimizations: | + | function ApplyOptimizations(WriteToCircuit: |
+ | procedure GetProductCode(out AProductCode: | ||
end; | end; | ||
</ | </ | ||
Line 528: | Line 529: | ||
Returns '' | Returns '' | ||
- | === ApplyOptimizations(): | + | === ApplyOptimizations(WriteToCircuit: |
- | Apply any independent optimizations to the circuit and selected memories. This lets the optimizer know that all the work is done, and it would be typically called just before disconnecting from the optimizer server. | + | Apply any independent optimizations to the circuit and selected memories. This lets the optimizer know that all the work is done, and it would be typically called just before disconnecting from the optimizer server. |
+ | Return ErrorCode: 0 if successful, non-zero if not. | ||
Line 561: | Line 563: | ||
Return: Output Parameters in a SafeArray format. | Return: Output Parameters in a SafeArray format. | ||
- | |||
=== GetSessionRunTime(): | === GetSessionRunTime(): | ||
Line 567: | Line 568: | ||
Return: TotalSeconds | Return: TotalSeconds | ||
+ | === GetProductCode(out AProductCode: | ||
+ | |||
+ | Get the globally unique product code for the specified ear side. This product code is dependent on the read instrument. | ||
+ | See [[ezfit: | ||
== Data Types & Ranges == | == Data Types & Ranges == | ||
Line 577: | Line 582: | ||
| 2 | MicroCard | | 2 | MicroCard | ||
| 3 | Gennum DSP | Gennum DSP programmer interface. Not supported. | | | 3 | Gennum DSP | Gennum DSP programmer interface. Not supported. | | ||
- | | 4 | NOAHlink | + | | 4 | NOAHlink |
| 5 | CF2 | CF2 programmer interface. Not supported. | | | 5 | CF2 | CF2 programmer interface. Not supported. | | ||
| 6 | EMiniTec | | 6 | EMiniTec | ||
Line 604: | Line 609: | ||
| 2 | Closed-Simulated | | 2 | Closed-Simulated | ||
| 3 | Closed-BTE-Ear-Hook | | 3 | Closed-BTE-Ear-Hook | ||
- | |||
==== Audiogram ==== | ==== Audiogram ==== | ||
Audiogram array to pass to Optimizer ('' | Audiogram array to pass to Optimizer ('' | ||
Line 618: | Line 622: | ||
| 8 | | 8 | ||
| 9 | | 9 | ||
+ | ==== Product Codes ==== | ||
+ | |||
+ | Return values for '' | ||
+ | |||
+ | This value could be one of the following: | ||
+ | ^ Product Code ^ Product Name ^ Description | ||
+ | | prod_Flx | ||
+ | | prod_Intuition12 | ||
+ | | prod_Sparo12 | ||
+ | | prod_Loon | ||
+ | | prod_Pluros | ||
Line 896: | Line 911: | ||
=== Performing Independent Optimizations === | === Performing Independent Optimizations === | ||
- | After the optimizer client (such as Clarujust) connects to the optimizer server, it can perform whatever optimizations or adjustments it requires on the circuit. | + | After the optimizer client (such as Clarujust) connects to the optimizer server, it can perform whatever optimizations or adjustments it requires on the circuit, without having to call the built-in optimizer routines. After all the work is done, the optimizer client needs to call the '' |
<code csharp> | <code csharp> | ||
Line 903: | Line 918: | ||
if (svr != null) | if (svr != null) | ||
{ | { | ||
+ | // | ||
+ | // Get Fitting Session Data | ||
+ | // | ||
+ | ... such as: | ||
+ | svr.GetEarCount(cnt); | ||
+ | ear = svr.GetEar(); | ||
+ | svr.GetInterface(idxIntf); | ||
+ | svr.GetTubingType(idxTubing, | ||
+ | svr.GetSerialNumber(SerialNumLeft, | ||
+ | svr.GetSerialNumber(SerialNumRight, | ||
+ | svr.GetDeviceID(DeviceIDLeft, | ||
+ | svr.GetDeviceID(DeviceIDRight, | ||
+ | svr.GetAudiogram(...); | ||
+ | ... | ||
+ | | ||
// | // | ||
// Do work: independent optimizations or circuit param changes | // Do work: independent optimizations or circuit param changes | ||
Line 918: | Line 947: | ||
DisconnectFromOptimizerSvr(); | DisconnectFromOptimizerSvr(); | ||
</ | </ | ||
- | |||
=== Performing Test Sequences (Calling Built-in Optimizations) === | === Performing Test Sequences (Calling Built-in Optimizations) === | ||
Line 950: | Line 978: | ||
// Get Fitting Session Data | // Get Fitting Session Data | ||
// | // | ||
- | | + | |
svr.GetEarCount(cnt); | svr.GetEarCount(cnt); | ||
ear = svr.GetEar(); | ear = svr.GetEar(); | ||
- | svr.GetInterface(idx); | + | svr.GetInterface(idxIntf); |
- | svr.GetTubingType(idx, grpEarSide.ItemIndex); | + | svr.GetTubingType(idxTubing, sideLeft); |
svr.GetSerialNumber(SerialNumLeft, | svr.GetSerialNumber(SerialNumLeft, | ||
svr.GetSerialNumber(SerialNumRight, | svr.GetSerialNumber(SerialNumRight, | ||
- | svr.GetDeviceID(SerialNumOptLeft, sideLeft); | + | svr.GetDeviceID(DeviceIDLeft, sideLeft); |
- | svr.GetDeviceID(SerialNumOptRight, sideRight); | + | svr.GetDeviceID(DeviceIDRight, sideRight); |
GetAudiogram(); | GetAudiogram(); | ||
svr.GetEthosArray(ParamsLeft, | svr.GetEthosArray(ParamsLeft, |