GPIO
The GPIO component provides an interface to the General Purpose Input/Output (GPIO) pins of the FPGA. The component is implemented as multiple singleton classes, each representing a single GPIO IP-Code of the hardware design.
Classes
Base GPIO Class
-
class Gpio
Represents a GPIO (General Purpose Input/Output) interface.
This class provides methods to control and access GPIO pins. It prevents move construction and move assignment to ensure proper resource management. The GPIO pins are accessed through a memory map provided by the
memorycontrol::MemoryMapclass.Subclassed by nexmess::components::gpio::GpioBLRPreGate, nexmess::components::gpio::GpioCfdAmp, nexmess::components::gpio::GpioCfdDelay, nexmess::components::gpio::GpioChargePackageSize, nexmess::components::gpio::GpioCoincidenceWindow, nexmess::components::gpio::GpioCountPackageSize, nexmess::components::gpio::GpioEnabled, nexmess::components::gpio::GpioFractionPackageSize, nexmess::components::gpio::GpioLongGate, nexmess::components::gpio::GpioLongWindow, nexmess::components::gpio::GpioMaxHeightFraction, nexmess::components::gpio::GpioMaxPackageSize, nexmess::components::gpio::GpioMeasurementInterrupt, nexmess::components::gpio::GpioMeasurementTime, nexmess::components::gpio::GpioMinHeightFraction, nexmess::components::gpio::GpioOffset, nexmess::components::gpio::GpioPreGate, nexmess::components::gpio::GpioRawPackageSize, nexmess::components::gpio::GpioRisetimePackageSize, nexmess::components::gpio::GpioShortWindow, nexmess::components::gpio::GpioSignalCount, nexmess::components::gpio::GpioTriggerValue
Public Functions
-
Gpio() = delete
-
~Gpio() = default
-
Gpio(uint32_t register_base, int mem)
Constructs a new Gpio object.
- Parameters:
register_base – The base address of the GPIO registers.
mem – The memory identifier.
-
bool has_error() const
Checks if there is any error with the GPIO.
- Returns:
trueif there is an error,falseotherwise.
Protected Functions
-
void set_value(uint32_t value)
Sets the value of the first data register.
- Parameters:
value – The value to be set.
-
uint32_t get_value()
Gets the value of the first data register.
- Returns:
The value of the first data register.
-
void set_value2(uint32_t value)
Sets the value of the second data register.
- Parameters:
value – The value to be set.
-
uint32_t get_value2()
Gets the value of the second data register.
- Returns:
The value of the second data register.
-
Gpio() = delete
Enables GPIO Class
-
class GpioEnabled : public nexmess::components::gpio::Gpio
The GpioEnabled class represents a GPIO interface especially for the GPIO to enable ADC channels and processing options.
This class inherits from the Gpio class and provides functionality for controlling GPIO pins to enable ADC channels and various processing options. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioEnabled() = delete
-
GpioEnabled(const GpioEnabled&) = delete
-
void operator=(const GpioEnabled&) = delete
-
GpioEnabled(GpioEnabled&&) = delete
-
GpioEnabled &operator=(GpioEnabled&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioEnabled instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void deactivate_all()
Deactivates all ADC channels and processing options.
-
static void activate_specific(uint8_t channel_value)
Activates the specified ADC channels for DMA operations.
This function uses a bit mask for the configuration of the ADC channels. The structure is as follows:
bit [0]: activate channel 1 for DMA operation
bit [1]: activate channel 2 for DMA operation
For example, a mask of 0b000000000001 would activate the first channel for DMA operation.
- Parameters:
channel_value – A bit mask specifying the ADC channels to be activated.
-
static uint8_t get_dma_channels()
Gets the channels for DMA operations.
- Returns:
The channels for DMA operations.
-
static uint8_t get_invert_channels()
Gets the channels for inversions.
- Returns:
The channels for inversions.
-
static void set_invert_channels(uint8_t invert_channel_value)
Sets the specified ADC channels to invert.
This function uses a bit mask for the configuration of the ADC channels. The structure is at follows:
bit [0]: activate channel 1 inversion
bit [1]: activate channel 2 inversion
For example, a mask of 0b000000000100 would activate the first channel inversion.
- Parameters:
invert_channel_value – A bit mask specifying the ADC channels to be activated.
-
static uint8_t get_fir_channels()
Gets the channels for FIR operations.
- Returns:
The channels for FIR operations.
-
static void set_fir_channels(uint8_t fir_channel_value)
Sets the specified ADC channels for FIR filtering.
This function uses a bit mask for the configuration of the ADC channels. The structure is at follows:
bit [0]: activate channel 1 for FIR filtering
bit [1]: activate channel 2 for FIR filtering
For example, a mask of 0b000000010000 would activate the first channel for FIR filtering.
- Parameters:
fir_channel_value – A bit mask specifying the ADC channels to be activated.
-
static uint8_t get_blr_channels()
Gets the channels for baseline restoration.
- Returns:
The channels for baseline restoration.
-
static void set_blr_channels(uint8_t blr_channel_value)
Sets the specified ADC channels for baseline restoration.
This function uses a bit mask for the configuration of the ADC channels. The structure is at follows:
bit [0]: activate channel 1 for baseline restoration
bit [1]: activate channel 2 for baseline restoration
For example, a mask of 0b000001000000 would activate the first channel for baseline restoration.
- Parameters:
blr_channel_value – A bit mask specifying the ADC channels to be activated.
-
static uint8_t get_cfd_trigger_channels()
Gets the channels for CFD triggering.
This selects channels that generate triggers from the Constant Fraction Discriminator instead of standard threshold triggering.
- Returns:
The channels for CFD triggering.
-
static void set_cfd_trigger_channels(uint8_t cfd_trigger_value)
Sets the specified ADC channels for CFD triggering.
This function uses a bit mask for the configuration of the ADC channels. The structure is at follows:
bit [0]: activate channel 1 for CFD triggering
bit [1]: activate channel 2 for CFD triggering
For example, a mask of 0b000100000000 would activate the first channel for baseline restoration.
- Parameters:
cfd_trigger_value – A bit mask specifying the ADC channels to be activated.
-
static uint8_t get_cfd_data_channels()
Gets the channels for CFD data output.
When enabled, the channel outputs the CFD-processed signal (sum of partial CFD signals) instead of the regular triggered pulse output.
- Returns:
The channels for CFD data output.
-
static void set_cfd_data_channels(uint8_t cfd_data_value)
Sets the specified ADC channels for baseline restoration.
This function uses a bit mask for the configuration of the ADC channels. The structure is at follows:
bit [0]: activate channel 1 for CFD data output
bit [1]: activate channel 2 for CFD data output
For example, a mask of 0b010000000000 would activate the first channel for baseline restoration.
- Parameters:
cfd_data_value – A bit mask specifying the ADC channels to be activated.
-
static bool get_coincidence()
Gets the flag for the measurement of coincident events.
- Returns:
True if the measurement of coincident events is enabled, false otherwise.
-
static void set_coincidence(bool coincidence_value)
Sets the flag for the measurement of coincident events.
- Parameters:
coincidence_value – True to enable the measurement of coincident events, false to disable it.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioEnabled(int mem)
Constructor for the GpioEnabled class.
This constructor initializes a new GpioEnabled object with all ADC channels and processing options disabled. This is done to ensure a clean state, preventing potential issues with channels that were left enabled from previous operations.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioEnabled()
Destructor for the GpioEnabled class.
Before the GpioEnabled object is destructed, this destructor disables all ADC channels and processing options. This ensures that no channels or processing paths remain active beyond the lifetime of the GpioEnabled object.
Private Members
-
uint32_t enableds_ = 0
Sets the state of ADC and processing options (0 -> off, 1 -> on).
Each bit is one configuration flag.
Private Static Functions
-
static GpioEnabled &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init().
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of the GPIO object.
-
static GpioEnabled &get_instance()
The implementation of get_instance without parameters.
- Returns:
The instance of the GPIO object.
-
GpioEnabled() = delete
Long gate GPIO Class
-
class GpioLongGate : public nexmess::components::gpio::Gpio
The GpioLongGate class represents a GPIO interface especially for the GPIO to set the number of samples to be measured once a trigger occurs.
This class inherits from the Gpio class and provides functionality for setting the long gate. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioLongGate() = delete
-
GpioLongGate(const GpioLongGate&) = delete
-
void operator=(const GpioLongGate&) = delete
-
GpioLongGate(GpioLongGate&&) = delete
-
GpioLongGate &operator=(GpioLongGate&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioLongGate instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_long_gates(uint16_t long_gate_c1, uint16_t long_gate_c2)
Sets the long gates of channel 1 and channel 2.
- Parameters:
long_gate_c1 – The long gate of channel 1 in number of samples.
long_gate_c2 – The long gate of channel 2 in number of samples.
-
static void set_long_gate_c1(uint16_t long_gate_c1)
Sets the long gate of channel 1.
- Parameters:
long_gate_c1 – The long gate of channel 1 in number of samples.
-
static void set_long_gate_c2(uint16_t long_gate_c2)
Sets the long gate of channel 2.
- Parameters:
long_gate_c2 – The long gate of channel 2 in number of samples.
-
static uint32_t get_long_gates()
Gets the long gate configuration of both channels.
- Returns:
The long gate configuration of both channels.
-
static uint16_t get_long_gate_c1()
Gets the long gate of channel 1.
- Returns:
The long gate of channel 1 in number of samples.
-
static uint16_t get_long_gate_c2()
Gets the long gate of channel 2.
- Returns:
The long gate of channel 2 in number of samples.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioLongGate(int mem)
Constructor for the GpioLongGate class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioLongGate()
Destructor for the GpioLongGate class.
Before the GpioLongGate object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t long_gates_ = 0
Number of samples for the long gate.
Private Static Functions
-
static GpioLongGate &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioLongGate &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioLongGate() = delete
Pre gate GPIO Class
-
class GpioPreGate : public nexmess::components::gpio::Gpio
The GpioPreGate class represents a GPIO interface especially for the GPIO to set the number of samples to be outputted before a trigger occurred.
For each channel an individual pre gate can be set.
This class inherits from the Gpio class and provides functionality for setting the pre gate. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioPreGate() = delete
-
GpioPreGate(const GpioPreGate&) = delete
-
void operator=(const GpioPreGate&) = delete
-
GpioPreGate(GpioPreGate&&) = delete
-
GpioPreGate &operator=(GpioPreGate&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioPreGate instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_pre_gates(uint16_t pre_gate_c1, uint16_t pre_gate_c2)
Sets the pre gates of channel 1 and channel 2.
- Parameters:
pre_gate_c1 – The pre gate of channel 1 in number of samples.
pre_gate_c2 – The pre gate of channel 1 in number of samples.
-
static void set_pre_gate_c1(uint16_t pre_gate_c1)
Sets the pre gate of channel 1.
- Parameters:
pre_gate_c1 – The pre gate of channel 1 in number of samples.
-
static void set_pre_gate_c2(uint16_t pre_gate_c2)
Sets the pre gate of channel 2.
- Parameters:
pre_gate_c2 – The pre gate of channel 2 in number of samples.
-
static uint32_t get_pre_gates()
Gets the pre gate configuration of both channels.
- Returns:
The pre gate configuration of both channels.
-
static uint16_t get_pre_gate_c1()
Gets the pre gate of channel 1.
- Returns:
The pre gate of channel 1 in number of samples.
-
static uint16_t get_pre_gate_c2()
Gets the pre gate of channel 2.
- Returns:
The pre gate of channel 2 in number of samples.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioPreGate(int mem)
Constructor for the GpioPreGate class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioPreGate()
Destructor for the GpioPreGate class.
Before the GpioPreGate object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t pre_gates_ = 0
Number of samples for the pre gate.
Private Static Functions
-
static GpioPreGate &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioPreGate &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioPreGate() = delete
Trigger value GPIO Class
-
class GpioTriggerValue : public nexmess::components::gpio::Gpio
The GpioTriggerValue class represents a GPIO interface especially for the GPIO to set the trigger value.
This class inherits from the Gpio class and provides functionality for setting the trigger value. The value corresponds to the values given by the ADC. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioTriggerValue() = delete
-
GpioTriggerValue(const GpioTriggerValue&) = delete
-
void operator=(const GpioTriggerValue&) = delete
-
GpioTriggerValue(GpioTriggerValue&&) = delete
-
GpioTriggerValue &operator=(GpioTriggerValue&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioTriggerValue instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_trigger_values(int16_t trigger_value_c1, int16_t trigger_value_c2)
Sets the trigger values for channel 1 and channel 2.
- Parameters:
trigger_value_c1 – The trigger value for channel 1 in units of the ADC.
trigger_value_c2 – The trigger value for channel 2 in units of the ADC.
-
static void set_trigger_value_c1(int16_t trigger_value_c1)
Sets the trigger value of channel 1.
- Parameters:
trigger_value_c1 – The trigger value of channel 1 in units of the ADC.
-
static void set_trigger_value_c2(int16_t trigger_value_c2)
Sets the trigger value of channel 2.
- Parameters:
trigger_value_c2 – The trigger value of channel 2 in units of the ADC.
-
static uint32_t get_trigger_values()
Gets the trigger value configuration of both channels.
- Returns:
The trigger value configuration of both channels.
-
static int16_t get_trigger_value_c1()
Gets the trigger value for channel 1.
- Returns:
The trigger value for channel 1 in units of the ADC.
-
static int16_t get_trigger_value_c2()
Gets the trigger value for channel 2.
- Returns:
The trigger value for channel 2 in units of the ADC.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioTriggerValue(int mem)
Constructor for the GpioTriggerValue class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioTriggerValue()
Destructor for the GpioTriggerValue class.
Before the GpioTriggerValue object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t trigger_values_ = 0
Trigger value in units of the ADC.
Private Static Functions
-
static GpioTriggerValue &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioTriggerValue &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioTriggerValue() = delete
Measurement interrupt GPIO Class
-
class GpioMeasurementInterrupt : public nexmess::components::gpio::Gpio
Represents a GPIO measurement interrupt.
This class extends the Gpio class and provides functionality for handling measurement interrupts.
This class checks if the measurement is stopped and if a DMA transfer is complete. It also provides functionality for preventing further interrupts from being triggered once a measurement is stopped.
It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioMeasurementInterrupt() = delete
-
GpioMeasurementInterrupt(const GpioMeasurementInterrupt&) = delete
-
void operator=(const GpioMeasurementInterrupt&) = delete
-
GpioMeasurementInterrupt(GpioMeasurementInterrupt&&) = delete
-
GpioMeasurementInterrupt &operator=(GpioMeasurementInterrupt&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GPIO measurement interrupt.
- Parameters:
mem – The memory value.
-
static void check_status()
Checks the status of the GPIO measurement interrupt.
In case a measurement was stopped it sets the 2nd GPIO register to 0 so no further interrupts are triggered!
-
static bool get_stopped(uint16_t dma_id)
Gets the stopped flag for a specific ID.
- Parameters:
dma_id – The ID value.
- Returns:
true if the stopped flag is set, false otherwise.
-
static bool get_dma_interrupt(uint16_t dma_interrupt_id)
Gets the DMA interrupt for a specific DMA.
- Parameters:
dma_interrupt_id – The ID value.
- Returns:
true if the DMA interrupt is set, false otherwise.
-
static void reset()
Resets the GPIO measurement interrupt.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioMeasurementInterrupt(int mem)
Constructor for the GpioMeasurementInterrupt class.
This constructor initializes a new GpioMeasurementInterrupt object with all ADC channels disabled. This is done to ensure a clean state, preventing potential issues with channels that were left enabled from previous operations.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioMeasurementInterrupt() = default
Destructor for the GpioMeasurementInterrupt class.
Before the GpioMeasurementInterrupt object is destructed, this destructor disables all ADC channels. This ensures that no ADC channels remain active beyond the lifetime of the GpioMeasurementInterrupt object, preventing potential issues with dangling resources.
Private Members
-
uint32_t measurement_interrupt_status_ = 0
The measurement interrupt status.
The This value represents the following data:
bit [0..1]: stopped status of ADC channel 0 and 1
bit [2..3]: DMA interrupt status of ADC channel 0 and 1
Private Static Functions
-
static GpioMeasurementInterrupt &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioMeasurementInterrupt &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioMeasurementInterrupt() = delete
Measurement time GPIO Class
-
class GpioMeasurementTime : public nexmess::components::gpio::Gpio
The GpioMeasurementTime class represents a GPIO interface especially for the GPIO to set the measurement time.
This class inherits from the Gpio class and provides functionality for setting the measurement time in ms. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioMeasurementTime() = delete
-
GpioMeasurementTime(const GpioMeasurementTime&) = delete
-
void operator=(const GpioMeasurementTime&) = delete
-
GpioMeasurementTime(GpioMeasurementTime&&) = delete
-
GpioMeasurementTime &operator=(GpioMeasurementTime&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioMeasurementTime instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_time(uint32_t time)
Sets the measurement time.
- Parameters:
time – The measurement time in ms. 0 means infinite.
-
static uint32_t get_time()
Gets the measurement time.
- Returns:
The measurement time in ms. 0 means infinite.
-
static void stop_measurement()
Stops the measurement.
The time is set to 1ms so that the hardware actually triggers the stop.
-
static void reset_stop_measurement()
Resets the stop measurement.
The time is set to the previous value. This should be called after stop_measurement() once the stop was handled.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioMeasurementTime(int mem)
Constructor for the GpioMeasurementTime class.
This constructor initializes a new GpioMeasurementTime object. The measurement time is initialized to 0.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioMeasurementTime()
Destructor for the GpioMeasurementTime class.
Before the GpioMeasurementTime object is destructed, this destructor resets the measurement time to 0.
Private Members
-
uint32_t time_ = 0
The measurement time in ms. 0 means infinite.
Private Static Functions
-
static GpioMeasurementTime &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioMeasurementTime &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioMeasurementTime() = delete
Raw data package size GPIO Class
-
class GpioRawPackageSize : public nexmess::components::gpio::Gpio
The GpioRawPackageSize class represents a GPIO interface especially for the GPIO to set the package size for the raw data.
This class inherits from the Gpio class and provides functionality for setting the package size. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioRawPackageSize() = delete
-
GpioRawPackageSize(const GpioRawPackageSize&) = delete
-
void operator=(const GpioRawPackageSize&) = delete
-
GpioRawPackageSize(GpioRawPackageSize&&) = delete
-
GpioRawPackageSize &operator=(GpioRawPackageSize&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioRawPackageSize instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_package_size_c1(uint32_t package_size)
Sets the package size for channel 1.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c1()
Gets the package size for channel 1.
- Returns:
The package size.
-
static void set_package_size_c2(uint32_t package_size)
Sets the package size for channel 2.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c2()
Gets the package size for channel 2.
- Returns:
The package size.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioRawPackageSize(int mem)
Constructor for the GpioRawPackageSize class.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioRawPackageSize()
Destructor for the GpioRawPackageSize class.
Before the GpioRawPackageSize object is destructed, the value is set to 524288 in hardware.
Private Members
-
uint32_t package_size_c1_ = 0
Package size for channel 1.
-
uint32_t package_size_c2_ = 0
Package size for channel 2.
Private Static Functions
-
static GpioRawPackageSize &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioRawPackageSize &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioRawPackageSize() = delete
Count data package size GPIO Class
-
class GpioCountPackageSize : public nexmess::components::gpio::Gpio
The GpioCountPackageSize class represents a GPIO interface especially for the GPIO to set the package size for the count data.
This class inherits from the Gpio class and provides functionality for setting the package size. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioCountPackageSize() = delete
-
GpioCountPackageSize(const GpioCountPackageSize&) = delete
-
void operator=(const GpioCountPackageSize&) = delete
-
GpioCountPackageSize(GpioCountPackageSize&&) = delete
-
GpioCountPackageSize &operator=(GpioCountPackageSize&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioCountPackageSize instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_package_size_c1(uint32_t package_size)
Sets the package size for channel 1.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c1()
Gets the package size for channel 1.
- Returns:
The package size.
-
static void set_package_size_c2(uint32_t package_size)
Sets the package size for channel 2.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c2()
Gets the package size for channel 2.
- Returns:
The package size.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioCountPackageSize(int mem)
Constructor for the GpioCountPackageSize class.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioCountPackageSize()
Destructor for the GpioCountPackageSize class.
Before the GpioCountPackageSize object is destructed, the value is set to 524288 in hardware.
Private Members
-
uint32_t package_size_c1_ = 0
Package size for channel 1.
-
uint32_t package_size_c2_ = 0
Package size for channel 2.
Private Static Functions
-
static GpioCountPackageSize &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioCountPackageSize &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioCountPackageSize() = delete
Charge data package size GPIO Class
-
class GpioChargePackageSize : public nexmess::components::gpio::Gpio
The GpioChargePackageSize class represents a GPIO interface especially for the GPIO to set the package size for the charge data.
This class inherits from the Gpio class and provides functionality for setting the package size. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioChargePackageSize() = delete
-
GpioChargePackageSize(const GpioChargePackageSize&) = delete
-
void operator=(const GpioChargePackageSize&) = delete
-
GpioChargePackageSize(GpioChargePackageSize&&) = delete
-
GpioChargePackageSize &operator=(GpioChargePackageSize&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioChargePackageSize instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_package_size_c1(uint32_t package_size)
Sets the package size for channel 1.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c1()
Gets the package size for channel 1.
- Returns:
The package size.
-
static void set_package_size_c2(uint32_t package_size)
Sets the package size for channel 2.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c2()
Gets the package size for channel 2.
- Returns:
The package size.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioChargePackageSize(int mem)
Constructor for the GpioChargePackageSize class.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioChargePackageSize()
Destructor for the GpioChargePackageSize class.
Before the GpioChargePackageSize object is destructed, the value is set to 524288 in hardware.
Private Members
-
uint32_t package_size_c1_ = 0
Package size for channel 1.
-
uint32_t package_size_c2_ = 0
Package size for channel 2.
Private Static Functions
-
static GpioChargePackageSize &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioChargePackageSize &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioChargePackageSize() = delete
Fraction data package size GPIO Class
-
class GpioFractionPackageSize : public nexmess::components::gpio::Gpio
The GpioFractionPackageSize class represents a GPIO interface especially for the GPIO to set the package size for the fraction data.
This class inherits from the Gpio class and provides functionality for setting the package size. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioFractionPackageSize() = delete
-
GpioFractionPackageSize(const GpioFractionPackageSize&) = delete
-
void operator=(const GpioFractionPackageSize&) = delete
-
GpioFractionPackageSize(GpioFractionPackageSize&&) = delete
-
GpioFractionPackageSize &operator=(GpioFractionPackageSize&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioFractionPackageSize instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_package_size_c1(uint32_t package_size)
Sets the package size for channel 1.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c1()
Gets the package size for channel 1.
- Returns:
The package size.
-
static void set_package_size_c2(uint32_t package_size)
Sets the package size for channel 2.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c2()
Gets the package size for channel 2.
- Returns:
The package size.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioFractionPackageSize(int mem)
Constructor for the GpioFractionPackageSize class.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioFractionPackageSize()
Destructor for the GpioFractionPackageSize class.
Before the GpioFractionPackageSize object is destructed, the value is set to 524288 in hardware.
Private Members
-
uint32_t package_size_c1_ = 0
Package size for channel 1.
-
uint32_t package_size_c2_ = 0
Package size for channel 2.
Private Static Functions
-
static GpioFractionPackageSize &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioFractionPackageSize &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioFractionPackageSize() = delete
Maximum height data package size GPIO Class
-
class GpioMaxPackageSize : public nexmess::components::gpio::Gpio
The GpioMaxPackageSize class represents a GPIO interface especially for the GPIO to set the package size for the maximum value data.
This class inherits from the Gpio class and provides functionality for setting the package size. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioMaxPackageSize() = delete
-
GpioMaxPackageSize(const GpioMaxPackageSize&) = delete
-
void operator=(const GpioMaxPackageSize&) = delete
-
GpioMaxPackageSize(GpioMaxPackageSize&&) = delete
-
GpioMaxPackageSize &operator=(GpioMaxPackageSize&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioMaxPackageSize instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_package_size_c1(uint32_t package_size)
Sets the package size for channel 1.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c1()
Gets the package size for channel 1.
- Returns:
The package size.
-
static void set_package_size_c2(uint32_t package_size)
Sets the package size for channel 2.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c2()
Gets the package size for channel 2.
- Returns:
The package size.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioMaxPackageSize(int mem)
Constructor for the GpioMaxPackageSize class.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioMaxPackageSize()
Destructor for the GpioMaxPackageSize class.
Before the GpioMaxPackageSize object is destructed, the value is set to 524288 in hardware.
Private Members
-
uint32_t package_size_c1_ = 0
Package size for channel 1.
-
uint32_t package_size_c2_ = 0
Package size for channel 2.
Private Static Functions
-
static GpioMaxPackageSize &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioMaxPackageSize &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioMaxPackageSize() = delete
Risetime data package size GPIO Class
-
class GpioRisetimePackageSize : public nexmess::components::gpio::Gpio
The GpioRisetimePackageSize class represents a GPIO interface especially for the GPIO to set the package size for the risetime data.
This class inherits from the Gpio class and provides functionality for setting the package size. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioRisetimePackageSize() = delete
-
GpioRisetimePackageSize(const GpioRisetimePackageSize&) = delete
-
void operator=(const GpioRisetimePackageSize&) = delete
-
GpioRisetimePackageSize(GpioRisetimePackageSize&&) = delete
-
GpioRisetimePackageSize &operator=(GpioRisetimePackageSize&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioRisetimePackageSize instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_package_size_c1(uint32_t package_size)
Sets the package size for channel 1.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c1()
Gets the package size for channel 1.
- Returns:
The package size.
-
static void set_package_size_c2(uint32_t package_size)
Sets the package size for channel 2.
- Parameters:
package_size – The package size.
-
static uint32_t get_package_size_c2()
Gets the package size for channel 2.
- Returns:
The package size.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioRisetimePackageSize(int mem)
Constructor for the GpioRisetimePackageSize class.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioRisetimePackageSize()
Destructor for the GpioRisetimePackageSize class.
Before the GpioRisetimePackageSize object is destructed, the value is set to 524288 in hardware.
Private Members
-
uint32_t package_size_c1_ = 0
Package size for channel 1.
-
uint32_t package_size_c2_ = 0
Package size for channel 2.
Private Static Functions
-
static GpioRisetimePackageSize &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioRisetimePackageSize &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioRisetimePackageSize() = delete
Signal count GPIO Class
-
class GpioSignalCount : public nexmess::components::gpio::Gpio
The GpioSignalCount class represents a GPIO interface especially for the GPIO to get the signal count for a specific channel.
This class inherits from the Gpio class and provides functionality for getting the signal count.
Public Functions
-
GpioSignalCount(uint32_t register_base, int mem)
Constructor for the GpioSignalCount class.
This constructor initializes a new GpioSignalCount. The signal count is initialized to DEFAULT_SIGNAL_COUNT.
- Parameters:
register_base – The register base address.
mem – The memory address to be used for the GPIO operations.
-
GpioSignalCount(GpioSignalCount&&) = delete
-
GpioSignalCount &operator=(GpioSignalCount&&) = delete
-
GpioSignalCount() = delete
-
GpioSignalCount(const GpioSignalCount&) = delete
-
void operator=(const GpioSignalCount&) = delete
-
~GpioSignalCount() = default
-
uint64_t get_signal_count()
Gets the signal count.
- Returns:
The signal count.
-
GpioSignalCount(uint32_t register_base, int mem)
Offset GPIO Class
-
class GpioOffset : public nexmess::components::gpio::Gpio
The GpioOffset class represents a GPIO interface especially for the GPIO to set the offset of the ADC channels.
This class inherits from the Gpio class and provides functionality for setting the offsets of channel 1 and channel 2. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioOffset() = delete
-
GpioOffset(const GpioOffset&) = delete
-
void operator=(const GpioOffset&) = delete
-
GpioOffset(GpioOffset&&) = delete
-
GpioOffset &operator=(GpioOffset&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioOffset instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_offsets(int16_t offset_c1, int16_t offset_c2)
Sets the offsets.
- Parameters:
offset_c1 – The offset of channel 1 in units of the ADC.
offset_c2 – The offset of channel 2 in units of the ADC.
-
static void set_offset_c1(int16_t offset_c1)
Sets the offset of channel 1.
- Parameters:
offset_c1 – The offset of channel 1 in units of the ADC.
-
static void set_offset_c2(int16_t offset_c2)
Sets the offset of channel 2.
- Parameters:
offset_c2 – The offset of channel 2 in units of the ADC.
-
static uint32_t get_offsets()
Gets the offset configuration of both channels.
- Returns:
The offsets configuration of both channels.
-
static int16_t get_offset_c1()
Gets the offset of channel 1.
- Returns:
The offsets of channel 1 in arbitrary units of the ADC.
-
static int16_t get_offset_c2()
Gets the offset of channel 2.
- Returns:
The offset of channel 2 in arbitrary units of the ADC.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioOffset(int mem)
Constructor for the GpioOffset class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioOffset()
Destructor for the GpioOffset class.
Before the GpioOffset object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t offsets_ = 0
Offsets of channel 1 and channel 2 in arbitrary units of voltage.
Private Static Functions
-
static GpioOffset &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioOffset &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioOffset() = delete
BLR pre gate GPIO Class
-
class GpioBLRPreGate : public nexmess::components::gpio::Gpio
The GpioBLRPreGate class represents a GPIO interface especially for the GPIO to set the number of samples to go back for the calculation of the baseline correction.
For each channel an individual BLR pre gate can be set.
This class inherits from the Gpio class and provides functionality for setting the BLR pre gate. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioBLRPreGate() = delete
-
GpioBLRPreGate(const GpioBLRPreGate&) = delete
-
void operator=(const GpioBLRPreGate&) = delete
-
GpioBLRPreGate(GpioBLRPreGate&&) = delete
-
GpioBLRPreGate &operator=(GpioBLRPreGate&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioBLRPreGate instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_blr_pre_gates(uint16_t blr_pre_gate_c1, uint16_t blr_pre_gate_c2)
Sets the BLR pre gates of channel 1 and channel 2.
- Parameters:
blr_pre_gate_c1 – The BLR pre gate of channel 1 in number of samples.
blr_pre_gate_c2 – The BLR pre gate of channel 1 in number of samples.
-
static void set_blr_pre_gate_c1(uint16_t blr_pre_gate_c1)
Sets the BLR pre gate of channel 1.
- Parameters:
blr_pre_gate_c1 – The BLR pre gate of channel 1 in number of samples.
-
static void set_blr_pre_gate_c2(uint16_t blr_pre_gate_c2)
Sets the BLR pre gate of channel 2.
- Parameters:
blr_pre_gate_c2 – The BLR pre gate of channel 2 in number of samples.
-
static uint32_t get_blr_pre_gates()
Gets the BLR pre gate configuration of both channels.
- Returns:
The BLR pre gate configuration of both channels.
-
static uint16_t get_blr_pre_gate_c1()
Gets the BLR pre gate of channel 1.
- Returns:
The BLR pre gate of channel 1 in number of samples.
-
static uint16_t get_blr_pre_gate_c2()
Gets the BLR pre gate of channel 2.
- Returns:
The BLR pre gate of channel 2 in number of samples.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioBLRPreGate(int mem)
Constructor for the GpioBLRPreGate class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioBLRPreGate()
Destructor for the GpioBLRGate class.
Before the GpioBLRGate object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t blr_pre_gates_ = 0
Number of samples for the BLR pre gate.
Private Static Functions
-
static GpioBLRPreGate &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioBLRPreGate &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioBLRPreGate() = delete
CFD delay GPIO Class
-
class GpioCfdDelay : public nexmess::components::gpio::Gpio
The GpioCfdDelay class represents a GPIO interface especially for the GPIO to set the CFD delay in number of samples.
For each channel an individual delay can be set.
This class inherits from the Gpio class and provides functionality for setting the CFD delay. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioCfdDelay() = delete
-
GpioCfdDelay(const GpioCfdDelay&) = delete
-
void operator=(const GpioCfdDelay&) = delete
-
GpioCfdDelay(GpioCfdDelay&&) = delete
-
GpioCfdDelay &operator=(GpioCfdDelay&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioCfdDelay instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_cfd_delays(uint16_t cfd_delay_c1, uint16_t cfd_delay_c2)
Sets the delay for the CFD of channel 1 and channel 2.
- Parameters:
cfd_delay_c1 – The delay for the CFD of channel 1 in number of samples.
cfd_delay_c2 – The delay for the CFD of channel 2 in number of samples.
-
static void set_cfd_delay_c1(uint16_t cfd_delay_c1)
Sets the delay for the CFD of channel 1.
- Parameters:
cfd_delay_c1 – The delay for the CFD of channel 1 in number of samples.
-
static void set_cfd_delay_c2(uint16_t cfd_delay_c2)
Sets the delay for the CFD of channel 2.
- Parameters:
cfd_delay_c2 – The delay for the CFD of channel 2 in number of samples.
-
static uint32_t get_cfd_delays()
Gets the delay for the CFD configuration of both channels.
- Returns:
The delay for the CFD configuration of both channels.
-
static uint16_t get_cfd_delay_c1()
Gets the delay for the CFD of channel 1.
- Returns:
The delay for the CFD of channel 1 in number of samples.
-
static uint16_t get_cfd_delay_c2()
Gets the delay for the CFD of channel 2.
- Returns:
The delay for the CFD of channel 2 in number of samples.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioCfdDelay(int mem)
Constructor for the GpioCfdDelay class.
The delay value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioCfdDelay()
Destructor for the GpioCfdDelay class.
Before the GpioCfdDelay object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t cfd_delays_ = 0
CFD delay setting for both channels.
Private Static Functions
-
static GpioCfdDelay &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init().
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of the GPIO object.
-
static GpioCfdDelay &get_instance()
The implementation of get_instance without parameters.
- Returns:
The instance of the GPIO object.
-
GpioCfdDelay() = delete
CFD amplification GPIO Class
-
class GpioCfdAmp : public nexmess::components::gpio::Gpio
The GpioCfdAmp class represents a GPIO interface especially for the GPIO to set the CFD amplification factor (fraction level).
This class inherits from the Gpio class and provides functionality for setting the CFD amplification factor. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioCfdAmp() = delete
-
GpioCfdAmp(const GpioCfdAmp&) = delete
-
void operator=(const GpioCfdAmp&) = delete
-
GpioCfdAmp(GpioCfdAmp&&) = delete
-
GpioCfdAmp &operator=(GpioCfdAmp&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioCfdAmp instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_cfd_amp_c1(float cfd_amp)
Sets the CFD amplification factor of channel 1.
- Parameters:
cfd_amp – The amplification factor (fraction) for channel 1.
-
static void set_cfd_amp_c2(float cfd_amp)
Sets the CFD amplification factor of channel 2.
- Parameters:
cfd_amp – The amplification factor (fraction) for channel 2.
-
static float get_cfd_amp_c1()
Gets the CFD amplification factor of channel 1.
- Returns:
The amplification factor of channel 1.
-
static float get_cfd_amp_c2()
Gets the CFD amplification factor of channel 2.
- Returns:
The amplification factor of channel 2.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioCfdAmp(int mem)
Constructor for the GpioCfdAmp class.
The amplification value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioCfdAmp()
Destructor for the GpioCfdAmp class.
Before the GpioCfdAmp object is destructed, the amplification value is set to 0 in hardware.
Private Members
-
uint32_t cfd_amp_c1_ = 0
CFD amplification factor for channel 1 (stored as 32-bit unsigned).
-
uint32_t cfd_amp_c2_ = 0
CFD amplification factor for channel 2 (stored as 32-bit unsigned).
Private Static Functions
-
static GpioCfdAmp &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init().
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of the GPIO object.
-
static GpioCfdAmp &get_instance()
The implementation of get_instance without parameters.
- Returns:
The instance of the GPIO object.
-
GpioCfdAmp() = delete
Short window GPIO Class
-
class GpioShortWindow : public nexmess::components::gpio::Gpio
The GpioShortWindow class represents a GPIO interface especially for the GPIO to set the length of the short integration window for stilbene pulse evaluation.
This class inherits from the Gpio class and provides functionality for setting the short window. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioShortWindow() = delete
-
GpioShortWindow(const GpioShortWindow&) = delete
-
void operator=(const GpioShortWindow&) = delete
-
GpioShortWindow(GpioShortWindow&&) = delete
-
GpioShortWindow &operator=(GpioShortWindow&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioShortWindow instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_short_windows(uint16_t short_window_c1, uint16_t short_window_c2)
Sets the short integration window of channel 1 and channel 2.
- Parameters:
short_window_c1 – The short integration window of channel 1 in number of samples.
short_window_c2 – The short integration window of channel 2 in number of samples.
-
static void set_short_window_c1(uint16_t short_window_c1)
Sets the short integration window of channel 1.
- Parameters:
short_window_c1 – The short integration window of channel 1 in number of samples.
-
static void set_short_window_c2(uint16_t short_window_c2)
Sets the short integration window of channel 2.
- Parameters:
short_window_c2 – The short integration window of channel 2 in number of samples.
-
static uint32_t get_short_windows()
Gets the short integration window configuration of both channels.
- Returns:
The short integration window configuration of both channels.
-
static uint16_t get_short_window_c1()
Gets the short integration window of channel 1.
- Returns:
The short integration window of channel 1 in number of samples.
-
static uint16_t get_short_window_c2()
Gets the short integration window of channel 2.
- Returns:
The short integration window of channel 2 in number of samples.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioShortWindow(int mem)
Constructor for the GpioShortWindow class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioShortWindow()
Destructor for the GpioShortWindow class.
Before the GpioShortWindow object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t short_windows_ = 0
Number of samples for the short integration window.
Private Static Functions
-
static GpioShortWindow &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioShortWindow &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioShortWindow() = delete
Long window GPIO Class
-
class GpioLongWindow : public nexmess::components::gpio::Gpio
The GpioLongWindow class represents a GPIO interface especially for the GPIO to set the length of the long integration window for stilbene pulse evaluation.
This class inherits from the Gpio class and provides functionality for setting the long window. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioLongWindow() = delete
-
GpioLongWindow(const GpioLongWindow&) = delete
-
void operator=(const GpioLongWindow&) = delete
-
GpioLongWindow(GpioLongWindow&&) = delete
-
GpioLongWindow &operator=(GpioLongWindow&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioLongWindow instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_long_windows(uint16_t long_window_c1, uint16_t long_window_c2)
Sets the long integration of channel 1 and channel 2.
- Parameters:
long_window_c1 – The long integration window of channel 1 in number of samples.
long_window_c2 – The long integration window of channel 2 in number of samples.
-
static void set_long_window_c1(uint16_t long_window_c1)
Sets the long integration window of channel 1.
- Parameters:
long_window_c1 – The long integration window of channel 1 in number of samples.
-
static void set_long_window_c2(uint16_t long_window_c2)
Sets the long integration window of channel 2.
- Parameters:
long_window_c2 – The long integration window of channel 2 in number of samples.
-
static uint32_t get_long_windows()
Gets the long integration window configuration of both channels.
- Returns:
The long integration window configuration of both channels.
-
static uint16_t get_long_window_c1()
Gets the long integration window of channel 1.
- Returns:
The long integration window of channel 1 in number of samples.
-
static uint16_t get_long_window_c2()
Gets the long window of channel 2.
- Returns:
The long window of channel 2 in number of samples.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioLongWindow(int mem)
Constructor for the GpioLongWindow class.
The value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioLongWindow()
Destructor for the GpioLongWindow class.
Before the GpioLongWindow object is destructed, the value is set to 0 in hardware.
Private Members
-
uint32_t long_windows_ = 0
Number of samples for the long integration window.
Private Static Functions
-
static GpioLongWindow &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init()
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of of the GPIO object.
-
static GpioLongWindow &get_instance()
The implementation of get_instance with parameters.
- Returns:
The instance of of the GPIO object.
-
GpioLongWindow() = delete
Minimum height fraction GPIO Class
-
class GpioMinHeightFraction : public nexmess::components::gpio::Gpio
The GpioMinHeightFraction class represents a GPIO interface especially for the GPIO to set the minimum height fraction for HPD pulse evaluation.
This class inherits from the Gpio class and provides functionality for setting the minimum height fraction. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioMinHeightFraction() = delete
-
GpioMinHeightFraction(const GpioMinHeightFraction&) = delete
-
void operator=(const GpioMinHeightFraction&) = delete
-
GpioMinHeightFraction(GpioMinHeightFraction&&) = delete
-
GpioMinHeightFraction &operator=(GpioMinHeightFraction&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioMinHeightFraction instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_min_height_fraction_c1(float min_height_fraction)
Sets the minimum height fraction of channel 1.
- Parameters:
min_height_fraction – The minimum height fraction for channel 1.
-
static void set_min_height_fraction_c2(float min_height_fraction)
Sets the minimum height fraction of channel 2.
- Parameters:
min_height_fraction – The minimum height fraction for channel 2.
-
static float get_min_height_fraction_c1()
Gets the minimum height fraction of channel 1.
- Returns:
The minimum height fraction of channel 1.
-
static float get_min_height_fraction_c2()
Gets the minimum height fraction of channel 2.
- Returns:
The minimum height fraction of channel 2.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioMinHeightFraction(int mem)
Constructor for the GpioMinHeightFraction class.
The amplification value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioMinHeightFraction()
Destructor for the GpioMinHeightFraction class.
Before the GpioMinHeightFraction object is destructed, the amplification value is set to 0 in hardware.
Private Members
-
uint32_t min_height_fraction_c1_ = 0
Minimum height fraction for channel 1 (stored as 32-bit unsigned).
-
uint32_t min_height_fraction_c2_ = 0
Minimum height fraction for channel 2 (stored as 32-bit unsigned).
Private Static Functions
-
static GpioMinHeightFraction &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init().
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of the GPIO object.
-
static GpioMinHeightFraction &get_instance()
The implementation of get_instance without parameters.
- Returns:
The instance of the GPIO object.
-
GpioMinHeightFraction() = delete
Maximum height fraction GPIO Class
-
class GpioMaxHeightFraction : public nexmess::components::gpio::Gpio
The GpioMaxHeightFraction class represents a GPIO interface especially for the GPIO to set the maximum height fraction for HPD pulse evaluation.
This class inherits from the Gpio class and provides functionality for setting the maximum height fraction. It is a singleton class, meaning that only one instance of this class can exist.
Public Functions
-
GpioMaxHeightFraction() = delete
-
GpioMaxHeightFraction(const GpioMaxHeightFraction&) = delete
-
void operator=(const GpioMaxHeightFraction&) = delete
-
GpioMaxHeightFraction(GpioMaxHeightFraction&&) = delete
-
GpioMaxHeightFraction &operator=(GpioMaxHeightFraction&&) = delete
Public Static Functions
-
static void init(int mem)
Initializes the GpioMaxHeightFraction instance with the specified memory address.
- Parameters:
mem – The memory address to be used for GPIO operations.
-
static void set_max_height_fraction_c1(float max_height_fraction)
Sets the maximum height fraction of channel 1.
- Parameters:
max_height_fraction – The maximum height fraction for channel 1.
-
static void set_max_height_fraction_c2(float max_height_fraction)
Sets the maximum height fraction of channel 2.
- Parameters:
max_height_fraction – The maximum height fraction for channel 2.
-
static float get_max_height_fraction_c1()
Gets the maximum height fraction of channel 1.
- Returns:
The maximum height fraction of channel 1.
-
static float get_max_height_fraction_c2()
Gets the maximum height fraction of channel 2.
- Returns:
The maximum height fraction of channel 2.
-
static bool has_error()
Checks if any error has occurred during GPIO operations.
- Returns:
true if an error has occurred, false otherwise.
Private Functions
-
explicit GpioMaxHeightFraction(int mem)
Constructor for the GpioMaxHeightFraction class.
The amplification value is set to 0 by default.
- Parameters:
mem – The memory address to be used for the GPIO operations.
-
~GpioMaxHeightFraction()
Destructor for the GpioMaxHeightFraction class.
Before the GpioMaxHeightFraction object is destructed, the amplification value is set to 0 in hardware.
Private Members
-
uint32_t max_height_fraction_c1_ = 0
maximum height fraction for channel 1 (stored as 32-bit unsigned).
-
uint32_t max_height_fraction_c2_ = 0
maximum height fraction for channel 2 (stored as 32-bit unsigned).
Private Static Functions
-
static GpioMaxHeightFraction &get_instance_impl(int mem = 0)
The implementation of get_instance with parameters.
This is called once by init().
- Parameters:
mem – The memory address to be used for the GPIO operations.
- Returns:
The instance of the GPIO object.
-
static GpioMaxHeightFraction &get_instance()
The implementation of get_instance without parameters.
- Returns:
The instance of the GPIO object.
-
GpioMaxHeightFraction() = delete