Scope
scope::XYControl Class Reference

#include <XYControl.h>

Public Member Functions

 ~XYControl ()
 
virtual void Initialize (parameters::XYControl &_params)
 
virtual void StartPolling ()
 
virtual void StopPolling ()
 
virtual void UpdatePositionValues ()
 
virtual void SetZero ()
 
virtual void ZeroXAxis ()
 
virtual void ZeroYAxis ()
 
virtual void MoveRelative (const double &xrel, const double &yrel)
 
virtual void MoveAbsolute (const double &xabs, const double &yabs)
 

Protected Member Functions

 XYControl (XYControl &)
 
XYControl operator= (XYControl)
 

Protected Attributes

bool initialized
 
StopCondition stop
 
std::future< bool > fut
 
ScopeController scope_controller
 
std::array< ScopeNumber< double > *, 2 > pos
 
uint32_t pollinterval
 

Detailed Description

Base class to control an xy-stage.

Definition at line 14 of file XYControl.h.

Constructor & Destructor Documentation

scope::XYControl::XYControl ( XYControl )
protected

disable copy

scope::XYControl::~XYControl ( )

If pollthread was started, request stop and wait for finish.

Definition at line 13 of file XYControl.cpp.

Member Function Documentation

XYControl scope::XYControl::operator= ( XYControl  )
protected

disable assignment

void scope::XYControl::Initialize ( parameters::XYControl _params)
virtual

Initialize hardware.

Get the ScopeNumbers by reference so we can automatically update GUI by writing to xpos and ypos. Call StartPolling to start the polling thread, since StartPolling is virtual we always call the most derived version of it (which should be overwritten to start the derived RunPolling). If pollinterval is zero we do not start the polling thread.

Definition at line 17 of file XYControl.cpp.

void scope::XYControl::StartPolling ( )
virtual

Start the worker function in the pollthread.

Definition at line 29 of file XYControl.cpp.

void scope::XYControl::StopPolling ( )
virtual

Stop the worker function.

Definition at line 42 of file XYControl.cpp.

void scope::XYControl::UpdatePositionValues ( )
virtual

Updates xpos and ypos with the current device position.

Here only a dummy to check if polling works!

Definition at line 48 of file XYControl.cpp.

virtual void scope::XYControl::SetZero ( )
inlinevirtual

Sets current position as zero.

Definition at line 64 of file XYControl.h.

virtual void scope::XYControl::ZeroXAxis ( )
inlinevirtual

Sets current X position as zero.

Definition at line 67 of file XYControl.h.

virtual void scope::XYControl::ZeroYAxis ( )
inlinevirtual

Sets current Y position as zero.

Definition at line 70 of file XYControl.h.

virtual void scope::XYControl::MoveRelative ( const double &  xrel,
const double &  yrel 
)
inlinevirtual

Relative movement.

Definition at line 73 of file XYControl.h.

virtual void scope::XYControl::MoveAbsolute ( const double &  xabs,
const double &  yabs 
)
inlinevirtual

Absolute movement.

Definition at line 76 of file XYControl.h.

Member Data Documentation

bool scope::XYControl::initialized
protected

true if initialized called successfully

Definition at line 18 of file XYControl.h.

StopCondition scope::XYControl::stop
protected

to signal the async polling thread to stop

Definition at line 21 of file XYControl.h.

std::future<bool> scope::XYControl::fut
protected

future for the async polling thread

Definition at line 24 of file XYControl.h.

ScopeController scope::XYControl::scope_controller
protected

our ScopeController here

Definition at line 27 of file XYControl.h.

std::array<ScopeNumber<double>*, 2> scope::XYControl::pos
protected

pointers to a ScopeNumber that is updated with the polled x and y positions

Definition at line 30 of file XYControl.h.

uint32_t scope::XYControl::pollinterval
protected

interval (in milliseconds) to poll device

Definition at line 33 of file XYControl.h.


The documentation for this class was generated from the following files: