3 #include "parameters/Devices.h"
4 #include "controllers/ScopeLogger.h"
10 , pollinterval(1000) {
32 fut = std::async([
this]() {
35 std::this_thread::sleep_for(std::chrono::milliseconds(
pollinterval));
virtual void Initialize(parameters::XYControl &_params)
Initialize hardware.
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 StopPolling()
Stop the worker function.
This is the include file for standard system include files, or project specific include files that ar...
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
StopCondition stop
to signal the async polling thread to stop
~XYControl()
If pollthread was started, request stop and wait for finish.
ScopeNumber< double > xpos
x position of xy device
ScopeNumber< double > pollinterval
interval in milliseconds to poll device, be careful: long intervals slow quitting of Scope (since to ...
void Set(const bool &_a=true)
ScopeNumber< double > ypos
y position of xy device
virtual void UpdatePositionValues()
Updates xpos and ypos with the current device position.