This is an old revision of the document!


Clarujust API

The following represents the expected methods/functionality that will be provided to Clarujust when it is initialized from an external application. Also, the following shows the functionality provided by Clarujust to the external application. For the rest of this document, the external application will be referred to as ezFit.

This is a work in progress and, I’m sure, is far from complete. Any suggestions or comments would be greatly appreciated.

The Audina API

It is assumed Clarujust will be initialized with a reference to some kind of object that communicates with the hearing aids. The following shows this interface:

I’m guessing the method names will be similar to what has previously been provided by ezOrange.

It is assumed the hearing devices will already be connect and initialized by ezFit when this interface is passed to Clarujust. Also, ezFit should already have the correct memory slots selected in the hearing devices.

Here’s a short description of the methods: Boolean GetHAInitialized() Returns true if the API has initialized the hearing devices; otherwise, false.

Int16 GetEar()
void SetEar(Int16 value)

Gets or sets the current ear. 0 = left, 1 = right. With the exception of the GetHAInitialized method, the SetEar method needs to be called before any other method is called in order to access data in the correct ear. For example, the following code shows how to get the bump values from the right-ear hearing device:

void GetBumpExample(AudinaAPI api)
{
    if (api != null &&
        api.GetHAInitialized())
    {
        api.SetEar(1);
        short bumpQ = api.GetBumpQ();
        short bumpGain = api.GetBumpGain();
        short bumpCF = api.GetBumpCF();
    }
}
short GetMemory()

Returns the current memory slot of the current ear.

int[] GetEthosArray()

Returns an array containing all current hearing device parameters in the current ear.

short GetBumpCF()
void SetBumpCF(short value)
short GetBumpQ()
void SetBumpQ(short value)
short GetBumpGain()
void SetBumpGain(short value)
short GetGain()
void SetGain(short value)
short GetTiltSlope()
void SetTiltSlope(short value)

Gets or sets the associated parameter values in the current ear.

I don’t know if we need the GetBias or SetBias methods, or if we’re going to handle the compression via the SetCompression method, but those can be added if needed.

Exposed Clarujust Methods/Objects

The following shows what will be exposed to ezFit.

The ClarujustApp static class provides one method:

static IClarujustWindow Create(AudinaAPI api)

Returns an instance of a Clarujust window.

The IClarujustWindow interface defines the methods that will be exposed to ezFit while Clarujust is running. We can add/remove/modify methods in this interface depending on what we decide should be provided to ezFit, but for the time being, here is the interface and its associated methods:

void Show()

Shows the Clarujust window.

void ShowModal()

Shows the Clarujust window as a modal dialog box.

void Hide()

Hides the Clarujust window.