HORIBA C++ SDK
Library for HORIBA devices
|
Represents a Monochromator. More...
#include <mono.h>
Public Types | |
enum class | Shutter : int { FIRST , SECOND } |
Shutters installed in the monochromator. Depending on the model, not all shutters may be available. More... | |
enum class | ShutterPosition : int { CLOSED , OPENED } |
Position of the shutter. More... | |
enum class | Grating : int { FIRST , SECOND , THIRD } |
Gratings installed in the monochromator. Depending on the model, not all gratings may be available. More... | |
enum class | FilterWheel : int { FIRST , SECOND } |
Filter wheels installed in the monochromator. Depending on the model, not all filter wheels may be available. More... | |
enum class | FilterWheelPosition : int { RED , GREEN , BLUE , YELLOW } |
Positions of the filter wheel installed in the monochromator. Depending on the model, not all positions may be available. More... | |
enum class | Mirror : int { ENTRANCE , EXIT } |
Mirrors installed in the monochromator. Depending on the model, not all mirrors may be available. More... | |
enum class | MirrorPosition : int { AXIAL , LATERAL } |
Possible positions of the mirrors. More... | |
enum class | Slit : int { A , B , C , D } |
Slits available on the monochromator. Depending on the model, not all slits may be available. More... | |
Public Member Functions | |
Monochromator (int id, std::shared_ptr< communication::Communicator > communicator) | |
~Monochromator () 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 monochromator is open. | |
bool | is_busy () noexcept(false) |
Checks if the monochromator is busy. | |
void | home (bool force_homing=false) noexcept(false) |
Starts the monochromator initialization process called "homing". | |
bool | initialized () noexcept(false) |
Checks if the monochromator is initialized. | |
nlohmann::json | configuration () noexcept(false) |
Returns the configuration of the monochromator. | |
double | get_current_wavelength () noexcept(false) |
Current wavelength of the monochromator's position in nm. | |
void | calibrate_wavelength (double wavelength) noexcept(false) |
This command sets the wavelength value of the current grating position of the monochromator. | |
void | move_to_target_wavelength (double wavelength) noexcept(false) |
Orders the monochromator to move to the requested wavelength. | |
Grating | get_turret_grating () noexcept(false) |
Current grating of the turret. | |
void | set_turret_grating (Grating grating) noexcept(false) |
Select turret grating. | |
FilterWheelPosition | get_filter_wheel_position (FilterWheel filter_wheel) noexcept(false) |
Current position of the filter wheel. | |
void | set_filter_wheel_position (FilterWheel filter_wheel, FilterWheelPosition position) noexcept(false) |
Sets the current position of the filter wheel. | |
MirrorPosition | get_mirror_position (Mirror mirror) noexcept(false) |
Position of the selected mirror. | |
void | set_mirror_position (Mirror mirror, MirrorPosition position) noexcept(false) |
Sets the position of the selected mirror. | |
double | get_slit_position_in_mm (Slit slit) noexcept(false) |
Returns the position in millimeters[mm] of the selected slit. | |
void | set_slit_position (Slit slit, double position_in_mm) noexcept(false) |
Sets the position of the selected slit. | |
int | get_slit_step_position (Slit slit) noexcept(false) |
Returns the step position of the selected slit. | |
void | set_slit_step_position (Slit slit, int step_position) noexcept(false) |
Sets the step position of the selected slit. | |
void | open_shutter () noexcept(false) |
Opens the shutter. | |
void | close_shutter () noexcept(false) |
Closes the shutter. | |
ShutterPosition | get_shutter_position (Shutter shutter) noexcept(false) |
Returns the shutter position. | |
void | wait_until_ready (std::chrono::seconds timeout) noexcept(false) |
Blocking waits until the monochromator is ready. | |
![]() | |
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 Monochromator.
This class should not be created directly by the end user. Instead a DeviceManager should be used to access the detected Monochromators on the system.
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
horiba::devices::single_devices::Monochromator::Monochromator | ( | int | id, |
std::shared_ptr< communication::Communicator > | communicator ) |
|
overridedefault |
void horiba::devices::single_devices::Monochromator::calibrate_wavelength | ( | double | wavelength | ) |
This command sets the wavelength value of the current grating position of the monochromator.
Warning! This could potentially un-calibrate the monochromator and report an incorrect wavelength compared to the actual output wavelength.
wavelength | Wavelength in nm |
std::runtime_error | when an error occurred on the device side |
|
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::Monochromator::close_shutter | ( | ) |
Closes the shutter.
std::runtime_error | when an error occurred on the device side |
nlohmann::json horiba::devices::single_devices::Monochromator::configuration | ( | ) |
Returns the configuration of the monochromator.
std::runtime_error | when an error occurred on the device side |
double horiba::devices::single_devices::Monochromator::get_current_wavelength | ( | ) |
Current wavelength of the monochromator's position in nm.
std::runtime_error | when an error occurred on the device side |
FilterWheelPosition horiba::devices::single_devices::Monochromator::get_filter_wheel_position | ( | FilterWheel | filter_wheel | ) |
Current position of the filter wheel.
filter_wheel | Desired filter wheel to get the position from |
std::runtime_error | when an error occurred on the device side |
MirrorPosition horiba::devices::single_devices::Monochromator::get_mirror_position | ( | Mirror | mirror | ) |
Position of the selected mirror.
mirror | Desired mirror to get the position from. See Monochromator::Mirror for possible values. |
std::runtime_error | when an error occurred on the device side |
ShutterPosition horiba::devices::single_devices::Monochromator::get_shutter_position | ( | Shutter | shutter | ) |
Returns the shutter position.
shutter | Desired shutter to get the position from. See Monochromator::Shutter. |
std::runtime_error | when an error occurred on the device side |
double horiba::devices::single_devices::Monochromator::get_slit_position_in_mm | ( | Slit | slit | ) |
Returns the position in millimeters[mm] of the selected slit.
slit | Desired slit to get the position from. See Monochromator::Slit for possible values |
std::runtime_error | when an error occurred on the device side |
int horiba::devices::single_devices::Monochromator::get_slit_step_position | ( | Slit | slit | ) |
Returns the step position of the selected slit.
slit | Desired slit to get the position from. |
std::runtime_error | when an error occurred on the device side |
Grating horiba::devices::single_devices::Monochromator::get_turret_grating | ( | ) |
Current grating of the turret.
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::home | ( | bool | force_homing = false | ) |
Starts the monochromator initialization process called "homing".
Use is_busy() to know if the operation is still taking place.
force_homing | Force starts the initialization process. |
std::runtime_error | when an error occurred on the device side |
bool horiba::devices::single_devices::Monochromator::initialized | ( | ) |
Checks if the monochromator is initialized.
Note: This command may also return false when the mono is busy with another command.
std::runtime_error | when an error occurred on the device side |
bool horiba::devices::single_devices::Monochromator::is_busy | ( | ) |
Checks if the monochromator is busy.
std::runtime_error | when an error occurred on the device side |
bool horiba::devices::single_devices::Monochromator::is_open | ( | ) |
Checks if the connection to the monochromator is open.
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::move_to_target_wavelength | ( | double | wavelength | ) |
Orders the monochromator to move to the requested wavelength.
Use is_busy() to know if the operation is still taking place.
wavelength | Wavelength in nm |
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::Monochromator::open_shutter | ( | ) |
Opens the shutter.
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::set_filter_wheel_position | ( | FilterWheel | filter_wheel, |
FilterWheelPosition | position ) |
Sets the current position of the filter wheel.
filter_wheel | Desired filter wheel to set the position |
position | New position of the filter wheel. See Monochromator::FilterWheelPosition enum for possible values. |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::set_mirror_position | ( | Mirror | mirror, |
MirrorPosition | position ) |
Sets the position of the selected mirror.
mirror | Desired mirror to set the position. See Monochromator::Mirror |
position | Position to set. See Monochromator::MirrorPosition |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::set_slit_position | ( | Slit | slit, |
double | position_in_mm ) |
Sets the position of the selected slit.
slit | Desired slit to set the position. See Monochromator::Slit for possible values. position Position to set in millimeters[mm]. |
position_in_mm | Position in mm |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::set_slit_step_position | ( | Slit | slit, |
int | step_position ) |
Sets the step position of the selected slit.
slit | Desired slit to set the step position. See Monochromator::Slit for possible values. |
step_position | The step position. |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::set_turret_grating | ( | Grating | grating | ) |
Select turret grating.
grating | New grating of the turret. See Monochromator::Grating enum for possible values. |
std::runtime_error | when an error occurred on the device side |
void horiba::devices::single_devices::Monochromator::wait_until_ready | ( | std::chrono::seconds | timeout | ) |
Blocking waits until the monochromator is ready.
timeout | Maximum time, in seconds [s], to wait for the monochromator to be ready. |
std::runtime_error | when the timeout is reached |