# TecellaAmp.h File Reference

## Data Structures
struct | tecella_lib_props
struct | tecella_hw_props
struct | tecella_hw_props_ex_01
struct | tecella_reg_props
struct | tecella_system_monitor_result
struct | tecella_stimulus_segment
struct | tecella_stimulus_segment_ex
## Defines
#define | TECELLA_ALLCHAN 0x8000
#define | TECELLA_SOURCE_NONE 0
#define | TECELLA_SOURCE_HEAD 1
#define | TECELLA_SOURCE_MODEL1 2
#define | TECELLA_SOURCE_MODEL2 3
#define | TECELLA_GAIN_A 0
#define | TECELLA_GAIN_B 1
#define | TECELLA_GAIN_C 2
#define | TECELLA_GAIN_D 3
#define | TECELLA_HW_PROPS_DEVICE_NAME_SIZE 32
#define | TECELLA_HW_PROPS_SERIAL_NUMBER_SIZE 32
#define | TECELLA_HW_PROPS_USER_CONFIG_NAME_SIZE 32
#define | TECELLA_HW_PROPS_ACQUISITION_UNITS_SIZE 32
#define | TECELLA_HW_PROPS_STIMULUS_UNITS_SIZE 32
#define | TECELLA_REG_PROPS_LABEL_SIZE 32
#define | TECELLA_REG_PROPS_UNITS_SIZE 32
#define | TECELLA_SYSTEM_MONITOR_RESULT_LABEL_SIZE 32
#define | TECELLA_SYSTEM_MONITOR_UNITS_LABEL_SIZE 32
#define | CALL __cdecl
## Typedefs
typedef int | TECELLA_HNDL
typedef struct tecella_lib_props | TECELLA_LIB_PROPS
typedef struct tecella_hw_props | TECELLA_HW_PROPS
typedef struct tecella_hw_props_ex_01 | TECELLA_HW_PROPS_EX_01
typedef struct tecella_reg_props | TECELLA_REG_PROPS
typedef struct tecella_system_monitor_result | TECELLA_SYSTEM_MONITOR_RESULT
typedef struct tecella_stimulus_segment | TECELLA_STIMULUS_SEGMENT
typedef struct tecella_stimulus_segment_ex | TECELLA_STIMULUS_SEGMENT_EX
typedef void(CALL * | TECELLA_ERR_CB )(TECELLA_HNDL h, TECELLA_ERRNUM e, const wchar_t *msg)
typedef void(CALL * | TECELLA_ACQUIRE_CB )(TECELLA_HNDL h, int channel, unsigned int samples_available)
typedef void(CALL * | TECELLA_STIMULUS_CB )(TECELLA_HNDL h, int stimulus_index, unsigned long long timestamp)
## Enumerations
enum | TECELLA_HW_MODEL { TECELLA_HW_MODEL_AUTO_DETECT, TECELLA_HW_MODEL_TRITON, TECELLA_HW_MODEL_TRITON_PLUS, TECELLA_HW_MODEL_JET, TECELLA_HW_MODEL_RICHMOND, TECELLA_HW_MODEL_PROTEUS, TECELLA_HW_MODEL_APOLLO, TECELLA_HW_MODEL_WALL_E, TECELLA_HW_MODEL_SHASTA, TECELLA_HW_MODEL_AMADEUS, TECELLA_HW_MODEL_PICO }
enum | TECELLA_REGISTER { TECELLA_REG_CFAST = 0x00, TECELLA_REG_CSLOW_A = 0x01, TECELLA_REG_CSLOW_B = 0x02, TECELLA_REG_CSLOW_C = 0x03, TECELLA_REG_CSLOW_D = 0x04, TECELLA_REG_RSERIES = 0x05, TECELLA_REG_LEAK = 0x06, TECELLA_REG_JP = 0x07, TECELLA_REG_JP_FINE = 0x08, TECELLA_REG_LEAK_FINE = 0x09, TECELLA_REG_ICMD_OFFSET = 0x0A }
enum | TECELLA_OFFSET_ADJUST_MODE { TECELLA_OAM_OFF = 0, TECELLA_OAM_ADJUST_STIMULUS = 1, TECELLA_OAM_ADJUST_RESPONSE = 2, TECELLA_OAM_ADJUST_STIMULUS_AND_RESPONSE = 3 }
enum | TECELLA_ERRNUM { TECELLA_ERR_OK = 0x000, TECELLA_ERR_NOT_IMPLEMENTED = 0x001, TECELLA_ERR_NOT_SUPPORTED = 0x002, TECELLA_ERR_BAD_HANDLE = 0x003, TECELLA_ERR_INVALID_CHANNEL = 0x004, TECELLA_ERR_INVALID_STIMULUS = 0x005, TECELLA_ERR_INVALID_CHOICE = 0x006, TECELLA_ERR_ALLCHAN_NOT_ALLOWED = 0x007, TECELLA_ERR_RETURN_POINTER_NULL = 0x008, TECELLA_ERR_ARGUMENT_POINTER_NULL = 0x009, TECELLA_ERR_VALUE_OUTSIDE_OF_RANGE = 0x00A, TECELLA_ERR_INVALID_REGISTER_COMBINATION = 0x00B, TECELLA_ERR_DEVICE_CONTENTION = 0x00C, TECELLA_ERR_INTERNAL = 0x00D, TECELLA_ERR_FILE_DOES_NOT_EXIST = 0x00E, TECELLA_ERR_BAD_FILE_FORMAT = 0X00F, TECELLA_ERR_OKLIB_NOT_FOUND = 0x100, TECELLA_ERR_DEVICE_OPEN_FAILED = 0x101, TECELLA_ERR_DEVICE_INIT_FAILED = 0x102, TECELLA_ERR_INVALID_DEVICE_INDEX = 0x103, TECELLA_ERR_BAD_FIRMWARE_VERSION = 0x104, TECELLA_ERR_STIMULUS_INVALID_SEGMENT_COUNT = 0x200, TECELLA_ERR_STIMULUS_INVALID_DURATION = 0x201, TECELLA_ERR_STIMULUS_INVALID_VALUE = 0x202, TECELLA_ERR_STIMULUS_INVALID_DURATION_DELTA = 0x203, TECELLA_ERR_STIMULUS_INVALID_VALUE_DELTA = 0x204, TECELLA_ERR_STIMULUS_INVALID_RAMP_STEP_COUNT = 0x205, TECELLA_ERR_STIMULUS_INVALID_RAMP_END_VALUE = 0x206, TECELLA_ERR_STIMULUS_INVALID_DELTA_COUNT = 0x207, TECELLA_ERR_STIMULUS_INVALID_REPEAT_COUNT = 0x208, TECELLA_ERR_STIMULUS_INVALID_SEGMENT_SEQUENCE = 0x209, TECELLA_ERR_INVALID_SAMPLE_PERIOD = 0x300, TECELLA_ERR_HW_BUFFER_OVERFLOW = 0x301, TECELLA_ERR_SW_BUFFER_OVERFLOW = 0x302, TECELLA_ERR_ACQ_CRC_FAILED = 0x303, TECELLA_ERR_CHANNEL_BUFFER_OVERFLOW = 0x304 }
enum | TECELLA_STIMULUS_SEGMENT_TYPE { TECELLA_STIMULUS_SEGMENT_SET, TECELLA_STIMULUS_SEGMENT_DELTA, TECELLA_STIMULUS_SEGMENT_RAMP }
## Functions
DLLEXPORT TECELLA_ERRNUM CALL | tecella_debug (char *logfile)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_debug_default ()
DLLEXPORT TECELLA_ERRNUM CALL | tecella_enumerate (int *device_count)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_enumerate_get (int device_index, TECELLA_HW_PROPS *description)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_initialize (TECELLA_HNDL *h, int device_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_initialize_pair (TECELLA_HNDL *h, TECELLA_HNDL hA, TECELLA_HNDL hB)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_finalize (TECELLA_HNDL h)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_user_config_get (TECELLA_HNDL h, int user_config, TECELLA_HW_PROPS *description)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_user_config_set (TECELLA_HNDL h, int user_config)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_user_config_get_current (TECELLA_HNDL h, int *user_config)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_initialize_from_file (TECELLA_HNDL *ph, char *filename)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_finalize_to_file (TECELLA_HNDL h, char *filename)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_lib_props (TECELLA_LIB_PROPS *props)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_hw_props (TECELLA_HNDL h, TECELLA_HW_PROPS *props)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_hw_props_ex_01 (TECELLA_HNDL h, TECELLA_HW_PROPS_EX_01 *props)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_reg_props (TECELLA_HNDL h, TECELLA_REGISTER r, TECELLA_REG_PROPS *props)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_gain_label (TECELLA_HNDL h, int gain_index, const wchar_t **label)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_source_label (TECELLA_HNDL h, int source_index, const wchar_t **label)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_get_slew_label (TECELLA_HNDL h, int slew_index, const wchar_t **label)
DLLEXPORT const wchar_t *CALL | tecella_error_message (TECELLA_ERRNUM errnum)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_error_set_callback (TECELLA_HNDL h, TECELLA_ERR_CB f)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_system_monitor_run (TECELLA_HNDL h, int *result_count, int *results_per_controller, int *results_per_slot)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_system_monitor_get (TECELLA_HNDL h, int result_index, TECELLA_SYSTEM_MONITOR_RESULT *result)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_system_monitor_dynamic_set (TECELLA_HNDL h, int monitor_index)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_diagnostics_run (TECELLA_HNDL h, int *pass_count, int *fail_count)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_diagnostics_get_pass (TECELLA_HNDL h, int pass_index, const wchar_t **msg)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_diagnostics_get_failure (TECELLA_HNDL h, int fail_index, const wchar_t **msg)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_utility_dac_set (TECELLA_HNDL h, double value, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_utility_trigger_out (TECELLA_HNDL h, int index)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_utility_set_stimulus (TECELLA_HNDL h, int channel, int stimulus_index)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_source (TECELLA_HNDL h, int channel, int choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_source (TECELLA_HNDL h, int channel, int *choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_gain (TECELLA_HNDL h, int channel, int choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_gain (TECELLA_HNDL h, int channel, int *choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_stimulus (TECELLA_HNDL h, int channel, int choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_stimulus (TECELLA_HNDL h, int channel, int *choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_iclamp_enable (TECELLA_HNDL h, int channel, bool enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_iclamp_enable (TECELLA_HNDL h, int channel, bool *enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set (TECELLA_HNDL h, TECELLA_REGISTER r, int channel, double value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get (TECELLA_HNDL h, TECELLA_REGISTER r, int channel, double *value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_pct (TECELLA_HNDL h, TECELLA_REGISTER r, int channel, double pct)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_pct (TECELLA_HNDL h, TECELLA_REGISTER r, int channel, double *pct)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_enable (TECELLA_HNDL h, TECELLA_REGISTER r, int channel, bool enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_enable (TECELLA_HNDL h, TECELLA_REGISTER r, int channel, bool *enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_bessel (TECELLA_HNDL h, int channel, int value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_bessel (TECELLA_HNDL h, int channel, int *value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_bessel_value2freq (TECELLA_HNDL h, int value, double *kHz)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_bessel_freq2value (TECELLA_HNDL h, double kHz, int *value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_stim_assign (TECELLA_HNDL h, int channel, int value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_apply_stim_assign (TECELLA_HNDL h, char *filename, int value[])
DLLEXPORT TECELLA_ERRNUM CALL | tecella_load_stim_assign (TECELLA_HNDL h, char *filename, int *value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_hpf (TECELLA_HNDL h, int channel, int value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_hpf (TECELLA_HNDL h, int channel, int *value)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_hpf_value2freq (TECELLA_HNDL h, int choice, double *Hz)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_hpf_freq2value (TECELLA_HNDL h, double Hz, int *choice)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_digital_leak (TECELLA_HNDL h, int channel, double digital_leak)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_digital_leak (TECELLA_HNDL h, int channel, double *digital_leak)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_set_digital_leak_enable (TECELLA_HNDL h, int channel, bool enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_chan_get_digital_leak_enable (TECELLA_HNDL h, int channel, bool *enabled)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_set_hold (TECELLA_HNDL h, double value, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_set (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT *segments, int segment_count, int delta_count=1, int repeat_count=1, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_set_ex (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT_EX *segments, int segment_count, int delta_count=1, int repeat_count=1, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_get (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT *segments, int segments_max, int *segments_in_stimulus, int *delta_count, int *repeat_count, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_get_ex (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT_EX *segments, int segments_max, int *segments_in_stimulus, int *delta_count, int *repeat_count, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_set_slew (TECELLA_HNDL h, int choice, int index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_set_callback (TECELLA_HNDL h, TECELLA_STIMULUS_CB f)
DLLEXPORT unsigned long long CALL | tecella_stimulus_index_sample_count (TECELLA_HNDL h, int index, double sample_period)
DLLEXPORT unsigned long long CALL | tecella_stimulus_sample_count (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT *segments, int segment_count, int delta_count, int repeat_count, double sample_period)
DLLEXPORT unsigned long long CALL | tecella_stimulus_sample_count_ex (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT_EX *segments, int segment_count, int delta_count, int repeat_count, double sample_period)
DLLEXPORT unsigned int CALL | tecella_stimulus_sample_count_partial (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT *segments, int segment_count, int delta_iteration, double sample_period)
DLLEXPORT unsigned int CALL | tecella_stimulus_sample_count_partial_ex (TECELLA_HNDL h, TECELLA_STIMULUS_SEGMENT_EX *segments, int segment_count, int delta_iteration, double sample_period)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_zap (TECELLA_HNDL h, double duration, double amplitude, int *channels=0, int channel_count=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_stimulus_steer (TECELLA_HNDL h, int stimulus_index, int destination_index, bool enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_scale (TECELLA_HNDL h, bool enable, int unused_stimulus_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_calibrate (TECELLA_HNDL h, bool enable, int unused_stimulus_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_calibrate_get (TECELLA_HNDL h, int channel, int *offset)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_calibrate_set (TECELLA_HNDL h, int channel, int offset)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_offset (TECELLA_HNDL h, double jp_delta=0, int unused_stimulus_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_comp_offset_adjust_mode_set (TECELLA_HNDL h, int channel, TECELLA_OFFSET_ADJUST_MODE mode)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_comp_offset_adjust_mode_get (TECELLA_HNDL h, int channel, TECELLA_OFFSET_ADJUST_MODE *mode)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_comp (TECELLA_HNDL h, double v_hold=0, double t_hold=20e-3, double v_step=10e-3, double t_step=20e-3, bool use_leak=true, bool use_digital_leak=true, bool use_cfast=true, bool use_cslow_a=true, bool use_cslow_b=true, bool use_cslow_c=true, bool use_cslow_d=true, bool use_artifact=true, double under_comp_coefficient=0.0, int acq_iterations=10, int unused_stimulus_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_decay_start (TECELLA_HNDL h, double time_fraction)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_update (TECELLA_HNDL h, double v_hold=0, double t_hold=19e-3, double v_step=10e-3, double t_step=19e-3, int iterations=10, int unused_stimulus_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_enable (TECELLA_HNDL h, bool enable=true, int stimulus_index=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_get_capacitance (TECELLA_HNDL h, int channel, double *capacitance)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_get_size (TECELLA_HNDL h, int channel, int *size)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_get (TECELLA_HNDL h, int channel, double *artifact, int max_size, int *actual_size)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_artifact_set (TECELLA_HNDL h, int channel, double *artifact, int size)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_auto_frequency_boost_filter (TECELLA_HNDL h, int lpf_width, int stimulus=0)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_sw_filter_enable (TECELLA_HNDL h, bool enable, int channel=TECELLA_ALLCHAN)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_sw_filter_set (TECELLA_HNDL h, double *kernel, int kernel_size, int channel=TECELLA_ALLCHAN)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_sw_filter_set_box (TECELLA_HNDL h, int width, int channel=TECELLA_ALLCHAN)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_sw_filter_set_lanczos (TECELLA_HNDL h, double width, int quality=3, int channel=TECELLA_ALLCHAN)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_set_callback (TECELLA_HNDL h, TECELLA_ACQUIRE_CB f, unsigned int period=1024)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_enable_channel (TECELLA_HNDL h, int channel, bool enable)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_enable_auto_zero (TECELLA_HNDL h, int channel, bool enable, int window_size)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_set_buffer_size (TECELLA_HNDL h, unsigned int samples_per_chan)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_set_trigger_in_mode (TECELLA_HNDL h, bool active_high, double debounce_delay)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_start (TECELLA_HNDL h, int sample_period_multiplier, bool continuous=false, bool start_stimuli=true, bool continuous_stimuli=false, bool start_on_trigger=false)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_start_stimulus (TECELLA_HNDL h, int stimulus_index, bool start=true, bool continuous=false, int sample_period_multiplier=1)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_start_stimuli (TECELLA_HNDL h, int *stimulus_indexes, int stimulus_count, bool start=true, bool continuous=false, int sample_period_multiplier=1)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_stop_stimulus (TECELLA_HNDL h, int stimulus_index, bool continuous=false)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_stop (TECELLA_HNDL h)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_samples_available (TECELLA_HNDL h, int chan, unsigned int *samples_available)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_read_d (TECELLA_HNDL h, int chan, int requested_samples, double *data, unsigned int *actual_samples, unsigned long long *first_sample_timestamp, bool *last_sample_flag)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_read_f (TECELLA_HNDL h, int chan, int requested_samples, float *data, unsigned int *actual_samples, unsigned long long *first_sample_timestamp, bool *last_sample_flag)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_read_i (TECELLA_HNDL h, int chan, int requested_samples, short *data, unsigned int *actual_samples, unsigned long long *first_sample_timestamp, bool *last_sample_flag)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_acquire_i2d_scale (TECELLA_HNDL h, int chan, double *scale)
DLLEXPORT TECELLA_ERRNUM CALL | tecella_AMS_set_mux (TECELLA_HNDL h, int val)

## Define Documentation

#define CALL __cdecl

#define TECELLA_ALLCHAN 0x8000

Use this in place of a channel number to indicate all channels.

#define TECELLA_GAIN_A 0

#define TECELLA_GAIN_B 1

#define TECELLA_GAIN_C 2

#define TECELLA_GAIN_D 3

#define TECELLA_HW_PROPS_ACQUISITION_UNITS_SIZE 32

tecella_hw_props_ex_01 subject to change Properties of the connected device. For use with tecella_get_hw_props_ex_01().

#define TECELLA_HW_PROPS_DEVICE_NAME_SIZE 32

tecella_hw_props Properties of the connected device. For use with tecella_get_hw_props().

#define TECELLA_HW_PROPS_SERIAL_NUMBER_SIZE 32

#define TECELLA_HW_PROPS_STIMULUS_UNITS_SIZE 32

#define TECELLA_HW_PROPS_USER_CONFIG_NAME_SIZE 32

#define TECELLA_REG_PROPS_LABEL_SIZE 32

tecella_reg_props Provides useful information about a register for a specific device. For use with tecella_get_reg_props().

#define TECELLA_REG_PROPS_UNITS_SIZE 32

#define TECELLA_SOURCE_HEAD 1

Tells tecella_chan_set_source() to use the regular head inputs. (Default)

#define TECELLA_SOURCE_MODEL1 2

Tells tecella_chan_set_source() to use the internal model cell. May or may not be supported, see tecella_get_hw_props().

#define TECELLA_SOURCE_MODEL2 3

Tells tecella_chan_set_source() to use no input. May or may not be supported, see tecella_get_hw_props().

#define TECELLA_SOURCE_NONE 0

Tells tecella_chan_set_source() to use no input

#define TECELLA_SYSTEM_MONITOR_RESULT_LABEL_SIZE 32

tecella_system_monitor_result Contains information about results returned by tecella_system_monitor_get_result().

#define TECELLA_SYSTEM_MONITOR_UNITS_LABEL_SIZE 32

## Typedef Documentation

typedef void(CALL * TECELLA_ACQUIRE_CB)(TECELLA_HNDL h, int channel, unsigned int samples_available)

typedef void(CALL * TECELLA_ERR_CB)(TECELLA_HNDL h, TECELLA_ERRNUM e, const wchar_t *msg)

typedef int TECELLA_HNDL

A device handle to let the API know which device you're addressing.

typedef struct tecella_hw_props TECELLA_HW_PROPS

typedef struct tecella_hw_props_ex_01 TECELLA_HW_PROPS_EX_01

typedef struct tecella_lib_props TECELLA_LIB_PROPS

tecella_lib_props Represents the version of the DLL being used. For use with tecella_get_lib_props().

typedef struct tecella_reg_props TECELLA_REG_PROPS

typedef void(CALL * TECELLA_STIMULUS_CB)(TECELLA_HNDL h, int stimulus_index, unsigned long long timestamp)

typedef struct tecella_stimulus_segment TECELLA_STIMULUS_SEGMENT

tecella_stimulus_segment Create an array of these and pass it to tecella_vcmd_set().

typedef struct tecella_stimulus_segment_ex TECELLA_STIMULUS_SEGMENT_EX

tecella_stimulus_segment_ex Create an array of these and pass it to tecella_vcmd_set_ex(). This version adds new features compared to the non "ex" version, but is more likely to change between versions

typedef struct tecella_system_monitor_result TECELLA_SYSTEM_MONITOR_RESULT

## Enumeration Type Documentation

enum TECELLA_ERRNUM

TECELLA_ERRNUM All functions in this API return one of these error values.

Enumerator:

  TECELLA_ERR_OK |
  TECELLA_ERR_NOT_IMPLEMENTED |
  TECELLA_ERR_NOT_SUPPORTED |
  TECELLA_ERR_BAD_HANDLE |
  TECELLA_ERR_INVALID_CHANNEL |
  TECELLA_ERR_INVALID_STIMULUS |
  TECELLA_ERR_INVALID_CHOICE |
  TECELLA_ERR_ALLCHAN_NOT_ALLOWED |
  TECELLA_ERR_RETURN_POINTER_NULL |
  TECELLA_ERR_ARGUMENT_POINTER_NULL |
  TECELLA_ERR_VALUE_OUTSIDE_OF_RANGE |
  TECELLA_ERR_INVALID_REGISTER_COMBINATION | One of the following constraints was not met: 1) Leak must be greater than Rseries.
  TECELLA_ERR_DEVICE_CONTENTION | Certain tasks cannot be run in parallel, such as diagnostics and acquisition.
  TECELLA_ERR_INTERNAL |
  TECELLA_ERR_FILE_DOES_NOT_EXIST |
  TECELLA_ERR_BAD_FILE_FORMAT |
  TECELLA_ERR_OKLIB_NOT_FOUND |
  TECELLA_ERR_DEVICE_OPEN_FAILED |
  TECELLA_ERR_DEVICE_INIT_FAILED |
  TECELLA_ERR_INVALID_DEVICE_INDEX |
  TECELLA_ERR_BAD_FIRMWARE_VERSION |
  TECELLA_ERR_STIMULUS_INVALID_SEGMENT_COUNT |
  TECELLA_ERR_STIMULUS_INVALID_DURATION |
  TECELLA_ERR_STIMULUS_INVALID_VALUE |
  TECELLA_ERR_STIMULUS_INVALID_DURATION_DELTA |
  TECELLA_ERR_STIMULUS_INVALID_VALUE_DELTA |
  TECELLA_ERR_STIMULUS_INVALID_RAMP_STEP_COUNT |
  TECELLA_ERR_STIMULUS_INVALID_RAMP_END_VALUE |
  TECELLA_ERR_STIMULUS_INVALID_DELTA_COUNT |
  TECELLA_ERR_STIMULUS_INVALID_REPEAT_COUNT |
  TECELLA_ERR_STIMULUS_INVALID_SEGMENT_SEQUENCE |
  TECELLA_ERR_INVALID_SAMPLE_PERIOD |
  TECELLA_ERR_HW_BUFFER_OVERFLOW |
  TECELLA_ERR_SW_BUFFER_OVERFLOW |
  TECELLA_ERR_ACQ_CRC_FAILED |
  TECELLA_ERR_CHANNEL_BUFFER_OVERFLOW |

enum TECELLA_HW_MODEL

TECELLA_HW_MODEL Specifies the type of device we're connected to or want to connect to. Use in conjunction with tecella_initialize() and tecella_get_hw_props().

Enumerator:

  TECELLA_HW_MODEL_AUTO_DETECT |
  TECELLA_HW_MODEL_TRITON |
  TECELLA_HW_MODEL_TRITON_PLUS |
  TECELLA_HW_MODEL_JET |
  TECELLA_HW_MODEL_RICHMOND |
  TECELLA_HW_MODEL_PROTEUS |
  TECELLA_HW_MODEL_APOLLO |
  TECELLA_HW_MODEL_WALL_E |
  TECELLA_HW_MODEL_SHASTA |
  TECELLA_HW_MODEL_AMADEUS |
  TECELLA_HW_MODEL_PICO |

enum TECELLA_OFFSET_ADJUST_MODE

TECELLA_OFFSET_ADJUST_MODE Used by tecella_auto_comp_offset_adjust_mode_set() to indicate if remaining offsets in the response after tecella_auto_comp() should be compensated using JP and/or offset in the response.

Enumerator:

  TECELLA_OAM_OFF |
  TECELLA_OAM_ADJUST_STIMULUS | Adjusts JP. JP must be supported by the hardware.
  TECELLA_OAM_ADJUST_RESPONSE | Adjusts the response offset.
  TECELLA_OAM_ADJUST_STIMULUS_AND_RESPONSE | Adjusts both JP and the response offset.

enum TECELLA_REGISTER

TECELLA_REGISTER An enumeration of all per-channel settings that may exist on a device. To see if a setting is supported by the device, use tecella_get_reg_props().

Enumerator:

  TECELLA_REG_CFAST |
  TECELLA_REG_CSLOW_A |
  TECELLA_REG_CSLOW_B |
  TECELLA_REG_CSLOW_C |
  TECELLA_REG_CSLOW_D |
  TECELLA_REG_RSERIES |
  TECELLA_REG_LEAK |
  TECELLA_REG_JP |
  TECELLA_REG_JP_FINE |
  TECELLA_REG_LEAK_FINE |
  TECELLA_REG_ICMD_OFFSET |

enum TECELLA_STIMULUS_SEGMENT_TYPE

TECELLA_STIMULUS_SEGMENT_TYPE Specifies the segment type in tecella_stimulus_segment.

Enumerator:

  TECELLA_STIMULUS_SEGMENT_SET | A flat segment.
  TECELLA_STIMULUS_SEGMENT_DELTA | A flat segment that changes its amplitude and/or duration after each iteration.
  TECELLA_STIMULUS_SEGMENT_RAMP | A segment that interpolates from one amplitude to another over a fixed duration.

## Function Documentation

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_enable_auto_zero | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | bool | enable,
|  | int | window_size |
| ) |  |  |

Enables or disables auto-zero for a channel. A window of initial samples is averaged to offset the entire acquisition, such that the window of samples average out to zero.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to enable or disable.
  | enable | If true, enable auto zero.
  | window_size | The number of initial samples to average for the new zero level.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_enable_channel | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | bool | enable |
| ) |  |  |

Enables or disables acquisition for a channel. All channels are enabled by default.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to enable or disable.
  | enable | If true, capture. If false, don't.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_i2d_scale | ( | TECELLA_HNDL | h,
|  | int | chan,
|  | double * | scale |
| ) |  |  |

Gets the current multiplier used to convert a 16 bit short sample to Amps.

Parameters:

  | h | A handle to an initialized device.
  | chan | The specified channel. TECELLA_ALLCHAN cannot be used with this function.
  | scale | The return argument for the Amp multiplier.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_read_d | ( | TECELLA_HNDL | h,
|  | int | chan,
|  | int | requested_samples,
|  | double * | data,
|  | unsigned int * | actual_samples,
|  | unsigned long long * | first_sample_timestamp,
|  | bool * | last_sample_flag |
| ) |  |  |

Reads samples from the queue as double-precision floats whose units are in Amps. Once the requested data has been returned, it no longer resides in the queue and cannot be retrieved again. All samples returned by a single call are continuous. A call to this function will block until the number of requested_samples are available or until acqusition is complete. To ensure this function is a non-blocking request use the number of samples returned by tecella_acquire_samples_available(). To recover from any acquisition error, call tecella_acquire_stop() and tecella_acquire_start() again. It is not necessary to re-initialize the entire hardware.

Parameters:

  | h | A handle to an initialized device.
  | chan | The specified channel. TECELLA_ALLCHAN cannot be used with this function.
  | requested_samples | The number of samples the user would like to have copied to data.
  | data | A pointer to an array of doubles, at least of size requested_samples.
  | actual_samples | Used to return how many samples were actually acquired, in the case acquisition is complete.
  | first_sample_timestamp | Timestamp of the first sample. The timestamp increments by 1 for each sample period after the last call to tecella_acquire_start(). (To be implemented.)
  | last_sample_flag | Indicates breaks in acquisition (samples after the last sample returned will not be captured). To be implemented.

Returns:
  TECELLA_ERR_OK If the read completed successfully.

  TECELLA_ERR_SW_BUFFER_OVERFLOW If the software buffers have been filled.

  TECELLA_ERR_HW_BUFFER_OVERFLOW If the hardware buffers have overflowed.

  TECELLA_ERR_ACQ_CRC_FAILED If the data stream was corrupted. (Not implemented yet)

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_read_f | ( | TECELLA_HNDL | h,
|  | int | chan,
|  | int | requested_samples,
|  | float * | data,
|  | unsigned int * | actual_samples,
|  | unsigned long long * | first_sample_timestamp,
|  | bool * | last_sample_flag |
| ) |  |  |

Reads samples from the queue as single-precision floats whose units are in Amps. Same as tecella_acquire_read_d, but for single-precision floats.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_read_i | ( | TECELLA_HNDL | h,
|  | int | chan,
|  | int | requested_samples,
|  | short * | data,
|  | unsigned int * | actual_samples,
|  | unsigned long long * | first_sample_timestamp,
|  | bool * | last_sample_flag |
| ) |  |  |

Reads samples from the queue as 16 bit integers whose units can be retrieved using tecella_acquire_i2d_scale(). Once the requested data has been returned, it no longer resides in the queue and cannot be retrieved again. A call to this function will block until the number of requested_samples are available or until acqusition is complete. To ensure this function is a non-blocking request use the number of samples returned by tecella_acquire_samples_available(). To recover from any acquisition error, call tecella_acquire_stop() and tecella_acquire_start() again. It is not necessary to re-initialize the entire hardware.

Parameters:

  | h | A handle to an initialized device.
  | chan | The specified channel. TECELLA_ALLCHAN cannot be used with this function.
  | requested_samples | The number of samples the user would like to have copied to data.
  | data | A pointer to an array of shorts, at least of size requested_samples.
  | actual_samples | Used to return how many samples were actually acquired, in the case acquisition is complete.
  | first_sample_timestamp | Timestamp of the first sample. The timestamp increments by 1 for each sample period after the last call to tecella_acquire_start(). (To be implemented.)
  | last_sample_flag | Indicates breaks in acquisition (samples after the last sample returned will not be captured). To be implemented.

Returns:
  TECELLA_ERR_OK If the read completed successfully.

  TECELLA_ERR_SW_BUFFER_OVERFLOW If the software buffers have been filled.

  TECELLA_ERR_HW_BUFFER_OVERFLOW If the hardware buffers have overflowed.

  TECELLA_ERR_ACQ_CRC_FAILED If the data stream was corrupted. (Not implemented yet)

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_samples_available | ( | TECELLA_HNDL | h,
|  | int | chan,
|  | unsigned int * | samples_available |
| ) |  |  |

Gets the current number of samples in the queue for the given channel.

Parameters:

  | h | A handle to an initialized device.
  | chan | The specified channel. If TECELLA_ALLCHAN is specified, this function returns the minimum samples available across all channels.
  | samples_available | The number of samples available are returned in this variable.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_set_buffer_size | ( | TECELLA_HNDL | h,
|  | unsigned int | samples_per_chan |
| ) |  |  |

Pre-allocates an internal per-channel software queue for acquisition.

Parameters:

  | h | A handle to an initialized device.
  | samples_per_chan | Maximum number of samples per channel to allow in the queue.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_set_callback | ( | TECELLA_HNDL | h,
|  | TECELLA_ACQUIRE_CB | f,
|  | unsigned int | period = `1024` |
| ) |  |  |

Sets a callback function to be called whenever there is new data for any channel.

Parameters:

  | h | A handle to an initialized device.
  | f | The acquire callback function.
  | period | The number of samples received in a channel before a notification is sent. The number of samples notified may be less if any stimulus starts before the period has been reached or if acquisition has stopped for a particular channel.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_set_trigger_in_mode | ( | TECELLA_HNDL | h,
|  | bool | active_high,
|  | double | debounce_delay |
| ) |  |  |

Sets the trigger in mode.

Parameters:

  | h | A handle to an initialized device.
  | edge_triggered | If true, trigger in is edge triggered. If false, trigger in is level triggered.
  | active_high | If true, trigger in occurs when going from low to high. If false, trigger in occurs when going from high to low.
  | debounce_delay | The trigger in must be high for at least this long before it is concidered true. Units are in seconds.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_start | ( | TECELLA_HNDL | h,
|  | int | sample_period_multiplier,
|  | bool | continuous = `false`,
|  | bool | start_stimuli = `true`,
|  | bool | continuous_stimuli = `false`,
|  | bool | start_on_trigger = `false` |
| ) |  |  |

Sets up an acquisition and returns once the acquisition has begun. When the function returns, an internal thread runs asynchronously that constantly pulls data from the device and pushes it into the internal queue.

Parameters:

  | h | A handle to an initialized device.
  | sample_period_multiplier | The actual sample period used will be sample_period_min times sample_peiriod_multiplier.
  | continuous | If true, acquisition continues until tecella_acquire_stop() is called. If false, acquisition continues for as long as the longest programmed stimulus or until tecella_acquire_stop() is called.
  | start_stimuli | If true, all stimuli start playing at the start of acquisition and also capture continuously if continuous_stimuli is ture. To use different options for different stimuli set both continuous_stimuli and start_stimuli to false and call tecella_acquire_start_stimulus() for each stimulus before calling tecella_acquire_start().
  | continuous_stimuli | Valid only if continuous is true. If true, all stimuli will capture continuously and also start playing if start_stimuli is true. To use different options for different stimuli set both continuous_stimuli and start_stimuli to false and call tecella_acquire_start_stimulus() for each stimulus before calling tecella_acquire_start().
  | start_on_trigger | If true, acquisition will not start until an external hardware trigger is detected.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_start_stimuli | ( | TECELLA_HNDL | h,
|  | int * | stimulus_indexes,
|  | int | stimulus_count,
|  | bool | start = `true`,
|  | bool | continuous = `false`,
|  | int | sample_period_multiplier = `1` |
| ) |  |  |

Starts one or more stimuli and starts acquiring data for the associated channels that are also enabled. tecella_acquire_start() must be called first, with continuous=true. There are three modes available when calling tecella_acquire_start_stimuli(): Mode0) If start=false and continuous=false, tecella_acquire_start_stimuli does nothing. Mode1) If start=false and continuous=true, you can acquire data continuously without starting the stimulus. Mode2) If start=true and continuous=false, only the samples that are part of the stimulus will be acquired. Mode3) If start=true and continuous=true, acquisition will start when the stimulus starts but then continue acquiring after the stimulus has ended, until tecella_acquire_stop_stimulus() is called.

Parameters:

  | h | A handle to an initialized device.
  | stimulus_indexes | A pointer to an array of stimulus indexes to start acquiring for.
  | stimulus_count | The size of the array pointed to by stimulus_indexes.
  | start | If true, the vcmd plays at the start of acquisition.
  | continuous | If true, acquisition starts and continues until tecella_acquire_stop_stimulus() is called. If false, acquisition only occurs while the stimlus is playing or until tecella_acquire_stop() is called.
  | sample_period_multiplier | Multiplies the base sample period (specified in tecella_acquire_start()) by this number.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_start_stimulus | ( | TECELLA_HNDL | h,
|  | int | stimulus_index,
|  | bool | start = `true`,
|  | bool | continuous = `false`,
|  | int | sample_period_multiplier = `1` |
| ) |  |  |

Starts a stimulus and starts acquiring data for the associated channels that are also enabled. tecella_acquire_start() must be called first, with continuous=true. There are three modes available when calling tecella_acquire_start_stimulus(): Mode0) If start=false and continuous=false, tecella_acquire_start_stimulus does nothing. Mode1) If start=false and continuous=true, you can acquire data continuously without starting the stimulus. Mode2) If start=true and continuous=false, only the samples that are part of the stimulus will be acquired. Mode3) If start=true and continuous=true, acquisition will start when the stimulus starts but then continue acquiring after the stimulus has ended, until tecella_acquire_stop_stimulus() is called.

Parameters:

  | h | A handle to an initialized device.
  | stimulus_index | The stimulus to start acquiring for.
  | start | If true, the vcmd plays at the start of acquisition.
  | continuous | If true, acquisition starts and continues until tecella_acquire_stop_stimulus() is called. If false, acquisition only occurs while the stimlus is playing or until tecella_acquire_stop() is called.
  | sample_period_multiplier | Multiplies the base sample period (specified in tecella_acquire_start()) by this number.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_stop | ( | TECELLA_HNDL | h | ) |

Stops the current acquistion and all stimuli. Sends a message to the acquisition thread to stop and returns immediately.

Parameters:

  | h | A handle to an initialized device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_acquire_stop_stimulus | ( | TECELLA_HNDL | h,
|  | int | stimulus_index,
|  | bool | continuous = `false` |
| ) |  |  |

Stops a stimulus and stops acquiring data for the associated channels that are also enabled. Valid only in asynchronous stimulus mode.

Parameters:

  | h | A handle to an initialized device.
  | stimulus_index | The stimulus to stop.
  | continuous | If true, associated channels will continue acquiring even after stimulus has stopped.

DLLEXPORT TECELLA_ERRNUM CALL tecella_AMS_set_mux | ( | TECELLA_HNDL | h,
|  | int | val |
| ) |  |  |

Writes to AMS Mux board outputs.

Parameters:

  | h | A handle to an initialized device.
  | val | value (0-7) written to mux

DLLEXPORT TECELLA_ERRNUM CALL tecella_apply_stim_assign | ( | TECELLA_HNDL | h,
|  | char * | filename,
|  | int | value[] |
| ) |  |  |

Apply stimulus assignment array to Balboa and save in file Pass 64-channel array of stimulus assignment values to Balboa. Apply to hardware and save to "appliedStimAssign" file. Values are: 0 = No stimulus assigned to channel 1 = Stimulus 1 assigned to channel 2 = Stimulus 2 assigned to channel

Parameters:

  | h | A handle to an initialized device.
  | filename | Name of file to write to.
  | value | Array of 64 values 0=none, 1=stim1, 2=stim2

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_decay_start | ( | TECELLA_HNDL | h,
|  | double | time_fraction |
| ) |  |  |

Lets the user indicate when artifact removal should start to linearly decay. Decaying earlier results in a smoother transition, but may not compensate faster capacitances as well.

Parameters:

  | h | A handle to an initialized device.
  | time_fraction | Must be within the range [0,1]. Represents a fraction of t_step in tecella_auto_artifact_update() at which artifact removal should start decaying.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_enable | ( | TECELLA_HNDL | h,
|  | bool | enable = `true`,
|  | int | stimulus_index = `0` |
| ) |  |  |

Enables/disables the application artifact removal. Does nothing if tecella_auto_artifact() hasn't been called. Note: tecella_auto_comp() automatically disables artifact removal is any of the use_cfast or use_cslows are true and use_artifact is false.

Parameters:

  | h | A handle to an initialized device.
  | enable | Indicates if artifact removal should be turned on or off.
  | stimulus_index | For which stimulus to turn off artifact removal.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_get | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | double * | artifact,
|  | int | max_size,
|  | int * | actual_size |
| ) |  |  |

Gets the current artifact data for a given channel. The units for each sample in the artifact is Amps/Volts. If you scale each sample by the step size of a voltage pulse, you will get the artifact in Amps that will be removed from the response. Note: the artifact is always applied to the max sample rate available.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the get the artifact removal of.
  | artifact | A pointer to an array of doubles where the API can store the values for artifact removal.
  | max_size | The maximum size of the artifact array.
  | actual_size | Returns the number of elements stored into artifact.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_get_capacitance | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | double * | capacitance |
| ) |  |  |

Returns the equivalent capacitance compensation of the artifact removal in Farads.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the capacitance compensation of.
  | capacitance | The equivalent capacitance compensation of artifact removal for the given channel.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_get_size | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | size |
| ) |  |  |

Gets the number of samples in the artifact for the given channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the get the artifact removal size of.
  | size | Upon return, will contain the size of the artifact data.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_set | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | double * | artifact,
|  | int | size |
| ) |  |  |

Sets the artifact to be removed for a given channel. See tecella_auto_artifact_get() for a description of units used.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want set the artifact removal of.
  | capacitance | The equivalent capacitance compensation of artifact removal for the given channel.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_artifact_update | ( | TECELLA_HNDL | h,
|  | double | v_hold = `0`,
|  | double | t_hold = `19e-3`,
|  | double | v_step = `10e-3`,
|  | double | t_step = `19e-3`,
|  | int | iterations = `10`,
|  | int | unused_stimulus_index = `0` |
| ) |  |  |

Records artifacts that remain after capacitance compensation so that they can be removed automatically. This function automatically enables artifact removal, so you must call tecella_auto_artifact_enable() with enable=false if you don't want the artifact removal to be applied immediately after calling this function. Artifacts should be updated whenever there's a change in gain,compensations,or bessel filter. Note: tecella_auto_comp() automatically disables artifact removal.

Parameters:

  | h | A handle to an initialized device.
  | v_hold | The holding voltage used by the auto comp algorithm.
  | t_hold | Number of seconds to hold the holding voltage. Tip: Use a combined value for t_hold+t_step that does not resonate with any environmental noise, such as 50Hz or 60Hz noise.
  | v_step | The amplitude of the test pulse used by the auto compensation algorithm.
  | t_step | Number of seconds to hold the pulse. Also becomes the amount of time after an edge artifact removal will work in the future. Tip: Use a combined value for t_hold+t_step that does not resonate with any environmental noise, such as 50Hz or 60Hz noise.
  | iterations | How many vcmd pulses to average together when measuring the artifact. Fewer iterations are faster, but more iterations reduces noise.
  | unused_stimulus_index | An unused stimulus the algorithm can use for calibration. Only associated channels are calibrated.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_calibrate | ( | TECELLA_HNDL | h,
|  | bool | enable,
|  | int | unused_stimulus_index = `0` |
| ) |  |  |

This calibrates any input offsets due to component tolerances WITHIN the amplifier. Make sure source is set to OPEN to isolate any external interference. You should only need need to run this once after initialization. A 0mV stimulus is played to establish a "tare" value for acquisitions on a per-channel basis. Subsequent acquisitions are adjusted by these per-channel tare values. Only channels that are enabled by tecella_acquire_enable_channel() will be affected by a call to this function. This function may not be used while acquiring.

Parameters:

  | h | A handle to an initialized device.
  | enable | Indicates whether we are enabling/disabling the offset.
  | unused_stimulus_index | An unused stimulus that tecella_auto_calibrate can use. Only associated channels are calibrated.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_calibrate_get | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | offset |
| ) |  |  |

Returns the current offset added to the incomming waveform. To get the actual units of the offset multiply by the scale returned by tecella_acquire_i2d_scale().

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel for which to get the calibration of.
  | offset | A pointer for the returned offset.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_calibrate_set | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | offset |
| ) |  |  |

Manually sets the offsets added to the incomming waveform. To get the actual units of the offset multiply by the scale returned by tecella_acquire_i2d_scale().

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel for which to get the calibration of.
  | offset | A pointer for the returned offset.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_comp | ( | TECELLA_HNDL | h,
|  | double | v_hold = `0`,
|  | double | t_hold = `20e-3`,
|  | double | v_step = `10e-3`,
|  | double | t_step = `20e-3`,
|  | bool | use_leak = `true`,
|  | bool | use_digital_leak = `true`,
|  | bool | use_cfast = `true`,
|  | bool | use_cslow_a = `true`,
|  | bool | use_cslow_b = `true`,
|  | bool | use_cslow_c = `true`,
|  | bool | use_cslow_d = `true`,
|  | bool | use_artifact = `true`,
|  | double | under_comp_coefficient = `0.0`,
|  | int | acq_iterations = `10`,
|  | int | unused_stimulus_index = `0` |
| ) |  |  |

Sets values for leak, cfast, and all the cslows that will compensate for parasitics in the response. All channels associated with the stimulus will be calibrated unless disabled using the function tecella_acquire_enable_channel(). If there's only 1 stimulus, this function cannot be used while acquiring. If there is more than 1 stimulus, this function may be used while acquiring in continuous mode as long as the unused_stimulus_index is not acquiring. If cfast or a cslow is used, artifact removal will automatically be disabled in order to get the best capacitance compensation. Note: tecella_auto_comp() automatically disables artifact removal.

Parameters:

  | h | A handle to an initialized device.
  | v_hold | The holding voltage used by the auto comp algorithm.
  | t_hold | Number of seconds to hold the holding voltage.
  | v_step | The amplitude of the test pulse used by the auto compensation algorithm.
  | t_step | Number of seconds to hold the pulse
  | use_leak | If true, algorithm will compensate for leak if supported by the hardware.
  | use_digital_leak | If true, auto comp digitally compensates for any leak not compensated by analog leak compensation. Use tecella_chan_get_digital_leak() to retreive the resulting compensation.
  | use_cfast | If true, algorithm will compensate using cfast if supported by the hardware. If false, cfast will remain untouched.
  | use_cslow_a | If true, algorithm will compensate using cslowa if supported by the hardware. If false, cslowa will remain untouched.
  | use_cslow_b | If true, algorithm will compensate using cslowb if supported by the hardware. If false, cslowb will remain untouched.
  | use_cslow_c | If true, algorithm will compensate using cslowc if supported by the hardware. If false, cslowc will remain untouched.
  | use_cslow_d | If true, algorithm will compensate using cslowd if supported by the hardware. If false, cslowd will remain untouched.
  | use_artifact | If true, artifact removal will automatically be updated. Not as accurate as running it separatly
  | under_comp_coefficient | Indicates the how much you prefer under-compensation to over-compensation. 0 indicates no preference. + indicates preference for under-compensation. - indicates preference for over-compensation. Magnitude indicates strengh of that preference. If positive, the max error over:under should be close to 1:(1+under_comp_coefficient). If negative, the max error under:over should be close to 1:(1-under_comp_coefficient).
  | acq_iterations | Indicates how many vcmd pulses to average before calculating compensations. Less iterations are faster, but more iterations are more accurate.
  | unused_stimulus_index | An unused stimulus the algorithm can use for calibration. Only associated channels are calibrated.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_comp_offset_adjust_mode_get | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | TECELLA_OFFSET_ADJUST_MODE * | mode |
| ) |  |  |

Gets the offset adjust mode to use when tecella_auto_comp is called

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel. TECELLA_ALLCHAN is not allowed.
  | mode | A return pointer for mode of the given channel.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_comp_offset_adjust_mode_set | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | TECELLA_OFFSET_ADJUST_MODE | mode |
| ) |  |  |

Selects the offset adjust mode to use when tecella_auto_comp() is called. Note: the resulting offset adjust after tecella_auto_comp() is only valid for the gain at which tecella_auto_comp() was run. If you change the gain, you should turn off the offset adjust mode. You should enable an offset adjust mode if you suspect JP will drift between experiments and you cannot use a 0mV as required by tecella_auto_offset(). This will allow you to adjust the offset using the same stimulus as requested of tecella_auto_comp().

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel. TECELLA_ALLCHAN is allowed.
  | mode | The offset mode to use for the given channel.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_frequency_boost_filter | ( | TECELLA_HNDL | h,
|  | int | lpf_width,
|  | int | stimulus = `0` |
| ) |  |  |

Automatically applies a frequency boost filter for the current gain and bessel settings. Overwrites any filters set by tecella_sw_filter_set(). Not implemented yet...

Parameters:

  | h | A handle to an initialized device.
  | lpf_width | Short for low pass filter width. Allows you to apply a low pass/decimation filter in parallel with the frequency boost.
  | stimulus | A stimulus the function can use to acquire from.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_offset | ( | TECELLA_HNDL | h,
|  | double | jp_delta = `0`,
|  | int | unused_stimulus_index = `0` |
| ) |  |  |

This function adds an offset to the stimulus to compensate for junction potentials or other battery effects EXTERNAL to the amplifier. This is accomplished by adjusting the JP register for each channel such that the measured current is as close to 0 Amps as possible for a 0 Volt stimulus. Make sure tecella_auto_calibrate() has already been run to remove any internal interference. All channels associated with the unused_stimulus_index will be compensated.

Note:
  This function sets to zero any offsets added to the response when offset adjust mode is set to RESPONSE.

Parameters:

  | h | A handle to an initialized device.
  | jp_delta | Auto offset uses jp=0mV and jp=(jp_delta)mV to determine the best jp per channel. 0 indicates don't care. This does not limit the final jp value, it only limits the jp values used to calculate the final jp value.
  | unused_stimulus_index | A stimulus index that is not currently playing. JP will be calculated for any channels associated with this stimulus.

DLLEXPORT TECELLA_ERRNUM CALL tecella_auto_scale | ( | TECELLA_HNDL | h,
|  | bool | enable,
|  | int | unused_stimulus_index = `0` |
| ) |  |  |

Internally calibrates the gain settings to be within 1% tolerance. Some gain feedback resistors have greater than 1% tolerance and must be calibrated to be within specification. Only channels that are enabled by tecella_acquire_enable_channel() will be affected by a call to this function. You should only need need to run this once after initialization. This function may not be used while acquiring.

Parameters:

  | h | A handle to an initialized device.
  | enable | Indicates whether we are enabling/disabling the auto scale. If disabled, the ideal scales will be used, whether or not they are correct.
  | unused_stimulus_index | An unused stimulus that tecella_auto_scale can use. Only associated channels are calibrated.

DLLEXPORT TECELLA_ERRNUM CALL tecella_bessel_freq2value | ( | TECELLA_HNDL | h,
|  | double | kHz,
|  | int * | value |
| ) |  |  |

Depricated. Use lpf type functions instead. Returns the best choice for a bessel filter cuttoff frequency.

DLLEXPORT TECELLA_ERRNUM CALL tecella_bessel_value2freq | ( | TECELLA_HNDL | h,
|  | int | value,
|  | double * | kHz |
| ) |  |  |

Depricated. Use lpf type functions instead. Returns the frequency of a bessel filter cuttoff choice.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | int | channel,
|  | double * | value |
| ) |  |  |

Gets a register (property) of a channel. See tecella_reg_props(), to determine if a particular register is supported by the current hardware and to retreive other properties such as valid value ranges and precision.

Parameters:

  | h | A handle to an initialized device.
  | r | Which register to get.
  | channel | A channel. TECELLA_ALLCHAN may not be used as a shortcut here.
  | value | Returns the value of the register..

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_bessel | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | value |
| ) |  |  |

Depricated. Use tecella_chan_get_lpf() instead. Gets the cuttoff frequency choice for the bessel filter. Note that an integer value is taken in to re-enforce the fact that the bessel filter cuttoff frequency is a non-linear function of the value being passed in. To see what frequency a choice corresponds to, use tecella_bessel_value2freq() / tecella_bessel_freq2value(). See tecella_get_hw_props(), to determine if bessel is supported and to see how many cuttoff frequency choices there are.

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel.
  | value | Which cuttoff frequency is selected.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_digital_leak | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | double * | digital_leak |
| ) |  |  |

Returns the equivalent digital leak compensation in Ohms^-1. To calculate the total leak compensation applied, you may add digital_leak to the analog leak register value and invert the combined value. Note: as of 10/19/2009 this function uses Ohms whereas the analog register uses MOhms.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the leak compensation of.
  | digital_leak | The amount of digital leak applied in Ohms^-1.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_digital_leak_enable | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | bool * | enabled |
| ) |  |  |

Gets whether digital leak is enabled or disabled.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the leak compensation of.
  | enabled | Returns whether digital leak is enabled or not.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_enable | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | int | channel,
|  | bool * | enable |
| ) |  |  |

Gets if a register (property) of a channel is enabled. See tecella_reg_props(), to determine if a particular register can be enabled/disabled.

Parameters:

  | h | A handle to an initialized device.
  | r | Which register to determine is enabled or not.
  | channel | A channel. TECELLA_ALLCHAN may not be used as a shortcut here.
  | enable | Returns if the register is enabled or not.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_gain | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | choice |
| ) |  |  |

Get the currently selected gain for a given channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel. TECELLA_ALLCHAN may not be used as a shortcut here.
  | choice | Returns which gain is selected. See tecella_get_hw_props() for valid values. See tecella_get_source_label() for what a value means.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_hpf | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | value |
| ) |  |  |

Gets the cuttoff frequency choice for the high pass filter.

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel.
  | value | Which cuttoff frequency is selected.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_iclamp_enable | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | bool * | enable |
| ) |  |  |

Returns whether iclamp is enables/disabled for a particular channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to change. TECELLA_ALLCHAN may not be used as a shortcut here.
  | enable | Indicates whether the iclamp is enabled or disabled.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_pct | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | int | channel,
|  | double * | pct |
| ) |  |  |

A convenience function for tecella_chan_get() that returns a percent instead of an actual value.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_source | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | choice |
| ) |  |  |

Get the currently selected source for a given channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel. TECELLA_ALLCHAN may not be used as a shortcut here.
  | choice | Returns which source is selected. See tecella_get_hw_props() for valid values. See tecella_get_source_label() for what a value means.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_get_stimulus | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int * | choice |
| ) |  |  |

Get the currently selected stimulus for a given channel. Applicable only for devices that support multiple stimuli [see tecella_get_hw_props()].

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel. TECELLA_ALLCHAN may not be used as a shortcut here.
  | choice | Returns which gain is selected. See tecella_get_hw_props() for valid values. See tecella_get_source_label() for what a value means.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | int | channel,
|  | double | value |
| ) |  |  |

Sets a register (property) of a channel. See tecella_reg_props(), to determine if a particular register is supported by the current hardware and to retreive other properties such as valid value ranges and precision.

Parameters:

  | h | A handle to an initialized device.
  | r | Which register to change.
  | channel | A channel. TECELLA_ALLCHAN can be used as a shortcut here.
  | value | The value to change the register to.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_bessel | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | value |
| ) |  |  |

Depricated. Use tecella_chan_set_lpf() instead. Chooses a cuttoff frequency for the bessel filter. Note that an integer value is taken in to re-enforce the fact that the bessel filter cuttoff frequency is a non-linear function of the value being passed in. To see what frequency a choice corresponds to, use tecella_bessel_value2freq() / tecella_bessel_freq2value(). See tecella_get_hw_props(), to determine if bessel is supported and to see how many cuttoff frequency choices there are.

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel. TECELLA_ALLCHAN may be used as a shortcut here.
  | value | Which cuttoff frequency to select.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_digital_leak | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | double | digital_leak |
| ) |  |  |

Sets digital leak compensation in Ohms^-1. To calculate the total leak compensation applied, you may add digital_leak to the analog leak register value and invert the combined value. Note: as of 10/19/2009 this function uses Ohms whereas the analog register uses MOhms.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the leak compensation of.
  | digital_leak | The amount of digital leak to apply in Ohms^-1.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_digital_leak_enable | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | bool | enable |
| ) |  |  |

Sets whether digital leak is enabled or disabled.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel you want the leak compensation of.
  | enable | Set to false if you wish to disable digital leak, true if you wish to enable digital leak.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_enable | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | int | channel,
|  | bool | enable |
| ) |  |  |

Enables/disables a register (property) of a channel. See tecella_reg_props(), to determine if a particular register can be enabled/disabled.

Parameters:

  | h | A handle to an initialized device.
  | r | Which register to determine enable/disable.
  | channel | A channel. TECELLA_ALLCHAN may be used as a shortcut here.
  | enable | If true, enables the register. Disables if false.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_gain | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | choice |
| ) |  |  |

Chooses which gain to use for a given channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to change. TECELLA_ALLCHAN can be used as a shortcut here.
  | choice | Which gain to use. See tecella_get_hw_props() for valid values. See tecella_get_gain_label() for what a value means.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_hpf | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | value |
| ) |  |  |

Chooses the cut-off frequency for the high pass filter. Note that an integer value is taken in to re-enforce the fact that the cuttoff frequency is a non-linear function of the value being passed in. To see what frequency a choice corresponds to, use tecella_hpf_value2freq() / tecella_hpf_freq2value(). See tecella_get_hw_props(), to determine if a high pass filter is supported and to see how many cuttoff frequency choices there are.

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel. TECELLA_ALLCHAN may be used as a shortcut here.
  | value | Which cuttoff frequency to select.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_iclamp_enable | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | bool | enable |
| ) |  |  |

Enables/disables the iclamp for a particular channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to change. TECELLA_ALLCHAN can be used as a shortcut here.
  | enable | Indicates whether to enable or disable the iclamp.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_pct | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | int | channel,
|  | double | pct |
| ) |  |  |

A convenience function for tecella_chan_set() that takes in a percent instead of an actual value.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_source | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | choice |
| ) |  |  |

Chooses which source to measure from for a given channel.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to change. TECELLA_ALLCHAN can be used as a shortcut here.
  | choice | Which source to use. See tecella_get_hw_props() for valid values. See tecella_get_source_label() for what a value means.

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_stim_assign | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | value |
| ) |  |  |

Assign stimulus to channel on Balboa Assign stimulus to channel for Balboa system based on the value: 0 = No stimulus assigned to channel 1 = Stimulus 1 assigned to channel 2 = Stimulus 2 assigned to channel

Parameters:

  | h | A handle to an initialized device.
  | channel | A channel. TECELLA_ALLCHAN may be used as a shortcut here.
  | value | Which stimulus to assign. 0=none, 1=stim1, 2=stim2

DLLEXPORT TECELLA_ERRNUM CALL tecella_chan_set_stimulus | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | choice |
| ) |  |  |

Chooses which stimulus to use for a given channel. Applicable only for devices that support multiple stimuli [see tecella_get_hw_props()], otherwise the only choice is '0'.

Parameters:

  | h | A handle to an initialized device.
  | channel | The channel to change. TECELLA_ALLCHAN can be used as a shortcut here.
  | choice | Which stimulus to use. See tecella_get_hw_props() for valid values. See tecella_get_gain_label() for what a value means.

DLLEXPORT TECELLA_ERRNUM CALL tecella_debug | ( | char * | logfile | ) |

Turns debug mode on/off

Parameters:

  | logfile | The filename of the debug log. An empty filename "" turns debug off.

DLLEXPORT TECELLA_ERRNUM CALL tecella_debug_default | ( |  | ) |

DLLEXPORT TECELLA_ERRNUM CALL tecella_diagnostics_get_failure | ( | TECELLA_HNDL | h,
|  | int | fail_index,
|  | const wchar_t ** | msg |
| ) |  |  |

Returns messages of failed tests after running tecella_diagnostics_run().

Parameters:

  | h | A handle to an initialized device.
  | fail_index | An index in the range [0,fail_count), as returned by tecella_diagnostics_run().
  | msg | A return argument for the null-terminated text of the failure. Pointer remains valid until the next call to tecella_diagnostics_run() with the same handle.

DLLEXPORT TECELLA_ERRNUM CALL tecella_diagnostics_get_pass | ( | TECELLA_HNDL | h,
|  | int | pass_index,
|  | const wchar_t ** | msg |
| ) |  |  |

Returns messages of passing tests after running tecella_diagnostics_run().

Parameters:

  | h | A handle to an initialized device.
  | pass_index | An index in the range [0,pass_count), as returned by tecella_diagnostics_run().
  | msg | A return argument for the null-terminated text describing the test. Pointer remains valid until the next call to tecella_diagnostics_run() with the same handle.

DLLEXPORT TECELLA_ERRNUM CALL tecella_diagnostics_run | ( | TECELLA_HNDL | h,
|  | int * | pass_count,
|  | int * | fail_count |
| ) |  |  |

Performs hardware diagnostics / sanity checks to make sure hardware is functional. To get actual warning/error messages, call tecella_diagnostics_run_get_pass() or tecella_diagnostics_get_failure().

Parameters:

  | h | A handle to an initialized device.
  | pass_count | A return argument for the number of warnings reported.
  | fail_count | A return argument for the number of errors reported.

DLLEXPORT TECELLA_ERRNUM CALL tecella_enumerate | ( | int * | device_count | ) |

Enumerates all Tecella amplifiers currently connected to the computer. Any subsequent calls to tecella_enumerate_descriptions() and tecella_initialize() will use the devices enumerated at the time of the last call to tecella_enumerate(). If a device has been connected after calling tecella_enumerate(), it will not affect initialization of the other amplifiers but will not have a corresponding device_index with which to initialize. If a device has been disconnected after calling tecella_enumerate(), it will not affect initialization of the other amplifiers but will fail to initialize.

Parameters:

  | device_count | A return pointer to hold the number of devices enumerated.

DLLEXPORT TECELLA_ERRNUM CALL tecella_enumerate_get | ( | int | device_index,
|  | TECELLA_HW_PROPS * | description |
| ) |  |  |

Returns the description of an amplifier as enumerated by the most recent call to tecella_enumerate().

Parameters:

  | device_index | A number >= 0 and < device_count as returned by tecella_enumerate().
  | description | A return pointer to a TECELLA_HW_PROPS structure that describes the device as indexed by device_index.

DLLEXPORT const wchar_t* CALL tecella_error_message | ( | TECELLA_ERRNUM | errnum | ) |

Retreives the message string associated with an error value.

Parameters:

  | errnum | The error returned by any of the API functions.

Returns:
  The message string.

DLLEXPORT TECELLA_ERRNUM CALL tecella_error_set_callback | ( | TECELLA_HNDL | h,
|  | TECELLA_ERR_CB | f |
| ) |  |  |

Sets a callback function to be called upon an error.

Parameters:

  | h | A handle to an initialized device.
  | f | The error callback function.

DLLEXPORT TECELLA_ERRNUM CALL tecella_finalize | ( | TECELLA_HNDL | h | ) |

Closes a device gracefully and deallocates any memory associated with it.

Parameters:

  | h | A handle to an initialized device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_finalize_to_file | ( | TECELLA_HNDL | h,
|  | char * | filename |
| ) |  |  |

Closes a device gracefully and deallocates any memory associated with it. Saves state to a file so another process can call tecella_initialize_from_file() to quickly transfer ownership.

Parameters:

  | h | A handle to an initialized device.
  | filename | Filename of the file to which the state will be stored.

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_gain_label | ( | TECELLA_HNDL | h,
|  | int | gain_index,
|  | const wchar_t ** | label |
| ) |  |  |

Retreives a label for a specific gain choice for use in a GUI. This will provide more useful information to the user about which gain is currently selected specific to their device.

Parameters:

  | h | A handle to an initialized device.
  | gain_index | The gain choice.
  | label | A return argument for the label string.

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_hw_props | ( | TECELLA_HNDL | h,
|  | TECELLA_HW_PROPS * | props |
| ) |  |  |

Retreives properties of the current hardware and firmware being used.

Note:
  Not all fields in props are set by this function yet. This will be fixed in a future release.

Parameters:

  | h | A handle to an initialized device.
  | props | A pointer to the hardware/firmware properties.

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_hw_props_ex_01 | ( | TECELLA_HNDL | h,
|  | TECELLA_HW_PROPS_EX_01 * | props |
| ) |  |  |

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_lib_props | ( | TECELLA_LIB_PROPS * | props | ) |

Retreives the current version of the DLL being used.

Parameters:

  | props | A pointer to the library properties.

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_reg_props | ( | TECELLA_HNDL | h,
|  | TECELLA_REGISTER | r,
|  | TECELLA_REG_PROPS * | props |
| ) |  |  |

Retreives properties of the requested register for a given device.

Parameters:

  | h | A handle to an initialized device.
  | r | The register we'd like the properties of.
  | props | A pointer to the register properties.

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_slew_label | ( | TECELLA_HNDL | h,
|  | int | slew_index,
|  | const wchar_t ** | label |
| ) |  |  |

Retreives a label for the specified slew choice. This will provide more useful information to the user about which slew is selected specific to their device.

Parameters:

  | h | A handle to an initialized device.
  | source_index | The slew choice.
  | label | A return argument for the label string.

DLLEXPORT TECELLA_ERRNUM CALL tecella_get_source_label | ( | TECELLA_HNDL | h,
|  | int | source_index,
|  | const wchar_t ** | label |
| ) |  |  |

Retreives a label for a specific source choice for use in a GUI. This will provide more useful information to the user about which source is selected specific to their device.

Parameters:

  | h | A handle to an initialized device.
  | source_index | The gain choice.
  | label | A return argument for the label string.

DLLEXPORT TECELLA_ERRNUM CALL tecella_hpf_freq2value | ( | TECELLA_HNDL | h,
|  | double | Hz,
|  | int * | choice |
| ) |  |  |

Returns the best choice for a high pass filter cuttoff frequency.

DLLEXPORT TECELLA_ERRNUM CALL tecella_hpf_value2freq | ( | TECELLA_HNDL | h,
|  | int | choice,
|  | double * | Hz |
| ) |  |  |

Returns the frequency of a high pass filter cuttoff choice.

DLLEXPORT TECELLA_ERRNUM CALL tecella_initialize | ( | TECELLA_HNDL * | h,
|  | int | device_index = `0` |
| ) |  |  |

Initializes the specified device and returns a handle for it. tecella_initialize() will automatically call tecella_enumerate() if it hasn't already been called by ther user. The default user configuration is used. After initialization you may change the user configuration via tecella_user_config_get() and tecella_user_config_set().

Parameters:

  | h | Pointer to a handle
  | device_index | The device index corresponding to the most recent call to tecella_enumerate().

Postcondition:
  Upon success, h will point to a valid handle for the requested device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_initialize_from_file | ( | TECELLA_HNDL * | ph,
|  | char * | filename |
| ) |  |  |

Returns a handle for a previously intialized device that was finalized via tecella_finalize_to_file(). All state and calibration info is loaded from the file.

Parameters:

  | ph | Pointer to a handle
  | filename | Filename of the file created by tecella_finalize_

Postcondition:
  Upon success, h will point to a valid handle for the requested device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_initialize_pair | ( | TECELLA_HNDL * | h,
|  | TECELLA_HNDL | hA,
|  | TECELLA_HNDL | hB |
| ) |  |  |

Takes two handles of already initilaized amplifiers and makes it look like a single one. This is only supported if both amplifiers are the same.

Parameters:

  | h | Pointer to a handle
  | hA | A handle previously returned by tecella_initialize()
  | hB | A handle previously returned by tecella_initialize(). Must be different than h1.

Postcondition:
  Upon success, h will point to a valid handle for the requested device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_load_stim_assign | ( | TECELLA_HNDL | h,
|  | char * | filename,
|  | int * | value |
| ) |  |  |

Load stimulus assignment array from file Read 64-channel array of stimulus assignment values from file "appliedStimAssign". Values are: 0 = No stimulus assigned to channel 1 = Stimulus 1 assigned to channel 2 = Stimulus 2 assigned to channel

Parameters:

  | h | A handle to an initialized device.
  | filename | Name of file to read from
  | value | Array of 64 values 0=none, 1=stim1, 2=stim2

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_get | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT * | segments,
|  | int | segments_max,
|  | int * | segments_in_stimulus,
|  | int * | delta_count,
|  | int * | repeat_count,
|  | int | index = `0` |
| ) |  |  |

Retreives the currently programed stimulus. Note: due to precision constraints of the hardware, the stimulus returned by tecella_stimulus_get() may not exactly match the stimulus passed into tecella_stimulus_set().

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of pre-allocated segments.
  | segments_max | The maximum size of the array pointed to by segments, so the API does not write into unallocated memory.
  | segments_in_stimulus | The actual number of segments in the stimulus.
  | delta_count | The number of times to increment a segment by the step value. After delta_count repeats, the segment goes back to it's initial value. Must be >=1.
  | repeat_count | The number of times the entire stimulus will repeat. Must be >=1.
  | index | Specifies which stimulus to program if multiple stimuli are supported on the device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_get_ex | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT_EX * | segments,
|  | int | segments_max,
|  | int * | segments_in_stimulus,
|  | int * | delta_count,
|  | int * | repeat_count,
|  | int | index = `0` |
| ) |  |  |

Retreives the currently programed stimulus. Note: This function has more functionality than the "non ex" version, but is more subject to change in future versions of the API. Note: due to precision constraints of the hardware, the stimulus returned by tecella_stimulus_get() may not exactly match the stimulus passed into tecella_stimulus_set().

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of pre-allocated segments.
  | segments_max | The maximum size of the array pointed to by segments, so the API does not write into unallocated memory.
  | segments_in_stimulus | The actual number of segments in the stimulus.
  | delta_count | The number of times to increment a segment by the step value. After delta_count repeats, the segment goes back to it's initial value. Must be >=1.
  | repeat_count | The number of times the entire stimulus will repeat. Must be >=1.
  | index | Specifies which stimulus to program if multiple stimuli are supported on the device.

DLLEXPORT unsigned long long CALL tecella_stimulus_index_sample_count | ( | TECELLA_HNDL | h,
|  | int | index,
|  | double | sample_period |
| ) |  |  |

Returns the number of samples to expect for a given stimulus, including all delta iterations and repeat iterations.

Parameters:

  | h | A handle to an initialized device.
  | index | A stimulus index.
  | sample_period | The sample period in seconds.

Returns:
  The number of samples in the stimulus, including all repeat counts and delta counts.

DLLEXPORT unsigned long long CALL tecella_stimulus_sample_count | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT * | segments,
|  | int | segment_count,
|  | int | delta_count,
|  | int | repeat_count,
|  | double | sample_period |
| ) |  |  |

Returns the number of samples to expect for a given stimulus, including all delta iterations and repeat iterations.

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of segments that define the stimulus.
  | segment_count | The number of segments to which segments points.
  | delta_count | The number of times to increment a segment by the step value. After delta_count repeats, the segment goes back to it's initial value. Must be >=1.
  | repeat_count | The number of times the entire stimulus will repeat. Must be >=1.
  | sample_period | The sample period in seconds used when acquiring. Be sure to manually include any

DLLEXPORT unsigned long long CALL tecella_stimulus_sample_count_ex | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT_EX * | segments,
|  | int | segment_count,
|  | int | delta_count,
|  | int | repeat_count,
|  | double | sample_period |
| ) |  |  |

Returns the number of samples to expect for a given stimulus, including all delta iterations and repeat iterations. Note: This function has more functionality than the "non ex" version, but is more subject to change in future versions of the API.

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of segments that define the stimulus.
  | segment_count | The number of segments to which segments points.
  | delta_count | The number of times to increment a segment by the step value. After delta_count repeats, the segment goes back to it's initial value. Must be >=1.
  | repeat_count | The number of times the entire stimulus will repeat. Must be >=1.
  | sample_period | The sample period in seconds used when acquiring. Be sure to manually include any

DLLEXPORT unsigned int CALL tecella_stimulus_sample_count_partial | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT * | segments,
|  | int | segment_count,
|  | int | delta_iteration,
|  | double | sample_period |
| ) |  |  |

Returns the number of samples to expect for a given stimulus, for only a single delta iteration.

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of segments that define the stimulus.
  | segment_count | The number of segments to which segments points.
  | delta_iteration | The step iteration of the stimulus used to calculate the sample count.
  | sample_period | The sample period in seconds used when acquiring.

DLLEXPORT unsigned int CALL tecella_stimulus_sample_count_partial_ex | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT_EX * | segments,
|  | int | segment_count,
|  | int | delta_iteration,
|  | double | sample_period |
| ) |  |  |

Returns the number of samples to expect for a given stimulus, for only a single delta iteration. Note: This function has more functionality than the "non ex" version, but is more subject to change in future versions of the API.

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of segments that define the stimulus.
  | segment_count | The number of segments to which segments points.
  | delta_iteration | The step iteration of the stimulus used to calculate the sample count.
  | sample_period | The sample period in seconds used when acquiring.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_set | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT * | segments,
|  | int | segment_count,
|  | int | delta_count = `1`,
|  | int | repeat_count = `1`,
|  | int | index = `0` |
| ) |  |  |

Programs a stimulus into the hardware. When the stimulus is played it will iterate through all its segments. Once it finishes or is stopped, the output will go back to the holding voltage as defined by tecella_stimulus_set_hold(). Note: Currently, a stimulus must have 3 or more segments.

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of segments that define the stimulus.
  | segment_count | The number of segments to which segments points. A stimulus must have 3 or more segments.
  | delta_count | The number of times to increment a segment by the step value. After delta_count repeats, the segment goes back to it's initial value. Must be >=1.
  | repeat_count | The number of times the entire stimulus will repeat. Must be >=1.
  | index | Specifies which stimulus to program if multiple stimuli are supported on the device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_set_callback | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_CB | f |
| ) |  |  |

Sets the stimulus callback. The stimulus callback will be called whenever a stimulus has started during acquisition. The stimulus callback is called in the same thread as the acquire callback. Notification of stimulus start is guaranteed to occur before notification of any associated samples.

Parameters:

  | h | A handle to an initialized device.
  | f | The stimulus callback function.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_set_ex | ( | TECELLA_HNDL | h,
|  | TECELLA_STIMULUS_SEGMENT_EX * | segments,
|  | int | segment_count,
|  | int | delta_count = `1`,
|  | int | repeat_count = `1`,
|  | int | index = `0` |
| ) |  |  |

Programs a stimulus into the hardware. This function has more functionality than the "non ex" version, but is more subject to change in future versions of the API. When the stimulus is played it will iterate through all its segments. Once it finishes or is stopped, the output will go back to the holding voltage as defined by tecella_stimulus_set_hold(). Note: Currently, a stimulus must have 3 or more segments.

Parameters:

  | h | A handle to an initialized device.
  | segments | A pointer to an array of segments that define the stimulus.
  | segment_count | The number of segments to which segments points. A stimulus must have 3 or more segments.
  | delta_count | The number of times to increment a segment by the step value. After delta_count repeats, the segment goes back to it's initial value. Must be >=1.
  | repeat_count | The number of times the entire stimulus will repeat. Must be >=1.
  | index | Specifies which stimulus to program if multiple stimuli are supported on the device.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_set_hold | ( | TECELLA_HNDL | h,
|  | double | value,
|  | int | index = `0` |
| ) |  |  |

Programs a simple holding voltage into the hardware. The holding voltage is defined as the voltage that is output whenever the stimulus is not playing.

Parameters:

  | h | A handle to an initialized device.
  | value | The requested holding voltage/current in Volts/Amps. Must be within the valid range for a stimulus segment.
  | index | The index of the stimulus to set the value of.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_set_slew | ( | TECELLA_HNDL | h,
|  | int | choice,
|  | int | index = `0` |
| ) |  |  |

DEPCRICATED This function is no longer supported and will be removed in the next majof version of the API. Use ex versions of the stimulus functions instead. Sets the slew rate of the stimulus / how fast the edges rise and fall.

Parameters:

  | h | A handle to an initialized device.
  | choice | 0 is the fastest, then it gets slower as the choice increases. The max value for this parameter depends on the connected hardware. Each increment may also not be linear.
  | index | The stimulus index to change the slew rate of.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_steer | ( | TECELLA_HNDL | h,
|  | int | stimulus_index,
|  | int | destination_index,
|  | bool | enable |
| ) |  |  |

Steers the stimulus to the specified distination. In most cases, the destination is a single channel. Note that this is not supported by most hardware. (As of 4/14, only Amadeus based amplifiers support this.) Check the field supports_stimulus_steering in the hwprops to see if it is supported by your device.

Parameters:

  | h | A handle to an initialized device.
  | stimulus_index | The stimulus to steer.
  | destination_index | In most cases, this is the channel to which we want to steer the stimulus.
  | enable | If false, steers the stimulus to nothing.

DLLEXPORT TECELLA_ERRNUM CALL tecella_stimulus_zap | ( | TECELLA_HNDL | h,
|  | double | duration,
|  | double | amplitude,
|  | int * | channels = `0`,
|  | int | channel_count = `0` |
| ) |  |  |

Applies a voltage pulse of a specified duration.

Parameters:

  | h | A handle to an initialized device.
  | duration | The duration of the zap in seconds. If duration is 0, zap will be held at the specified amplitude until the next call to this function.
  | amplitude | The amplitude of the zap in Volts.
  | channels | An array of channels to zap.
  | channel_count | The number of channels in channel_array.

DLLEXPORT TECELLA_ERRNUM CALL tecella_sw_filter_enable | ( | TECELLA_HNDL | h,
|  | bool | enable,
|  | int | channel = `TECELLA_ALLCHAN` |
| ) |  |  |

Enables/Disables filtering.

Parameters:

  | h | A handle to an initialized device.
  | enable | If true, filtering is enabled. If false, filtering is disabled.
  | channel | The channel on which to enable/disable filtering.

DLLEXPORT TECELLA_ERRNUM CALL tecella_sw_filter_set | ( | TECELLA_HNDL | h,
|  | double * | kernel,
|  | int | kernel_size,
|  | int | channel = `TECELLA_ALLCHAN` |
| ) |  |  |

Sets a kernel to be convolved with incoming samples at the native sampling frequency. Note: The kernel will be normalized before it is stored in the API to prevent unwanted scaling.

Parameters:

  | h | A handle to an initialized device.
  | kernel | An array of doubles that define the kernel.
  | kernel_size | The number of elements in the kernel array.

DLLEXPORT TECELLA_ERRNUM CALL tecella_sw_filter_set_box | ( | TECELLA_HNDL | h,
|  | int | width,
|  | int | channel = `TECELLA_ALLCHAN` |
| ) |  |  |

Sets a simple nearest-neighbor averaging filter. This acts as a low pass filter that doesn't have much ringing, but will not preserve peaks as well as a Lanczos filter.

Parameters:

  | h | A handle to an initialized device.
  | width | The number of samples to average together.

DLLEXPORT TECELLA_ERRNUM CALL tecella_sw_filter_set_lanczos | ( | TECELLA_HNDL | h,
|  | double | width,
|  | int | quality = `3`,
|  | int | channel = `TECELLA_ALLCHAN` |
| ) |  |  |

Sets a Lanczos filter kernel, which approximates the ideal low pass filter. It preserves peaks well, however it may result in ringing near sharp edges. For an explanation of Lanczos filters, see: http://en.wikipedia.org/wiki/Lanczos_resampling

Parameters:

  | h | A handle to an initialized device.
  | width | 1/width is the effective cutoff frequency of the Lanczos filter. If downsampling, set width equal to the number of samples being decimated. Using a width that is not a whole number will prevent the zeroes from falling exactly on a sample.
  | quality | Must be 1 or greater. There are deminishing returns after 3. Corresponds to the "a" coefficient usually used in texts when describing a Lanczos filter. Note: The final size of the Lanczos filter will be width*quality.

DLLEXPORT TECELLA_ERRNUM CALL tecella_system_monitor_dynamic_set | ( | TECELLA_HNDL | h,
|  | int | monitor_index |
| ) |  |  |

Tells the dynamic monitor which point to monitor. Dynamic monitor is when one of the channels records a monitor point at the same sampling rate as all the other channels during acquisition.

Parameters:

  | h | A handle to an initialized device.
  | monitor_index | Indicates which point to monitor.

DLLEXPORT TECELLA_ERRNUM CALL tecella_system_monitor_get | ( | TECELLA_HNDL | h,
|  | int | result_index,
|  | TECELLA_SYSTEM_MONITOR_RESULT * | result |
| ) |  |  |

Retreives results from the most recent call to tecella_system_monitor_run(). Cannot be used during acquisition.

Parameters:

  | h | A handle to an initialized device.
  | result_index | An index to a result between 0 and result_count as returned by tecella_system_monitor_run.
  | result | A pointer to a TECELLA_SYSTEM_MONITOR_RESULT structure that will contain the result on return.

DLLEXPORT TECELLA_ERRNUM CALL tecella_system_monitor_run | ( | TECELLA_HNDL | h,
|  | int * | result_count,
|  | int * | results_per_controller,
|  | int * | results_per_slot |
| ) |  |  |

Runs a quick tests on the system, such as system voltage and power measurments. Retreive results by using tecella_system_monitor_get(). Cannot be used during acquisition.

Parameters:

  | h | A handle to an initialized device.
  | result_count | A pointer to an int that will hold how many results can be retreived by calling tecella_system_monitor_get().

DLLEXPORT TECELLA_ERRNUM CALL tecella_user_config_get | ( | TECELLA_HNDL | h,
|  | int | user_config,
|  | TECELLA_HW_PROPS * | description |
| ) |  |  |

Returns details of available configurations. Replaces tecella_get_stimulus_mode() in a more generic manner.

Parameters:

  | h | A handle to an initialized device.
  | user_config | A valid user configuration index. Must be greater than or equal to 0 and less than the user_config_count field returned by tecella_get_hw_props() or tecella_enumerate_get().
  | description | A return pointer to a TECELLA_HW_PROPS structure that describes the device if it were configured with user_config.

DLLEXPORT TECELLA_ERRNUM CALL tecella_user_config_get_current | ( | TECELLA_HNDL | h,
|  | int * | user_config |
| ) |  |  |

If the amplifier supports a user selectable configuration, you may use this function to determine which configuration is currently used.

Parameters:

  | h | A handle to an initialized device.
  | user_config | A return pointer to hold the current user configuration index.

DLLEXPORT TECELLA_ERRNUM CALL tecella_user_config_set | ( | TECELLA_HNDL | h,
|  | int | user_config |
| ) |  |  |

If the amplifier supports a user selectable configuration, it may be set here. The configuration may only be set when not acquiring. Replaces tecella_set_stimulus_mode() in a more generic manner.

Parameters:

  | h | A handle to an initialized device.
  | user_config | A valid user configuration index. Must be greater than or equal to 0 and less than the user_config_count field returned by tecella_get_hw_props() or tecella_enumerate_get().

DLLEXPORT TECELLA_ERRNUM CALL tecella_utility_dac_set | ( | TECELLA_HNDL | h,
|  | double | value,
|  | int | index = `0` |
| ) |  |  |

Sets the utility DAC voltage.

DLLEXPORT TECELLA_ERRNUM CALL tecella_utility_set_stimulus | ( | TECELLA_HNDL | h,
|  | int | channel,
|  | int | stimulus_index |
| ) |  |  |

Sets the stimulus index for stimulus-only outputs.

DLLEXPORT TECELLA_ERRNUM CALL tecella_utility_trigger_out | ( | TECELLA_HNDL | h,
|  | int | index |
| ) |  |  |

Sets the utility trigger out.