HORIBA C++ SDK
Library for HORIBA devices
|
Represents a SpectrAcq3 device. More...
#include <spectracq3.h>
Public Types | |
enum class | TriggerMode : int { START_AND_INTERVAL = 1 , TRIGGER_AND_INTERVAL = 2 , WAIT_FOR_TRIGGER = 3 } |
Trigger modes for the SpectrAcq3 device. More... | |
enum class | HardwareTriggerPinMode : int { TTL_INPUT = 0 , EVENT_MARKER_INPUT = 1 , HARDWARE_TRIGGER_INPUT = 2 } |
Hardware trigger pins for the SpectrAcq3 device. More... | |
enum class | TriggerInPolarity : int { ACTIVE_LOW = 0 , ACTIVE_HIGH = 1 } |
Polarity of the input trigger for the SpectrAcq3 device. More... | |
Public Member Functions | |
SpectrAcq3 (int id, std::shared_ptr< communication::Communicator > communicator) | |
~SpectrAcq3 () override=default | |
void | open () noexcept(false) override |
Opens the device. | |
void | close () noexcept(false) override |
Closes the device. | |
bool | is_open () noexcept(false) |
Checks if the connection to the SpectrAcq3 device is open. | |
bool | is_busy () noexcept(false) |
Checks whether the instrument is busy (e.g., performing initialization or data acquisition). | |
std::string | get_firmware_version () noexcept(false) |
Get the fimrware version of the device for the given index. | |
std::string | get_fpga_version () noexcept(false) |
Get the FPGA version of the device. | |
std::string | get_board_revision () noexcept(false) |
Get the board revision of the device. | |
std::string | get_serial_number () noexcept(false) |
Get the serial number of the device. | |
void | set_hv_bias_voltage (int bias_voltage) noexcept(false) |
Set the high bias voltage in Volts. | |
int | get_hv_bias_voltage () noexcept(false) |
Gets the bias voltage that was previously set. If no bias voltage has been explicitly set, the default value is returned. | |
int | get_max_hv_voltage_allowed () noexcept(false) |
Gets the maximum bias high voltage allowed in Volts. | |
void | set_acquisition_set (int scan_count, int time_step, int integration_time, int external_param) noexcept(false) |
Defines and sends the parameters for the acquisition set to perform the acquisition. | |
AcquisitionSetParameters | get_acquisition_set () noexcept(false) |
Get the acquisition set parameters. | |
void | acquisition_start (SpectrAcq3::TriggerMode trigger) noexcept(false) |
void | acquisition_stop () noexcept(false) |
Stops the current acquisition. The current data point is discarded. The acquisition process must be checked and restarted if needed. | |
void | acquisition_pause () noexcept(false) |
Pause active Acquisition. Current point is completed. Can be continued. Needs to be Stopped to start a new Acquisition. | |
void | acquisition_continue () noexcept(false) |
Restart a paused acquisition. An error will be returned if continue is received when not paused. | |
bool | is_data_available () noexcept(false) |
Check whether the acquired data is available. | |
nlohmann::json | get_acquisition_data () noexcept(false) |
Retrieve the acquired data that is available so far. | |
void | force_trigger () noexcept(false) |
Software Trigger, treated the same as Hardware Trigger (IN). | |
void | set_in_trigger_mode (SpectrAcq3::HardwareTriggerPinMode mode) noexcept(false) |
Tell the device how Hardware Trigger pin is used. Returns Error if Acquisition is in Progress. | |
std::pair< SpectrAcq3::TriggerMode, SpectrAcq3::HardwareTriggerPinMode > | get_in_trigger_mode () noexcept(false) |
Returns the acquisition trigger mode defined in acquisition_start, as well as, the hardware input trigger mode defined in set_in_trigger_mode. | |
void | set_trigger_in_polarity (SpectrAcq3::TriggerInPolarity polarity) noexcept(false) |
Defines the polarity of the input trigger. | |
SpectrAcq3::TriggerInPolarity | get_trigger_in_polarity () noexcept(false) |
Polarity of the input trigger. | |
std::string | get_last_error () noexcept(false) |
std::string | get_error_log () noexcept(false) |
void | clear_error_log () noexcept(false) |
![]() | |
Device (int id, std::shared_ptr< communication::Communicator > communicator) | |
virtual | ~Device ()=default |
int | device_id () const |
Additional Inherited Members | |
![]() | |
communication::Response | execute_command (const communication::Command &command) |
Represents a SpectrAcq3 device.
This class should not be created directly by the end user. Instead a DeviceManager should be used to access the detected SpectrAcq3s on the system.
|
strong |
Hardware trigger pins for the SpectrAcq3 device.
Enumerator | ||
---|---|---|
TTL_INPUT | 0 | |
EVENT_MARKER_INPUT | 1 | |
HARDWARE_TRIGGER_INPUT | 2 |
|
strong |
Polarity of the input trigger for the SpectrAcq3 device.
Enumerator | ||
---|---|---|
ACTIVE_LOW | 0 | Falling edge. |
ACTIVE_HIGH | 1 | Rising edge. |
|
strong |
Trigger modes for the SpectrAcq3 device.
Enumerator | ||
---|---|---|
START_AND_INTERVAL | 1 | |
TRIGGER_AND_INTERVAL | 2 | |
WAIT_FOR_TRIGGER | 3 |
horiba::devices::single_devices::SpectrAcq3::SpectrAcq3 | ( | int | id, |
std::shared_ptr< communication::Communicator > | communicator ) |
|
overridedefault |
void horiba::devices::single_devices::SpectrAcq3::acquisition_continue | ( | ) |
Restart a paused acquisition. An error will be returned if continue is received when not paused.
void horiba::devices::single_devices::SpectrAcq3::acquisition_pause | ( | ) |
Pause active Acquisition. Current point is completed. Can be continued. Needs to be Stopped to start a new Acquisition.
An error will be returned if a pause is received while an acquisition is not running.
void horiba::devices::single_devices::SpectrAcq3::acquisition_start | ( | SpectrAcq3::TriggerMode | trigger | ) |
error_count
field indicating the number of errors detected. trigger |
void horiba::devices::single_devices::SpectrAcq3::acquisition_stop | ( | ) |
Stops the current acquisition. The current data point is discarded. The acquisition process must be checked and restarted if needed.
void horiba::devices::single_devices::SpectrAcq3::clear_error_log | ( | ) |
|
overridevirtual |
Closes the device.
std::runtime_error | when an error occurred on the device side |
Implements horiba::devices::single_devices::Device.
void horiba::devices::single_devices::SpectrAcq3::force_trigger | ( | ) |
Software Trigger, treated the same as Hardware Trigger (IN).
If no acquisition is in progress, the trigger will be ignored.
nlohmann::json horiba::devices::single_devices::SpectrAcq3::get_acquisition_data | ( | ) |
Retrieve the acquired data that is available so far.
Note: Once the acquired data is read, it will be removed from the device/software's data buffer. Ensure that you save the data to a local buffer or storage before reading to prevent data loss.
AcquisitionSetParameters horiba::devices::single_devices::SpectrAcq3::get_acquisition_set | ( | ) |
Get the acquisition set parameters.
std::string horiba::devices::single_devices::SpectrAcq3::get_board_revision | ( | ) |
Get the board revision of the device.
std::string horiba::devices::single_devices::SpectrAcq3::get_error_log | ( | ) |
std::string horiba::devices::single_devices::SpectrAcq3::get_firmware_version | ( | ) |
Get the fimrware version of the device for the given index.
std::string horiba::devices::single_devices::SpectrAcq3::get_fpga_version | ( | ) |
Get the FPGA version of the device.
int horiba::devices::single_devices::SpectrAcq3::get_hv_bias_voltage | ( | ) |
Gets the bias voltage that was previously set. If no bias voltage has been explicitly set, the default value is returned.
std::pair< SpectrAcq3::TriggerMode, SpectrAcq3::HardwareTriggerPinMode > horiba::devices::single_devices::SpectrAcq3::get_in_trigger_mode | ( | ) |
Returns the acquisition trigger mode defined in acquisition_start, as well as, the hardware input trigger mode defined in set_in_trigger_mode.
std::string horiba::devices::single_devices::SpectrAcq3::get_last_error | ( | ) |
int horiba::devices::single_devices::SpectrAcq3::get_max_hv_voltage_allowed | ( | ) |
Gets the maximum bias high voltage allowed in Volts.
std::string horiba::devices::single_devices::SpectrAcq3::get_serial_number | ( | ) |
Get the serial number of the device.
SpectrAcq3::TriggerInPolarity horiba::devices::single_devices::SpectrAcq3::get_trigger_in_polarity | ( | ) |
Polarity of the input trigger.
bool horiba::devices::single_devices::SpectrAcq3::is_busy | ( | ) |
Checks whether the instrument is busy (e.g., performing initialization or data acquisition).
bool horiba::devices::single_devices::SpectrAcq3::is_data_available | ( | ) |
Check whether the acquired data is available.
bool horiba::devices::single_devices::SpectrAcq3::is_open | ( | ) |
Checks if the connection to the SpectrAcq3 device is open.
std::runtime_error | when an error occurred on the device side |
|
overridevirtual |
Opens the device.
std::runtime_error | when an error occurred on the device side |
Reimplemented from horiba::devices::single_devices::Device.
void horiba::devices::single_devices::SpectrAcq3::set_acquisition_set | ( | int | scan_count, |
int | time_step, | ||
int | integration_time, | ||
int | external_param ) |
Defines and sends the parameters for the acquisition set to perform the acquisition.
If the acquisition set is not defined, a single-point scan with default settings is performed. Parameters that are not explicitly defined are set to their default values. Parameters to define for the acquisition
scan_count | Number of acquisitions to perform |
time_step | Time interval in seconds between acquisitions |
integration_time | |
external_param | ser defined parameter |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::SpectrAcq3::set_hv_bias_voltage | ( | int | bias_voltage | ) |
Set the high bias voltage in Volts.
If not set then default value will be used.
bias_voltage | High bias voltage in Volts |
|
noexcept |
Tell the device how Hardware Trigger pin is used. Returns Error if Acquisition is in Progress.
mode | Trigger mode |
|
noexcept |
Defines the polarity of the input trigger.
polarity | Polarity of the input trigger |