HORIBA C++ SDK
Library for HORIBA devices
Loading...
Searching...
No Matches
spectracq3.h
Go to the documentation of this file.
1#ifndef SPECTRAC3_H
2#define SPECTRAC3_H
3
6
7#include <chrono>
8#include <memory>
9#include <nlohmann/json.hpp>
10#include <string>
11#include <vector>
12
14
19 public:
21 std::chrono::seconds time_step,
22 std::chrono::seconds integration_time,
24 : _scan_count(scan_count),
25 _time_step(time_step),
26 _integration_time(integration_time),
27 _external_param(external_param) {}
28
34 [[nodiscard]] int scan_count() const { return _scan_count; }
35
43 [[nodiscard]] std::chrono::seconds time_step() const { return _time_step; }
44
50 [[nodiscard]] std::chrono::seconds integration_time() const {
51 return _integration_time;
52 }
53
59 [[nodiscard]] int external_param() const { return _external_param; }
60
61 private:
62 int _scan_count;
63 std::chrono::seconds _time_step;
64 std::chrono::seconds _integration_time;
65 int _external_param;
66};
67
75class SpectrAcq3 final : public Device {
76 public:
85
94
98 enum class TriggerInPolarity : int {
103 };
104
105 SpectrAcq3(int id, std::shared_ptr<communication::Communicator> communicator);
106 ~SpectrAcq3() override = default;
107
113 void open() noexcept(false) override;
114
120 void close() noexcept(false) override;
121
129 bool is_open() noexcept(false);
130
137 bool is_busy() noexcept(false);
138
144 std::string get_firmware_version() noexcept(false);
145
151 std::string get_fpga_version() noexcept(false);
152
158 std::string get_board_revision() noexcept(false);
159
165 std::string get_serial_number() noexcept(false);
166
176 void set_hv_bias_voltage(int bias_voltage) noexcept(false);
177
184 int get_hv_bias_voltage() noexcept(false);
185
191 int get_max_hv_voltage_allowed() noexcept(false);
192
208 void set_acquisition_set(int scan_count, int time_step, int integration_time,
209 int external_param) noexcept(false);
210
217
232 void acquisition_start(SpectrAcq3::TriggerMode trigger) noexcept(false);
233
238 void acquisition_stop() noexcept(false);
239
247 void acquisition_pause() noexcept(false);
248
253 void acquisition_continue() noexcept(false);
254
260 bool is_data_available() noexcept(false);
261
271 nlohmann::json get_acquisition_data() noexcept(false);
272
278 void force_trigger() noexcept(false);
279
287 false);
288
297 get_in_trigger_mode() noexcept(false);
298
305 false);
306
313
314 std::string get_last_error() noexcept(false);
315 std::string get_error_log() noexcept(false);
316 void clear_error_log() noexcept(false);
317};
318} // namespace horiba::devices::single_devices
319#endif /* ifndef SPECTRAC3_H */
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)
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
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.
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
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