|
CAEN FERS Library v1.3.0
SDK for FERS systems
|
Functions | |
| int | FERS_InitReadout (int handle, int ROmode, int *AllocatedSize) |
| Init readout for one board (allocate buffers and initialize variables) | |
| int | FERS_CloseReadout (int handle) |
| De-init readoout (free buffers) | |
| int | FERS_FlushData (int handle) |
| Flush the data buffer (Read and discard data until the RX buffer is empty) | |
| int | FERS_GetCrcErrorCnt (int cnc_handle, uint32_t *errcnt) |
| Get the number of CRC errors detected by the concentrator since the last start of run. | |
| int | FERS_StartAcquisition (int *handle, int NumBrd, int StartMode, int RunNum) |
| Start data acquisition. Set ReadoutState = RUNNING, wait until all threads are running, then send the run command to the boards, according to the given start mode. | |
| int | FERS_StopAcquisition (int *handle, int NumBrd, int StartMode, int RunNum) |
| Send the stop command to the boards (according to the same mode used to start them) | |
| int | FERS_GetEvent (int *handle, int *bindex, int *DataQualifier, double *tstamp_us, void **Event, int *nb) |
| Read and decode one event from the readout buffers. There are two readout modes: sorted or unsorted. If sorting is requested, the readout init function will allocate queues for sorting. | |
| int | FERS_GetEventFromBoard (int handle, int *DataQualifier, double *tstamp_us, void **Event, int *nb) |
| Read and decode one event from a specific board. | |
| int FERS_InitReadout | ( | int | handle, |
| int | ROmode, | ||
| int * | AllocatedSize ) |
Init readout for one board (allocate buffers and initialize variables)
| [out] | AllocatedSize | Pointer to the tot. num. of bytes allocated for data buffers and descriptors |
| [in] | handle | Board handle |
| [in] | ROmode | EventBuilding readout mode |
| int FERS_CloseReadout | ( | int | handle | ) |
De-init readoout (free buffers)
| [in] | handle | Board handle |
| int FERS_FlushData | ( | int | handle | ) |
Flush the data buffer (Read and discard data until the RX buffer is empty)
| [in] | handle | Board handle |
| int FERS_GetCrcErrorCnt | ( | int | cnc_handle, |
| uint32_t * | errcnt ) |
Get the number of CRC errors detected by the concentrator since the last start of run.
| [out] | errcnt | Pointer to the CRC error counter |
| [in] | cnc_handle | Handle of the concentratore |
| int FERS_StartAcquisition | ( | int * | handle, |
| int | NumBrd, | ||
| int | StartMode, | ||
| int | RunNum ) |
Start data acquisition. Set ReadoutState = RUNNING, wait until all threads are running, then send the run command to the boards, according to the given start mode.
| [in] | handle | Array of board handles |
| [in] | NumBrd | Number of boards to start |
| [in] | StartMode | Acquisition start mode (Async, T0/T1 chain, TDlink) |
| [in] | RunNum | Run number |
| int FERS_StopAcquisition | ( | int * | handle, |
| int | NumBrd, | ||
| int | StartMode, | ||
| int | RunNum ) |
Send the stop command to the boards (according to the same mode used to start them)
| [in] | handle | Array of board handles |
| [in] | NumBrd | Number of boards to stop |
| [in] | StartMode | Acquisition stop mode |
| [in] | RunNum | Run number |
| int FERS_GetEvent | ( | int * | handle, |
| int * | bindex, | ||
| int * | DataQualifier, | ||
| double * | tstamp_us, | ||
| void ** | Event, | ||
| int * | nb ) |
Read and decode one event from the readout buffers. There are two readout modes: sorted or unsorted. If sorting is requested, the readout init function will allocate queues for sorting.
| [out] | bindex | Pointer to the board index from which the event comes |
| [out] | DataQualifier | Pointer to the data qualifier (type of data, used to determine the struct for event data) |
| [out] | tstamp_us | Pointer to the event timestamp in microseconds (the information is also reported in the event data struct) |
| [out] | Event | Pointer to the read event data structure |
| [out] | nb | Pointer to the size of the read event (in bytes) |
| [in] | handle | Array of boards handles |
| int FERS_GetEventFromBoard | ( | int | handle, |
| int * | DataQualifier, | ||
| double * | tstamp_us, | ||
| void ** | Event, | ||
| int * | nb ) |
Read and decode one event from a specific board.
| [out] | DataQualifier | Pointer to the data qualifier (type of data, used to determine the struct for event data) |
| [out] | tstamp_us | Pointer to the event timestamp in microseconds (the information is also reported in the event data struct) |
| [out] | Event | Pointer to the read event data |
| [out] | nb | Pointer to the size of the read event (in bytes) |
| [in] | handle | Board handle |