Runtime Control

Once a TimeTagger4 device is configured, the following functions can be used to control the behavior of it.

These functions return quickly with very little overhead. However, they are not guaranteed to be thread safe.

int timetagger4_start_capture(timetagger4_device *device)

Start data acquisition.

Note

timetagger4_start_capture() will reset the memory buffer.

If you wish to stop recording data and resume later without clearing the buffer, use timetagger4_pause_capture() and timetagger4_continue_capture().

Parameters:
  • device – Pointer to a TimeTagger4 device.

Returns:

Status code: TIMETAGGER4_OK, TIMETAGGER4_INVALID_DEVICE, TIMETAGGER4_CRONO_INTERNAL_ERROR, TIMETAGGER4_HARDWARE_FAILURE, or TIMETAGGER4_WRONG_STATE.

int timetagger4_pause_capture(timetagger4_device *device)

Pause data acquisition.

timetagger4_pause_capture() and timetagger4_continue_capture() have less overhead than timetagger4_start_capture() and timetagger4_stop_capture(), but do not allow for a configuration change.

Parameters:
  • device – Pointer to a TimeTagger4 device.

Returns:

Status code: TIMETAGGER4_OK, TIMETAGGER4_INVALID_DEVICE, TIMETAGGER4_WRONG_STATE.

int timetagger4_continue_capture(timetagger4_device *device)

Continue data acquisition.

timetagger4_pause_capture() and timetagger4_continue_capture() have less overhead than timetagger4_start_capture() and timetagger4_stop_capture(), but do not allow for a configuration change.

Parameters:
  • device – Pointer to a TimeTagger4 device.

Returns:

Status code: TIMETAGGER4_OK, TIMETAGGER4_INVALID_DEVICE, TIMETAGGER4_WRONG_STATE.

int timetagger4_stop_capture(timetagger4_device *device)

Stop data acquisition.

Parameters:
  • device – Pointer to a TimeTagger4 device.

Returns:

Status code: TIMETAGGER4_OK, or TIMETAGGER4_INVALID_DEVICE.

int timetagger4_start_tiger(timetagger4_device *device)

Start the Timing Generator (TiGer)

This can be done independently of the state of the data acquisition.

Parameters:
  • device – Pointer to a TimeTagger4 device.

Returns:

Status code: TIMETAGGER4_OK, TIMETAGGER4_INVALID_DEVICE, or TIMETAGGER4_WRONG_STATE.

int timetagger4_stop_tiger(timetagger4_device *device)

Stop the Timing Generator (TiGer)

This can be done independently of the state of the data acquisition.

Parameters:
  • device – Pointer to a TimeTagger4 device.

Returns:

Status code: TIMETAGGER4_OK or TIMETAGGER4_INVALID_DEVICE.