tic  130
tic_c.h File Reference

Timer/Counter (TIC) C Interface. More...

Go to the source code of this file.

Functions

Status functions
int tic_failed (int i)
 get the most error status. More...
 
const char * tic_errortext (int i)
 Error message of the most recent error encountered. More...
 
int tic_errorcode (int i)
 Error code of the most recent error encountered. More...
 
int tic_diagcode (int i)
 Diagnostic code of the most recent error encountered. More...
 
Lifecycle functions
int tic_init (int i)
 initialize device More...
 
int tic_fini (int i)
 finish device use More...
 
Measurement functions
int tic_count_samples (int i)
 sample count More...
 
int tic_loop (int i)
 main loop, controls the device operation during measurements More...
 
MFAV functions
int tic_mode_frequency_average (int i)
 set MFAV (frequeny average mode) More...
 
double tic_read_frequency_average (int i)
 read sample More...
 
MPWI functions
int tic_mode_pulse_width (int i)
 set MPWI (pulse width mode) More...
 
double tic_read_pulse_width (int i)
 read sample More...
 
MPUL functions
int tic_mode_pulse (int i)
 set MPUL (pulse mode) More...
 
double tic_read_pulse_first (int i)
 read first half of sample More...
 
double tic_read_pulse_second (int i)
 read second half of sample More...
 
MTOC functions
int tic_mode_totalcount (int i)
 set MTOC (totalizing counter) More...
 
long long tic_read_totalcount (int i)
 read totalized count More...
 
Control functions
int tic_arm (int i)
 arm channel More...
 
int tic_set_property (int i, unsigned eProp, int iVal)
 set mode properties More...
 
Test/Demo functions
int tic_init_stimuli (int i)
 enable 200 kHz test mode stimuli at port IO15 More...
 

Detailed Description

Timer/Counter (TIC) C Interface.

Function Documentation

◆ tic_arm()

int tic_arm ( int  i)

arm channel

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

◆ tic_count_samples()

int tic_count_samples ( int  i)

sample count

Parameters
idevice index, 0 for the first device attached
Returns
sample count, negative if failed.

◆ tic_diagcode()

int tic_diagcode ( int  i)

Diagnostic code of the most recent error encountered.

An additional diagnostic code may be given for some errors.

Parameters
idevice index, 0 for the first device attached
Returns
diagnostic code

References Failable::iErr().

◆ tic_errorcode()

int tic_errorcode ( int  i)

Error code of the most recent error encountered.

Parameters
idevice index, 0 for the first device attached
Returns
error code (hexadecimal)

◆ tic_errortext()

const char* tic_errortext ( int  i)

Error message of the most recent error encountered.

Parameters
idevice index, 0 for the first device attached
Returns
error message string

References Failable::szErr().

◆ tic_failed()

int tic_failed ( int  i)

get the most error status.

Error details may requested by the tic_errortext(), tic_errorcode and tic_diagcode() functions.

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

References Failable::isFail().

◆ tic_fini()

int tic_fini ( int  i)

finish device use

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

◆ tic_init()

int tic_init ( int  i)

initialize device

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

◆ tic_init_stimuli()

int tic_init_stimuli ( int  i)

enable 200 kHz test mode stimuli at port IO15

Parameters
idevice index, 0 for the first device attached
Warning
Do not attach external signals when using test mode.

References TicLocalInitializer::ptp().

◆ tic_loop()

int tic_loop ( int  i)

main loop, controls the device operation during measurements

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

References TinaPlex::callTinaSample(), and TicLocalInitializer::ptp().

◆ tic_mode_frequency_average()

int tic_mode_frequency_average ( int  i)

set MFAV (frequeny average mode)

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

References TinaPlex::callTinaConfig(), and TicLocalInitializer::ptp().

◆ tic_mode_pulse()

int tic_mode_pulse ( int  i)

set MPUL (pulse mode)

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

References TinaPlex::callTinaConfig(), and TicLocalInitializer::ptp().

◆ tic_mode_pulse_width()

int tic_mode_pulse_width ( int  i)

set MPWI (pulse width mode)

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

References TinaPlex::callTinaConfig(), and TicLocalInitializer::ptp().

◆ tic_mode_totalcount()

int tic_mode_totalcount ( int  i)

set MTOC (totalizing counter)

Parameters
idevice index, 0 for the first device attached
Returns
nonzero if failed, zero otherwise.

References TinaPlex::callTinaConfig(), and TicLocalInitializer::ptp().

◆ tic_read_frequency_average()

double tic_read_frequency_average ( int  i)

read sample

Parameters
idevice index, 0 for the first device attached
Returns
sample value, (-1.0 if failed).

References ModeAvg::rdFreq().

◆ tic_read_pulse_first()

double tic_read_pulse_first ( int  i)

read first half of sample

Parameters
idevice index, 0 for the first device attached
Returns
width of the first half of the pulse, (-1.0 if failed).

◆ tic_read_pulse_second()

double tic_read_pulse_second ( int  i)

read second half of sample

Parameters
idevice index, 0 for the first device attached
Returns
width of the second half of the pulse, (-1.0 if failed).

◆ tic_read_pulse_width()

double tic_read_pulse_width ( int  i)

read sample

Parameters
idevice index, 0 for the first device attached
Returns
sample value, (-1.0 if failed).

◆ tic_read_totalcount()

long long tic_read_totalcount ( int  i)

read totalized count

Parameters
idevice index, 0 for the first device attached
Returns
totalized count

◆ tic_set_property()

int tic_set_property ( int  i,
unsigned  eProp,
int  iVal 
)

set mode properties

Parameters
idevice index, 0 for the first device attached
ePropproperty key
iValproperty value
Returns
nonzero if failed, zero otherwise.