HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
horiba::devices::single_devices::SpectrAcq3 Class Referencefinal

Represents a SpectrAcq3 device. More...

#include <spectracq3.h>

Inheritance diagram for horiba::devices::single_devices::SpectrAcq3:

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::HardwareTriggerPinModeget_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)
 
- Public Member Functions inherited from horiba::devices::single_devices::Device
 Device (int id, std::shared_ptr< communication::Communicator > communicator)
 
virtual ~Device ()=default
 
int device_id () const
 

Additional Inherited Members

- Protected Member Functions inherited from horiba::devices::single_devices::Device
communication::Response execute_command (const communication::Command &command)
 

Detailed Description

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.

Member Enumeration Documentation

◆ HardwareTriggerPinMode

Hardware trigger pins for the SpectrAcq3 device.

Enumerator
TTL_INPUT 
EVENT_MARKER_INPUT 
HARDWARE_TRIGGER_INPUT 

◆ TriggerInPolarity

Polarity of the input trigger for the SpectrAcq3 device.

Enumerator
ACTIVE_LOW 

Falling edge.

ACTIVE_HIGH 

Rising edge.

◆ TriggerMode

Trigger modes for the SpectrAcq3 device.

Enumerator
START_AND_INTERVAL 
TRIGGER_AND_INTERVAL 
WAIT_FOR_TRIGGER 

Constructor & Destructor Documentation

◆ SpectrAcq3()

horiba::devices::single_devices::SpectrAcq3::SpectrAcq3 ( int id,
std::shared_ptr< communication::Communicator > communicator )

◆ ~SpectrAcq3()

horiba::devices::single_devices::SpectrAcq3::~SpectrAcq3 ( )
overridedefault

Member Function Documentation

◆ acquisition_continue()

void horiba::devices::single_devices::SpectrAcq3::acquisition_continue ( )

Restart a paused acquisition. An error will be returned if continue is received when not paused.

◆ acquisition_pause()

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.

◆ acquisition_start()

void horiba::devices::single_devices::SpectrAcq3::acquisition_start ( SpectrAcq3::TriggerMode trigger)
Note
Define acquisition sets before starting an acquisition. Ensure acquisition preparation is completed successfully.
Starting an acquisition will return an error if:
  • An acquisition is already running, or
  • Acquisition preparation has not been completed.
  • In the event of errors in the defined parameters, the result will include an error_count field indicating the number of errors detected.
See also
get_error_log() to get the detailed error.
Parameters
trigger

◆ acquisition_stop()

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.

◆ clear_error_log()

void horiba::devices::single_devices::SpectrAcq3::clear_error_log ( )

◆ close()

void horiba::devices::single_devices::SpectrAcq3::close ( )
overridevirtual

Closes the device.

Exceptions
std::runtime_errorwhen an error occurred on the device side

Implements horiba::devices::single_devices::Device.

◆ force_trigger()

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.

◆ get_acquisition_data()

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.

Returns
acquisition data

◆ get_acquisition_set()

AcquisitionSetParameters horiba::devices::single_devices::SpectrAcq3::get_acquisition_set ( )

Get the acquisition set parameters.

Returns
the acquisition set parameters.

◆ get_board_revision()

std::string horiba::devices::single_devices::SpectrAcq3::get_board_revision ( )

Get the board revision of the device.

Returns
Board revision of the device

◆ get_error_log()

std::string horiba::devices::single_devices::SpectrAcq3::get_error_log ( )

◆ get_firmware_version()

std::string horiba::devices::single_devices::SpectrAcq3::get_firmware_version ( )

Get the fimrware version of the device for the given index.

Returns
Firmware version of the device

◆ get_fpga_version()

std::string horiba::devices::single_devices::SpectrAcq3::get_fpga_version ( )

Get the FPGA version of the device.

Returns
FPGA version of the device

◆ get_hv_bias_voltage()

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.

Returns

◆ get_in_trigger_mode()

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.

Returns
trigger mode and hardware input trigger mode

◆ get_last_error()

std::string horiba::devices::single_devices::SpectrAcq3::get_last_error ( )

◆ get_max_hv_voltage_allowed()

int horiba::devices::single_devices::SpectrAcq3::get_max_hv_voltage_allowed ( )

Gets the maximum bias high voltage allowed in Volts.

Returns
Maximum bias high voltage allowed in Volts

◆ get_serial_number()

std::string horiba::devices::single_devices::SpectrAcq3::get_serial_number ( )

Get the serial number of the device.

Returns
Serial number of the device

◆ get_trigger_in_polarity()

SpectrAcq3::TriggerInPolarity horiba::devices::single_devices::SpectrAcq3::get_trigger_in_polarity ( )

Polarity of the input trigger.

Returns
Returns the polarity of the input trigger.

◆ is_busy()

bool horiba::devices::single_devices::SpectrAcq3::is_busy ( )

Checks whether the instrument is busy (e.g., performing initialization or data acquisition).

Returns
True if the instrument is busy, false otherwise.

◆ is_data_available()

bool horiba::devices::single_devices::SpectrAcq3::is_data_available ( )

Check whether the acquired data is available.

Returns
True if data is available, false otherwise.

◆ is_open()

bool horiba::devices::single_devices::SpectrAcq3::is_open ( )

Checks if the connection to the SpectrAcq3 device is open.

Returns
True if the connection is open, false otherwise.
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ open()

void horiba::devices::single_devices::SpectrAcq3::open ( )
overridevirtual

Opens the device.

Exceptions
std::runtime_errorwhen an error occurred on the device side

Reimplemented from horiba::devices::single_devices::Device.

◆ set_acquisition_set()

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

Parameters
scan_countNumber of acquisitions to perform
time_stepTime interval in seconds between acquisitions
integration_time
external_paramser defined parameter
Exceptions
std::runtime_errorwhen an error occurred on the device side

◆ set_hv_bias_voltage()

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.

Todo
what is the default value?
Parameters
bias_voltageHigh bias voltage in Volts

◆ set_in_trigger_mode()

void horiba::devices::single_devices::SpectrAcq3::set_in_trigger_mode ( SpectrAcq3::HardwareTriggerPinMode mode)
noexcept

Tell the device how Hardware Trigger pin is used. Returns Error if Acquisition is in Progress.

Parameters
modeTrigger mode

◆ set_trigger_in_polarity()

void horiba::devices::single_devices::SpectrAcq3::set_trigger_in_polarity ( SpectrAcq3::TriggerInPolarity polarity)
noexcept

Defines the polarity of the input trigger.

Parameters
polarityPolarity of the input trigger

The documentation for this class was generated from the following file: