9#include <nlohmann/json.hpp>
34 [[nodiscard]]
int scan_count()
const {
return _scan_count; }
43 [[nodiscard]] std::chrono::seconds
time_step()
const {
return _time_step; }
51 return _integration_time;
63 std::chrono::seconds _time_step;
64 std::chrono::seconds _integration_time;
105 SpectrAcq3(
int id, std::shared_ptr<communication::Communicator> communicator);
113 void open() noexcept(false) override;
120 void close() noexcept(false) override;
209 int external_param) noexcept(false);
Represents the parameters for the acquisition set.
Definition spectracq3.h:18
AcquisitionSetParameters(int scan_count, std::chrono::seconds time_step, std::chrono::seconds integration_time, int external_param)
Definition spectracq3.h:20
std::chrono::seconds integration_time() const
Integration time in seconds.
Definition spectracq3.h:50
int scan_count() const
Number of acquisition to perform.
Definition spectracq3.h:34
std::chrono::seconds time_step() const
Interval between successive scans for time based scan in seconds. If 0 or not defined,...
Definition spectracq3.h:43
int external_param() const
User defined value.
Definition spectracq3.h:59
Device(int id, std::shared_ptr< communication::Communicator > communicator)
void clear_error_log() noexcept(false)
int get_max_hv_voltage_allowed() noexcept(false)
Gets the maximum bias high voltage allowed in Volts.
bool is_busy() noexcept(false)
Checks whether the instrument is busy (e.g., performing initialization or data acquisition).
void acquisition_stop() noexcept(false)
Stops the current acquisition. The current data point is discarded. The acquisition process must be c...
TriggerMode
Trigger modes for the SpectrAcq3 device.
Definition spectracq3.h:80
@ TRIGGER_AND_INTERVAL
Definition spectracq3.h:82
@ START_AND_INTERVAL
Definition spectracq3.h:81
@ WAIT_FOR_TRIGGER
Definition spectracq3.h:83
SpectrAcq3::TriggerInPolarity get_trigger_in_polarity() noexcept(false)
Polarity of the input trigger.
void acquisition_start(SpectrAcq3::TriggerMode trigger) noexcept(false)
bool is_data_available() noexcept(false)
Check whether the acquired data is available.
std::string get_firmware_version() noexcept(false)
Get the fimrware version of the device for the given index.
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 tri...
void set_hv_bias_voltage(int bias_voltage) noexcept(false)
Set the high bias voltage in Volts.
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.
~SpectrAcq3() override=default
AcquisitionSetParameters get_acquisition_set() noexcept(false)
Get the acquisition set parameters.
void acquisition_pause() noexcept(false)
Pause active Acquisition. Current point is completed. Can be continued. Needs to be Stopped to start ...
void set_trigger_in_polarity(SpectrAcq3::TriggerInPolarity polarity) noexcept(false)
Defines the polarity of the input trigger.
std::string get_last_error() noexcept(false)
bool is_open() noexcept(false)
Checks if the connection to the SpectrAcq3 device is open.
void open() noexcept(false) override
Opens the device.
void close() noexcept(false) override
Closes the device.
HardwareTriggerPinMode
Hardware trigger pins for the SpectrAcq3 device.
Definition spectracq3.h:89
@ EVENT_MARKER_INPUT
Definition spectracq3.h:91
@ HARDWARE_TRIGGER_INPUT
Definition spectracq3.h:92
@ TTL_INPUT
Definition spectracq3.h:90
SpectrAcq3(int id, std::shared_ptr< communication::Communicator > communicator)
std::string get_board_revision() noexcept(false)
Get the board revision of the device.
int get_hv_bias_voltage() noexcept(false)
Gets the bias voltage that was previously set. If no bias voltage has been explicitly set,...
nlohmann::json get_acquisition_data() noexcept(false)
Retrieve the acquired data that is available so far.
std::string get_error_log() noexcept(false)
void acquisition_continue() noexcept(false)
Restart a paused acquisition. An error will be returned if continue is received when not paused.
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.
TriggerInPolarity
Polarity of the input trigger for the SpectrAcq3 device.
Definition spectracq3.h:98
@ ACTIVE_HIGH
Rising edge.
Definition spectracq3.h:102
@ ACTIVE_LOW
Falling edge.
Definition spectracq3.h:100
void force_trigger() noexcept(false)
Software Trigger, treated the same as Hardware Trigger (IN).
std::string get_serial_number() noexcept(false)
Get the serial number of the device.
std::string get_fpga_version() noexcept(false)
Get the FPGA version of the device.
Definition device_manager.h:7