CAEN FERS Library v1.3.0
SDK for FERS systems
Loading...
Searching...
No Matches
Open/Close
Collaboration diagram for Open/Close:

Functions

float FERS_GetClockPeriod (int handle)
 Get the clock of the FERS board.
 
int FERS_OpenDevice (char *path, int *handle)
 Open a device (either FERS board, concentrator or offline)
 
int FERS_IsOpen (char *path)
 Check if a device is already opened.
 
int FERS_IsOpenByHandle (int handle, char *path)
 Check if a device is already opened, with handle.
 
int FERS_CloseDevice (int handle)
 Cloase a device (either FERS board or concentrator)
 
int FERS_TotalAllocatedMemory ()
 Return the total size of the allocated buffers for the readout of all boards.
 
int FERS_Reset_IPaddress (int handle)
 Restore the factory IP address (192.168.50.3) of the device. The board must be connected through the USB port.
 
int FERS_Get_CncPath (char *dev_path, char *cnc_path)
 Find the path of the concentrator to which a device is connected.
 
int FERS_InitTDLchains (int handle, float DelayAdjust[8][16])
 Send a sync broadcast command via TDL.
 
bool FERS_TDLchainsInitialized (int handle)
 Check if TDL chains are initialized.
 
uint16_t FERS_GetNumBrdConnected ()
 Get the number of boards connected.
 

Detailed Description

Function Documentation

◆ FERS_GetClockPeriod()

float FERS_GetClockPeriod ( int handle)

Get the clock of the FERS board.

Parameters
[in]handleboard handle return Clock period in ns

◆ FERS_OpenDevice()

int FERS_OpenDevice ( char * path,
int * handle )

Open a device (either FERS board, concentrator or offline)

Parameters
[in]pathdevice path (e.g. eth:192.168.50.125:tdl:0:0)
[in]*handledevice handle
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

◆ FERS_IsOpen()

int FERS_IsOpen ( char * path)

Check if a device is already opened.

Parameters
[in]*pathpath to be checked
Returns
1 if connected, 0 if not connected

◆ FERS_IsOpenByHandle()

int FERS_IsOpenByHandle ( int handle,
char * path )

Check if a device is already opened, with handle.

Parameters
[in]handledevice handle
[in]*pathpath to be checked
Returns
1 if connected, 0 if not connected

◆ FERS_CloseDevice()

int FERS_CloseDevice ( int handle)

Cloase a device (either FERS board or concentrator)

Parameters
[in]handlehandle of the device to be closed
Returns
0

◆ FERS_TotalAllocatedMemory()

int FERS_TotalAllocatedMemory ( )

Return the total size of the allocated buffers for the readout of all boards.

Returns
memory allocated in Byte

◆ FERS_Reset_IPaddress()

int FERS_Reset_IPaddress ( int handle)

Restore the factory IP address (192.168.50.3) of the device. The board must be connected through the USB port.

Parameters
[in]handlehandle of the board to be reset
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

◆ FERS_Get_CncPath()

int FERS_Get_CncPath ( char * dev_path,
char * cnc_path )

Find the path of the concentrator to which a device is connected.

Parameters
[out]cnc_pathconcentrator path
[in]dev_pathdevice address
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

◆ FERS_InitTDLchains()

int FERS_InitTDLchains ( int handle,
float DelayAdjust[8][16] )

Send a sync broadcast command via TDL.

Parameters
[in]handleconcentrator handel
[in]DelayAdjustarray with delay adjustments for each TDL chain and node
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

◆ FERS_TDLchainsInitialized()

bool FERS_TDLchainsInitialized ( int handle)

Check if TDL chains are initialized.

Parameters
[in]handleconcentator handle
Returns
0 in case of success, or a negative error code specified in FERSLIB_ErrorCodes

◆ FERS_GetNumBrdConnected()

uint16_t FERS_GetNumBrdConnected ( )

Get the number of boards connected.

Returns
number of board connected