NSCL DDAS
12.1-001
Support for XIA DDAS at FRIB
|
The HardwareRegistry namespace is where information about all known DDAS modules are stored. More...
Classes | |
struct | HardwareSpecification |
Generic hardware specs for hardware types. More... | |
Enumerations | |
enum | HardwareType { RevB_100MHz_12Bit =1 , RevC_100MHz_12Bit =2 , RevD_100MHz_12Bit =3 , RevF_100MHz_14Bit =4 , RevF_100MHz_16Bit =5 , RevF_250MHz_12Bit =6 , RevF_250MHz_14Bit =7 , RevF_250MHz_16Bit =8 , RevF_500MHz_12Bit =9 , RevF_500MHz_14Bit =10 , RevF_500MHz_16Bit =11 , Unknown =0 } |
The HardwareType enum. More... | |
Functions | |
void | configureHardwareType (int type, const HardwareSpecification &spec) |
HardwareSpecification & | getSpecification (int type) |
Retrieve a reference to the current hdwr specification for a hardware type. More... | |
void | resetToDefaults () |
int | computeHardwareType (int hdwrVersion, int adcFreq, int adcRes) |
Compute the hardware type from input specifications. More... | |
int | createHardwareType (int hdwrVersion, int adcFreq, int adcRes, double clockCalibration) |
Create an enumerated hardware type from input specifications. More... | |
The HardwareRegistry namespace is where information about all known DDAS modules are stored.
The information that the user can access in this namespace's functions is not specific to a module but rather to a hardware type. If the user wants to know basic information about the ADC resolution or frequency, this namespace will scratch that itch. However, if the user is looking for information about the serial number, this is not the place for that. In fact, there currently is no place for that.
The HardwareRegistry is fairly simple. It is just a map of HardwareRegistry::HardwareSpecifications that are keyed by HardwareRegistry::HardwareType enumerations. The HardwareRegistry provides a default state that provides the normal specifications for each hardware type in use at the NSCL. If for some crazy reason, something changes, the user can change the specifications associated with each device type.
There is also a function to determine the hardware type enumeration value given the hardware revision, ACD frequency, and ADC resolution called HardwareRegistry::computeHardwareType(). The reverse operation is called HardwareRegistry::getSpecification(HardwareType type). Together these two functions are probably the most useful tools.
The HardwareType enum.
The HardwareType enumeration provides an identifier for each type of hardware that might be found in the system. The user can determine which hardware type they are dealing with by calling the Pixie16ReadModuleInfo()
methods to access the ADC sampling frequency, the ADC resolution, and the hardware revision. Together with those three pieces of information, it is possible to determine the appropriate HardwareType.
int DAQ::DDAS::HardwareRegistry::computeHardwareType | ( | int | hdwrVersion, |
int | adcFreq, | ||
int | adcRes | ||
) |
Compute the hardware type from input specifications.
hdwrVersion | Hardware revision. |
adcFreq | ADC sampling frequency. |
adcRes | ADC bit resolution (e.g. 12, 14, etc.). |
void DAQ::DDAS::HardwareRegistry::configureHardwareType | ( | int | type, |
const HardwareSpecification & | spec | ||
) |
int DAQ::DDAS::HardwareRegistry::createHardwareType | ( | int | hdwrVersion, |
int | adcFreq, | ||
int | adcRes, | ||
double | clockCalibration | ||
) |
Create an enumerated hardware type from input specifications.
hdwrVersion | Hardware revision. |
adcFreq | ADC sampling frequency. |
adcRes | ADC bit resolution (e.g. 12, 14, etc.). |
clockCalibration | FPGA clock calibration in ns/clock tick. |
DAQ::DDAS::HardwareRegistry::HardwareSpecification & DAQ::DDAS::HardwareRegistry::getSpecification | ( | int | type | ) |
Retrieve a reference to the current hdwr specification for a hardware type.
type | The enumerated hardware type. |
std::runtime_error | If no specification exists for the hardware type provided. |
void DAQ::DDAS::HardwareRegistry::resetToDefaults | ( | ) |