|
CDT I-BM API 1.0.0
|
Class for managing the Ion Beam Monitor API (CdtIonBMAPI). More...
#include <cdtIbmApi.h>


Public Member Functions | |
| CdtIonBMAPI (RMMAPI *rmmApi, int ring, int node, std::string name, TiaBoardVersion tia_board_version) | |
| Constructor for the CdtIonBMAPI class. | |
| void | configFE () |
| Configures the FEN with default values. | |
| uint32_t | getFirmwareHash () |
| Retrieves the ESS firmware hash. | |
| rmmStatus | setSamplingPeriod (double sampling) |
| Sets the sampling period in microseconds. | |
| double | getSamplingPeriod () |
| Retrieves the current sampling period. | |
| rmmStatus | setSumCounterStop (uint32_t value) |
| Sets the TIA SERDES sum counter stop value. | |
| rmmStatus | setADCSummation (uint8_t value) |
| Sets the summation over 'n' consecutive ADC samples. | |
| uint8_t | getADCSummation () |
| Retrieves the summation over 'n' ADC samples. | |
| rmmStatus | enableEmulateADCData (bool enable) |
| Enables or disables emulation of ADC data. | |
| rmmStatus | setEmulatedADCValue (uint32_t value) |
| Sets the emulated ADC value. | |
| RMMResult | isEmulatedADCDataEnabled () |
| Checks whether ADC data emulation is currently enabled. | |
| RMMResult | getEmulatedADCValue () |
| Retrieves the current emulated ADC value. | |
| RMMResult | setADCDataInjection (bool enable, uint32_t value) |
Public Member Functions inherited from CdtHv | |
| CdtHv (std::string name, TiaBoardVersion tia_board_version) | |
| TiaBoardVersion | getTiaBoardVersion () const |
| const std::string & | getTiaBoardVersionLabel () const |
| void | setHvTimeout (uint32_t val) |
| uint32_t | getHvTimeout () |
| bool | isHVRampRunning () const |
| Checks if the high-voltage (HV) ramp process is currently running. | |
| void | requestHVStop () |
| Requests to stop ongoing operations. | |
| void | resetHVStop () |
| Resets the stop request flag, allowing operations to continue. | |
| double | readHV (rmmStatus *status=NULL) |
| Reads the measured voltage from the HV chip via I2C. | |
| void | writeHV (const double voltage, const double voltagePerSec) |
| Writes a voltage value to the HV chip, ensuring proper enabling and smooth ramping. | |
| bool | isStopHVRequested () const |
| Checks if a stop request has been issued. | |
Public Member Functions inherited from CdtBaseBMAPI | |
| CdtBaseBMAPI (RMMAPI *rmmApi, int ring, int node, std::string name, FENRegMap additional_reg_map) | |
| Constructor for the CdtBm class. | |
| void | configAcquireTime (uint64_t cycles) |
| Sets the acquisition time. Executed inside configFE right before starting the acquisition. | |
| void | measurementEnable (bool enable) |
| Enables or disables the measurement process. | |
| bool | isMeasRunning () |
| Checks if the measurement is currently running. | |
Additional Inherited Members | |
Protected Member Functions inherited from CdtHv | |
| uint32_t | calcDacForVoltage (const double voltage) |
| Calculates the DAC value for a given voltage. | |
| void | jumpToVoltage (const double voltage) |
| Jumps to a specific high voltage value. | |
| bool | isI2cRequestDone () |
| Checks if an I2C request has completed. | |
| rmmStatus | runI2cRequest (I2cRequestAction action, uint32_t dac_value=0xFF) |
| Executes an I2C read or write request to the HV module. | |
Protected Attributes inherited from CdtHv | |
| std::atomic< uint32_t > | previousDacValue {0} |
| TiaBoardVersion | tiaVersion |
| std::string | tiaBoardVersionLabel |
Class for managing the Ion Beam Monitor API (CdtIonBMAPI).
The CdtIonBMAPI class is responsible for managing the front-end configuration and controlling high-voltage (HV) operations for the I-BM frontend node.
| CdtIonBMAPI::CdtIonBMAPI | ( | RMMAPI * | rmmApi, |
| int | ring, | ||
| int | node, | ||
| std::string | name, | ||
| TiaBoardVersion | tia_board_version ) |
Constructor for the CdtIonBMAPI class.
Initializes a new instance of the CdtIonBMAPI class by calling the constructor of the FrontEndBase class to set up the base class parameters and configuration.
| [in] | rmmApi | Pointer to the RMMAPI instance used for communication and management of the RMM |
| [in] | ring | The ring number. |
| [in] | node | The node number. |
| [in] | version | Version selector for tia board version:
|
| [in] | name | The name to identify the front-end instance. |
| void CdtIonBMAPI::configFE | ( | ) |
Configures the FEN with default values.
This function is used to configure the FEN by performing the setup tasks related to the system.
| rmmStatus CdtIonBMAPI::enableEmulateADCData | ( | bool | enable | ) |
Enables or disables emulation of ADC data.
This method sets bit 31 of the tia_adc_control register to either enable or disable ADC data emulation. A value of true sets the bit to 1 (enabled), while false sets it to 0 (disabled).
| [in] | enable | Set to true to enable emulated ADC data; false to disable it. |
| uint8_t CdtIonBMAPI::getADCSummation | ( | ) |
Retrieves the summation over 'n' ADC samples.
| RMMResult CdtIonBMAPI::getEmulatedADCValue | ( | ) |
Retrieves the current emulated ADC value.
Reads bits 23 downto 0 of the tia_adc_control register to obtain the current emulated ADC value.
| uint32_t CdtIonBMAPI::getFirmwareHash | ( | ) |
Retrieves the ESS firmware hash.
| double CdtIonBMAPI::getSamplingPeriod | ( | ) |
Retrieves the current sampling period.
Reads the TIA SERDES sampling register and converts the value to microseconds.
| RMMResult CdtIonBMAPI::isEmulatedADCDataEnabled | ( | ) |
Checks whether ADC data emulation is currently enabled.
Reads bit 31 of the tia_adc_control field to determine the emulation status. A value of 1 indicates that emulation is enabled, while 0 means it is disabled.
| rmmStatus CdtIonBMAPI::setADCSummation | ( | uint8_t | value | ) |
Sets the summation over 'n' consecutive ADC samples.
The mca_sum_counter_stop field defines how many consecutive 24-bit ADC values are summed together. To avoid overflow, the maximum number of samples that can be safely accumulated is 32.
This method ensures the provided value is within the valid range [1, 32]. A value of 0 is considered invalid and will be rejected. Upon successful validation, the value is written to bits 32 downto 24 of the mca_base register.
| [in] | value | The number of consecutive samples to sum (must be in [1, 32]). |
| rmmStatus CdtIonBMAPI::setEmulatedADCValue | ( | uint32_t | value | ) |
Sets the emulated ADC value.
Writes the specified 24-bit value into bits 23 downto 0 of the tia_adc_control field. This value is used during ADC data emulation.
| [in] | value | The 24-bit ADC value to emulate. |
| rmmStatus CdtIonBMAPI::setSamplingPeriod | ( | double | sampling | ) |
Sets the sampling period in microseconds.
This method ensures the provided value is within the valid range [1.2us, 132.2us]. Upon successful validation, the us is converted to uint16 value and written to bits 23 downto 8 of the tia_serdes_base register.
| [in] | sampling | Sampling period in microseconds. |
| rmmStatus CdtIonBMAPI::setSumCounterStop | ( | uint32_t | value | ) |
Sets the TIA SERDES sum counter stop value.
Writes the specified value to bits 32 downto 24 of the tia_serdes_base register.
| [in] | value | The counter stop value to set. |