GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> FES / V6-5-0 > fes_ux / rhel4-32
#include <fesDevice.h>
Classes | |
struct | fesBoard_s |
Board information block. More... | |
Defines | |
#define | FES_TYP_TKR "tkr" |
Board type name - tracker. | |
#define | FES_TYP_CAL "cal" |
Board type name - calorimeter. | |
#define | FES_TYP_ACD "acd" |
Board type name - ACD. | |
#define | FES_TYP_CTL "ctl" |
Board type name - control. | |
#define | FES_CODE_TKR "Fes_Tkr_100.ttf" |
Tracker FPGA code file. | |
#define | FES_CODE_CAL "Fes_Cal_100.ttf" |
Calorimeter FPGA code file. | |
#define | FES_CODE_ACD "Fes_Acd_100.ttf" |
ACD FPGA code file. | |
#define | FES_CODE_CTL "Fes_Ctl_100.ttf" |
Control FPGA code file. | |
Typedefs | |
typedef struct fesBoard_s | fesBoard_t |
Board information block. | |
Enumerations | |
enum | { FES_NUM_TOWERS = 16, FES_MAX_ACD_BOARDS = 8, FES_MAX_SIM_BOARDS = 2 * FES_NUM_TOWERS + FES_MAX_ACD_BOARDS, FES_MAX_BOARDS = FES_MAX_SIM_BOARDS + 1, FES_NUM_SIDES = 4, FES_NUM_ACD_CABLES = 12, FES_MAX_CTL_CABLES = FES_MAX_SIM_BOARDS, FES_DEV_TYP_UNK = DEV_TYP_UNK, FES_DEV_TYP_TKR = DEV_TYP_TKR, FES_DEV_TYP_CAL = DEV_TYP_CAL, FES_DEV_TYP_ACD = DEV_TYP_ACD, FES_DEV_TYP_CTL = DEV_TYP_CTL, FES_BMASK_TKR = 0x000000ffffll, FES_BMASK_CAL = 0x00ffff0000ll, FES_BMASK_ACD = 0xff00000000ll, FES_BMASK_ALL = FES_BMASK_TKR | FES_BMASK_CAL | FES_BMASK_ACD, FES_BMASK_PED = FES_BMASK_CAL | FES_BMASK_ACD } |
Board parameters. More... | |
Functions | |
const int * | fesConfigAcdCblGet (int unit, int global) |
Get the ACD cable numbers of a board. | |
int | fesConfigAcdCblsGet (int unit, int global, int *cables) |
Get the packed ACD cable numbers of a board. | |
int | fesConfigAcdPathGet (int unit, int global) |
Get the ACD path number of a board. | |
int | fesConfigAUnitGet (int unit, int global) |
Get the associated unit number of a board. | |
int | fesConfigBoardFind (const char *name, int global) |
Find the board with a given name. | |
const fesBoard_t * | fesConfigBoardGet (int unit, int global) |
Get complete information for a board. | |
int | fesConfigCableGet (int unit, int global) |
Get the control cable number of a board. | |
int | fesConfigCtlIndexGet (void) |
Get the index of the control board. | |
int | fesConfigCtlUnitGet (void) |
Get the unit number of the control board. | |
int | fesConfigDiskGet (int unit, int global) |
Get the disk number of a board. | |
const int * | fesConfigFifoGet (int unit, int global) |
Get the FIFO cable map of a board. | |
int | fesConfigHwUnitGet (int unit) |
Get the hardware unit number of a board. | |
int | fesConfigIdFind (int id, int global) |
Find the board with a given ID. | |
int | fesConfigIdGet (int unit, int global) |
Get the ID number of a board. | |
int | fesConfigIndexGet (int unit, int global) |
Get the global index of a board. | |
int | fesConfigInit (const char *file) |
Initialize configuration data. | |
const char * | fesConfigNameGet (int unit, int global) |
Get the detector name of a board. | |
int | fesConfigNBoardGet (int global) |
Get the number of configured boards. | |
const char * | fesConfigNodeGet (int unit, int global) |
Get the node name of a board. | |
int | fesConfigPrimaryGet (int unit, int global) |
Get primary flag for a board. | |
int | fesConfigTowerGet (int unit, int global) |
Get the tower number of a board. | |
int | fesConfigTypeGet (int unit, int global) |
Get the type of a board. | |
const char * | fesConfigTypeNameGet (int unit, int global) |
Get the type name of a board. | |
int | fesConfigUnitGet (int unit, int global) |
Get the unit number of a board. |
$Id: fesConfig.h,v 1.20 2010/08/19 23:25:13 saxton Exp $
anonymous enum |
Board parameters.
const int* fesConfigAcdCblGet | ( | int | unit, | |
int | global | |||
) |
Get the ACD cable numbers of a board.
This routine gets the ACD cable numbers of a configured FES board, as a pointer to a four-element array containing the cable numbers in FIFO order. A FIFO without a cable contains the value -1.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::acdCbl.
int fesConfigAcdCblsGet | ( | int | unit, | |
int | global, | |||
int * | cables | |||
) |
Get the packed ACD cable numbers of a board.
This routine returns all the cable numbers for an ACD board, packed into an array in numerical order.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. | |
cables | The address of a four-element integer array to receive the ACD detector's cable numbers. If there are fewer than four cable numbers for the detector, the array is padded with the value -1. |
0 | Success. | |
-1 | The unit number or index was not in the allowed range. |
References fesBoard_s::acdCbl, FES_NUM_ACD_CABLES, and FES_NUM_SIDES.
Referenced by fesDataGen(), fesDataGenPedes(), and fesDataGenTrig().
int fesConfigAcdPathGet | ( | int | unit, | |
int | global | |||
) |
Get the ACD path number of a board.
This routine gets the ACD path number of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::acdPath.
int fesConfigAUnitGet | ( | int | unit, | |
int | global | |||
) |
Get the associated unit number of a board.
This routine gets the associated unit number of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameters are interpreted as board indices in the global list. Otherwise they are unit numbers on the local node. |
References fesBoard_s::aIndx, and fesBoard_s::aUnit.
Referenced by fesDataInfoGet().
int fesConfigBoardFind | ( | const char * | name, | |
int | global | |||
) |
Find the board with a given name.
This routine finds the board which has the specified detector name.
name | The address of the detector name to be found. | |
global | If TRUE, the board's global index is returned. Otherwise its local unit number is returned. |
References fesBoard_s::name, and fesBoard_s::unit.
Referenced by fesDataDel(), and fesDataDisp().
const fesBoard_t* fesConfigBoardGet | ( | int | unit, | |
int | global | |||
) |
Get complete information for a board.
This routine gets the full information for a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
int fesConfigCableGet | ( | int | unit, | |
int | global | |||
) |
Get the control cable number of a board.
This routine gets the control cable number of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::cCable.
int fesConfigCtlIndexGet | ( | void | ) |
Get the index of the control board.
This routine gets the index of the system-wide control board, if present.
Referenced by fesXctlInit().
int fesConfigCtlUnitGet | ( | void | ) |
Get the unit number of the control board.
This routine gets the unit number of the local control board, if present.
int fesConfigDiskGet | ( | int | unit, | |
int | global | |||
) |
Get the disk number of a board.
This routine gets the disk number of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::disk.
Referenced by fesDataDel(), fesDataDisp(), fesDataInfoGet(), fesDataJoin(), fesDataLoad(), and fesDataRename().
const int* fesConfigFifoGet | ( | int | unit, | |
int | global | |||
) |
Get the FIFO cable map of a board.
This routine gets the FIFO cable map of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::fifo.
int fesConfigHwUnitGet | ( | int | unit | ) |
Get the hardware unit number of a board.
This routine gets the hardware unit number of a configured FES board.
unit | The unit number of the board on the local node. |
References fesBoard_s::hwUnit.
int fesConfigIdFind | ( | int | id, | |
int | global | |||
) |
Find the board with a given ID.
This routine finds the board which has the specified board ID.
id | The ID of the board to be found. | |
global | If TRUE, the board's global index is returned. Otherwise its local unit number is returned. |
References fesBoard_s::id, and fesBoard_s::unit.
int fesConfigIdGet | ( | int | unit, | |
int | global | |||
) |
Get the ID number of a board.
This routine gets the ID number of a configured FES board. This is a number in the range 0-40 which uniquely identifies the board as follows: 0-15: tracker 0-15; 16-31: calorimeter 0-15; 32-39: ACD 0-7; 40: control.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::id.
Referenced by fesDataGen(), fesDataGenPedes(), fesDataGenTrig(), fesDataInfoGet(), fesDataJoin(), fesDataLoad(), and fesDataRename().
int fesConfigIndexGet | ( | int | unit, | |
int | global | |||
) |
Get the global index of a board.
This routine gets the global index of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
int fesConfigInit | ( | const char * | file | ) |
Initialize configuration data.
This routine reads the FES configuration file (in XML format) to obtain the configuration information about all the FES boards in the whole system. It also matches the board information for the local node with the actual hardware present.
file | The address of the name of the configuration file to use. If NULL or if the name is null, the name defaults to Fes_Config.xml. |
FES_SUCCESS | Success. | |
FES_NOCONFIG | Unable to open configuration file. | |
FES_CONFGERR | Error parsing configuration file. | |
FES_NOHOSTNM | Unable to obtain host name. | |
FES_DUPLHWID | Multiple boards found with the same ID. | |
FES_FPGAFAIL | An error occurred during FPGA loading. | |
FES_FPGANRDY | FPGAs not ready for loading. |
References fesBoard_s::acdCbl, fesBoard_s::acdPath, fesBoard_s::aIndx, fesBoard_s::aTower, fesBoard_s::aUnit, fesBoard_s::disk, FES_DEV_TYP_ACD, FES_DEV_TYP_UNK, FES_NUM_SIDES, fesBoard_s::hwUnit, fesBoard_s::node, fesBoard_s::tower, fesBoard_s::type, and fesBoard_s::unit.
Referenced by fesXctlInit().
const char* fesConfigNameGet | ( | int | unit, | |
int | global | |||
) |
Get the detector name of a board.
This routine gets a board's detector name given its global index.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::name.
Referenced by fesDataInfoGet(), fesDataJoin(), fesDataLoad(), fesDataRename(), and fesXctlRunStatShow().
int fesConfigNBoardGet | ( | int | global | ) |
Get the number of configured boards.
This routine gets the number of configured FES boards, either for the local node, or for the whole system.
global | If TRUE, causes the global number of boards to be returned. Otherwise only the number on the local node is returned. |
Referenced by fesDataGen(), fesDataGenPedes(), fesDataGenTrig(), fesDataInfoGet(), fesDataJoin(), fesDataLoad(), and fesDataRename().
const char* fesConfigNodeGet | ( | int | unit, | |
int | global | |||
) |
Get the node name of a board.
This routine gets the node name of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::node.
Referenced by fesDataDel(), fesDataDisp(), fesDataGen(), fesDataGenPedes(), fesDataGenTrig(), fesDataInfoGet(), fesDataLoad(), fesDataRename(), and fesXctlInit().
int fesConfigPrimaryGet | ( | int | unit, | |
int | global | |||
) |
Get primary flag for a board.
This routine gets a board's primary flag. This flag is TRUE if the board has no associated board or if the board appears in the description file before its associated board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::aUnit, and fesBoard_s::unit.
Referenced by fesDataDel(), fesDataDisp(), fesDataGen(), fesDataGenPedes(), fesDataGenTrig(), fesDataInfoGet(), fesDataJoin(), fesDataLoad(), and fesDataRename().
int fesConfigTowerGet | ( | int | unit, | |
int | global | |||
) |
Get the tower number of a board.
This routine gets the tower number of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::tower.
int fesConfigTypeGet | ( | int | unit, | |
int | global | |||
) |
Get the type of a board.
This routine gets the type of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::type.
Referenced by fesDataGen(), fesDataGenPedes(), fesDataGenTrig(), fesDataInfoGet(), fesDataJoin(), fesDataLoad(), fesDataRename(), and fesXctlRunStatShow().
const char* fesConfigTypeNameGet | ( | int | unit, | |
int | global | |||
) |
Get the type name of a board.
This routine gets the type name of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::tName.
int fesConfigUnitGet | ( | int | unit, | |
int | global | |||
) |
Get the unit number of a board.
This routine gets the unit number of a configured FES board.
unit | The unit number of the board on the local node, or its index in the system-wide board list, depending on the value of the global flag parameter. | |
global | If TRUE, the unit parameter is interpreted as the index of the board in the global list. Otherwise it is the unit number on the local node. |
References fesBoard_s::unit.