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
, orXTDC4_WRONG_STATE
.
xtdc4_pause_capture¶
-
int xtdc4_pause_capture(xtdc4_device *device)¶
Pause data acquisition.
xtdc4_pause_capture()
andxtdc4_continue_capture()
have less overhead thanxtdc4_start_capture()
andxtdc4_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()
andxtdc4_continue_capture()
have less overhead thanxtdc4_start_capture()
andxtdc4_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
, orXTDC4_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
, orXTDC4_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
orXTDC4_INVALID_DEVICE
.