declare const DeviceStatusCode: { readonly noIviumsoft: -1; readonly notConnected: 0; readonly availableIdle: 1; readonly availableBusy: 2; readonly noDeviceAvailable: 3; }; type DeviceStatusCode = typeof DeviceStatusCode[keyof typeof DeviceStatusCode]; /** * A tuple that represents the result of an Ivium function call. The first element is a number indicating the result code, and the second element is the actual result of the function. * @template T The type of the actual result of the function. Can be a string or a number (default is number). */ type IviumResult = [number, T]; /** * The core class that provides access to Ivium functionality. * All its methods are static. */ declare class Core { #private; /** * Opens the Ivium driver. * * @returns The result code of the operation. */ static IV_open(): number; /** * Closes the Ivium driver. * * @returns The result code of the operation. */ static IV_close(): number; /** * Determines whether the Ivium driver is open. * * @returns A boolean value indicating whether the driver is open. */ static isDriverOpen(): boolean; /** * Gets the maximum number of devices supported by the Ivium library. * * @returns The maximum number of devices. */ static IV_MaxDevices(): number; /** * Selects a specific device based on its Ivium soft instance number. * * @param iviumsoftInstanceNumber - The Ivium soft instance number of the device to select. * @returns A tuple containing the result code of the operation and the Ivium soft instance number of the selected device. */ static IV_selectdevice(iviumsoftInstanceNumber: number): IviumResult; /** * It returns -1 (no IviumSoft), 0 (not connected), 1 (available_idle), 2 (available_busy), 3 (no device available) * @returns {number} The status of the device. */ static IV_getdevicestatus(): DeviceStatusCode; /** * Reads the serial number of the currently selected device. * * @returns A tuple containing the result code of the operation and the serial number of the device. */ static IV_readSN(): IviumResult; /** * Connects to the Ivium device. * @param connectionStatus A number indicating the connection status. * @returns An IviumResult tuple containing the result code and the updated connection status. */ static IV_connect(connectionStatus: number): IviumResult; /** * Returns the version host. * @returns {number} An IviumResult tuple containing the result code and the version host. */ static IV_VersionHost(versionHost: number): IviumResult; /** * Returns the version of the IviumSoft driver DLL. * @returns {number} The version of the IviumSoft driver DLL. */ static IV_VersionDll(): number; /** * It returns 1 if the selected instance of IviumSoft is running. * @returns {number}. */ static IV_VersionCheck(): number; /** * Returns the handle of the host. * @returns {number} The handle of the host. */ static IV_HostHandle(): number; /** * Returns the version of the DLL file. * @returns {number} The version of the DLL file. */ static IV_VersionDllFile(): number; /** * Returns the version of the DLL file as a string. * @returns {number} The version of the DLL file as a string. */ static IV_VersionDllFileStr(): number; /** * Sending the integer value communicates with Multichannel control: if not yet active, the [int] number of tabs is automatically opened and the [int] tab becomes active; if Ivium-n-Soft is active already, the [int] tab becomes active. Now the channel/instrument that is connected to this tab can be controlled. If no instrument is connected, the next available instrument in the list can be connected (IV_connect) and controlled. * @param {number} channelNumber The channel number to select. * @returns {number} The result of selecting the specified channel. */ static IV_SelectChannel(channelNumber: number): number; /** * Returns the corresponding cell status label ["I_ovl", "Anin1_ovl","E_ovl", "CellOff_button pressed", "Cell on"] * @returns {number} The cell status label. */ static IV_getcellstatus(): IviumResult; /** * Sets the connection mode for the Ivium device. * @param connectionModeNumber - The connection mode number. * @returns An IviumResult containing the result code and the updated connection mode number. */ static IV_setconnectionmode(connectionModeNumber: number): IviumResult; /** * Set cell on off to close cell relais (0=off;1=on) * @param {number} cellOnModeNumber - The cell on mode number. * @returns {number} The result of setting the cell on mode. */ static IV_setcellon(cellOnModeNumber: number): number; /** * Set cell potential * @param {number} potential - The potential to set. * @returns {number} The result of setting the cell potential. */ static IV_setpotential(potential: number): number; /** * Set BiStat offset potential * @param {number} potentialWe2 - The potential to set. * @returns {number} The result of setting the cell potential. */ static IV_setpotentialWE2(potentialWe2: number): number; /** * Set cell current * @param {number} current - The current to set. * @returns {number} The result of setting the cell current. */ static IV_setcurrent(current: number): number; /** * Get measured cell potential * @returns An IviumResult containing the result code and the measured cell potential. */ static IV_getpotential(): IviumResult; /** * Set current range, 0=10A, 1=1A, etc, * @returns The result code of the operation. */ static IV_setcurrentrange(currentRange: number): number; /** * Set current range for BiStat, 0=10A, 1=1A, etc, * @returns The result code of the operation. */ static IV_setcurrentrangeWE2(currentRange: number): number; /** * Get measured cell current * @returns An IviumResult containing the result code and the measured cell current. */ static IV_getcurrent(): IviumResult; /** * Get measured cell current from WE2 (bipotentiostat) * @returns An IviumResult containing the result code and the measured cell current from WE2 (bipotentiostat). */ static IV_getcurrentWE2(): IviumResult; /** * Set filter, for int :0=1MHz, 1=100kHz, 2=10kHz, 3=1kHz, 4=10Hz. * @param {number} filter - The filter to set. * @returns {number} The result of setting the filter. */ static IV_setfilter(filter: number): number; /** * Set stability, for int 0=HighSpeed, 1=Standard, 2=HighStability. * @param {number} stability - The stability to set. * @returns {number} The result of setting the stability. */ static IV_setstability(stability: number): number; /** * Select mode for BiStat, for int 0=standard, 1=scanning * This bistat_mode function also can be used to control the Automatic E-ranging function of the instrument; * 0=AutoEranging off; 1=AutoEranging on. * @param {number} bistatMode - The bistat mode to set. * @returns {number} The result of setting the bistat mode. */ static IV_setbistatmode(bistatMode: number): number; /** * Set dac on external port, int=0 for dac1, int=1 for dac2. * @param {number} channel - The channel to set. * @param {number} value - The value to set. * @returns {number} The result of setting the dac on external port. */ static IV_setdac(channel: number, value: number): number; /** * Returns measured voltage on external ADC port, int=channelnr. 0-7. * @param {number} channel - The channel to get. * @returns An IviumResult containing the result code and the measured voltage on external ADC port. */ static IV_getadc(channel: number): IviumResult; /** * Set channel of multiplexer, int=channelnr. starting from 0(default). * @param {number} channel - The channel to set. * @returns {number} The result of setting the channel of multiplexer. */ static IV_setmuxchannel(channel: number): number; /** * Set digital lines on external port, int is bitmask. * @param {number} channel - The channel to set. * @returns {number} The result of setting the digital lines on external port. */ static IV_setdigout(channel: number): number; /** * Returns status of digital inputs from external port, int is bitmask. * @returns An IviumResult containing the result code and the status of digital inputs from external port. */ static IV_getdigin(): IviumResult; /** * Set the frequency value. * @param {number} frequency - The frequency to set. * @returns {number} The result of setting the frequency value. */ static IV_setfrequency(frequency: number): number; /** * Set the amplitude value. * @param {number} amplitude - The amplitude to set. * @returns {number} The result of setting the amplitude value. */ static IV_setamplitude(amplitude: number): number; /** * Returns a sequence of measured currents at defined samplingrate (npoints, interval, array of double): npoints<=256, interval: 10us to 20ms. * @param {number} pointsQuantity - The quantity of points to get. * @param {number} intervalRate - The interval rate to get. * @returns An IviumResult containing the result code and a sequence of measured currents at defined samplingrate. */ static IV_getcurrenttrace(pointsQuantity: number, intervalRate: number): IviumResult; /** * Returns a sequence of measured WE2 currents at defined samplingrate (npoints, interval, array of double): npoints<=256, interval: 10us to 20ms. * @param {number} pointsQuantity - The quantity of points to get. * @param {number} intervalRate - The interval rate to get. * @returns An IviumResult containing the result code and a sequence of measured WE2 currents at defined samplingrate. */ static IV_getcurrentWE2trace(pointsQuantity: number, intervalRate: number): IviumResult; /** * Returns a sequence of measured potentials at defined samplingrate (npoints, interval, array of double): npoints<=256, interval: 10us to 20ms. * @param {number} pointsQuantity - The quantity of points to get. * @param {number} intervalRate - The interval rate to get. */ static IV_getpotentialtrace(pointsQuantity: number, intervalRate: number): IviumResult; /** * Select active WE32 channel (chan) * @param channel The channel to be selected. * @returns The result code. */ static IV_we32setchannel(channel: number): number; /** * Set WE32 offset (chan,value), value -2 to +2V. * Use chan=0 to apply the same offset to all channels. * @param channel The channel to be selected. * @param offset The offset to be applied. * @returns The result code. */ static IV_we32setoffset(channel: number, offset: number): number; /** * Set WE32 offsets values (Nchan,values), with Nchan the number of channels (1..32). * @param numberOfChannels The number of channels. * @param offset The offset to be applied. * @returns The result code. */ static IV_we32setoffsets(numberOfChannels: number, offset: number): number; /** * Returns array with 32 WE32 current values, that are measured simultaneously. * @returns A tuple containing the result code and the current values. */ static IV_we32getoffsets(numberOfChannels: number): IviumResult; /** * Returns array with 32 WE32 current values, that are measured simultaneously. * @returns A tuple containing the result code and the current values. */ static IV_we32readcurrents(): IviumResult; /** * Loads method procedure previously saved to a file. * @param {string} methodFilePath - The path to the method file. * @returns {IviumResult} A tuple containing the result code and the method file path. */ static IV_readmethod(methodFilePath: string): IviumResult; /** * Saves currently loaded method procedure to a file. * @param {string} methodFilePath - The path to the method file. * @returns {IviumResult} A tuple containing the result code and the method file path. */ static IV_savemethod(methodFilePath: string): IviumResult; /** * Starts a method procedure. * If method_file_path is an empty string then the presently loaded procedure is started. * If the full path to a previously saved method is provided * then the procedure is loaded from the file and started. * @param {string} [methodFilePath=''] - The path to the method file. If not specified, the current method will be used. * @returns {IviumResult} A tuple containing the result code and the method file path. */ static IV_startmethod(methodFilePath?: string): IviumResult; /** * Aborts the ongoing method procedure. * @returns {number} The result code. */ static IV_abort(): number; /** * Saves the results of the last method execution into a file. * @param {string} dataFilePath - The full path to the new file. * @returns {IviumResult} A tuple containing the result code and the method data file path. */ static IV_savedata(dataFilePath: string): IviumResult; /** * Allows updating the parameter values for the currently loaded method procedrue. * It only works for text based parameters and dropdowns (multiple option selectors). * @param {string} parameterName - The name of the parameter to set. * @param {string} parameterValue - The value to set the parameter to. * @returns {number} The result code of the function call. */ static IV_setmethodparameter(parameterName: string, parameterValue: string): number; /** * Returns actual available number of datapoints: indicates the progress during a run. * @returns {IviumResult} The result of the function call, with the number of data points as the second element. */ static IV_Ndatapoints(): IviumResult; /** * Returns the data from a datapoint with index int, returns 3 values that depend on * the used technique. For example LSV/CV methods return (E/I/0) Transient methods * return (time/I,E/0), Impedance methods return (Z1,Z2,freq) etc. * @param {number} dataPointIndex - The index of the data point to retrieve data for. * @returns {IviumResult} The result of the function call, with the data for the specified data point as the second element (an array of three numbers). */ static IV_getdata(dataPointIndex: number): IviumResult; /** * Same as get_data_point, but with the additional scan_index parameter. * This function will allow reading data from non-selected (previous) scans. * @param {number} dataPointIndex - The index of the data point to retrieve data from. * @param {number} scanIndex - The index of the scan to retrieve data from. * @returns {IviumResult} - An array with the result code as the first element, and an array of measured values as the second element. */ static IV_getdatafromline(dataPointIndex: number, scanIndex: number): IviumResult; } /** * Wrapper class for the Ivium library. * It uses the methods defined in the Core class. * All its methods are static. */ declare class Ivium { /** * Open the driver to manipulate the Ivium software. */ static openDriver(): void; /** * Close the iviumsoft driver. */ static closeDriver(): void; /** * @returns the maximum number of devices that can be managed by IviumSoft. */ static getMaxDeviceNumber(): number; /** * Informs about the status of IviumSoft and the connected device. * It use the global statusLabes array including all the possible resulting status. * @returns -1 (no IviumSoft), 0 (not connected), 1 (available_idle), 2 (available_busy), * 3 (no device available). */ static getDeviceStatus(): IviumResult; /** * @returns A boolean value indicating whether IviumSoft is running. */ static isIviumsoftRunning(): boolean; /** * @returns A list of active(open) IviumSoft instances. */ static getActiveIviumsoftInstances(): number[]; /** * It allows to select one instance of the currently running IviumSoft instances * @param {number} iviumsoftInstanceNumber The instance number to select. */ static selectIviumsoftInstance(iviumsoftInstanceNumber: number): void; /** * @returns The serial number of the currently selected device if available. */ static getDeviceSerialNumber(): string; /** * It connects the currently selected device. */ static connectDevice(): void; /** * It disconnects the currently selected device. */ static disconnectDevice(): void; /** * @returns The version of the IviumSoft dll. */ static getDllVersion(): number; /** * @returns The version of the IviumSoft that match with this iviumjs version. */ static getIviumsoftVersion(): string; /** * Sending the number value communicates with Multichannel control: * if not yet active, the [number] of tabs is automatically opened and the [number] tab becomes active. * if Ivium-n-Soft is active already, the [number] tab becomes active. * Now the channel/instrument that is connected to this tab can be controlled. * If no instrument is connected, the next available instrument in the list can be connected (IV_connect) and controlled. * @param {number} channelNumber to target */ static selectChannel(channelNumber: number): void; /** * @returns The cell status labels: * ["I_ovl", "Anin1_ovl","E_ovl", "CellOff_button pressed", "Cell on"]. */ static getCellStatus(): string[]; /** * Select the connection mode for the currently connected device. * The available modes depend on the connected device. * The list can include: 0=off, 1=EStat4EL(default), 2=EStat2EL, * 3=EstatDummy1,4=EStatDummy2,5=EstatDummy3,6=EstatDummy4 * 7=Istat4EL, 8=Istat2EL, 9=IstatDummy, 10=BiStat4EL, 11=BiStat2EL. * @param connectionMode the number corresponding with available list. */ static setConnectionMode(connectionMode: number): void; /** * Set cell on. */ static setCellOn(): void; /** * Set cell off. */ static setCellOff(): void; /** * Set cell potential. * @param potential the value of potential (in Volts) to set. */ static setPotential(potential: number): void; /** * Set BiStat (WE2) offset potential potential. * @param we2Potential the value of potential, in Volts (V), to set. */ static setWe2Potential(we2Potential: number): void; /** * Set cell current (galvanostatic mode). * @param current the value of current intensity, in Amperes (A), to be set. */ static setCurrent(current: number): void; /** * @returns The measured potential. */ static getPotential(): number; /** * Set current range: 0=10A, 1=1A, etc... * @param currentRange The current range from the available current ranges list. */ static setCurrentRange(currentRange: number): void; /** * Set current range for BiStat (WE2): 0=10mA, 1=1mA, etc... * @param currentRange The number of current range from the available current ranges list. */ static setWe2CurrentRange(currentRange: number): void; /** * @returns The measured(applied) current. */ static getCurrent(): number; /** * @returns The measured current from WE2 (bipotentiostat). */ static getWe2Current(): number; /** * Set filter: 0=1MHz, 1=100kHz, 2=10kHz, 3=1kHz, 4=10Hz * @param filter The number of filter from the available filter list. */ static setFilter(filter: 0 | 1 | 2 | 3 | 4): void; /** * Set stability: 0=HighSpeed, 1=Standard, 2=HighStability * @param stability The number value from the available filter list. */ static setStability(stability: 0 | 1 | 2): void; /** * Select mode for BiStat, for number 0=standard, 1=scanning. * This bistat_mode function also can be used to control the Automatic E-ranging function of the instrument; * 0=AutoEranging off; 1=AutoEranging on. * @param bistatMode The number value 0=standard or 1=scanning. */ static setBistatMode(bistatMode: 0 | 1): void; /** * Set dac on external port: channelNumber=0 for dac1 and channelNumber=1 for dac2. * @param channel The dac channel number. * @param dac The dac value to set. */ static setDac(channel: 0 | 1, dac: number): void; /** * Returns measured voltage on external ADC port, int=channelnr. 0-7 * @param channel The dac channel number. */ static getAdc(channel: number): number; /** * Set channel of multiplexer, int=channelnr. starting from 0(default). * @param channel The number multiplexer channel. */ static setMuxChannel(channel?: number): void; /** * @returns A sequence of measured currents at defined sampling rate * @param pointsQuantity The number of points <= 256. * @param intervalRate The interval rate (10us to 20ms). */ static getCurrentTrace(pointsQuantity: number, intervalRate: number): number; /** * @returns A sequence of measured WE2 currents at defined sampling rate * @param pointsQuantity The number of points <= 256. * @param intervalRate The interval rate (10us to 20ms). */ static getCurrentWe2Trace(pointsQuantity: number, intervalRate: number): number; /** * @returns A sequence of measured potentials at defined samplingrate * @param pointsQuantity The number of points <= 256. * @param intervalRate The interval rate (10us to 20ms). */ static getPotentialTrace(pointsQuantity: number, intervalRate: number): number; /** * Set the value of the ac amplitude in Volts. * @param acAmplitude The AC amplitude in Hz. */ static setAcAmplitude(acAmplitude: number): void; /** * Set the value of the ac frequency in Hz. * @param acFrequency The AC frequency in Hz. */ static setAcFrequency(acFrequency: number): void; /** * Loads method procedure previously saved to a file. * @param methodFilePath The path to the file where the method is stored. */ static loadMethod(methodFilePath: string): void; /** * Saves currently loaded method procedure to a file.. * @param methodFilePath The the full path to the new file. */ static saveMethod(methodFilePath: string): void; /** * Starts a method procedure. * If methodFilePath is an empty string then the presently loaded procedure is started. * If the full path to a previously saved method is provided * then the procedure is loaded from the file and started * @param {string} [methodFilePath=''] - The path to the method file. If not specified, the current method will be used. */ static startMethod(methodFilePath?: string): void; /** * Aborts the ongoing method procedure */ static abortMethod(): void; /** * Saves the results of the last method execution into a file. * @param {string} dataFilePath - The full path to the new file. * IMPORTANT: If the path provided is not valid, * it will close the selected iviumsoft instance. */ static saveData(dataFilePath: string): void; /** * Allows updating the parameter values for the currently loaded method procedrue. * It only works for text based parameters and dropdowns (multiple option selectors). * @param {string} parameterName - The name of the parameter to set. * @param {string} parameterValue - The value to set the parameter to. */ static setMethodParameter(parameterName: string, parameterValue: string): void; /** * Returns actual available number of datapoints: indicates the progress during a run. * @returns {number} The number of available data points. */ static getAvailableDataPointsNumber(): number; /** * Returns the data from a datapoint with index int, returns 3 values that depend on * the used technique. For example LSV/CV methods return (E/I/0) Transient methods * return (time/I,E/0), Impedance methods return (Z1,Z2,freq) etc. * @param {number} dataPointIndex - The index of the data point to retrieve data for. * @returns {number[]} The data for the specified data point (an array of three numbers). */ static getDataPoint(dataPointIndex: number): number[]; /** * Same as get_data_point, but with the additional scan_index parameter. * This function will allow reading data from non-selected (previous) scans. * @param {number} dataPointIndex - The index of the data point to retrieve data from. * @param {number} scanIndex - The index of the scan to retrieve data from. * @returns {number[]} - An array of measured values. */ static getDataPointFromScan(dataPointIndex: number, scanIndex: number): number[]; } /** * @class * @classdesc Class that encapsulates methods to validated the current status of the IviumSoft environment. */ declare class IviumVerifiers { /** * @static * @method * @description Raise exception if the driver is not open. * @throws {DriverNotOpenError} * @memberof IviumVerifiers */ static verifyDriverIsOpen(): void; /** * @static * @method * @description Raise exception if IviumSoft is not running. * @throws {IviumsoftNotRunningError} * @memberof IviumVerifiers */ static verifyIviumsoftIsRunning(): void; /** * @static * @method * @description Raise exception if a device is not connected through the IviumSoft app. * @throws {DeviceNotConnectedToIviumsoftError} * @memberof IviumVerifiers */ static verifyDeviceIsConnectedToIviumsoft(): void; /** * @static * @method * @description Raise exception if no device is connected to your computer through usb. * @throws {NoDeviceDetectedError} * @memberof IviumVerifiers */ static verifyDeviceIsConnectedToComputer(): void; /** * @static * @method * @description Raise exception if no device is connected to your computer through usb. * @throws {DeviceBusyError} * @memberof IviumVerifiers */ static verifyDeviceIsAvailable(): void; /** * @static * @method * @description Raise exception if cell is off. * @throws {CellOffError} * @memberof IviumVerifiers */ static verfiyCellIsOn(): void; } declare class CellOffError extends Error { constructor(message?: string); } declare class DeviceBusyError extends Error { constructor(message?: string); } declare class DeviceNotConnectedToIviumsoftError extends Error { constructor(message?: string); } declare class DriverNotOpenError extends Error { constructor(message?: string); } declare class NoDeviceDetectedError extends Error { constructor(message?: string); } declare class IviumsoftNotRunningError extends Error { constructor(message?: string); } type index_CellOffError = CellOffError; declare const index_CellOffError: typeof CellOffError; type index_DeviceBusyError = DeviceBusyError; declare const index_DeviceBusyError: typeof DeviceBusyError; type index_DeviceNotConnectedToIviumsoftError = DeviceNotConnectedToIviumsoftError; declare const index_DeviceNotConnectedToIviumsoftError: typeof DeviceNotConnectedToIviumsoftError; type index_DriverNotOpenError = DriverNotOpenError; declare const index_DriverNotOpenError: typeof DriverNotOpenError; type index_IviumsoftNotRunningError = IviumsoftNotRunningError; declare const index_IviumsoftNotRunningError: typeof IviumsoftNotRunningError; type index_NoDeviceDetectedError = NoDeviceDetectedError; declare const index_NoDeviceDetectedError: typeof NoDeviceDetectedError; declare namespace index { export { index_CellOffError as CellOffError, index_DeviceBusyError as DeviceBusyError, index_DeviceNotConnectedToIviumsoftError as DeviceNotConnectedToIviumsoftError, index_DriverNotOpenError as DriverNotOpenError, index_IviumsoftNotRunningError as IviumsoftNotRunningError, index_NoDeviceDetectedError as NoDeviceDetectedError, }; } export { Core, Ivium, index as IviumErrors, IviumVerifiers };