SEARCH   
Home About Us Products Manufacturing Services Support ARK online Contact Us
Support > Software Downloads >
ARK® Tutorial



Introduction  |  Core Component  |  Communications  |  Additional Topics  |  Reference Guide




 
   

Reference Guide

interface IProgrammer2

The key interface to controller components.

Definition
interface IProgrammer: ISupportsCatalog
{
[id(0),propget]
HRESULT Name ([out, retval] BSTR* rval);
[propget]
HRESULT Title ([out, retval] BSTR* rval);
[propget]
HRESULT Version ([out, retval] BSTR* rval);
[propget]
HRESULT Controllers ([out, retval] IControllers ** rval);
HRESULT GetEmpty ([in] Ear ear, [in] short memoryno, [in, defaultvalue("")] BSTR controllername, [out,retval] IMemory** rval);
HRESULT Open ([in] long hWnd);
HRESULT WhichChip ([in] Ear ear, [in, defaultvalue("")] BSTR forcecontroller, [out, retval] IControllerInfo** rval);
HRESULT Init ([in] Ear ear, [out] IMemory** control, [out, retval] long* rval);
HRESULT Timing ([in] Ear ear, [out, retval] long* rval);
HRESULT Read ([in] Ear ear, [in] short memoryno, [out, retval] IMemory** rval);
HRESULT Write ([in] Ear ear, [in] short memoryno, [in] IMemory* values);
HRESULT Burn ([in] Ear ear, [in] short memoryno, [in] IMemory* values, [in, defaultvalue(FALSE)] VARIANT_BOOL verify);
HRESULT Close();
};
interface IProgrammer2 : IProgrammer
{
HRESULT InitEx ([in] Ear ear, [in, out] IMemory** control, [out, retval] long* rval);
HRESULT ReadEx ([in] Ear ear, [in] short memoryno, [in, out] IMemory** mem);
HRESULT SwitchToMemory ([in] Ear ear, [in] short memoryno);
};
Descriptions

[id(0), propget]
HRESULT Name([out, retval] BSTR* rval);
The short name of the controller component.

[propget]
HRESULT Title([out, retval] BSTR* rval);
The descriptive name of the controller component.

[propget]
HRESULT Version([out, retval] BSTR*rval);
Version information regarding the controller component.

[propget]
HRESULT Controllers([out, retval] IControllers ** rval);
The collection of ControllerInfo objects providing information on supported controller chips.

HRESULT GetEmpty([in] Ear ear, [in] short memoryno, [in,defaultvalue("")] BSTR controllername, [out, retval] IMemory ** rval);
Creates a new, empty Memory object.  ear indicates that the object should be created for the controller chip that is connected to the specified ear port.  memoryno specifies the memory number that the Memory object is going to be used with and thus determines the parameters that are made available in the Memory object.  For example, audiological memories have different parameters than control memories.

HRESULT Open([in] long hWnd);
Opens the programming box. hWnd is the handle to the main window of the calling application. This method must be called before any of the methods below. It is usually followed by WhichChip .

HRESULT WhichChip([in] Ear ear, [in, defaultvalue("")] BSTR forcecontroller, [out, retval] IControllerInfo ** rval);
Determines which controller chip is connected. It is usually called after Open and before Init or InitEx.  The optional parameter, forcecontroller, is used to force the controller component to assume that a particular controller chip is connected.  A ControllerInfo object is returned which provides information on the controller chip that was detected.

HRESULT Init([in] Ear ear,[out] IMemory ** control, [out, retval]long* rval);
Initializes the connected device and reads its control and calibration data. This method has been replaced in ARK 2 by InitEx.  InitEx must be used by applications communicating with PARAGON hybrids.  The ear parameter specifies the ear port that the hearing instrument is connected to.  The Memory object for the control word is returned via the control parameter, and the measured timing value (in units that are specific to the programming box) is returned via the rval parameter.

HRESULT Timing([in] Ear ear, [out, retval] long* rval);
Measures the timing of the connected device.   The ear parameter specifies the ear port that the hearing instrument is connected to.  Returns the measured value in units that are specific to the programming box.

HRESULT Read([in] Ear ear,[in] short memoryno, [out, retval] IMemory ** rval);
Reads data into a Memory object from the connected device. This method has been replaced in ARK 2 by ReadEx .  ReadEx must be used by applications communicating with PARAGON hybrids.
The ear parameter specifies the ear port that the hearing instrument is connected to.   memoryno specifies the memory number that data should be read from.  The resulting Memory object is returned via the rval parameter.

HRESULT Write([in] Ear ear, [in] short memoryno, [in] IMemory *values);
Writes data from a Memory object to the connected device. Changes are non-permanent. The ear parameter specifies the ear port that the hearing instrument is connected to.   memoryno specifies the memory number that data should be written to.  The Memory object containing the data to be written is passed via the values parameter.

HRESULT Burn([in] Ear ear,[in] short memoryno, [in] IMemory * values,[in, defaultvalue(FALSE)] VARIANT_BOOL verify);
Writes data from a Memory object to the connected device. Changes are permanent. The ear parameter specifies the ear port that the hearing instrument is connected to.   memoryno specifies the memory number that data should be written to.  The Memory object containing the data to be written is passed via the values parameter.

HRESULT Close();
Closes the programming box. This method should be called before the application terminates.

HRESULT InitEx([in] Ear ear, [in, out] IMemory ** control, [out,retval] long* rval);
Initializes the connected device and reads its control and calibration data. The ear parameter specifies the ear port that the hearing instrument is connected to.   The Memory object passed in the control parameter must have been obtained using the GetFull method of the product component.   The measured timing value (in units that are specific to the programming box) is returned via the rval parameter.

HRESULT ReadEx([in] Ear ear, [in] short memoryno, [in, out] IMemory ** mem);
Reads data into a Memory object from the connected device. The ear parameter specifies the ear port that the hearing instrument is connected to.   memoryno specifies the memory number that data should be read from.  The Memory object passed in the control parameter must have been obtained using the GetFull method of the product component.

HRESULT SwitchToMemory([in] Ear ear, [in] short memoryno);
Causes the device to switch to the specified memory, if the memory is valid. When communicating with PARAGON hybrids, an exception is raised if the memory is invalid that the application is attempting to switch to. When communicating with programmable analog hybrids, the hybrid goes to the "short" or "open" state, depending on how the device is configured. In PARAGON hybrids, SwitchToMemory will only work when the hearing instrument is configured to be in momentary mode (which is the default).




© ON Semiconductor  |   PRIVACY POLICY  |   TERMS OF USE