7#include <nlohmann/json.hpp>
23 std::shared_ptr<communication::Communicator> communicator);
77 void open() noexcept(false) override;
84 void close() noexcept(false) override;
113 void home(
bool force_homing = false) noexcept(false);
Device(int id, std::shared_ptr< communication::Communicator > communicator)
void set_mirror_position(Mirror mirror, MirrorPosition position) noexcept(false)
Sets the position of the selected mirror.
Mirror
Mirrors installed in the monochromator. Depending on the model, not all mirrors may be available.
Definition mono.h:59
@ ENTRANCE
Definition mono.h:59
@ EXIT
Definition mono.h:59
Monochromator(int id, std::shared_ptr< communication::Communicator > communicator)
Slit
Slits available on the monochromator. Depending on the model, not all slits may be available.
Definition mono.h:70
void set_slit_step_position(Slit slit, int step_position) noexcept(false)
Sets the step position of the selected slit.
Grating
Gratings installed in the monochromator. Depending on the model, not all gratings may be available.
Definition mono.h:41
@ THIRD
Definition mono.h:41
void calibrate_wavelength(double wavelength) noexcept(false)
This command sets the wavelength value of the current grating position of the monochromator.
ShutterPosition
Position of the shutter.
Definition mono.h:35
@ CLOSED
Definition mono.h:35
@ OPENED
Definition mono.h:35
void wait_until_ready(std::chrono::seconds timeout) noexcept(false)
Blocking waits until the monochromator is ready.
FilterWheelPosition get_filter_wheel_position(FilterWheel filter_wheel) noexcept(false)
Current position of the filter wheel.
MirrorPosition get_mirror_position(Mirror mirror) noexcept(false)
Position of the selected mirror.
FilterWheelPosition
Positions of the filter wheel installed in the monochromator. Depending on the model,...
Definition mono.h:53
@ BLUE
Definition mono.h:53
@ YELLOW
Definition mono.h:53
@ GREEN
Definition mono.h:53
@ RED
Definition mono.h:53
void home(bool force_homing=false) noexcept(false)
Starts the monochromator initialization process called "homing".
int get_slit_step_position(Slit slit) noexcept(false)
Returns the step position of the selected slit.
void close() noexcept(false) override
Closes the device.
void set_filter_wheel_position(FilterWheel filter_wheel, FilterWheelPosition position) noexcept(false)
Sets the current position of the filter wheel.
bool is_open() noexcept(false)
Checks if the connection to the monochromator is open.
void open_shutter() noexcept(false)
Opens the shutter.
void set_slit_position(Slit slit, double position_in_mm) noexcept(false)
Sets the position of the selected slit.
void move_to_target_wavelength(double wavelength) noexcept(false)
Orders the monochromator to move to the requested wavelength.
MirrorPosition
Possible positions of the mirrors.
Definition mono.h:64
@ AXIAL
Definition mono.h:64
@ LATERAL
Definition mono.h:64
FilterWheel
Filter wheels installed in the monochromator. Depending on the model, not all filter wheels may be av...
Definition mono.h:47
void close_shutter() noexcept(false)
Closes the shutter.
~Monochromator() override=default
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.
bool is_busy() noexcept(false)
Checks if the monochromator is busy.
double get_slit_position_in_mm(Slit slit) noexcept(false)
Returns the position in millimeters[mm] of the selected slit.
Grating get_turret_grating() noexcept(false)
Current grating of the turret.
Shutter
Shutters installed in the monochromator. Depending on the model, not all shutters may be available.
Definition mono.h:30
@ SECOND
Definition mono.h:30
@ FIRST
Definition mono.h:30
void set_turret_grating(Grating grating) noexcept(false)
Select turret grating.
bool initialized() noexcept(false)
Checks if the monochromator is initialized.
ShutterPosition get_shutter_position(Shutter shutter) noexcept(false)
Returns the shutter position.
void open() noexcept(false) override
Opens the device.
Definition device_manager.h:7