3 #include "controllers/ScopeController.h"
24 std::future<bool>
fut;
30 std::array<ScopeNumber<double>*, 2>
pos;
73 virtual void MoveRelative(
const double& xrel,
const double& yrel) {}
76 virtual void MoveAbsolute(
const double& xabs,
const double& yabs) {}
Main controller of microscope hardware and acquisition, also interface to the GUI.
virtual void ZeroXAxis()
Sets current X position as zero.
virtual void ZeroYAxis()
Sets current Y position as zero.
virtual void Initialize(parameters::XYControl &_params)
Initialize hardware.
Thread-safe lock-free bool to signal a requested stop to the worker function currently executed in th...
bool initialized
true if initialized called successfully
Parameters for a general xy stage.
virtual void StartPolling()
Start the worker function in the pollthread.
virtual void MoveAbsolute(const double &xabs, const double &yabs)
Absolute movement.
virtual void StopPolling()
Stop the worker function.
uint32_t pollinterval
interval (in milliseconds) to poll device
std::future< bool > fut
future for the async polling thread
std::array< ScopeNumber< double > *, 2 > pos
pointers to a ScopeNumber that is updated with the polled x and y positions
XYControl operator=(XYControl)
disable assignment
virtual void SetZero()
Sets current position as zero.
StopCondition stop
to signal the async polling thread to stop
~XYControl()
If pollthread was started, request stop and wait for finish.
A templated class for a thread-safe numeric value, with signals that are called on value changes...
virtual void MoveRelative(const double &xrel, const double &yrel)
Relative movement.
Base class to control an xy-stage.
ScopeController scope_controller
our ScopeController here
virtual void UpdatePositionValues()
Updates xpos and ypos with the current device position.