Runtime Control

Once an xTDC4 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.

xtdc4_start_capture

int xtdc4_start_capture(xtdc4_device *device)

Start data acquisition.

Parameters:
  • device – Pointer to an xTDC4 device.

Returns:

Status code: XTDC4_OK, XTDC4_INVALID_DEVICE, XTDC4_CRONO_INTERNAL_ERROR, XTDC4_HARDWARE_FAILURE, or XTDC4_WRONG_STATE.

xtdc4_pause_capture

int xtdc4_pause_capture(xtdc4_device *device)

Pause data acquisition.

xtdc4_pause_capture() and xtdc4_continue_capture() have less overhead than xtdc4_start_capture() and xtdc4_stop_capture(), but do not allow for a configuration change.

Parameters:
  • device – Pointer to an xTDC4 device.

Returns:

Status code: XTDC4_OK, XTDC4_INVALID_DEVICE, XTDC4_WRONG_STATE.

xtdc4_continue_capture

int xtdc4_continue_capture(xtdc4_device *device)

Continue data acquisition.

xtdc4_pause_capture() and xtdc4_continue_capture() have less overhead than xtdc4_start_capture() and xtdc4_stop_capture(), but do not allow for a configuration change.

Parameters:
  • device – Pointer to an xTDC4 device.

Returns:

Status code: XTDC4_OK, XTDC4_INVALID_DEVICE, XTDC4_WRONG_STATE.

xtdc4_stop_capture

int xtdc4_stop_capture(xtdc4_device *device)

Stop data acquisition.

Parameters:
  • device – Pointer to an xTDC4 device.

Returns:

Status code: XTDC4_OK, or XTDC4_INVALID_DEVICE.

xtdc4_start_tiger

int xtdc4_start_tiger(xtdc4_device *device)

Start the Timing Generator (TiGer)

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

Parameters:
  • device – Pointer to an xTDC4 device.

Returns:

Status code: XTDC4_OK, XTDC4_INVALID_DEVICE, or XTDC4_WRONG_STATE.

xtdc4_stop_tiger

int xtdc4_stop_tiger(xtdc4_device *device)

Stop the Timing Generator (TiGer)

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

Parameters:
  • device – Pointer to an xTDC4 device.

Returns:

Status code: XTDC4_OK or XTDC4_INVALID_DEVICE.